This is a framework that combines multiple images using multiple homographies.
For reduce misalignment, we didved the images into background and foreground. Then, we apply background and foreground homographies to the images
Paper address link "Lee, D., Yoon, J., & Lim, S. (2017, September). Image Stitching Using Multiple Homographies Estimated by Segmented Regions for Different Parallaxes. In Vision, Image and Signal Processing (ICVISP), 2017 International Conference on (pp. 71-75). IEEE."
We propose a novel image stitching method using multiple homographies. The method can stitch images having different parallaxes, such as an image that contains distant buildings and close trees. Such images might not be stitched with fine quality by single global homography. Therefore, we select a background homography by analyzing the inliers of the homographies estimated by RANSAC (random sample consensus) for leave-one-out segmented regions, and the left segmented region of the background homography is designated as an object region. Then, the object homography is estimated by the object region. Using these multiple homographies, image stitching and multi-band blending are performed. With this method, images having different parallaxes are stitched with higher visual quality than with other methods using single homography and multiple homographies.
I divide the picture into background and foreground using inlier rate.
- I use the inlier rate like the eqaution in the above figure.
- In case of foreground, the inlier rate is high.
- In case of background, the inlier rate is low.
- in the above figure, you can see that when the inlier rate is low, the foreground is selected.
-
Selecting the foreground by inlier rate is often failed. So, I valid the selected foreground using the validation function.
-
Finally, we estimate the background and foreground homography.
- Before the warping and blending, we preprocess the images for removing the noise and fill the holes.
- Warping and blending are consisted two stage. First, the background is stitched using background homography. Then, the foreground is stitched using foreground homography.
- Blending algorithm is Multi-band blending.
- Compare the other method
- It is good performance when the image contain the prallaxes.
- But, the proposed method take a long time.
It is based on OpenCV 2.4.1.1, MFC
- Important code
ImageProcessing.h / ImageProcessing.cpp : including the basic imageProcessing function
imageStitch_jy.h / imageStitch_jy.cpp : including the main image stitching code