Skip to content

Fix rectangle rounding in cvGetOptimalNewCameraMatrix.#24927

Open
vrabaud wants to merge 2 commits intoopencv:4.xfrom
vrabaud:cvGetOptimalNewCameraMatrix
Open

Fix rectangle rounding in cvGetOptimalNewCameraMatrix.#24927
vrabaud wants to merge 2 commits intoopencv:4.xfrom
vrabaud:cvGetOptimalNewCameraMatrix

Conversation

@vrabaud
Copy link
Copy Markdown
Contributor

@vrabaud vrabaud commented Jan 26, 2024

This fixes #24831

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

@vrabaud vrabaud force-pushed the cvGetOptimalNewCameraMatrix branch from 6a8f60a to e8d2dfd Compare January 26, 2024 12:54
@vrabaud vrabaud changed the title Fix rectangle rounding. Fix rectangle rounding in cvGetOptimalNewCameraMatrix. Jan 26, 2024
@asmorkalov asmorkalov added this to the 4.10.0 milestone Jan 26, 2024
@asmorkalov asmorkalov requested a review from vpisarev January 29, 2024 08:28
@vrabaud vrabaud force-pushed the cvGetOptimalNewCameraMatrix branch 2 times, most recently from 7a5dcf7 to e556ad8 Compare January 30, 2024 13:46
@Xuanrrr
Copy link
Copy Markdown

Xuanrrr commented Jul 8, 2025

sorry to interrupt, but in opencv 4.12.0, the output of w and h of roi is still 1 less than the image width and height.

@asmorkalov asmorkalov modified the milestones: 4.13.0, 4.14.0 Dec 26, 2025
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.

ROI returned by cvGetOptimalNewCameraMatrix has wrong width & height

3 participants