Skip to content

fix default cap_prop_orientation_auto behaviour#26800

Merged
asmorkalov merged 8 commits intoopencv:4.xfrom
shyama7004:fix-cap-orientation-auto-default
Jan 22, 2025
Merged

fix default cap_prop_orientation_auto behaviour#26800
asmorkalov merged 8 commits intoopencv:4.xfrom
shyama7004:fix-cap-orientation-auto-default

Conversation

@shyama7004
Copy link
Copy Markdown
Contributor

@shyama7004 shyama7004 commented Jan 19, 2025

Fixes : #26795

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 self-assigned this Jan 20, 2025
@shyama7004 shyama7004 requested a review from mshabunin January 20, 2025 20:54
@asmorkalov asmorkalov force-pushed the fix-cap-orientation-auto-default branch from ae0ed76 to e623093 Compare January 21, 2025 09:05
Copy link
Copy Markdown
Contributor

@mshabunin mshabunin left a comment

Choose a reason for hiding this comment

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

There are some issues on Windows machine:

[ RUN      ] videoio/VideoCaptureAPITests.mp4_orientation_default_auto/0, where GetParam() = FFMPEG
C:\build\precommit_windows64\4.x\opencv\modules\videoio\test\test_orientation.cpp(53): error: Value of: cap.get(CAP_PROP_ORIENTATION_AUTO)
  Actual: false
Expected: true
C:\build\precommit_windows64\4.x\opencv\modules\videoio\test\test_orientation.cpp(33): error: Expected equality of these values:
  width
    Which is: 270
  (int)cap.get(CAP_PROP_FRAME_WIDTH)
    Which is: 480
C:\build\precommit_windows64\4.x\opencv\modules\videoio\test\test_orientation.cpp(34): error: Expected equality of these values:
  height
    Which is: 480
  (int)cap.get(CAP_PROP_FRAME_HEIGHT)
    Which is: 270
before read frame!
after read frame!
C:\build\precommit_windows64\4.x\opencv\modules\videoio\test\test_orientation.cpp(41): error: Expected equality of these values:
  width
    Which is: 270
  frame.cols
    Which is: 480
Check done!
[  FAILED  ] videoio/VideoCaptureAPITests.mp4_orientation_default_auto/0, where GetParam() = FFMPEG (12 ms)
...
[ RUN      ] videoio/VideoCaptureAPITests.mp4_orientation_switch/0, where GetParam() = FFMPEG
C:\build\precommit_windows64\4.x\opencv\modules\videoio\test\test_orientation.cpp(33): error: Expected equality of these values:
  width
    Which is: 270
  (int)cap.get(CAP_PROP_FRAME_WIDTH)
    Which is: 480
C:\build\precommit_windows64\4.x\opencv\modules\videoio\test\test_orientation.cpp(34): error: Expected equality of these values:
  height
    Which is: 480
  (int)cap.get(CAP_PROP_FRAME_HEIGHT)
    Which is: 270
before read frame!
after read frame!
C:\build\precommit_windows64\4.x\opencv\modules\videoio\test\test_orientation.cpp(41): error: Expected equality of these values:
  width
    Which is: 270
  frame.cols
    Which is: 480
before read frame!
after read frame!
[  FAILED  ] videoio/VideoCaptureAPITests.mp4_orientation_switch/0, where GetParam() = FFMPEG (16 ms)

https://pullrequest.opencv.org/buildbot/builders/precommit_windows64/builds/108339/steps/test_videoio/logs/stdio

@asmorkalov
Copy link
Copy Markdown
Contributor

Requires CI fix first: opencv/ci-gha-workflow#213

@asmorkalov asmorkalov merged commit f6aa472 into opencv:4.x Jan 22, 2025
@shyama7004 shyama7004 deleted the fix-cap-orientation-auto-default branch January 22, 2025 11:15
@asmorkalov asmorkalov mentioned this pull request Feb 19, 2025
NanQin555 pushed a commit to NanQin555/opencv that referenced this pull request Feb 24, 2025
…uto-default

Fixed default cap_prop_orientation_auto behaviour opencv#26800

Fixes : opencv#26795

### Pull Request Readiness Checklist

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

- [x] I agree to contribute to the project under Apache 2 License.
- [x] 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
- [x] The PR is proposed to the proper branch
- [x] 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
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.

VideoCapture auto-rotation disabled in 4.11 (enabled by default <= 4.10)

3 participants