您的当前位置:首页正文

SURF applied in Panorama Image Stitching

2021-09-03 来源:易榕旅网
Image Processing Theory, Tools and Applications

SURF applied in Panorama Image Stitching

Luo Juan1, Oubong Gwun2

Computer Graphics Lab, Computer Science & Computer Engineering,

Chonbuk National University, Jeonju 561-756, South Korea

12

Email: qiuhehappy@hotmail.com, obgwun@chonbuk.ac.kr

Abstract------SURF (Speeded Up Robust Features) is one of the

famous feature-detection algorithms. This paper proposes a panorama image stitching system which combines an image matching algorithm; modified SURF and an image blending algorithm; multi-band blending. The process is divided in the following steps: first, get feature descriptor of the image using modified SURF; secondly, find matching pairs, check the neighbors by K-NN (K-nearest neighbor), and remove the mismatch couples by RANSAC(Random Sample Consensus); then, adjust the images by bundle adjustment and estimate the accurate homography matrix; lastly, blend images by multi-band blending. Also, comparison of SIFT (Scale Invariant Feature Transform) and modified SURF are also shown as a base of selection of image matching algorithm. According to the experiments, the present system can make the stitching seam invisible and get a perfect panorama for large image data and it is faster than previous method.

Keywords------panorama, SURF, stitching, multi-band blending, LM,

bundle adjustment.

I. INTRODUCTION

Stitching multiple images together can create beautiful high-resolution panoramas. It is a popular method of effectively increasing the field of view of a camera, by allowing several views of a scene to be combined into a single view, which is one of the most popular applications of image registration and blending. Image stitching algorithms have been used to produce digital maps and satellite photos, and it comes with today’s digital cameras, there are more applications, such as video stitching, 3D image stitching, and et cetera. In general, stitching includes two main parts: image matching and image blending. Image matching is used to find the motion relationship between two images or several images, and it directly relates to the success rate and the speed of image stitching process. So if there is a high speed matching algorithm with high quality, it is better to choose the high speed matching algorithm like that this paper chooses SURF. There are many algorithms for matching, and there are several kinds blending algorithms. For matching, there are two ways: direct method and feature detection method. Direct method is

sometimes inconvenient because it always needs a high quality image.

SURF and SIFT are two of the most famous feature detection methods

because of their robustness. SIFT was presented by Lowe in 2004[1], which is invariant to scale changes and rotation. So it was widely used in object recognition, registration, stitching, and et cetera. There are also some researchers present some new methods based on SIFT by giving some improvement. Ke and Sukthankar[2] used PCA(Principle Component Analysis) to normalize gradient patch instead of histograms. They showed that PCA-based local descriptors were also distinctive and robust to image deformations. In 2006, Bay and Tuytelaars[3] speeded up robust features algorithm and used integral images for image convolutions and Fast-Hessian detector, which created a new tide of robust feature detection method. There are also some researches about comparing the famous feature detection methods [7][8].

The other part of stitching is blending. But before blending, what we need to do is to adjust the images into a same coordinate, which can be implemented by homography matrix that computed by matches that got previously. Bundle adjustment is a popular way to adjust images. In Brown and Lowe’s panorama recognition [9], they used to unify the various illumination of the adjacent images and eliminate inconsecutive color which caused by the geometric correction or dynamic scene.

There are some blending algorithms: weight averaged linear blending, multi-band blending, gradient domain blending, and et cetera. This paper chooses multi-band blending method because of its good performance, which can be easily got by experiment also [10], though, it is a compromise between quality of result and time cost.

