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

Update USAC #23078

Merged
merged 15 commits into from Jun 16, 2023
Merged

Update USAC #23078

merged 15 commits into from Jun 16, 2023

Conversation

ivashmak
Copy link
Contributor

@ivashmak ivashmak commented Jan 2, 2023

Pull Request Readiness Checklist

  • 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

modules/calib3d/include/opencv2/calib3d.hpp Outdated Show resolved Hide resolved
modules/calib3d/src/usac.hpp Outdated Show resolved Hide resolved
modules/calib3d/src/usac.hpp Outdated Show resolved Hide resolved
modules/calib3d/include/opencv2/calib3d.hpp Show resolved Hide resolved
@asmorkalov
Copy link
Contributor

@ivashmak friendly reminder

@ivashmak
Copy link
Contributor Author

ivashmak commented Mar 3, 2023

@ivashmak friendly reminder

Hi, sorry, I was busy with ICCV deadline. I fixed things you mentioned, thanks for the feedback. By the way, is there anything else I need to do regarding the multi-view calibration pull request?

modules/calib3d/src/usac.hpp Outdated Show resolved Hide resolved
modules/calib3d/src/usac.hpp Outdated Show resolved Hide resolved
modules/calib3d/src/usac.hpp Outdated Show resolved Hide resolved
modules/calib3d/src/usac/bundle.cpp Show resolved Hide resolved
@asmorkalov
Copy link
Contributor

@ivashmak There are some memory corruption troubles reported by valgrind on Buildbot: https://pullrequest.opencv.org/buildbot/builders/4_x_valgrind-lin64-debug/builds/100019. Could you take a look on it?

@ivashmak
Copy link
Contributor Author

@ivashmak There are some memory corruption troubles reported by valgrind on Buildbot: https://pullrequest.opencv.org/buildbot/builders/4_x_valgrind-lin64-debug/builds/100019. Could you take a look on it?

I had a look at this, but I was not able to recreate the same error on my local machine. I got a slightly different error in the same test related to 'Conditional jump or move depends on uninitialised value(s)'. I fixed it, so maybe it fixes that issue too.

By the way, now I am getting strange error in automatic evaluation (in Docs): "error: Could not read a60b392" Do you know how I can fix it?

@asmorkalov asmorkalov added this to the 4.8.0 milestone May 5, 2023
modules/calib3d/include/opencv2/calib3d.hpp Show resolved Hide resolved
modules/calib3d/src/usac.hpp Outdated Show resolved Hide resolved
modules/calib3d/src/usac.hpp Outdated Show resolved Hide resolved
modules/calib3d/src/usac.hpp Outdated Show resolved Hide resolved
modules/calib3d/src/usac.hpp Outdated Show resolved Hide resolved
modules/calib3d/src/usac/essential_solver.cpp Show resolved Hide resolved
Comment on lines 15 to 16
const Mat * points_mat;
const float * const points;
Copy link
Contributor

Choose a reason for hiding this comment

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

The same on pointers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added comment

modules/calib3d/src/usac/utils.cpp Show resolved Hide resolved
modules/calib3d/src/usac/termination.cpp Outdated Show resolved Hide resolved
modules/calib3d/src/usac/local_optimization.cpp Outdated Show resolved Hide resolved
}
EXPECT_NE(roll_results_sum, 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not obvious that roll_results_sum += cv::norm(E1, E2, NORM_L1) != 0; happens even once. Previous line may hide actual behavior. We need to check amount of successful findEssentialMat at least.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have not written this test, and I do not think it is necessary. As I understand, it checks that output of RANSAC is not the same for 1 and 1000 iterations. However, given random behaviour of RANSAC it could happen that the output will be the same.

@asmorkalov
Copy link
Contributor

@ivashmak There is merge conflict. Please take a look.

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.

👍

@asmorkalov asmorkalov merged commit 4488159 into opencv:4.x Jun 16, 2023
21 checks passed
@opencv-alalek opencv-alalek mentioned this pull request Jul 12, 2023
@ivashmak ivashmak mentioned this pull request Jul 17, 2023
6 tasks
asmorkalov pushed a commit that referenced this pull request Jul 27, 2023
Merge usac to 5.x #24005

### 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.
- [x] The feature is well documented and sample code can be built with the project CMake


Base branch is PR #23979. Merging PR #23078, 23900 and PR #23806  to 5.x
thewoz pushed a commit to thewoz/opencv that referenced this pull request Jan 4, 2024
Update USAC opencv#23078

### Pull Request Readiness Checklist

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

None yet

4 participants