如何在opencv中找到图像之间的重叠区域? [英] how to find overlapping region between images in opencv?

查看:2108
本文介绍了如何在opencv中找到图像之间的重叠区域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图实现与两个图像的alpha混合图像拼接。
我的第一张图片是这个 - >



这里是我的第二张图片 - >



这里是我的结果图片 - >



正如你可以看到的结果是不正确的。我想我首先要找到之间的重叠区域,然后实现alpha混合首先,你是否看过在OpenCV 2.3中引入了一个新的拼接模块?

>

它提供了一组用于拼接管道的构建块,包括混合和查找重叠(例如注册)步骤。以下是文档: http://docs.opencv.org/modules/stitching/ doc / stitching.html 和拼接应用程序示例: stitching_detailed.cpp



我建议您研究此示例的代码,以便更好地了解详细信息。 p>

关于重叠的发现,在计算机视觉中有几种常见的方法:




  • optical



  • 对于你的情况下,我推荐最后一个 - 它的作品非常好的照片。这个方法已经在OpenCV中实现 - 探索OpenCv源,看看 cv :: detail :: BestOf2NearestMatcher 是如何工作的。


    I am trying to implement alpha blending with two images for image stitching . My first image is this ->

    here is my second image ->

    here is my result image ->

    As you can see the result is not proper.I think I first have to find the overlapping region between then and then implement alpha blending on the overlapping part.

    解决方案

    First of all, have you seen a new "stitching" module introduced in OpenCV 2.3?

    It provides a set of building blocks for stitching pipeline including blending and "finding an overlap" (e.g. registration) steps. Here is a documentation: http://docs.opencv.org/modules/stitching/doc/stitching.html and an example of stitching application: stitching_detailed.cpp

    I recommend you to study the code of this sample for better understanding of the details.

    Regarding the finding of overlap there are several common approaches in computer vision:

    • optical flow
    • template matching
    • feature matching

    For your case I recommend the last one - it works very well on the photos. And this approach is already implemented in OpenCV - explore the OpenCv source and see how the cv::detail::BestOf2NearestMatcher works.

    这篇关于如何在opencv中找到图像之间的重叠区域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