Ask Your Question

OpenCV with point and shoot/DSLR

asked 2017-12-05 13:51:05 -0500

Noahyt gravatar image

I want to purchase multiple cameras to use for computer vision application.

However, I want to have complete control over the following: - manual trigger - shutter speed - iso/gain

As such I was going to buy a scientific cameras such as the thorlabs cmos:

However, I suspect it may be possible to achieve similar results by buying a cheap consumer point and shoot or DSLR (which would be much cheaper).

I would like to know whether there are any proven examples of manual control of such cameras through opencv as most examples seem to be webcam-exclusive. Note: I don't want to just have a continuous video stream and "pull" frames using something like

Specifically, I would like to be able

edit retag flag offensive close merge delete


In my personal experience, if you want to access every setting of your camera through software, use the brand specific software API and then pass the retrieved frame to OpenCV for processing, bypassing the need of VideoCapture.

StevenPuttemans gravatar imageStevenPuttemans ( 2017-12-06 04:25:04 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-12-06 03:30:31 -0500

kbarni gravatar image

updated 2017-12-07 06:56:54 -0500

OpenCV has support for the libgphoto2 library. So you can control and capture images with cameras supported by this library using the cv::VideoCapture class.

For even more functionality and control, you can use directly the libgphoto2 library for capturing and convert the captured images to cv::Mat; it's quite easy. Here are some examples.

Here is the list of supported cameras:

Just make sure that you have libgphoto2 library installed and OpenCV is built with libgphoto support.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-12-05 13:51:05 -0500

Seen: 208 times

Last updated: Dec 07 '17