Skip to content

Stitching Detailed Tutorial Improvements#19931

Merged
alalek merged 3 commits intoopencv:masterfrom
lukasalexanderweber:patch-1
Apr 26, 2021
Merged

Stitching Detailed Tutorial Improvements#19931
alalek merged 3 commits intoopencv:masterfrom
lukasalexanderweber:patch-1

Conversation

@lukasalexanderweber
Copy link
Copy Markdown
Contributor

There are two issues with the code in the tutorial:

  1. Vertical wave correction isn't supported but proposed as parameter to the user
  2. Changing the confidence threshold isn't supported but proposed as parameter to the user

Both are because of static implementations instead of using the user defined parameters.
Please see the commit descriptions for details.
This Pull request solves both Issues.

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 other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to 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

The user has the possibility to pass "vert" as wave_correct parameter. However, in the code "cv.detail.WAVE_CORRECT_HORIZ" ist fixed. This change proposes changes so that the wave correction is done vertically if the user passes "vert" as wave_correct parameter. The variable "do_wave_correct" is replaced by None which is passed to the variable "wave_correct" if the user chooses "no" for wave correction.
According to the documentation, [cv.detail.leaveBiggestComponent](https://docs.opencv.org/4.5.1/d7/d74/group__stitching__rotation.html#ga855d2fccbcfc3b3477b34d415be5e786) takes features, the pairwise_matches and the conf_threshold as input.
In the tutorial, however, conf_threshold is fixed at 0.3 even though the user can pass conf_thresh as parameter which is 1 by default. Fixing this parameter at 0.3 causes the script to include images into the panorama which are not part of it.
@lukasalexanderweber
Copy link
Copy Markdown
Contributor Author

do I have to do change something because of the failed checks?

@alalek
Copy link
Copy Markdown
Member

alalek commented Apr 21, 2021

You can ignore "OpenCV CN *" builders results (these failures are not related to this PR).

@lukasalexanderweber
Copy link
Copy Markdown
Contributor Author

ok thanks!

Copy link
Copy Markdown
Member

@DumDereDum DumDereDum left a comment

Choose a reason for hiding this comment

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

👍

@alalek alalek merged commit 6c53af8 into opencv:master Apr 26, 2021
@alalek alalek mentioned this pull request Jun 4, 2021
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
Stitching Detailed Tutorial Improvements

* Add Vertical Wave Correction

The user has the possibility to pass "vert" as wave_correct parameter. However, in the code "cv.detail.WAVE_CORRECT_HORIZ" ist fixed. This change proposes changes so that the wave correction is done vertically if the user passes "vert" as wave_correct parameter. The variable "do_wave_correct" is replaced by None which is passed to the variable "wave_correct" if the user chooses "no" for wave correction.

* Correct fixed conf_thresh

According to the documentation, [cv.detail.leaveBiggestComponent](https://docs.opencv.org/4.5.1/d7/d74/group__stitching__rotation.html#ga855d2fccbcfc3b3477b34d415be5e786) takes features, the pairwise_matches and the conf_threshold as input.
In the tutorial, however, conf_threshold is fixed at 0.3 even though the user can pass conf_thresh as parameter which is 1 by default. Fixing this parameter at 0.3 causes the script to include images into the panorama which are not part of it.
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.

3 participants