Merge pull request #19931 from lukasalexanderweber:patch-1
authorLukas-Alexander Weber <32765578+lukasalexanderweber@users.noreply.github.com>
Mon, 26 Apr 2021 14:47:50 +0000 (16:47 +0200)
committerGitHub <noreply@github.com>
Mon, 26 Apr 2021 14:47:50 +0000 (14:47 +0000)
commit6c53af8e41b1780e3ce5d5e18f2ad8983fd1966a
tree0bd6bd6d139c58097b42ae69672275fbc7f67ed2
parente68657cdb2b31ec9b60f2b20f9a44b382a4d6e02
Merge pull request #19931 from lukasalexanderweber:patch-1

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.
samples/python/stitching_detailed.py