Ask Your Question

VideoCapture interface

asked 2017-12-17 13:55:08 -0500

ArkadiuszRaj gravatar image

updated 2017-12-17 14:15:38 -0500

There are on market USB3vision cameras that do not like frequent start / stop operation. Unfortunatelly the VideoCapture opens the feed immediatelly, than we can tune camera settings, which can be the size of the image, pixel format etc. For example, we have 6Mpx industrial camera but want use only 2 Mpx center, but in 16 and not 8(default) mode.

I wonder if there is Today posiibility to use OpenCV in following manner (pseducode):


Of course there is no start/stop interface exposed Today.

I am asking if this shall be considered as good idea to implement start method?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-12-18 04:49:23 -0500

kbarni gravatar image

OpenCV's VideoCapture class provides a simple interface for cameras, but it isn't meant to give you full control (just like the HighGui class is great for basic display, but not to create a complex user interface).

For full camera control - especially for industrial cameras, which provide lots of features - I strongly recommend to use the official SDK of the camera. It allows to set the pixel format, ROI, exposure, resolution, and hundreds of other parameters.

You can easily convert the captured buffer to cv::Mat for further processing.

edit flag offensive delete link more


That way having VideoCapture is questionable at all.

What if camera manufacturer does not provide API? For plenty of those, and to make life easier for dozens of developers I have added Aravis backend to OpenCV. Works nice with GIGE or USB3vision cameras.

But now I face problems that can not be solved in easy way. That is why I asked a question to improve VideoCapture class.

ArkadiuszRaj gravatar imageArkadiuszRaj ( 2017-12-18 05:23:56 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-12-17 13:55:08 -0500

Seen: 203 times

Last updated: Dec 18 '17