Skip to content

Fix seam finder in stitching_detailed.py#19987

Merged
opencv-pushbot merged 1 commit intoopencv:masterfrom
daksayli:stitching_detailed_branch
May 21, 2021
Merged

Fix seam finder in stitching_detailed.py#19987
opencv-pushbot merged 1 commit intoopencv:masterfrom
daksayli:stitching_detailed_branch

Conversation

@daksayli
Copy link
Copy Markdown

Seam finder in stitching_detailed.py does not update the masks and output panorama looks blurry because of that. The blurryness problem was mentioned in issue #14413 and seam finder update problem was mention in issue #15520.

To fix the updating problem, DP and Voronoi seam finder result needs to be assigned to a variable. In addition, graph cut seam finder should be removed from the script as it returns None.

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

Copy link
Copy Markdown
Contributor

@lukasalexanderweber lukasalexanderweber left a comment

Choose a reason for hiding this comment

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

With this changes I can solve this question

Maybe an even better change would be that detail_GraphCutSeamFinder

cv.detail_GraphCutSeamFinder.find( src, corners, masks ) -> None

returns "masks" instead of "None" as e.g. detail_VoronoiSeamFinder:

 cv.detail_VoronoiSeamFinder.find( src, corners, masks ) -> masks

then the lines

SEAM_FIND_CHOICES['gc_color'] = cv.detail_GraphCutSeamFinder('COST_COLOR')
SEAM_FIND_CHOICES['gc_colorgrad'] = cv.detail_GraphCutSeamFinder('COST_COLOR_GRAD')

would not have to be deleted.

However I don't understand the Python API to OpenCV's C++ functionality well enough to implement it.

It's somewhere in seam_finders.hpp I guess.

@alalek
Copy link
Copy Markdown
Member

alalek commented Apr 29, 2021

/cc @LaurentBerger

@daksayli
Copy link
Copy Markdown
Author

Do i need to change something because of the failed check?

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.

Thank you for contribution!

@opencv-pushbot opencv-pushbot merged commit fea12f7 into opencv:master May 21, 2021
@alalek alalek mentioned this pull request Jun 4, 2021
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.

5 participants