What camera to try?

I have a computer (an old Phenom II desktop) sending pick and place co-ordinates to a robot. I am working on generating the co-ordinates with OpenCV / Python. Have USB2.

What camera can I use? I would like to be able to control the timing of the image from the computer. 1080p would probably be fine.

Can I just buy cheap webcam (like a Logitech Brio 101) or something low cost and common and use it in such a way?

Thanks,
JP.

something like that should be OK.

however, don’t expect too much processing power out of a “Phenom II” these days.

The Phenom is definitely not up to speed with a threadripper, but she has been getting the job done for me for 15(+?) years.

The biggest disappointment lately has been loading Debian 12. It crashes a lot more than older versions.

I have a couple of RPi’s with old Raspian that are over 3 years uptime (one would be 6 years but an UPS failed), much more stable than new stuff (on an isolated LAN with only very occasional WWW exposure).

Anyway, how do I tell a camera, from Opencv, or from Python to take an image now?

I apologize for these rudimentary Q’s but I’m an old fashioned just do what it takes to make it work controls guy.

Thanks again,
JP.

depends.

if that is allowed to take a few seconds, open the VideoCapture, read a frame, close it again.

if that is not allowed to take a few seconds, then you’ll have to work with threads.

tutorial from the official docs: OpenCV: Getting Started with Videos

older recipe of mine for thread stuff: freshest_camera_frame.py · GitHub

I’d recommend using Python for all of this. C++ is just pain. Python will not take performance from you. All the library calls go to compiled code.