Skip to content

Apply normalization to 7p algorithm.#16612

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
rabbull:master
Feb 18, 2020
Merged

Apply normalization to 7p algorithm.#16612
opencv-pushbot merged 1 commit intoopencv:3.4from
rabbull:master

Conversation

@rabbull
Copy link
Copy Markdown
Contributor

@rabbull rabbull commented Feb 18, 2020

resolves #10643

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 OpenCV (BSD) License.
  • [ x ] To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • [ x ] The PR is proposed to proper branch
  • [ x ] There is reference to 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

Attempting to fix the bug issued in #10643, I just copied (modified a few lines) from the normalization part of 8p algorithm implemented by OpenCV. The original fundam tests are passed and no additional tests are privided.

force_builders=linux,docs

@alalek
Copy link
Copy Markdown
Member

alalek commented Feb 18, 2020

Thank you for contribution!

As a "bugfix" this patch should go into 3.4 branch first. We will merge changes from 3.4 into master regularly (weekly/bi-weekly).

So, please:

  • change "base" branch of this PR: master => 3.4 (use "Edit" button near PR title)
  • rebase your commits from master onto 3.4 branch. For example:
    git rebase -i --onto upstream/3.4 upstream/master
    (check list of your commits, save and quit (Esc + "wq" + Enter)
    where upstream is configured by following this GitHub guide and fetched (git fetch upstream).
  • push rebased commits into source branch of your fork (with --force option)

Note: no needs to re-open PR, apply changes "inplace".

@rabbull rabbull changed the base branch from master to 3.4 February 18, 2020 13:49
@rabbull
Copy link
Copy Markdown
Contributor Author

rabbull commented Feb 18, 2020

@alalek
Thanks for patience. It's barely my first pr to such a huge repo, so I might mess things up. If something else goes wrong, let me know and I'll correct it as soon as possible.

@alalek
Copy link
Copy Markdown
Member

alalek commented Feb 18, 2020

Merge commit ("rebase to 3.4") is not needed here (as you can see, this PR contains 1,141 commits now).

Drop it:

git checkout -B master 7e51e43270d3397827fc78d4d6780f53192c1d32
git push <origin> master --force


Point2d m1c(0, 0), m2c(0, 0);
double t, scale1 = 0, scale2 = 0;
constexpr int count = 7;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please remove constexpr - use C++98 only => const

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Got it.

use const instead of constexpr
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

opencv-pushbot pushed a commit that referenced this pull request Feb 18, 2020
@opencv-pushbot opencv-pushbot merged commit 331a96c into opencv:3.4 Feb 18, 2020
@alalek alalek mentioned this pull request Feb 20, 2020
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.

The 7-point algorithm is not normalized

3 participants