Skip to content

Handle degenerate cases in RQDecomp3x3#25050

Merged
asmorkalov merged 2 commits intoopencv:4.xfrom
akretz:fix_issue_24330
Feb 27, 2024
Merged

Handle degenerate cases in RQDecomp3x3#25050
asmorkalov merged 2 commits intoopencv:4.xfrom
akretz:fix_issue_24330

Conversation

@akretz
Copy link
Copy Markdown
Contributor

@akretz akretz commented Feb 19, 2024

The point of the Givens rotations here is to iteratively set the lower left matrix entries to zero. If an element is zero already, we don't need to do anything. This resolves #24330.

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
Copy link
Copy Markdown
Contributor

@ivashmak could you take a look?

@ivashmak
Copy link
Copy Markdown
Contributor

@ivashmak could you take a look?

Changes look reasonable. As I understand, the main idea is if s equals 0, then we force c to be 1, which results that rotations are identity.

@asmorkalov asmorkalov merged commit e0b489e into opencv:4.x Feb 27, 2024
@asmorkalov asmorkalov mentioned this pull request Feb 28, 2024
klatism pushed a commit to klatism/opencv that referenced this pull request May 17, 2024
Handle degenerate cases in RQDecomp3x3 opencv#25050

The point of the Givens rotations here is to iteratively set the lower left matrix entries to zero. If an element is zero already, we don't need to do anything. This resolves opencv#24330.

### 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
- [x] 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.

RQDecomp3x3 wrong output

4 participants