Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAP_PROP_WHITE_BALANCE_BLUE_U #13130

Closed
gheogoijfdgfjlkfd opened this issue Nov 12, 2018 · 3 comments
Closed

CAP_PROP_WHITE_BALANCE_BLUE_U #13130

gheogoijfdgfjlkfd opened this issue Nov 12, 2018 · 3 comments

Comments

@gheogoijfdgfjlkfd
Copy link

CAP_PROP_WHITE_BALANCE_BLUE_U

is still unsupported. can this PLEASE be supported?

and also a way to disable AUTO CAP_PROP_WHITE_BALANCE_BLUE_U

now i manually use every time i start the computer:

myVideoCapture.set(CV_CAP_PROP_SETTINGS, 1)

but i need a way to do it programmatically.

thanks!

@JordanWa
Copy link

JordanWa commented Oct 10, 2019

Is there any documentation that explains why CV_CAP_PROP_WHITE_BALANCE_BLUE_U is not supported?

I've been playing with this and surprisingly I can read this setting with cv::VideoCapture.get(), but I'm still unable to set it (using the DShow backend). In noticing this odd behavior I decided to take a peek at code for the opencv DShow backend and found that the setting is implemented both in the get and set methods.

I'll probably keep playing with this, but it seems like there is either a disconnect between opencv and DShow (IAMVideoProcAmp, really) here or there is a deeper issue that may or may not be machine specific.


EDIT:
I wrote some code to interface with DShow directly. Using the IAMVideoProcAmp filter I don't have any issues manipulating white balance. I've spent some more time in the opencv DShow backend code and after learning more about how the IAMVideoProcAmp filter works, I think I see some room for improvement. I'll attempt to throw something together, but my lack of general opencv architecture knowledge might be an impediment... we'll see how far I get.

@gheogoijfdgfjlkfd
Copy link
Author

Thanks JordanWa! Yes eventually i also used DShow and it works, but it took a lot of struggling to find out how. Hope OpenCV fixes this.

@TIS-Stefan
Copy link

TIS-Stefan commented Sep 21, 2021

It seems, that in cap_dshow.cpp in line 1949
hr = pIAMCameraControl->Set(Property, lValue, Flags);
Flags is always 0, which does not seem to be a valid value. Drivers validate this valued will return an error in hr.

The function using that is defined as

bool setVideoSettingFilter(int deviceID, long Property, long lValue, long Flags = 0, bool useDefaultValue = false);
Where flags is 0 by default. Setting that to 2 could do the job, but does not sound for a real good idea. Anyway, these functions are marked as experimental for now.
(For testing we disabled the validation of Flags in our driver and thus are able to set white balance successfully.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants