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

Get rid of unsafe raw pointers to Mat object in USAC #23806

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

asmorkalov
Copy link
Contributor

@asmorkalov asmorkalov commented Jun 15, 2023

Fix for #23078

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
Contributor Author

@ivashmak Could you take a look on my proposal.

@asmorkalov asmorkalov changed the title Git rid of unsafe raw pointers to Mat object Get rid of unsafe raw pointers to Mat object Jun 15, 2023
@asmorkalov asmorkalov changed the title Get rid of unsafe raw pointers to Mat object Get rid of unsafe raw pointers to Mat object in USAC Jun 15, 2023
@ivashmak
Copy link
Contributor

It looks alright with me. Originally, I created those raw pointers, so I don't need to access them from the Mat container in each function at each iteration of RANSAC, but I guess this operation is fast enough anyway.

@asmorkalov asmorkalov changed the title Get rid of unsafe raw pointers to Mat object in USAC WIP: Get rid of unsafe raw pointers to Mat object in USAC Jun 16, 2023
@asmorkalov asmorkalov added this to the 4.8.0 milestone Jun 19, 2023
@asmorkalov asmorkalov changed the title WIP: Get rid of unsafe raw pointers to Mat object in USAC Get rid of unsafe raw pointers to Mat object in USAC Jun 20, 2023
@asmorkalov
Copy link
Contributor Author

@mshabunin could you take a look too.

modules/calib3d/src/usac/degeneracy.cpp Outdated Show resolved Hide resolved
modules/calib3d/src/usac/estimator.cpp Outdated Show resolved Hide resolved
modules/calib3d/src/usac/pnp_solver.cpp Outdated Show resolved Hide resolved
modules/calib3d/src/usac/pnp_solver.cpp Outdated Show resolved Hide resolved
modules/calib3d/src/usac/pnp_solver.cpp Show resolved Hide resolved
@asmorkalov asmorkalov merged commit ee97dd5 into opencv:4.x Jun 23, 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
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