Git Product home page Git Product logo

image-stitching-opencv's Introduction

图片全景拼接

代码来自pyimagesearch

原理简述

对多张图片进行基于SIFT的特征检测算法,如果符合最小拼接要求大的关键点matchKeypoints数量,使用OpenCV-Python自带的stitching方法进行全景拼接,但是对于拼接后的黑边裁剪效果不好,可以修改优化。

使用方式

python image_stitching.py --images images/scottsdale --output output.png --crop 1

其中images/scottsdale为待拼接图像所在文件夹,output.png为处理拼接保存后的图像;这里使用了相对路径,因为在工程根目录下运行了终端。不确定在根目录最好使用完整的绝对路径。 --crop 1为是否裁剪黑色边框,缺省则不裁剪。

对比效果

相比其他方式,因为使用了较好的匹配关键点,所以拼接没有裂缝,没有鬼影

示例1:有裂缝(两张图片拼接中间有竖着的裂缝)

示例2:有鬼影(重影,由于拼接范围内有运动物体)

示例3:使用上面pyimagesearch的代码,没有裂缝和鬼影

image-stitching-opencv's People

Contributors

samggggflynn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.