Image Stitching in CSharp

From EMGU
Jump to navigation Jump to search

This project is part of the Emgu.CV.Example solution of Version 2.4.0, currently it is only available from svn

System Requirement

Component Requirement Detail
Emgu CV Version 2.4.0
Operation System Cross-platform

Image Stitching

According to wikipedia

Image stitching or photo stitching is the process of combining multiple photographic images with overlapping fields of view to produce a segmented panorama or high-resolution image. Commonly performed through the use of computer software, most approaches to image stitching require nearly exact overlaps between images and identical exposures to produce seamless results.


Source Code

It is so easy to use with the help of the Emgu.CV.GPU.Stitcher class. If you have an array of images such as Image<Bgr, Byte>[] images, all the code you need to write is

using (Stitcher stitcher = new Stitcher(
  //This indicate if the Stitcher should use GPU for processing. 
  //There is currently a bug in Open CV such that GPU processing cannot produce the correct result. 
  //Must specify false as parameter. Hope this will be fixed soon to enable GPU processing
  false 
  ))
{
  Image<Bgr, Byte> result = stitcher.Stitch(sourceImages);
  // code to display or save the result 
}

Result

Stitching
Stitching