question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

range_width having no effect in FeatureMatcher?

See original GitHub issue

Hi, I’m trying to stitch a sequence of images that I know are adjacent, and I thought I understood setting range_width to 1 when matching might improve results, but it doesn’t seem to have any effect. Perhaps I have misunderstood how this parameter works, but it doesn’t seem to be doing anything from what I can tell.

I tried taking a fresh copy of Stitching Tutorial.ipynb and changing the range_width parameter in the matching section, and I still get a full matrix of confidence values for every pair of images no matter what value I choose – I expected that setting it to 1 would force it to only consider adjacent pairs (e.g. pair 1-2 would have a confidence but pair 1-3 would not). That’s what the C++ code seems to be doing, but I admit I haven’t dug deeply enough into it.

Here’s my results: Screenshot 2022-07-25 at 12 21 45

You can see on the final block that under the hood the type is being set to cv2.detail.BestOf2NearestRangeMatcher correctly.

Do you have any suggestions, or have I misunderstood how this is supposed to work? If I manually set the confidence of non-adjacent images to zero then I get a better stitching result in later stages, but I was hoping for a significant performance increase of comparing fewer images too. Thanks!

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
chinerycommented, Aug 2, 2022

(p.s. if you do run into any more issues with the C++ code or Python bindings feel free to message me, can’t promise anything but I can take a look!)

1reaction
lukasalexanderwebercommented, Aug 1, 2022

Thank you! This is something that has been bugging me for some time. Unfortunately I have zero C++ experience and am somewhat dependent on the Python wrappers and docs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BestOf2NearestRangeMatcher not working in Python ... - GitHub
When calling BestOf2NearestRangeMatcher from Python with a range_width of 1, I still get matches between images that are not adjacent going by ...
Read more >
图像拼接1 opencv stitcher - jnu-wang - 博客园
Works faster than usual mode,\n" " but output image will have lower resolution.\n" " --try_cuda (yes|no)\n" " Try to use CUDA.
Read more >
OpenCV 4 with Python Blueprints Second Edition
Generating complex effects is not hard if you have a lot of computing ... In the previous code block, the FeatureMatching.match method processes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found