Skip to content

Reworked camera stream check to exclude non-video formats#24778

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
asmorkalov:as/win_msmf_stream_type_check
Dec 27, 2023
Merged

Reworked camera stream check to exclude non-video formats#24778
asmorkalov merged 1 commit intoopencv:4.xfrom
asmorkalov:as/win_msmf_stream_type_check

Conversation

@asmorkalov
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov commented Dec 27, 2023

Fixes #24487
Previous trial: #22347
Documentation: https://learn.microsoft.com/en-us/windows/win32/medfound/video-subtype-guids#luminance-and-depth-formats

Pull Request Readiness Checklist

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

  • I agree to contribute to the project under Apache 2 License.
  • 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
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov asmorkalov added this to the 4.9.0 milestone Dec 27, 2023
@asmorkalov asmorkalov force-pushed the as/win_msmf_stream_type_check branch 5 times, most recently from d864735 to bf5f0bf Compare December 27, 2023 13:52
Copy link
Copy Markdown
Contributor

@opencv-alalek opencv-alalek left a comment

Choose a reason for hiding this comment

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

LGTM 👍

In future we should try to work with CAP_PROP_VIDEO_STREAM to properly select video/depth streams

@asmorkalov asmorkalov force-pushed the as/win_msmf_stream_type_check branch from bf5f0bf to e5b5984 Compare December 27, 2023 14:52
@asmorkalov asmorkalov merged commit afe7c8b into opencv:4.x Dec 27, 2023
@asmorkalov asmorkalov mentioned this pull request Jan 19, 2024
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.

Frame size of my USB camera cannot be set to desired width and height with 4.7.0.68 or later

2 participants