In short, we propose a panorama image stitching process which combines an image matching system; Modified SURF and an image blending algorithm; multi-band blending. The process of our method is: first, find the SURF features from the image, use KNN(K-nearest

neighbor) and RANSAC(Random Sample Consensus) to find the correct matches; estimate the homography matrix according to LM (Levenberg-Marquardt) method, secondly, based on which, adjust the coordinate of images. Lastly, blend the images by multi-blending to remove the stitch seam and illumination discrepancy. This paper is structured in this way: Section 2 will represent the fundamental knowledge of SURF matching algorithm, give comparison of SIFT and Modified SURF algorithm. Section 3 will describe the method of adjustment and blending. Section 4 will give the experiment results of this paper. In Section 5, there will give some conclusion and future works. The images that used in this paper are all shown in Appendix. II. ROUBUST FEATURE DETECTION

This section explores pre-step of our panorama image stitching:

feature detection. First, this section gives a brief remark on SIFT and

SURF, then shows that Modified SURF is more suitable than SIFT for

our image stitching process based on an experiment.

A. Modified SURF Comparing with SIFT, SURF algorithms employ slightly different ways of detecting features. SIFT builds an image pyramids, filtering each layer with Gaussians while increasing their sigma values and taking the difference. On the other hand, SURF creates a “stack” without 2:1 down sampling for higher levels in the pyramid, resulting in images of the same resolution [3]. Due to the use of integral images, SURF filters the stack using a box filter approximation of second-order Gaussian partial derivatives.

978-1-4244-7249-9/10/$26.00 ©2010 IEEE

Integral images allow the computation of rectangular box filters in near constant time [3]. This paper used KNN to find the nearest Table1. The number of Matched points of modified SURF and SIFT neighbor with setting k to 2. In other paper, RANSAC is used to in scale change. estimate a model for finding the minimize error matches set, which can maintain the correct matches by comparing the distance of the

Object dataset image SIFT SURF closest neighbor to that of second-closest neighbor [1]. If it is less than

number (matches number) (matches number) the distance ratio, then this paper maintains them, else removes. This

1-2 205 246 paper decided to choose 0.5 as the distance ratio according to Lowe’s

experiment in SIFT. This makes the repeatability larger, which means 3-4 156 146 improving of the matching performance. More details of this

5-6 106 87 algorithm can be seen on [1][14].

7-8 75 18

B. Comparison of SIFT and modified SURF 9-10 0 2 For panorama stitching process, we evaluated SIFT and our Modified SURF having RANSAC [6]. They were evaluated in terms of their ability to reduce the number of false matches in given match sets, while preserving the good matches, which are used in the next step of feature detection. After extracting invariant scale features, we got potential feature matches by using k-nearest neighbor method, and then remove the mismatches with RANSAC algorithm. We called it modified SURF. It enables to realize image match precisely. This part shows some comparison results of the paper for completeness. It

performed the comparisons of its performance (the number of

correspondence pairs, repeatability) in illumination and scale change.

Comparison results can be seen in more detail on [6]. The experiment was performed with Object dataset in appendix A, whose sizes are all 300 x 240 pixels. Though SIFT get more matches than Modified

SURF, Modified SURF is much faster than SIFT [6].

Figure 1 and Fig. 2 give the match results of Modified SURF and

SIFT in scale and illumination change respectively. More details can

be seen on Table 1 and Table 2. In Table 1 and Table 2, Object dataset

image number denotes image number of Object dataset. In Table 1,

matches number denotes the number of matched point in scale change.

In Table 2, repeatability is computed as a ratio between the number of

point-to-point correspondences that can be established for detected

points and the mean number of points detected in two images using

equation (1):

r=C(I1,I2)

1,2 (1) mean(m1,m2)

where C(I1,I2),m1 and m2 denotes the number of corresponding couples, the numbers of the detected point respectively.

Fig. 1. Matched point of Modified SURF (right) and SIFT (left) in

scale change.

Fig.2. Matched point of Modified SURF (left) and SIFT (right) in

illumination change.

Table 2. Repeatability of Modified SURF and SIFT in illumination change. Object dataset SIFT SURF image number (repeatability) (repeatability) 11-12 43% 70% 11-13 32% 49% 11-14 18% 25% 11-15 8% 6% 11-16 2% 5% average 21% 31%

Table 1 shows that modified SURF is as robust as SIFT in scale

