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

Support VideoCapture CAP_PROP_AUTO_WB and CV_CAP_PROP_WHITE_BALANCE_BLUE_U for DShow #23300

Conversation

ippei-i
Copy link
Contributor

@ippei-i ippei-i commented Feb 24, 2023

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

Before apply this pull request console output.

before AWB setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: -1

after AWB disable setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: -1

after AWB enable setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: -1

after Manual WB(and Disable AWB) setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: -1

After apply this pull request console output.

before AWB setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: 0

after AWB disable setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 4000
CAP_PROP_AUTO_WB: 0

after AWB enable setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 4000
CAP_PROP_AUTO_WB: 1

after Manual WB(and Disable AWB) setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: 0

Test Code

OpenCvVideoCapTest.zip

…ITE_BALANCE_BLUE_U in Windows 10 CAP_DSHOW.

cap.set(CAP_PROP_AUTO_WB, 0.0);
cap.set(CAP_PROP_AUTO_WB, 1.0);
cap.set(CAP_PROP_WHITE_BALANCE_BLUE_U, 2000);
@ippei-i
Copy link
Contributor Author

ippei-i commented Feb 24, 2023

After this request, I plan to address the inability to set and get autoexposure in CAP_DSHOW.

@asmorkalov asmorkalov changed the title Add Support VideoCapture get/set CAP_PROP_AUTO_WB and set CAP_PROP_WH… Support VideoCapture CAP_PROP_AUTO_WB and CV_CAP_PROP_WHITE_BALANCE_BLUE_U for DSHOW Feb 27, 2023
@asmorkalov asmorkalov changed the title Support VideoCapture CAP_PROP_AUTO_WB and CV_CAP_PROP_WHITE_BALANCE_BLUE_U for DSHOW Support VideoCapture CAP_PROP_AUTO_WB and CV_CAP_PROP_WHITE_BALANCE_BLUE_U for DShow Feb 27, 2023
@vovka643
Copy link
Contributor

vovka643 commented Mar 1, 2023

Tested on
System: windows 8.1, 64-bit
IDE: Visual Studio 2017.
OpenCV: 4.x

Everything work as described above.

…::VideoCaptureProperties::CAP_PROP_AUTO_WB".
@ippei-i
Copy link
Contributor Author

ippei-i commented Mar 13, 2023

I have corrected the points you pointed out.
As I wrote in my previous comment, there are mix of legacy enums and new enums.
If necessary,
I check the legacy value and change it to the new enum.

Copy link
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Well done!

@asmorkalov asmorkalov self-assigned this Mar 21, 2023
@asmorkalov asmorkalov added this to the 4.8.0 milestone Mar 21, 2023
@asmorkalov asmorkalov merged commit a60408c into opencv:4.x Mar 21, 2023
@ippei-i ippei-i deleted the CAP_PROP_AUTO_WB-and-CAP_PROP_WHITE_BALANCE_BLUE_U_support_in_CAP_DSHOW branch March 24, 2023 03:35
hanliutong pushed a commit to hanliutong/opencv that referenced this pull request Mar 27, 2023
…_PROP_WHITE_BALANCE_BLUE_U_support_in_CAP_DSHOW

Support VideoCapture CAP_PROP_AUTO_WB and CV_CAP_PROP_WHITE_BALANCE_BLUE_U for DShow

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [OK] I agree to contribute to the project under Apache 2 License.
- [OK] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [OK] The PR is proposed to the proper branch
- [OK] There is a reference to the original bug report and related work
opencv#19621
opencv#21408

### Before apply this pull request console output.

before AWB setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: -1

after AWB disable setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: -1

after AWB enable setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: -1

after Manual WB(and Disable AWB) setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: -1

### After apply this pull request console output.

before AWB setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: 0

after AWB disable setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 4000
CAP_PROP_AUTO_WB: 0

after AWB enable setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 4000
CAP_PROP_AUTO_WB: 1

after Manual WB(and Disable AWB) setting
CAP_PROP_WHITE_BALANCE_BLUE_U: 2000
CAP_PROP_AUTO_WB: 0

### Test Code
[OpenCvVideoCapTest.zip](https://github.com/opencv/opencv/files/10825399/OpenCvVideoCapTest.zip)
@asmorkalov asmorkalov mentioned this pull request May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants