I may just be googling wrong, but I cannot find out a way (read function) to change properties of camera in the new Open CV. I need to disable auto exposure and auto gain of the camera.
Is that even possible?
相关问题
- Sorting 3 numbers without branching [closed]
- How to get the background from multiple images by
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
相关文章
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- What exactly do pointers store? (C++)
- Converting glm::lookat matrix to quaternion and ba
- What is the correct way to declare and use a FILE
so, there's your VideoCapture:
now you could try to set or get properties:
sometimes you can even acces the drivers config dialog this way:
those constants are in highgui_c.h, around l 333
This is an old question but I want to add a solution to this.
opencv calls underlying v4l methods to query frames, set/get camera properties etc. And the problem is, the calls are not complete. Also for some reason, the library calls v4l methods instead of v4l2 ones. Similar issue here. It is solved through modifying opencv code, it seems.
I also checked if opencv can set a property supported in v4l2 -like "manual exposure", "or exposure auto priority". It couldn't. I played around v4l2 to solve this:
You can then work with opencv.
Full list of camera controls are here.
You can use the OpenCV API to do this using VideoCapture::Set(). Here is an example of how to set the exposure manually in Python:
Here are the notes I have about the exposure time for each frame. Though I believe they are camera specific, they give you a good idea.
The same function has settings for GAIN and many other values, though I have not tried them.
A bit more discussion at
Setting Manual Exposure in OpenCV