Skip to content

issue #5769 fixed: cv::stereoRectify fails if given inliers mask of t… - #15341

Merged
alalek merged 5 commits into
opencv:3.4from
DiebBlue:is5769
Sep 16, 2019
Merged

alalek merged 5 commits into
opencv:3.4from
DiebBlue:is5769

Conversation

@DiebBlue

@DiebBlue DiebBlue commented Aug 20, 2019 •

Copy link
Copy Markdown

…ype vector

resolves #5769

This pullrequest changes

original: mask1, mask2, mask3, mask4 will be transposed but not the input mask -> so CV_Assert(mask.size() == mask1.size()) causes an exception.
fix: the input mask will also be transposed like the masks 1 to 4, so that the sizes fit again and than it works.
(see also [https://github.com//issues/5769])

@alalek alalek left a comment

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.

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".

Comment thread modules/calib3d/src/five-point.cpp Outdated
if (!_mask.empty())
{
Mat mask = _mask.getMat();
Mat mask = _mask.getMat().t();

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.

  1. Please add simple test for that (to avoid regressions in the future). No need to use input images, specify some valid points set in test directly. Example of simple test
  2. Vectors layout in OpenCV is not specified. Usually both row-based and column-based vectors should be handled.
  3. Use fast .reshape() instead of copy-based transpose().

@DiebBlue
DiebBlue changed the base branch from master to 3.4 August 20, 2019 15:35
@alalek

alalek commented Aug 21, 2019

Copy link
Copy Markdown
Member

Lets continue working on "master" branch. I will rebase onto "3.4" before merge.

@DiebBlue

DiebBlue commented Aug 21, 2019 •

Copy link
Copy Markdown
Author

I have already rebased my local commits on 3.4.
Than I will rebase it again local on master with
git rebase -i --onto upstream/master upstream/3.4

@alalek

alalek commented Aug 21, 2019

Copy link
Copy Markdown
Member

OK. Please update PR target branch again after force push of local changes into fork (you should see on "commits" tab your commits only).

@DiebBlue

Copy link
Copy Markdown
Author

Ok, I work on it. :)

@DiebBlue DiebBlue closed this Sep 9, 2019
@DiebBlue DiebBlue reopened this Sep 9, 2019
@DiebBlue

Copy link
Copy Markdown
Author

How is it going to continue here?

@alalek alalek left a comment

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.

Thank you!

@alalek
alalek merged commit d2872af into opencv:3.4 Sep 16, 2019
@DiebBlue
DiebBlue deleted the is5769 branch September 17, 2019 07:35
@alalek alalek mentioned this pull request Sep 20, 2019
SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
* issue 5769 fixed: cv::stereoRectify fails if given inliers mask of type vector<uchar>

* issue5769 fix using reshape and add regression test

* regression test with outlier detection, testing vector and mat data

* Size comparision of wrong vector within CV_Assert in regression test corrected

* cleanup test code
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.

2 participants