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
- feature detection.
- feature matching.
- image matching.
- blending.
Students will get extra points if they implement any of the following extensions
- Recognizing panoramas.
- bundle adjustment
- Better blending techniques, such as Poisson blending or Photomont
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
//MargePathProcessing of ImageStitch.exe:
- I use zlImageLib to read source pictures (jpg format), store as unsigned-char images.
- I implement Harris Corner Detector and SIFT to find features.
- Feature detection: Harris Corner Detector
- Feature detection: SIFT
- Feature Match
-Descriptor
- Descriptor size 4x4 sample group x8 adjacent bins = 128 vectors.
- Orientation histogram of gradient magnitudes
- Each gradient sample rotated relative to keypoint orientation.
- Normalize descriptor vectors
- Cap each element to 0.2, normalize again.
Red Dot: Keypoints
Yellow Dot: Matched keypoints
-Outliers Rejection
- Image Matching
Assume that our set of images only have translation
Use Cylindrical projection
- Blending
-MargeBlend : Simple linear blending
-MargePath : Use A* to find a path of lessness color different, paste 2 image to each side ,resampling edge only (red line).
Blended Image
- Recognizing panoramas
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
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
References