Aligning multiple images into one image? [closed]

吃可爱长大的小学妹 提交于 2020-01-01 05:31:32

问题


What is a good method to align images together that may have different rotations, exposures, etc, but have the same background or other fixed reference?

Adobe Photoshop can do this with its "Photomerge" feature.

How can I do this programatically? Is there an Open Source application that does it?


回答1:


You want to search for image stitching or image registration as these are the names that it's also known by. This wikipedia article has some useful information. But I only know of commercial libraries that do it, not any open source ones.

The basic outline of the process (in the commercial library I know of) is this:

  1. Initially you have to specify the rough alignment of the images, i.e.
    • Image A is to the left of image B and they overlap by less that 10%.
    • Image C is to the right of image B and they overlap by 10-20% etc.
  2. Based on the parameters in 1) the algorithm will attempt to find unique a "template" in the overlapping regions. It will then use a template matching technique to locate the template in each of the 2 overlapping images.
  3. Item 2) can be repeated several times to give a series of matching locations, that can then be used to provide an exact fit.

In step 3 you can also take account of distortion such as rotation and lens distortion. But to allow for changes in colour step 2 would need to be more advanced (i.e. not just based on the greyscale pixel level).

There's an feature request to add this functionality to the AForge library, but at the moment it's not been done and I don't know the current status.




回答2:


Updating the answer by Matt Warren, there is an article on CodeProject explaining how automatic image stitching could be done using Accord.NET. It also explains some of the theory behind the process.

The Accord.NET Framework is a framework written in C# which extends the original AForge.NET Framework with new tools and libraries.



来源:https://stackoverflow.com/questions/2590220/aligning-multiple-images-into-one-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!