Image Stitching

R96944043 ©P§B¬Û

http://www.cmlab.csie.ntu.edu.tw/~zho/

 

 

Project #2

Image stitching is a technique to combine a set of images into a larger image by registering, warping, resampling and blending them together.
In this project, we must implement

Students will get extra points if they implement any of the following extensions

1.Taking photographs

I take series of pictures by using the SONY Cyber-shot DSC-W200 with a tripod or handhold.

2.Write a program to stitch a set of images

Program brief:

Stand-alone executable program created & compiled by visual c++ 2005, ImageStitch.exe with library zlImageLib , zlCore, zlGDIRDev ,zlAI

I read the external data by using a ImageSitich.ini file which define as follow:

//What method to use, there are Harris, SIFT to now.
//Detector %s
Detector SIFT

//If using Harris corner detector, there provide NONMAXIMAL_SUPPRESSION ,or ADAPTIVEGRID to find feature
Feature ADAPTIVEGRID
//and we can set the maximun feature number by setting FeatureNum
FeatureNum 500

//If using SIFT, we can use SIFTGain to adjust feature number. A larger number will find more freature.
SIFTGain 4


//A set of images to be marge
Image prtn00.jpg
Image prtn01.jpg
Image prtn02.jpg
Image prtn03.jpg
Image prtn04.jpg
Image prtn05.jpg
Image prtn06.jpg
Image prtn07.jpg
Image prtn08.jpg
Image prtn09.jpg
Image prtn10.jpg
Image prtn11.jpg
Image prtn12.jpg
Image prtn13.jpg
Image prtn14.jpg
Image prtn15.jpg
Image prtn16.jpg
Image prtn17.jpg
...........

//When image matching, if the value of descriptor distance less then MatchThreshold , then these two features are matched.
MatchThreshold 0.2

//The program will export intermediate image by default, if you won't to export them, you can use NoDump to cancel that.
NoDump

//There are 2 marge methods , use MargeBlend or MargePath to select which method you like.
MargeBlend
//MargePath

Processing of ImageStitch.exe:


Using ADAPTIVEGRID
Limit feature number to 500


Using NONMAXIMAL_SUPPRESSION
Limit feature number to 500


SIFT with gain = 4


SIFT with gain = 1

 

-Descriptor

  1. Descriptor size 4x4 sample group x8 adjacent bins = 128 vectors.
  2. Orientation histogram of gradient magnitudes
  3. Each gradient sample rotated relative to keypoint orientation.
  4. Normalize descriptor vectors
  5. Cap each element to 0.2, normalize again.

Red Dot: Keypoints
Yellow Dot: Matched keypoints


11 Matched by SIFT


11 Matched by SIFT

-Outliers Rejection


10 Matched by SIFT


10 Matched by SIFT

 

Assume that our set of images only have translation

Use Cylindrical projection

-MargeBlend : Simple linear blending


Linear blending

-MargePath : Use A* to find a path of lessness color different, paste 2 image to each side ,resampling edge only (red line).


Blending Edge Found


Blended Image

 

Test images created by the program.


grail , marge from 18 images by SIFT, with tripods, each image size 384x512, marged image size 4158x572, take 24.544599 second
Images from the web site of this course




parrington , marge from 18 images by SIFT,with tripods, each image size 384x512, marged image size 4606x581, take 63.660528 second
Images from the web site of this course

 


csie , marge from 11 images by SIFT,without tripods, each image size 540x720, marged image size 2751x788, take 7.177554 second
Images from the web site of this course

 


park , marge from 11 images by SIFT,without tripods, each image size 600x800, marged image size 3749x864, take 13.377409 second

 


Memorial Hall, marge from 16 images by SIFT,without tripods, each image size 1500x2000, marged image size 12850x2210, take 42.662427 second

 


pond, marge from 8 images by SIFT,without tripods, each image size 1500x2000, marged image size 7326x2104, take 17.518848 second

 

 


Set of images

Final Image



center of park, marge from 16 images by SIFT,without tripods, each image size 600x800, marged image size 5750x856, take 27.990215 second

View full size

 


References