change and Table 2 shows that it is more robust than SIFT in

illumination change. Paper [6] showed that, though modified SURF

was not better than SIFT in rotation, Modified SURF is as robust as

SIFT in other performance.

In panorama image stitching, there is not very large rapid rotation

generally, so this paper chooses modified SURF to be the feature

detection method weighted on its time cost and its good performance

in scale and illumination.

III. ADJUSTMENT AND BLENDING This section explores post–steps: image adjustment and blending for panorama image stitching. It describes the selected algorithms of image adjustment and blending and the reason why the algorithms are

selected.

A. Image Adjustment algorithm

Image adjustment is to transform the images into a same coordinate or computing surface. In this paper, we choose bundle adjustment as image adjustment algorithm because it is popular in computer vision and shows a good performance in Demo Software: SIFT Keypoint Detection [16].

The process of bundle adjustment is as follows: firstly, choose one of the images to be reference surface; then, transform each of other images to the reference surface, at the end of which all images are on the same surface. In addition, for larger fields of view, however, we cannot maintain a flat representation without excessively stretching pixels near the border of the image. The usual choice for compositing larger panoramas is to use a cylindrical or spherical projection.

Transformation needs to compute the homography and optimize the parameters of the matrix in the adjustment. The process is as follows: first find out the best neighbor image for each image, then directly calculate the distance between the two neighbor images, lastly minimize the distance value to adjust the matrix between the neighbor images. LM, which is one of the minimization methods using nonlinear minimum square evaluation, was one of the most popular algorithms for optimizing in bundle adjustment. In one sentence, what

