-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
OpenCV Class VideoCapture doesn't support get/set Videoio.CAP_PROP_AUTO_WB in Windows 10 but Linux (Ubuntu) #19621
Copy link
Copy link
Closed
Labels
category: videoio(camera)duplicatequestion (invalid tracker)ask questions and other "no action" items here: https://forum.opencv.orgask questions and other "no action" items here: https://forum.opencv.org
Description
System information (version)
- OpenCV => 4.5.1 release version
- Operating System / Platform => Windows10 64 Bit
- installed through exe; I didn't compiled
-->
Detailed description
Steps to reproduce
// java code example
VideoCapture capture = new VideoCapture();
capture.open(0);
if (this.capture.isOpened())
{
System.out.println("get backend name: " + capture.getBackendName());
System.out.println("Camera Auto White Balance = " + capture.get(Videoio.CAP_PROP_AUTO_WB));
boolean b = capture.set(Videoio.CAP_PROP_AUTO_WB, 1);
if (b)
System.out.println("Successfully turn Auto White Balance ON");
else
System.out.println("Failed to turn Auto White Balance ON");
System.out.println("Camera Auto White Balance = " + capture.get(Videoio.CAP_PROP_AUTO_WB));
b = capture.set(Videoio.CAP_PROP_AUTO_WB, 0);
if (b)
System.out.println("Successfully turn Auto White Balance OFF");
else
System.out.println("Failed to turn Auto White Balance OFF");
System.out.println("Camera Auto White Balance = " + capture.get(Videoio.CAP_PROP_AUTO_WB));
}
Issue submission checklist
Output of above java code would be as below:
get backend name: MSMF
Camera Auto White Balance = -1.0
Failed to turn Auto White Balance ON
Camera Auto White Balance = -1.0
Failed to turn Auto White Balance OFF
Camera Auto White Balance = -1.0
-
I posted the question at https://forum.opencv.org/t/class-videocapture-set-method-on-property-videoio-cap-auto-wb/1742/8
-
With suggestion, I checked code on below two files
opencv/cap_dshow.cpp at master · opencv/opencv · GitHub
opencv/cap_msmf.cpp at master · opencv/opencv · GitHub
And realized that neither cpp file implemented get/setProperty for CAP_PROP_AUTO_WB- OpenCV documentation: https://docs.opencv.org (https://docs.opencv.org/4.5.1/d4/d15/group__videoio__flags__base.html#ggaeb8dd9c89c10a5c63c139bf7c4f5704da762391cbaa101c4015e6a935aa0cfc95)-
Videoio only stated that CAP_PROP_WHITE_BALANCE_BLUE_U - Currently unsupported.
and stated that CAP_PROP_AUTO_WB - enable/ disable auto white-balance
- OpenCV documentation: https://docs.opencv.org (https://docs.opencv.org/4.5.1/d4/d15/group__videoio__flags__base.html#ggaeb8dd9c89c10a5c63c139bf7c4f5704da762391cbaa101c4015e6a935aa0cfc95)-
I searched below pages and didn't find much regarding to this issue.
- FAQ page: https://github.com/opencv/opencv/wiki/FAQ
- OpenCV forum: https://forum.opencv.org
- OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
- Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
[heavy_check_mark ] I report the issue, it's not a question
[ heavy_check_mark ] I checked the problem with documentation, FAQ, open issues,
forum.opencv.org, Stack Overflow, etc and have not found solution
[ heavy_check_mark ] I updated to latest OpenCV version and the issue is still there
[ heavy_check_mark ] There is reproducer code and related data files: videos, images, onnx, etc
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
category: videoio(camera)duplicatequestion (invalid tracker)ask questions and other "no action" items here: https://forum.opencv.orgask questions and other "no action" items here: https://forum.opencv.org