vectors in this experiment. Secondly, among this descriptors, the square Euclidean distance ratio between neighbors is calculated, which is computed by the closest neighbor to the second closest neighbor. If it exists and its value is lower than a threshold value -1X')2+d(X',HX)2) (2) ∑ d=(d(X,H (setting as 0.5), we maintain it as neighbors. All of which can be iiii

idescribed by K-NN(2). Lastly, RANSAC is used to estimate a model

'

where d is the Euclidian distance, Xi and Xi are the correspondence of consensus set that minimizes matching error. This is an iterative

process, the goal of which is to find the largest feature points good to

points, the estimated homography H will be the one for which transformation. The matches fitted to the minimizing error model are

needs to be done is to minimize the transfer error, which is calculated as equation (2):

equation (2) is minimized, H-1

is the inverse of H. LM has become a standard technique for nonlinear least-squares problems and can be thought of as a combination of steepest descent and the Gauss-Newton method [11]. There is a free LM implementation that can be found at [17].

B. Image Blending algorithm

Mathematically speaking, image blending is nothing more than a type of interpolation. The goal of the blending is to produce a resulting image where no transition can be seen between the original source images. Average weighted blending is a common linear method, employ simple average of images in the overlapping regions. This results in ghosting artifacts, blurring, and visible seams that degrade the mosaic, so as bilinear blending. But Linear blending method is fast and can be a good compromise between quality and speed if you are not too demanding on quality. The work of Burt and Adelson [12] on multi-band blending or called by pyramid blending has proved particularly effective for image stitching without blurring and ghosting artifacts. It will produce much better results than the \"Linear\" mode. The transitional areas between images will hardly visible. The comparison results can be seen directly in [10]. Multi-band blending scheme ensures smooth transitions between images despite illumination differences, while preserving high frequency details. So we choose multi-band blending method (2-band) in this paper.

The idea of multi-band blending is to blend low frequencies over a large spatial range and high frequencies over a short range. Image is decomposed into a collection of N band pass images using the Laplacian pyramid. The Laplacian pyramid of the final image is formed as equation (3):

Yk(i,j)=X1,k(i,j)Mk

(i,j) +X2,k(i,j)(1-Mk(i,j)) (3)

where X1,k and X2,k are the kth level of Laplacian pyramid decomposition for the two images after coordinate adjustment, Yk is the kth level of Laplacian pyramid decomposition for the final combination result. Similarly, Mk is the kth level of Gaussian pyramid decomposition of the image mask. Pyramid blending gradually blends the lower frequencies of the images while maintaining a sharper transition for the higher frequencies, which makes image clearer than

other methods. The results of experiment will show in the follow section.

IV. EXPERIENTS AND RESULTS

The experiment has been done on visual studio 2008 C++ environment with OpenCV library. In this section, we will give a detail description of present system and show the experimental results focusing on time cost and panorama quality.

A. Flow of present system

Before giving the experimental result, we show the flow diagram of our stitching process in Fig. 3. There are two main parts: matching

and blending. The connection of the two parts is the correspondence pairs. In matching part, first, our modified SURF is used to detect feature points. Modified SURF feature descriptors are 64 dimensional

known as the correct matches or correspondences.

Fig. 3. Flow diagram of panorama stitching system

In blending part, first Homography matrix H can be estimated based on these correspondence pairs, H will be the one that minimize

equation (2), which can be computed by LM. Then adjustment between images is done, in other word, the images has been transformed into the corresponding image in a same coordinate system by the H matrix. Now the panorama has already got, but with some stitching error of color and illumination. Lastly, Multi-band blending is used to make the transformation error or the seam invisible by resetting the value of overlapped region according to equation (3) [15].

B.Experiments

Experiments consist of two parts: panorama quality (stitching) test and time cost test. A good stitching program should make panorama seamless and clear and be fast for using in various application such as real time processing. In this experiment, we use Camp dataset as shown in appendix B. The other datasets that used can be found in [18].

1) Stitching test: Figure 4 and Fig. 5 show the results of stitching before multi-blending and after multi-blending. For those image, we use 4 images; img3, img9, img10, img11 from Camp dataset. It is easy to find out the three seams on the Fig. 4, which caused by the

illumination and color. Figure 5 looks very clear and perfect.

Fig 8 use from 5 images to 20 images, which are all 200*300 in size, from Abbey data set that can be downloaded from [18]. The experiments of Fig 9 use 16 images of Camp dataset. Those show that the Present system is faster than SIFT demo. The present system is almost 4 times (3.56~4.46) faster than SIFT demo in changing number of images and also faster than SIFT demo in changing size of images. When we were measuring the processing time on Windows platform, those are different each other little. All the time values are got by the processing analyze tools of visual studio 2010. Each experiment the time will change a little because of the CPU and memory, the reasonable experiment time is needed. After testing and computing, we measured the processing times 4 times for SIFT demo and 5 times for the present system which are the most stable times of experiments.

Fig. 4. Panorama with obvious seam before blending processing

Fig. 5. Panorama with seamless after blending processing of Fig. 4.

Next, we did an experiment with large data set. In this experiment, we use 16 images of Camp dataset. Fig. 7 is the result of present program and Fig.6 is the result of SIFT demo [17].

Fig. 6. Panorama stitched 16 images based on SIFT.

Fig.7. Panorama stitched 16 images based on modified SURF.

We can see that the present stitching process can show its good performance for large image dataset. It has the good performance as good as SIFT demo, which is well known for its robust performance and perfect result.

2) Time cost test: The present system is faster than SIFT demo [17] as shown in Fig 8 and Fig 9, due to using fast modified SURF[6]. They are two different views. Fig 8 shows the time cost when the numbers of images that used are different. Fig 9 shows the time cost when the size of images that used are different. The experiments of

Fig. 8. Time cost– number of images, using Abbey data set.

Fig. 9. Time cost – size of image diagram, using the whole

Camp data set that includes 16 images.

V. CONCLUSION AND FUTURE WORKS

Experiments showed that the present panorama image stitching process has a good performance. The reasons are as follows. Due to Modified SURF, high-resolution panorama can be created in case there are some changes of illumination, color, blur and et cetera, and processed fast. K-NN and RANSAC improves the repeatability of matching. Bundle adjustment and multi-band blending make the panorama seamless. In addition, LM is used to estimate the homography, which makes the transformation more accurate. But the present system shows its defects when there are some noise images that are not neighbored. So as a future work, we plan to do more research in the area through removing the noise before stitching processing.

VI. APPENDIX

A. Object image dataset

The test images of this paper are shown in this appendix, which include two image dataset. They are Object image dataset and Camp image dataset.

The following images are Object image dataset. Images marked from left to right, from up to down is: 1, 2, 3, …, 16. All the images are in the same size with 574x 768.

[4] Yang zhan-long and Guo bao-long. Image Mosaic Based On SIFT. International Conference on Intelligent Information Hiding and Multimedia Signal Processing, pp.1422-1425,2008.

[5] M. Brown and D. Lowe. Recognizing Panoramas. Proc. Ninth Int’l Conf. Computer Vision, pp. 1218-1227, 2003.

[6]Luo Juan and Oubong Gwun. A Comparison of SIFT, PCA-SIFT and SURF. International Journal of Image Processing (IJIP), Volume (3): Issue (4) 2009.

[7] K. Mikolajzyk and C. Schmid. A Perforance Evaluation of Local Descriptors. IEEE,Trans. Pattern Analysis and Machine Intelligence, vol.27, no.10, pp 1615-1630, October 2005.

[8] K. Mikolajczyk, T. Tuytelaars, C. Schmid, A. Zisserman, J. Matas, F. Schaffalitzky, T. Kadir, and L.V. Gool. A Comparison of Affine Region Detectors. IJCV, 65(1/2), pp.43-72, 2005.

[9] M. Brown and D. Lowe. Automatic Panoramic Image Stitching using Invariant Features. International Journal of Computer Vision, 74(1), pages 59-73, 2007.

[10]Interpolation and blenders, http://www.autopano.net/wiki-en/action/view/Interpolation_and_blenders .

[11] Manolis I. A. Lourakis. A Brief Description of the Levenberg-Marquardt Algorithm Implemened by levmar. February 11, 2005.

[12] P. J. Burt and E. H. Adelson. A multiresolution spline with application to image mosaics. ACM Trans. On Graphics, 2(4), 1983. [13] M. A. Fischler, R. C. Bolles. Random Sample Consensus: A Paradigm for Model Fitting with Applications to Image Analysis and Automated Cartography. Comm. of the ACM, Vol 24, pp. 381-395,

1981. [14] W. Zhang and J. Kosecka. Generalized ransac framework for

relaxed correspondence problems. In International Symposium on 3D B. Camp image dataset

The following images are Camp image dataset. Images are Data Processing, Visualization and Transmission,2006.

marked from left to right, from up to down as 0, 1, 2, …,15. All the [15] Mueller, N.[Nickolaus], Nguyen, T.Q.[Truong Q.]. Image

interpolation using classification and stitching. ICIP08(901-904). images are in the same size with 574x 768 resolutions.

[16]Demo Software: SIFT Keypoint Detection,

http://people.cs.ubc.ca/~lowe/keypoints

[17] A c/c++ library for robust, non linear homography estimation, http://www.ics.forth.gr/~lourakis/levmar/.

[18] Image dataset : http://research.microsoft.com/en-us/um/people/szeliski/StitchingEvaluation/.

REFERENCES

[1] D. Lowe.Distinctive. Image Features from Scale-Invariant Keypoints. IJCV, 60(2) ,pp. 91–110, 2004.

[2] Y. Ke and R. Sukthankar. PCA-SIFT: A More Distinctive Representation for Local Image Descriptors. Proc. Conf. Computer Vision and Pattern Recognition, pp. 511-517, 2004.

[3] Herbert Bay, Andreas Ess, Tinne Tuytelaars, Luc Van Gool. SURF: Speeded Up Robust Features. Computer Vision and Image Understanding (CVIU), Vol. 110, No. 3, pp. 346--359, 2008.

因篇幅问题不能全部显示,请点此查看更多更全内容