13
Research Article The Improved Algorithm of Fast Panorama Stitching for Image Sequence and Reducing the Distortion Errors Zhong Qu, 1 Si-Peng Lin, 1 Fang-Rong Ju, 1 and Ling Liu 2 1 Chongqing University of Posts and Telecommunications, Chongqing 400065, China 2 College of Mobile Telecommunications, Chongqing University of Posts and Telecommunications, Chongqing 401520, China Correspondence should be addressed to Zhong Qu; [email protected] Received 20 March 2015; Revised 7 June 2015; Accepted 13 September 2015 Academic Editor: Jason Gu Copyright © 2015 Zhong Qu et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. e traditional image stitching result based on the SIFT feature points extraction, to a certain extent, has distortion errors. e panorama, especially, would get more seriously distorted when compositing a panoramic result using a long image sequence. To achieve the goal of creating a high-quality panorama, the improved algorithm is proposed in this paper, including altering the way of selecting the reference image and putting forward a method that can compute the transformation matrix for any image of the sequence to align with the reference image in the same coordinate space. Additionally, the improved stitching method dynamically selects the next input image based on the number of SIFT matching points. Compared with the traditional stitching process, the improved method increases the number of matching feature points and reduces SIFT feature detection area of the reference image. e experimental results show that the improved method can not only accelerate the efficiency of image stitching processing, but also reduce the panoramic distortion errors, and finally we can obtain a pleasing panoramic result. 1. Introduction Image stitching is a process to combine a sequence of images together, mutually having overlapping areas, resulting into a seamless, smooth panoramic image [1]. e hand-held camera has limited resolution and small field-of-view, while the image stitching can get high-resolution and high-quality panorama by using hand-held equipment. Image stitching has become a hotspot in the field of computer vision, image processing, and computer graphics. Image registration [2] is an important step in the image stitching process. e quality of image stitching greatly depends on the accuracy of image registration. According to the different methods for image registration, the image stitching algorithms are divided into two categories generally, region-related image registration [3] and feature-based image registration [4, 5]. Region-related image registration studies the relationship of the same dimension blocks between the input image and the reference image and computes their similarity degree. But when the image is rotated or resized, this method would not result in a desired result. While the textures are too strong or too weak, the result would also show enormous stitching errors. Feature-based image registration method uses mathematical models to find the abstract description features of the useful pixel information by com- paring the description features to find the correspondence connection between the input image and the reference image. However, the traditional feature detection methods such as Harris corner and Susan operator do not have the invariance properties. So a stable feature detection method is requested for image stitching process. In 2004, Lowe proposed local scale-invariant image feature extraction algorithm (SIFT) [6], which received a good performance from different scale, dif- ferent rotation direction, and perspective distortion images. is paper uses the feature-based image registration method and selects scale-invariant SIFT features to imple- ment panorama image stitching. e aim of image stitching is to transform multiple source images with areas overlapping each other to unify in the same coordinate system through transformation matrixes. erefore, it is important to select a reference coordinate system. e traditional stitching process [7–9] constructs panoramic images from ordered image Hindawi Publishing Corporation Mathematical Problems in Engineering Volume 2015, Article ID 428076, 12 pages http://dx.doi.org/10.1155/2015/428076

Research Article The Improved Algorithm of Fast Panorama ...downloads.hindawi.com/journals/mpe/2015/428076.pdf · Image Sequence and Reducing the Distortion Errors ZhongQu, 1 Si-PengLin,

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Research Article The Improved Algorithm of Fast Panorama ...downloads.hindawi.com/journals/mpe/2015/428076.pdf · Image Sequence and Reducing the Distortion Errors ZhongQu, 1 Si-PengLin,

Research ArticleThe Improved Algorithm of Fast Panorama Stitching forImage Sequence and Reducing the Distortion Errors

Zhong Qu1 Si-Peng Lin1 Fang-Rong Ju1 and Ling Liu2

1Chongqing University of Posts and Telecommunications Chongqing 400065 China2College of Mobile Telecommunications Chongqing University of Posts and Telecommunications Chongqing 401520 China

Correspondence should be addressed to Zhong Qu quzhongcqupteducn

Received 20 March 2015 Revised 7 June 2015 Accepted 13 September 2015

Academic Editor Jason Gu

Copyright copy 2015 Zhong Qu et al This is an open access article distributed under the Creative Commons Attribution Licensewhich permits unrestricted use distribution and reproduction in any medium provided the original work is properly cited

The traditional image stitching result based on the SIFT feature points extraction to a certain extent has distortion errors Thepanorama especially would get more seriously distorted when compositing a panoramic result using a long image sequence Toachieve the goal of creating a high-quality panorama the improved algorithm is proposed in this paper including altering the wayof selecting the reference image and putting forward a method that can compute the transformation matrix for any image of thesequence to align with the reference image in the same coordinate space Additionally the improved stitching method dynamicallyselects the next input image based on the number of SIFT matching points Compared with the traditional stitching process theimproved method increases the number of matching feature points and reduces SIFT feature detection area of the reference imageThe experimental results show that the improved method can not only accelerate the efficiency of image stitching processing butalso reduce the panoramic distortion errors and finally we can obtain a pleasing panoramic result

1 Introduction

Image stitching is a process to combine a sequence of imagestogether mutually having overlapping areas resulting intoa seamless smooth panoramic image [1] The hand-heldcamera has limited resolution and small field-of-view whilethe image stitching can get high-resolution and high-qualitypanorama by using hand-held equipment Image stitchinghas become a hotspot in the field of computer vision imageprocessing and computer graphics

Image registration [2] is an important step in the imagestitching process The quality of image stitching greatlydepends on the accuracy of image registration Accordingto the different methods for image registration the imagestitching algorithms are divided into two categories generallyregion-related image registration [3] and feature-based imageregistration [4 5] Region-related image registration studiesthe relationship of the same dimension blocks between theinput image and the reference image and computes theirsimilarity degree But when the image is rotated or resizedthis method would not result in a desired result While the

textures are too strong or tooweak the result would also showenormous stitching errors Feature-based image registrationmethod uses mathematical models to find the abstractdescription features of the useful pixel information by com-paring the description features to find the correspondenceconnection between the input image and the reference imageHowever the traditional feature detection methods such asHarris corner and Susan operator do not have the invarianceproperties So a stable feature detection method is requestedfor image stitching process In 2004 Lowe proposed localscale-invariant image feature extraction algorithm (SIFT) [6]which received a good performance from different scale dif-ferent rotation direction and perspective distortion images

This paper uses the feature-based image registrationmethod and selects scale-invariant SIFT features to imple-ment panorama image stitching The aim of image stitchingis to transformmultiple source images with areas overlappingeach other to unify in the same coordinate system throughtransformation matrixesTherefore it is important to select areference coordinate systemThe traditional stitching process[7ndash9] constructs panoramic images from ordered image

Hindawi Publishing CorporationMathematical Problems in EngineeringVolume 2015 Article ID 428076 12 pageshttpdxdoiorg1011552015428076

2 Mathematical Problems in Engineering

sequences stitching step by step from left to right The firstimage of the sequence is selected as the reference imageSubsequently select the following stitching result as the nextnew reference image in the traditional stitching process Thetraditional stitching process cumulates the matching errorsof each stitching process in the reference image which wouldbe seriously distorted [10] when the set of image sequences islarge it affects the quality of panoramic result The improvedmethod proposed in this paper first implements image regis-tration for all adjacent images in the sequence and calculatesthe transformation matrix between the adjacent images andthen took the middle image of the sequence as the referenceimage According to the transformation matrixes of alladjacent images the improvedmethod can realize image any-where in the sequence transforms to the coordinate space ofthe reference imageTherefore all images in the sequence canbe unified to the same coordinate system after undergoing allstitching processes The experimental results show that theimproved method reduces the distortion errors of panoramaand saves the time of stitching process moreover it enhancesthe quality of the stitching result

The rest of this paper is organized as follows Section 2describes the SIFT algorithm for extracting image featuresand the RANSAC algorithm for purifying the matching fea-ture points meanwhile it obtains the transformation matrixfor the matching images Section 3 introduced the algorithmof Levenberg-Marquardt which is used to adjust the param-eters in the transformation matrix [11] Section 4 describesthe traditional image stitching process and Section 5 proposesthe improved image stitching process Section 6 shows theexperimental results and quantitative analysis to evaluate theimproved method Section 7 acts as the conclusion of thewhole paper

2 Image Registration

21 SIFT Feature Extraction Brown and Lowe proposedscale-invariant features extraction algorithm (SIFT) in 2004and continuously proposed the image stitching process [9]based on SIFT algorithm in 2007The SIFT algorithm detectsthe image features speedily and provides invariant propertywhen the image is rotated resized or illuminated The SIFTdetection process is shown in Figure 1

In order to simulate the multiscale feature the SIFTalgorithm proposes the scale space which is defined as theconvolution of a variable-scale Gaussian 119866(119909 119910 120575) with aninput image 119868(119909 119910)

119871 (119909 119910 120575) = 119866 (119909 119910 120575) lowast 119868 (119909 119910) (1)

where 120575 represents the factor of the scale space Large-scalefactors correspond to the overviews of the image featuresand small-scale factors correspond to the details of the imagefeatures Creating the Difference of Gaussians (DOG opera-tor) function

119863 (119909 119910 120575) = [119866 (119909 119910 119896120575) minus 119866 (119909 119910 120575)] lowast 119868 (119909 119910)

= 119871 (119909 119910 119896120575) minus 119871 (119909 119910 120575)

(2)

SIFT detection area

Scale space extrema detection

Keypoint localization

Orientation assignment

Keypoint descriptor

Figure 1 SIFT feature extraction step

We search the extreme points in DOG space Eachsampling point is compared with the 8 neighborhood pointsof the same scale factor and 18 neighborhood points of theadjacent scale factorsThe detected extreme points are chosenas the candidate keypoints

In order to improve the stability of the keypoints correctthe parameters of the DOG operator based on the Taylorformula to obtain the accurate position and scale factorMeanwhile eliminate the low contrast points and unstablepoints at the edge to enhance the stability of the matchingpoints Around the neighborhood of the keypoints the gradi-ent orientation of the pixels is counted by histogram and thendistributes the maximum orientation of the histogram forthe keypoints to provide the rotation-invariant characteristicThe formula of gradient orientation shows as follows

120579 (119909 119910) = tanminus1 [119871 (119909 119910 + 1) minus 119871 (119909 119910 minus 1)

119871 (119909 + 1 119910) minus 119871 (119909 minus 1 119910)] (3)

Until now the keypoints of the image are detectedcompletely Each keypoint has coordinate position scale andorientation information Then we need to build a descriptorfor each keypoint At first in order to ensure the rotation-invariant characteristic rotate the coordinate axis to theorientation of the keypoint and then divide the region aroundthe keypoint into 4 times 4 subregions Each subregion has 8-dimension vector of orientation information Thus there is4 times 4 times 8 = 128 dimension vector in the keypoint descriptorFinally we normalize the keypoint descriptor to eliminatethe influence of the illumination changeThe original images(image sequence) are shown in Figure 2

Figure 3 shows the results of extracting the SIFT featuresfrom the 4 original images in Figure 2 Different colors rep-resent the different degrees of feature points in density Thehigher density degree of feature points represents the moresignificant characteristics of feature points Density degreeswere sorted from high to low as red green blue yellow andblack 5 levels Table 1 lists the experimental data of extract-ing SIFT features including the number of SIFT featurepoints and the time of each step in detection SIFT featuresprocess

22 RANSAC Algorithm RANSAC (Random Sample Con-sensus) algorithm calculates the parameters of mathematicalmodel based on random sampling through continuously

Mathematical Problems in Engineering 3

Table 1 Experimental data in extracting SIFT features

Number Number of SIFT feature pointsTime(s)

Scale spaceextrema detection

Keypointlocalization

Orientationassignment

Keypointdescriptor Total

Figure 2(a) 2844 1716 1670 0249 2590 5225Figure 2(b) 2269 1635 1451 0203 2012 4319Figure 2(c) 2652 1685 1576 0202 2278 4741Figure 2(d) 3315 1528 1748 0249 2839 5364

(a) Image 1 (b) Image 2

(c) Image 3 (d) Image 4

Figure 2 The original image sequence

iterating new random combinations of sample data until amathematical model that can explain or adapt to distributionof all data sets is found [12] For each feature point of theimage search the matching points based on the minimumEuclidean distance using a k-d tree The coordinate space

mapping relationship betweenmatching points is representedby the 3 times 3 transformation matrix This paper is intended touse RANSAC algorithm to obtain the transformation matrixbetween thematching points and thenmakematching imagesmapped to the same coordinate space by the transformation

4 Mathematical Problems in Engineering

(a) SIFT features in Figure 2(a) (b) SIFT features in Figure 2(b)

(c) SIFT features in Figure 2(c) (d) SIFT features in Figure 2(d)

Figure 3 Extract SIFT feature points for images in Figure 2

matrixes information In this paper image sequences wereshot by a hand-held camera along the same horizontal planeSo the transformation matrix is suitable for the affine matrixThe affine matrix structure [13] is shown as follows

119867 =[[

[

cos 120579 minus sin 120579 119906

sin 120579 cos 120579 V

0 0 1

]]

]

(4)

where the variable 120579 represents the image rotation angle119906 V separately represent the translation distance in 119909 axialdirection and 119910 axial direction In order to calculate theparameters of the affine matrix at least 3 pairs of coordinateinformation pieces ofmatching points are neededWe assume

that (119909119894

119910119894

1)119879 and (119909

1015840

119894

1199101015840

119894

1)119879 represent a pair of matching

feature points The affine matrix can be obtained as follows

119867 =[[[

[

1199091015840

1

1199091015840

2

1199091015840

3

1199101015840

1

1199101015840

2

1199101015840

3

1 1 1

]]]

]

[[

[

1199091

1199092

1199093

1199101

1199102

1199103

1 1 1

]]

]

minus1

(5)

In the panorama image stitching process select 119903 = 3

pairs of matching points at random (Ensure that the 3 pairs offeature points in the input image composite into an invertiblematrix) [10] Through formula (5) it calculates the affinetransformation matrix 119867 and then iterates resampling thenewmatching feature points to find an affinematrix119867 whichcorresponds to the maximum number of inliers (whoseprojections are consistent with 119867 with a tolerance isin pixels)if we assume that 119901

119894

represents the probability that a feature

Mathematical Problems in Engineering 5

Table 2 Experimental data in image registration process

Stitching processing The inliers number after RANSAC The time for stitching (s)Figures 3(a) and 3(b) 79 1026Figures 3(b) and 3(c) 49 977Figures 3(c) and 3(d) 56 1182

(a) RANSAC inliers between Figures 3(a) and 3(b) (b) RANSAC inliers between Figures 3(b) and 3(c)

(c) RANSAC inliers between Figures 3(c) and 3(d)

Figure 4 RANSAC for the adjacent images in Figure 3

point matches correctly between the matching images After119899 times iterations the probability of finding a correct affinematrix is 119875 = 1 minus (1 minus (119901

119894

)119903

)119899 With the iteration number

is increasing the probability 119875 will increase as well When119899 = 100 and 119901

119894

= 05 the probability that a correct affinetransformation matrix is not found approaches 10 times 10

minus6This paper first extracts the image feature points through

SIFT algorithm searches matching feature points in the over-lapping areas of the adjacent images according to the mini-mum Euclidean distance and then uses RANSAC algorithmto findmaximumnumber of inlierswithin the set ofmatchingpoints obtaining the affine transformation matrix Afterrefining the matching points with the RANSAC algorithmthe set of inliers are set up with red lines shown as in Figure 4The inliers number and the time of image registration areshown in Table 2

3 Bundle Adjustment Using L-M Algorithm

L-M (Levenberg-Marquardt) algorithm is a nonlinearoptimization algorithm that combines the Gauss-Newton

method with the gradient descent method making useof known measurement data to estimate the unknownparameters [14] In this paper we use L-M bundle to adjustthe parameters of the affine transformation matrix and try tomake the total matching errors among the matching featurepoints approach a minimum Generally the standard modelof error function is defined as sum

119894

(12)1199032

119894

where 119903119894

representsthe Euclidean distance between the 119894th matching pointsHowever when there is a mismatching point the Euclideandistance is so large that it will impact on the standarderror function with a great weight In order to eliminatethe influence of mismatching points we choose the Huberfunction instead of the standard error function The Huberfunction [9 15] can empower the weight dynamicallyaccording to the matching errors value

ℎ (119903) =

1

2|119903|2

if |119903| lt 120575

120575 |119903| minus1

21205752

if |119903| ge 120575

(6)

6 Mathematical Problems in Engineering

Table 3 The total matching errors comparison data after L-M

Stitching processing The total matching errors before L-M The total matching errors after L-MFigure 4(a) 7265 5969Figure 4(b) 1562 1389Figure 4(c) 4974 3219

119908 (119903) =

1 if |119903| lt 120575

120575

|119903| if |119903| ge 120575

(7)

Formula (6) shows the Huber function and (7) shows theweight function of the Huber One has 120575 = 1345119904 where 119904

represents the standard deviation of the measurement dataThe new error function is expressed as minsum

119894

ℎ(119903119894

) whichis equivalent to minsum

119894

119908(119903)1199032 When |119903| lt 120575 the matching

point is inlier corresponding to the fact that the residual isgiven weight 1 When |119903| ge 120575 the matching point is outliercorresponding the weight for residual trend towards 0

L-M algorithm continues to iterate until finding a setof parameters that make the error function minimize Weassume119867

119896

= [1198861

1198862

119886119898

] represents the solution vector ofunknown parameters in the 119896th iteration process Δ119872 repre-sents the offset vectorThen the next iteration process in L-Malgorithm can be expressed as

119867119896+1

= 119867119896

+ Δ119872

Δ119872 = minus (119869119879

119896

119869119896

+ 119906119896

119868)minus1

119869119879

119896

119890119896

119869119896

=

[[[[[[[[[[

[

1205971199031

(119867119896

)

1205971198861

1205971199031

(119867119896

)

1205971198862

sdot sdot sdot1205971199031

(119867119896

)

120597119886119898

1205971199032

(119867119896

)

1205971198861

1205971199032

(119867119896

)

1205971198862

sdot sdot sdot1205971199032

(119867119896

)

120597119886119898

sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot

120597119903119899

(119867119896

)

1205971198861

120597119903119899

(119867119896

)

1205971198862

sdot sdot sdot120597119903119899

(119867119896

)

120597119886119898

]]]]]]]]]]

]

(8)

where 119869119896

corresponds to the Jacobi matrix under the con-dition of the 119867

119896

119868 represents unit matrix 119890119896

is the residualsum of all matching points under 119867

119896

119906 (119906 ge 0) representsthe damping parameter When 119906 gradually tends to 0 L-M algorithm is similar to the Gauss-Newton method whichcontinuously closes to the ideal value after each iterationprocess When 119906 is large L-M algorithm is similar to thegradient descent method which can find the solution neigh-borhood of the unknown parameters speedily

Table 3 makes a list of comparative data of total matchingerrors before and after L-M bundle adjustment Total match-ing errors are expressed as sum

119898

119894=0

119903 where 119898 represents thematching feature points number Comparative data showsthat L-M algorithm can truly reduce the image matchingerrors

4 The Traditional Stitching Method

After referring to the paper published by Xiong and Pulli [7]and Brown and Lowe [9] we summarize that the traditionalstitching method is shown as in the following steps

Algorithm 1 (the traditional image stitching process) Con-sider the following

Input 119899 ordered image sequence 119878(1198780

1198781

119878119899minus1

) whichmutually have overlapping areas

(1) Select the first two images of the set 119878 to calculate theSIFT feature points respectively

(2) Select the first image in the sequence 119878 as the referenceimage and the second image as the new input imageUse 119870NN (119870 Nearest-Neighbours) algorithm [16] tosearchmatching feature points between the new inputimage and the reference image in accordance with theminimum Euclidean distance

(3) According to thematching feature points data set usethe RANSAC algorithm to calculate the affine matrix119867 which can transform the new input image into thecoordinate space of the reference image

(4) Use the L-M algorithm to optimize the affine matrix119867

(5) Use the optimized 119867 to transform the new inputimage

(6) Search the optimal seam between the affine trans-formation result in step (5) and the reference imagethen along the seam to combine them togetherseamlessly obtain the stitched result 119894119898119892119877119890119904119906119897119905

(7) Add the 119894119898119892119877119890119904119906119897119905 into 119878 to replace the input imageand the reference image In next stitching process the119894119898119892119877119890119904119906119897119905 is selected as the new reference image

(8) Return to step (1) to continuously implement the nextstitching process until there is only one image existingin the 119878 which is the panoramic result

Output A panoramic image

However in traditionalmethod each timewhen an imagestitching is completed the dimension of reference image willcontinue to increase The overlapping area between the newinput image and the reference image accounts for smallerand smaller proportion comparing with the entire referenceimage area Therefore calculating SIFT feature points for thewhole reference image will consume a lot of system resources

Mathematical Problems in Engineering 7

Image[x]

Hminus1

[x] Hminus1

[k minus 2] Hminus1

[k minus 1]H[k] H[k + 1] H[y minus 1]

Image[k minus 2] Image[k minus 1] The reference image Image[k + 1] Image[k + 2] Image[y]middot middot middotmiddot middot middot

prod x=kminus1

x++Hminus1

[x] prody=k

minusminusyH[y]

Figure 5 The process of calculating the affine transformation matrix for arbitrary image

and registration time In addition the approach of the tradi-tional stitching algorithm to selecting the next input imageis relatively single Each time when the adjacent image isselected as the new input image it does not give priority to theoverlapping area size or the matching feature point numberbetween new input image and the reference image Mean-while if there are manymatching errors in image registrationprocess the matching errors will be preserved and affectevery subsequent registration process because the referenceimage is formed by the previous stitched results Finally thepanoramic image will be seriously distorted

5 The Improved Stitching Method

In the image stitching process as we know the accuracyof image registration decides the quality of the panoramicimage and the affine transformationmatrix is the final resultwhich is what wewanted by image registration So it is impor-tant to obtain a precise transformation matrix Thereforewe proposed a new mathematical model to compute thetransformation matrix which is shown as

119867 =

119894=119896minus1

prod

119894++

119867minus1

[119894] 119894 lt 119896

119894=119896

prod

minusminus119894

119867 [119894] 119894 gt 119896

(9)

where 119867[119894] represents the affine transformation matrixobtained from each group of adjacent images and 119896 repre-sents the middle index of the sequence The new mathemati-cal model does not calculate the affine transformationmatrixbetween the result of each stitching process and the newinput image but using the property of transitivity of matrixesobtained the affine transformation matrix for the new inputimage through all adjacent images Figure 5 describes theprocess of calculating the affine transformation matrix forarbitrary image Firstly we do image registrations for all adja-cent images to get the matching feature points informationUsing the information of matching features we can calculatethe affine matrices between all adjacent images and then theaffine matrix mapped from the input image to the referenceimage also can be obtained through the statistical matricesset according to formula (9) Due to the transitivity of thematrixes we can get the affine matrix transformed from anyimage to the reference image

The improved method does not detect the SIFT featurepoints for the whole reference image area but uses thestatistical registration information of all adjacent images tocalculate the affine matrix So the improved method not only

reduces the SIFT feature detection area of the referenceimage but also increases the number of matching featurepoints and improves the efficiency of stitching time

On the other hand in contrast to stitching serially fromleft to right one by one in the traditional method theimproved method takes the middle image as the referenceimage and selects the next input image based on the numberof matching points and completes the image sequence stitch-ing process from middle position dynamically expanding toboth sides In the improved stitching process the maximumaccumulated matching errors are computed from the middleimage to the two sides of the image sequence as shown in(10) reduced to the half level of the traditional method

119864 = MAX(

119896minus1

sum

119894=1

sum

119898isin119908(119894119894+1)

119889119898

119899

sum

119894=119896+1

sum

119898isin119908(119894119894minus1)

119889119898

) (10)

where 119908(119894 119894 + 1) represents the matching points numberbetween the image 119894 and the image 119894+1 and 119889

119898

represents theresidual of the 119898th matching feature points After obtainingthe affine transformation matrix using RANSAC algorithmwe can continuously use L-M algorithm bundle to adjust theaffine matrix to further reduce the accumulated matchingerrors Since the stitching errors are reduced obviously in theimprovedmethod the distortion degree of panorama is lowercompared to the traditional method

Algorithm 2 (the improved image stitching process) Con-sider the following

Input 119899 ordered image sequence 119878(1198780

1198781

119878119899minus1

) whichmutually have overlapping areas

(1) Do image registrations for all adjacent images

(i) Assume the adjacent images are 119878119894

and 119878119894minus1

119894 isin

[1 119899 minus 1] use 119870NN algorithm to search match-ing SIFT feature points between 119878

119894

and 119878119894minus1

inaccordance with the minimum Euclidean dis-tance and then preserve the matching featurepoints data and the matching points numberseparately by using the arrays 119891119890119886119905119906119903119890119871119894119904119905 and119899119906119898119871119894119904119905

(ii) According to the matching feature points dataset 119891119890119886119905119906119903119890119871119894119904119905 compute the affine matrix thatcan be transformed from the coordinate spaceof the image 119878

119894minus1

to the coordinate space of theimage 119878

119894

and then preserve the affine matrix inthe array 119867119871119894119904119905

8 Mathematical Problems in Engineering

(a) Original image sequence (6 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

Figure 6 The panoramic images obtained by the traditional method and the improved method

(iii) Return to step (i) to complete the image regis-trations for the next adjacent images

(2) 119896 represents the middle index of the set 119878 Take 119878119896

asthe reference image According to the array 119899119906119898119871119894119904119905select the image which has larger matching pointsnumber with 119878

119896

as the next new input image(3) According to the index of the new input image and

the array119867119871119894119904119905 calculate the affinematrix119867 betweenthe new input image and the reference image based onformula (9)

(4) Use the L-M algorithm to optimize the affine matrix119867

(5) Use the optimized 119867 to transform the new inputimage

(6) Search the optimal seam between the affine transfor-mation result in step (5) and the reference image thenalong the seam combine them together seamlesslyand obtain the stitched result 119894119898119892119877119890119904119906119897119905

(7) Add the 119894119898119892119877119890119904119906119897119905 into 119878 to replace the input imageand the reference imageTherefore the stitched result119894119898119892119877119890119904119906119897119905 becomes the new middle image of thesequence 119878

(8) Return to step (2) to continuously implement the nextstitching process until there is only one image existingin 119878 which is the panoramic result

Output A panoramic image

Figure 6(a) is the original image sequence of the sceneFigures 6(b) and 6(c) are the panoramic images respec-tively obtained by the traditional method and the improvedmethod Comparing the two panoramic images we canconclude that the result from the improved stitching methodis better The distortion in the traditional stitching result issignificantly reduced by the improved stitching method

6 The Experimental Results and Analysis

61 The Experimental Results In order to demonstrate thestability of the improved method we select image sequencesfrom multiple scenes to implement the improved stitchingalgorithm Figures 7(a) 8(a) and 9(a) are the parts of theexperimental scenes The source image size in Figures 7 and9 is 500 times 747 and the size in Figure 8 is 500 times 697 Figures7(b) and 7(c) show the experimental results of the tradi-tional stitching process and the improved stitching processFigure 7(d) shows the stitching result after adding the L-Madjustment in the improved method Because of the obviousseam in the panorama continue to search the optimal seambetween affine transformation result and the reference imagealong the seam combine them together seamlessly in thestitching process The result is as shown in Figure 7(e) Fig-ure 7(f) shows the panoramic result after cutting the uselessarea In order to detect the stability of the improved stitchingprocess continue to select longer image sequence Figure 8(a)lists 12 computer graphic images and Figure 9(a) lists 16building images The rest of the images in Figures 8 and 9show the experimental results corresponding with the imagesin Figure 7

The experimental results in Figures 7 8 and 9 showthat the improved stitching method is adaptable for thelonger image sequences as well The stitching process cansignificantly improve the panorama distortions obtaininghigh-resolution and high-quality panorama

62 Estimation of Performance This paper takes the middleimage of the sequence as the reference image Do imageregistrations first for all adjacent images Then we calculatethe affine transformationmatrix according to the overlappingareas transitivity among the adjacent images instead of calcu-lating the affine transformationmatrix between the new inputimage and the reference image directly In addition we canget more matching feature points by the improved method

Mathematical Problems in Engineering 9

(a) Original image sequence of the grass scene (8 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitching method

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 7 Experimental results for 8 source images sequence

So we can provide more sample data for RANSAC algorithmwhich can increase the accuracy of the affine transformationmatrix and assure that we can obtain high-quality panoramaat last

Figures 10(a) 10(b) and 10(c) show the comparative dataof matching feature points number between the traditionalmethod and the improved method the results correspond tothe scenes of Figures 7(a) 8(a) and 9(a) The three scenesrespectively have 8 12 and 16 images in the sequenceWe use119875119894

to represent the 119894th stitching processThe three charts showthat the improvedmethod has better performance which canget more matching feature points

Figure 11 shows the comparative data of stitching timebetween the traditional method and the improved methodThe stitching time is recorded from the beginning of thestitching process to the end of finishing the last imagestitching The chart shows that the improved method hasfaster time efficiency Moreover the time efficiency will beimproved more obviously for the longer image sequence

At the same time from Figures 7 8 and 9 we can see thatthe improved algorithmobviously eliminates the distortion ofthe traditional results and gets better panoramic results Weassume that (119909 119910) represents the center of the input image

after being transformed by the affine matrix 119867 and wepreserve the center point of each stitching process in the set ofthe variable 119888119890119899119905119890119903119878119890119905 To some extent 119888119890119899119905119890119903119878119890119905 could reflectthe degree of panorama distortion We use formula (11) toexpress the distortion degree in which the Slope representsa function of computing slope between two points

distortion degree = Max Slope (119894 119895)

119894 119895 isin centerSet(11)

In addition we also define the variable 119894119899119891119900 119901119903119900119901119900119905119894119900119899which represents the ratio between the panorama image pixelnumber after removing the useless black pixels and the entirepanorama pixels number For example in Figure 9(e) thereare some black background pixels which are useless andwould be cut in Figure 9(f) The 119894119899119891119900 119901119903119900119901119900119905119894119900119899 expressionis showed as formula (12) and the 119908119894119889119905ℎ ℎ119890119894119892ℎ119905 are thepanorama dimensions

info proportion = 1 minusblack pixels

width times height (12)

10 Mathematical Problems in Engineering

(a) Original image sequence of the computer graphic scene (12 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 8 Experimental results for 12 source images sequence

(a) Original image sequence of the building scene (16 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 9 Experimental results for 16 source images sequence

Mathematical Problems in Engineering 11

20

40

60

80

100

120

140

160

P1 P2 P3 P4 P5 P6 P7

The m

atch

ing

poin

ts nu

mbe

r

Stitching process

ImprovedTraditional

(a) The matching feature points number of Figure 7(a)

2030405060708090

100110120

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11Stitching process

(b) The matching feature points number of Figure 8(a)

0

100

200

300

400

500

600

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10P11P12P13 P15P14Stitching process

(c) The matching feature points number of Figure 9(a)

Figure 10 The comparison data of matching feature points number between the traditional method and the improved method

From Table 4 we can see that the 119889119894119904119905119900119903119905119894119900119899 119889119890119892119903119890119890 and119894119899119891119900 119901119903119900119901119900119905119894119900119899 compared with the traditional method havebeen pleasingly improved

7 Conclusion

This paper increases the number of thematching SIFT featurepoints by improving the traditional method reducing theunnecessary SIFT detection area in the reference area as wellIn addition the improved method accelerates the panoramicstitching time efficiency and obtains a high-resolution high-quality panorama image Compared with the traditionalmethod the improved method proposed in this paper startsstitching from the middle position of the image sequenceThe middle image is taken as the reference image Then weobtain the affine matrix for any image in the sequence to thereference image according to the statistics information of allaffine transformation matrixes between the adjacent imagesMeanwhile the improved method dynamically selects thenext new input image to join the stitching process basedon the number of statistical matching points of the adjacentimages The experimental results verify that the improvedstitching process can accelerate time efficiency and reduce thedistortion of the panorama image

0

100

200

300

400

500

600

Scene 1 Scene 2 Scene 3

The t

otal

tim

e for

stitc

hing

the s

cene

TraditionalImproved

Figure 11 The comparison data of stitching time between thetraditional method and the improved method

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

12 Mathematical Problems in Engineering

Table 4 The comparison data of distortion degree between the traditional method and the improved method

Scene distortion degree info proportionThe traditional method The improved method The traditional method The improved method

Figure 7(a) 02027 01173 814 936Figure 8(a) 01879 01080 828 947Figure 9(a) 01923 00961 854 950

Acknowledgments

This work is supported by Chongqing Frontier and AppliedBasic Research Project under Grant no cstc2014jcyjA1347Chongqing Science and Technology Research Project ofChongqing Municipal Education Commission under Grantno KJ1402001 and Outstanding Achievements Transforma-tion Projects of University in Chongqing under Grant noKJZH14219 The authors wish to thank the associate editorsand anonymous reviewers for their valuable comments andsuggestions on this paper

References

[1] H-K Kim K-W Lee J-Y Jung S-W Jung and S-J Ko ldquoAcontent-aware image stitching algorithm formobilemultimediadevicesrdquo IEEE Transactions on Consumer Electronics vol 57 no4 pp 1875ndash1882 2011

[2] Z Song S Zhou and J Guan ldquoA novel image registration algo-rithm for remote sensing under affine transformationrdquo IEEETransactions on Geoscience and Remote Sensing vol 52 no 8pp 4895ndash4912 2014

[3] R-F Chang K-C Chang-Chien E Takada et al ldquoRapidimage stitching and computer-aided detection for multipassautomated breast ultrasoundrdquoMedical Physics vol 37 no 5 pp2063ndash2073 2010

[4] X Qiu S Liu and F Liu ldquoAn adaptive kernel-based targettracking method based on multiple features fusionrdquo IEEJTransactions on Electrical and Electronic Engineering vol 7 no1 pp 91ndash97 2012

[5] V C S Chew and F-L Lian ldquoPanorama stitching usingoverlap area weighted image plane projection and dynamic pro-gramming for visual localizationrdquo in Proceedings of the IEEEASME International Conference on Advanced Intelligent Mecha-tronics (AIM rsquo12) pp 250ndash255 July 2012

[6] D G Lowe ldquoDistinctive image features from scale-invariantkeypointsrdquo International Journal of Computer Vision vol 60 no2 pp 91ndash110 2004

[7] Y Xiong and K Pulli ldquoFast panorama stitching for high-qualitypanoramic images on mobile phonesrdquo IEEE Transactions onConsumer Electronics vol 56 no 2 pp 298ndash306 2010

[8] S Ha H Koo S Lee N Cho and S Kim ldquoPanorama mosaicoptimization for mobile camera systemsrdquo IEEE Transactions onConsumer Electronics vol 53 no 4 pp 1217ndash1225 2007

[9] M Brown and D G Lowe ldquoAutomatic panoramic image stitch-ing using invariant featuresrdquo International Journal of ComputerVision vol 74 no 1 pp 59ndash73 2007

[10] I K Hyung S K Beom and I C Nam ldquoA new method to findan optimal warping function in image stitchingrdquo in Proceedingsof the IEEE International Conference on Acoustics Speech andSignal Processing (ICASSP rsquo09) pp 1289ndash1292 IEEE TaipeiTaiwan April 2009

[11] M S Bascil and F Temurtas ldquoA study on hepatitis diseasediagnosis using multilayer neural network with LevenbergMarquardt training algorithmrdquo Journal of Medical Systems vol35 no 3 pp 433ndash436 2011

[12] Y S KimMGhergherehchi S Y Kim andHAfarideh ldquoRAN-dom sample consensus (RANSAC) algorithm for enhancingoverlapped etched track countingrdquo IET Image Processing vol9 no 2 pp 97ndash106 2015

[13] J Bentolila and J M Francos ldquoHomography and fundamentalmatrix estimation from region matches using an affine errormetricrdquo Journal ofMathematical Imaging andVision vol 49 no2 pp 481ndash491 2014

[14] H Pang D Chen M Pan et al ldquoImprovement of magnetome-ter calibration using Levenberg-Marquardt algorithmrdquo IEEJTransactions on Electrical and Electronic Engineering vol 9 no3 pp 324ndash328 2014

[15] F Hampel C Hennig and E Ronchetti ldquoA smoothing principlefor the Huber and other locationM-estimatorsrdquo ComputationalStatistics amp Data Analysis vol 55 no 1 pp 324ndash337 2011

[16] Z Al Aghbari and A Al-Hamadi ldquoEfficient KNN search bylinear projection of image clustersrdquo International Journal ofIntelligent Systems vol 26 no 9 pp 844ndash865 2011

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 2: Research Article The Improved Algorithm of Fast Panorama ...downloads.hindawi.com/journals/mpe/2015/428076.pdf · Image Sequence and Reducing the Distortion Errors ZhongQu, 1 Si-PengLin,

2 Mathematical Problems in Engineering

sequences stitching step by step from left to right The firstimage of the sequence is selected as the reference imageSubsequently select the following stitching result as the nextnew reference image in the traditional stitching process Thetraditional stitching process cumulates the matching errorsof each stitching process in the reference image which wouldbe seriously distorted [10] when the set of image sequences islarge it affects the quality of panoramic result The improvedmethod proposed in this paper first implements image regis-tration for all adjacent images in the sequence and calculatesthe transformation matrix between the adjacent images andthen took the middle image of the sequence as the referenceimage According to the transformation matrixes of alladjacent images the improvedmethod can realize image any-where in the sequence transforms to the coordinate space ofthe reference imageTherefore all images in the sequence canbe unified to the same coordinate system after undergoing allstitching processes The experimental results show that theimproved method reduces the distortion errors of panoramaand saves the time of stitching process moreover it enhancesthe quality of the stitching result

The rest of this paper is organized as follows Section 2describes the SIFT algorithm for extracting image featuresand the RANSAC algorithm for purifying the matching fea-ture points meanwhile it obtains the transformation matrixfor the matching images Section 3 introduced the algorithmof Levenberg-Marquardt which is used to adjust the param-eters in the transformation matrix [11] Section 4 describesthe traditional image stitching process and Section 5 proposesthe improved image stitching process Section 6 shows theexperimental results and quantitative analysis to evaluate theimproved method Section 7 acts as the conclusion of thewhole paper

2 Image Registration

21 SIFT Feature Extraction Brown and Lowe proposedscale-invariant features extraction algorithm (SIFT) in 2004and continuously proposed the image stitching process [9]based on SIFT algorithm in 2007The SIFT algorithm detectsthe image features speedily and provides invariant propertywhen the image is rotated resized or illuminated The SIFTdetection process is shown in Figure 1

In order to simulate the multiscale feature the SIFTalgorithm proposes the scale space which is defined as theconvolution of a variable-scale Gaussian 119866(119909 119910 120575) with aninput image 119868(119909 119910)

119871 (119909 119910 120575) = 119866 (119909 119910 120575) lowast 119868 (119909 119910) (1)

where 120575 represents the factor of the scale space Large-scalefactors correspond to the overviews of the image featuresand small-scale factors correspond to the details of the imagefeatures Creating the Difference of Gaussians (DOG opera-tor) function

119863 (119909 119910 120575) = [119866 (119909 119910 119896120575) minus 119866 (119909 119910 120575)] lowast 119868 (119909 119910)

= 119871 (119909 119910 119896120575) minus 119871 (119909 119910 120575)

(2)

SIFT detection area

Scale space extrema detection

Keypoint localization

Orientation assignment

Keypoint descriptor

Figure 1 SIFT feature extraction step

We search the extreme points in DOG space Eachsampling point is compared with the 8 neighborhood pointsof the same scale factor and 18 neighborhood points of theadjacent scale factorsThe detected extreme points are chosenas the candidate keypoints

In order to improve the stability of the keypoints correctthe parameters of the DOG operator based on the Taylorformula to obtain the accurate position and scale factorMeanwhile eliminate the low contrast points and unstablepoints at the edge to enhance the stability of the matchingpoints Around the neighborhood of the keypoints the gradi-ent orientation of the pixels is counted by histogram and thendistributes the maximum orientation of the histogram forthe keypoints to provide the rotation-invariant characteristicThe formula of gradient orientation shows as follows

120579 (119909 119910) = tanminus1 [119871 (119909 119910 + 1) minus 119871 (119909 119910 minus 1)

119871 (119909 + 1 119910) minus 119871 (119909 minus 1 119910)] (3)

Until now the keypoints of the image are detectedcompletely Each keypoint has coordinate position scale andorientation information Then we need to build a descriptorfor each keypoint At first in order to ensure the rotation-invariant characteristic rotate the coordinate axis to theorientation of the keypoint and then divide the region aroundthe keypoint into 4 times 4 subregions Each subregion has 8-dimension vector of orientation information Thus there is4 times 4 times 8 = 128 dimension vector in the keypoint descriptorFinally we normalize the keypoint descriptor to eliminatethe influence of the illumination changeThe original images(image sequence) are shown in Figure 2

Figure 3 shows the results of extracting the SIFT featuresfrom the 4 original images in Figure 2 Different colors rep-resent the different degrees of feature points in density Thehigher density degree of feature points represents the moresignificant characteristics of feature points Density degreeswere sorted from high to low as red green blue yellow andblack 5 levels Table 1 lists the experimental data of extract-ing SIFT features including the number of SIFT featurepoints and the time of each step in detection SIFT featuresprocess

22 RANSAC Algorithm RANSAC (Random Sample Con-sensus) algorithm calculates the parameters of mathematicalmodel based on random sampling through continuously

Mathematical Problems in Engineering 3

Table 1 Experimental data in extracting SIFT features

Number Number of SIFT feature pointsTime(s)

Scale spaceextrema detection

Keypointlocalization

Orientationassignment

Keypointdescriptor Total

Figure 2(a) 2844 1716 1670 0249 2590 5225Figure 2(b) 2269 1635 1451 0203 2012 4319Figure 2(c) 2652 1685 1576 0202 2278 4741Figure 2(d) 3315 1528 1748 0249 2839 5364

(a) Image 1 (b) Image 2

(c) Image 3 (d) Image 4

Figure 2 The original image sequence

iterating new random combinations of sample data until amathematical model that can explain or adapt to distributionof all data sets is found [12] For each feature point of theimage search the matching points based on the minimumEuclidean distance using a k-d tree The coordinate space

mapping relationship betweenmatching points is representedby the 3 times 3 transformation matrix This paper is intended touse RANSAC algorithm to obtain the transformation matrixbetween thematching points and thenmakematching imagesmapped to the same coordinate space by the transformation

4 Mathematical Problems in Engineering

(a) SIFT features in Figure 2(a) (b) SIFT features in Figure 2(b)

(c) SIFT features in Figure 2(c) (d) SIFT features in Figure 2(d)

Figure 3 Extract SIFT feature points for images in Figure 2

matrixes information In this paper image sequences wereshot by a hand-held camera along the same horizontal planeSo the transformation matrix is suitable for the affine matrixThe affine matrix structure [13] is shown as follows

119867 =[[

[

cos 120579 minus sin 120579 119906

sin 120579 cos 120579 V

0 0 1

]]

]

(4)

where the variable 120579 represents the image rotation angle119906 V separately represent the translation distance in 119909 axialdirection and 119910 axial direction In order to calculate theparameters of the affine matrix at least 3 pairs of coordinateinformation pieces ofmatching points are neededWe assume

that (119909119894

119910119894

1)119879 and (119909

1015840

119894

1199101015840

119894

1)119879 represent a pair of matching

feature points The affine matrix can be obtained as follows

119867 =[[[

[

1199091015840

1

1199091015840

2

1199091015840

3

1199101015840

1

1199101015840

2

1199101015840

3

1 1 1

]]]

]

[[

[

1199091

1199092

1199093

1199101

1199102

1199103

1 1 1

]]

]

minus1

(5)

In the panorama image stitching process select 119903 = 3

pairs of matching points at random (Ensure that the 3 pairs offeature points in the input image composite into an invertiblematrix) [10] Through formula (5) it calculates the affinetransformation matrix 119867 and then iterates resampling thenewmatching feature points to find an affinematrix119867 whichcorresponds to the maximum number of inliers (whoseprojections are consistent with 119867 with a tolerance isin pixels)if we assume that 119901

119894

represents the probability that a feature

Mathematical Problems in Engineering 5

Table 2 Experimental data in image registration process

Stitching processing The inliers number after RANSAC The time for stitching (s)Figures 3(a) and 3(b) 79 1026Figures 3(b) and 3(c) 49 977Figures 3(c) and 3(d) 56 1182

(a) RANSAC inliers between Figures 3(a) and 3(b) (b) RANSAC inliers between Figures 3(b) and 3(c)

(c) RANSAC inliers between Figures 3(c) and 3(d)

Figure 4 RANSAC for the adjacent images in Figure 3

point matches correctly between the matching images After119899 times iterations the probability of finding a correct affinematrix is 119875 = 1 minus (1 minus (119901

119894

)119903

)119899 With the iteration number

is increasing the probability 119875 will increase as well When119899 = 100 and 119901

119894

= 05 the probability that a correct affinetransformation matrix is not found approaches 10 times 10

minus6This paper first extracts the image feature points through

SIFT algorithm searches matching feature points in the over-lapping areas of the adjacent images according to the mini-mum Euclidean distance and then uses RANSAC algorithmto findmaximumnumber of inlierswithin the set ofmatchingpoints obtaining the affine transformation matrix Afterrefining the matching points with the RANSAC algorithmthe set of inliers are set up with red lines shown as in Figure 4The inliers number and the time of image registration areshown in Table 2

3 Bundle Adjustment Using L-M Algorithm

L-M (Levenberg-Marquardt) algorithm is a nonlinearoptimization algorithm that combines the Gauss-Newton

method with the gradient descent method making useof known measurement data to estimate the unknownparameters [14] In this paper we use L-M bundle to adjustthe parameters of the affine transformation matrix and try tomake the total matching errors among the matching featurepoints approach a minimum Generally the standard modelof error function is defined as sum

119894

(12)1199032

119894

where 119903119894

representsthe Euclidean distance between the 119894th matching pointsHowever when there is a mismatching point the Euclideandistance is so large that it will impact on the standarderror function with a great weight In order to eliminatethe influence of mismatching points we choose the Huberfunction instead of the standard error function The Huberfunction [9 15] can empower the weight dynamicallyaccording to the matching errors value

ℎ (119903) =

1

2|119903|2

if |119903| lt 120575

120575 |119903| minus1

21205752

if |119903| ge 120575

(6)

6 Mathematical Problems in Engineering

Table 3 The total matching errors comparison data after L-M

Stitching processing The total matching errors before L-M The total matching errors after L-MFigure 4(a) 7265 5969Figure 4(b) 1562 1389Figure 4(c) 4974 3219

119908 (119903) =

1 if |119903| lt 120575

120575

|119903| if |119903| ge 120575

(7)

Formula (6) shows the Huber function and (7) shows theweight function of the Huber One has 120575 = 1345119904 where 119904

represents the standard deviation of the measurement dataThe new error function is expressed as minsum

119894

ℎ(119903119894

) whichis equivalent to minsum

119894

119908(119903)1199032 When |119903| lt 120575 the matching

point is inlier corresponding to the fact that the residual isgiven weight 1 When |119903| ge 120575 the matching point is outliercorresponding the weight for residual trend towards 0

L-M algorithm continues to iterate until finding a setof parameters that make the error function minimize Weassume119867

119896

= [1198861

1198862

119886119898

] represents the solution vector ofunknown parameters in the 119896th iteration process Δ119872 repre-sents the offset vectorThen the next iteration process in L-Malgorithm can be expressed as

119867119896+1

= 119867119896

+ Δ119872

Δ119872 = minus (119869119879

119896

119869119896

+ 119906119896

119868)minus1

119869119879

119896

119890119896

119869119896

=

[[[[[[[[[[

[

1205971199031

(119867119896

)

1205971198861

1205971199031

(119867119896

)

1205971198862

sdot sdot sdot1205971199031

(119867119896

)

120597119886119898

1205971199032

(119867119896

)

1205971198861

1205971199032

(119867119896

)

1205971198862

sdot sdot sdot1205971199032

(119867119896

)

120597119886119898

sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot

120597119903119899

(119867119896

)

1205971198861

120597119903119899

(119867119896

)

1205971198862

sdot sdot sdot120597119903119899

(119867119896

)

120597119886119898

]]]]]]]]]]

]

(8)

where 119869119896

corresponds to the Jacobi matrix under the con-dition of the 119867

119896

119868 represents unit matrix 119890119896

is the residualsum of all matching points under 119867

119896

119906 (119906 ge 0) representsthe damping parameter When 119906 gradually tends to 0 L-M algorithm is similar to the Gauss-Newton method whichcontinuously closes to the ideal value after each iterationprocess When 119906 is large L-M algorithm is similar to thegradient descent method which can find the solution neigh-borhood of the unknown parameters speedily

Table 3 makes a list of comparative data of total matchingerrors before and after L-M bundle adjustment Total match-ing errors are expressed as sum

119898

119894=0

119903 where 119898 represents thematching feature points number Comparative data showsthat L-M algorithm can truly reduce the image matchingerrors

4 The Traditional Stitching Method

After referring to the paper published by Xiong and Pulli [7]and Brown and Lowe [9] we summarize that the traditionalstitching method is shown as in the following steps

Algorithm 1 (the traditional image stitching process) Con-sider the following

Input 119899 ordered image sequence 119878(1198780

1198781

119878119899minus1

) whichmutually have overlapping areas

(1) Select the first two images of the set 119878 to calculate theSIFT feature points respectively

(2) Select the first image in the sequence 119878 as the referenceimage and the second image as the new input imageUse 119870NN (119870 Nearest-Neighbours) algorithm [16] tosearchmatching feature points between the new inputimage and the reference image in accordance with theminimum Euclidean distance

(3) According to thematching feature points data set usethe RANSAC algorithm to calculate the affine matrix119867 which can transform the new input image into thecoordinate space of the reference image

(4) Use the L-M algorithm to optimize the affine matrix119867

(5) Use the optimized 119867 to transform the new inputimage

(6) Search the optimal seam between the affine trans-formation result in step (5) and the reference imagethen along the seam to combine them togetherseamlessly obtain the stitched result 119894119898119892119877119890119904119906119897119905

(7) Add the 119894119898119892119877119890119904119906119897119905 into 119878 to replace the input imageand the reference image In next stitching process the119894119898119892119877119890119904119906119897119905 is selected as the new reference image

(8) Return to step (1) to continuously implement the nextstitching process until there is only one image existingin the 119878 which is the panoramic result

Output A panoramic image

However in traditionalmethod each timewhen an imagestitching is completed the dimension of reference image willcontinue to increase The overlapping area between the newinput image and the reference image accounts for smallerand smaller proportion comparing with the entire referenceimage area Therefore calculating SIFT feature points for thewhole reference image will consume a lot of system resources

Mathematical Problems in Engineering 7

Image[x]

Hminus1

[x] Hminus1

[k minus 2] Hminus1

[k minus 1]H[k] H[k + 1] H[y minus 1]

Image[k minus 2] Image[k minus 1] The reference image Image[k + 1] Image[k + 2] Image[y]middot middot middotmiddot middot middot

prod x=kminus1

x++Hminus1

[x] prody=k

minusminusyH[y]

Figure 5 The process of calculating the affine transformation matrix for arbitrary image

and registration time In addition the approach of the tradi-tional stitching algorithm to selecting the next input imageis relatively single Each time when the adjacent image isselected as the new input image it does not give priority to theoverlapping area size or the matching feature point numberbetween new input image and the reference image Mean-while if there are manymatching errors in image registrationprocess the matching errors will be preserved and affectevery subsequent registration process because the referenceimage is formed by the previous stitched results Finally thepanoramic image will be seriously distorted

5 The Improved Stitching Method

In the image stitching process as we know the accuracyof image registration decides the quality of the panoramicimage and the affine transformationmatrix is the final resultwhich is what wewanted by image registration So it is impor-tant to obtain a precise transformation matrix Thereforewe proposed a new mathematical model to compute thetransformation matrix which is shown as

119867 =

119894=119896minus1

prod

119894++

119867minus1

[119894] 119894 lt 119896

119894=119896

prod

minusminus119894

119867 [119894] 119894 gt 119896

(9)

where 119867[119894] represents the affine transformation matrixobtained from each group of adjacent images and 119896 repre-sents the middle index of the sequence The new mathemati-cal model does not calculate the affine transformationmatrixbetween the result of each stitching process and the newinput image but using the property of transitivity of matrixesobtained the affine transformation matrix for the new inputimage through all adjacent images Figure 5 describes theprocess of calculating the affine transformation matrix forarbitrary image Firstly we do image registrations for all adja-cent images to get the matching feature points informationUsing the information of matching features we can calculatethe affine matrices between all adjacent images and then theaffine matrix mapped from the input image to the referenceimage also can be obtained through the statistical matricesset according to formula (9) Due to the transitivity of thematrixes we can get the affine matrix transformed from anyimage to the reference image

The improved method does not detect the SIFT featurepoints for the whole reference image area but uses thestatistical registration information of all adjacent images tocalculate the affine matrix So the improved method not only

reduces the SIFT feature detection area of the referenceimage but also increases the number of matching featurepoints and improves the efficiency of stitching time

On the other hand in contrast to stitching serially fromleft to right one by one in the traditional method theimproved method takes the middle image as the referenceimage and selects the next input image based on the numberof matching points and completes the image sequence stitch-ing process from middle position dynamically expanding toboth sides In the improved stitching process the maximumaccumulated matching errors are computed from the middleimage to the two sides of the image sequence as shown in(10) reduced to the half level of the traditional method

119864 = MAX(

119896minus1

sum

119894=1

sum

119898isin119908(119894119894+1)

119889119898

119899

sum

119894=119896+1

sum

119898isin119908(119894119894minus1)

119889119898

) (10)

where 119908(119894 119894 + 1) represents the matching points numberbetween the image 119894 and the image 119894+1 and 119889

119898

represents theresidual of the 119898th matching feature points After obtainingthe affine transformation matrix using RANSAC algorithmwe can continuously use L-M algorithm bundle to adjust theaffine matrix to further reduce the accumulated matchingerrors Since the stitching errors are reduced obviously in theimprovedmethod the distortion degree of panorama is lowercompared to the traditional method

Algorithm 2 (the improved image stitching process) Con-sider the following

Input 119899 ordered image sequence 119878(1198780

1198781

119878119899minus1

) whichmutually have overlapping areas

(1) Do image registrations for all adjacent images

(i) Assume the adjacent images are 119878119894

and 119878119894minus1

119894 isin

[1 119899 minus 1] use 119870NN algorithm to search match-ing SIFT feature points between 119878

119894

and 119878119894minus1

inaccordance with the minimum Euclidean dis-tance and then preserve the matching featurepoints data and the matching points numberseparately by using the arrays 119891119890119886119905119906119903119890119871119894119904119905 and119899119906119898119871119894119904119905

(ii) According to the matching feature points dataset 119891119890119886119905119906119903119890119871119894119904119905 compute the affine matrix thatcan be transformed from the coordinate spaceof the image 119878

119894minus1

to the coordinate space of theimage 119878

119894

and then preserve the affine matrix inthe array 119867119871119894119904119905

8 Mathematical Problems in Engineering

(a) Original image sequence (6 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

Figure 6 The panoramic images obtained by the traditional method and the improved method

(iii) Return to step (i) to complete the image regis-trations for the next adjacent images

(2) 119896 represents the middle index of the set 119878 Take 119878119896

asthe reference image According to the array 119899119906119898119871119894119904119905select the image which has larger matching pointsnumber with 119878

119896

as the next new input image(3) According to the index of the new input image and

the array119867119871119894119904119905 calculate the affinematrix119867 betweenthe new input image and the reference image based onformula (9)

(4) Use the L-M algorithm to optimize the affine matrix119867

(5) Use the optimized 119867 to transform the new inputimage

(6) Search the optimal seam between the affine transfor-mation result in step (5) and the reference image thenalong the seam combine them together seamlesslyand obtain the stitched result 119894119898119892119877119890119904119906119897119905

(7) Add the 119894119898119892119877119890119904119906119897119905 into 119878 to replace the input imageand the reference imageTherefore the stitched result119894119898119892119877119890119904119906119897119905 becomes the new middle image of thesequence 119878

(8) Return to step (2) to continuously implement the nextstitching process until there is only one image existingin 119878 which is the panoramic result

Output A panoramic image

Figure 6(a) is the original image sequence of the sceneFigures 6(b) and 6(c) are the panoramic images respec-tively obtained by the traditional method and the improvedmethod Comparing the two panoramic images we canconclude that the result from the improved stitching methodis better The distortion in the traditional stitching result issignificantly reduced by the improved stitching method

6 The Experimental Results and Analysis

61 The Experimental Results In order to demonstrate thestability of the improved method we select image sequencesfrom multiple scenes to implement the improved stitchingalgorithm Figures 7(a) 8(a) and 9(a) are the parts of theexperimental scenes The source image size in Figures 7 and9 is 500 times 747 and the size in Figure 8 is 500 times 697 Figures7(b) and 7(c) show the experimental results of the tradi-tional stitching process and the improved stitching processFigure 7(d) shows the stitching result after adding the L-Madjustment in the improved method Because of the obviousseam in the panorama continue to search the optimal seambetween affine transformation result and the reference imagealong the seam combine them together seamlessly in thestitching process The result is as shown in Figure 7(e) Fig-ure 7(f) shows the panoramic result after cutting the uselessarea In order to detect the stability of the improved stitchingprocess continue to select longer image sequence Figure 8(a)lists 12 computer graphic images and Figure 9(a) lists 16building images The rest of the images in Figures 8 and 9show the experimental results corresponding with the imagesin Figure 7

The experimental results in Figures 7 8 and 9 showthat the improved stitching method is adaptable for thelonger image sequences as well The stitching process cansignificantly improve the panorama distortions obtaininghigh-resolution and high-quality panorama

62 Estimation of Performance This paper takes the middleimage of the sequence as the reference image Do imageregistrations first for all adjacent images Then we calculatethe affine transformationmatrix according to the overlappingareas transitivity among the adjacent images instead of calcu-lating the affine transformationmatrix between the new inputimage and the reference image directly In addition we canget more matching feature points by the improved method

Mathematical Problems in Engineering 9

(a) Original image sequence of the grass scene (8 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitching method

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 7 Experimental results for 8 source images sequence

So we can provide more sample data for RANSAC algorithmwhich can increase the accuracy of the affine transformationmatrix and assure that we can obtain high-quality panoramaat last

Figures 10(a) 10(b) and 10(c) show the comparative dataof matching feature points number between the traditionalmethod and the improved method the results correspond tothe scenes of Figures 7(a) 8(a) and 9(a) The three scenesrespectively have 8 12 and 16 images in the sequenceWe use119875119894

to represent the 119894th stitching processThe three charts showthat the improvedmethod has better performance which canget more matching feature points

Figure 11 shows the comparative data of stitching timebetween the traditional method and the improved methodThe stitching time is recorded from the beginning of thestitching process to the end of finishing the last imagestitching The chart shows that the improved method hasfaster time efficiency Moreover the time efficiency will beimproved more obviously for the longer image sequence

At the same time from Figures 7 8 and 9 we can see thatthe improved algorithmobviously eliminates the distortion ofthe traditional results and gets better panoramic results Weassume that (119909 119910) represents the center of the input image

after being transformed by the affine matrix 119867 and wepreserve the center point of each stitching process in the set ofthe variable 119888119890119899119905119890119903119878119890119905 To some extent 119888119890119899119905119890119903119878119890119905 could reflectthe degree of panorama distortion We use formula (11) toexpress the distortion degree in which the Slope representsa function of computing slope between two points

distortion degree = Max Slope (119894 119895)

119894 119895 isin centerSet(11)

In addition we also define the variable 119894119899119891119900 119901119903119900119901119900119905119894119900119899which represents the ratio between the panorama image pixelnumber after removing the useless black pixels and the entirepanorama pixels number For example in Figure 9(e) thereare some black background pixels which are useless andwould be cut in Figure 9(f) The 119894119899119891119900 119901119903119900119901119900119905119894119900119899 expressionis showed as formula (12) and the 119908119894119889119905ℎ ℎ119890119894119892ℎ119905 are thepanorama dimensions

info proportion = 1 minusblack pixels

width times height (12)

10 Mathematical Problems in Engineering

(a) Original image sequence of the computer graphic scene (12 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 8 Experimental results for 12 source images sequence

(a) Original image sequence of the building scene (16 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 9 Experimental results for 16 source images sequence

Mathematical Problems in Engineering 11

20

40

60

80

100

120

140

160

P1 P2 P3 P4 P5 P6 P7

The m

atch

ing

poin

ts nu

mbe

r

Stitching process

ImprovedTraditional

(a) The matching feature points number of Figure 7(a)

2030405060708090

100110120

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11Stitching process

(b) The matching feature points number of Figure 8(a)

0

100

200

300

400

500

600

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10P11P12P13 P15P14Stitching process

(c) The matching feature points number of Figure 9(a)

Figure 10 The comparison data of matching feature points number between the traditional method and the improved method

From Table 4 we can see that the 119889119894119904119905119900119903119905119894119900119899 119889119890119892119903119890119890 and119894119899119891119900 119901119903119900119901119900119905119894119900119899 compared with the traditional method havebeen pleasingly improved

7 Conclusion

This paper increases the number of thematching SIFT featurepoints by improving the traditional method reducing theunnecessary SIFT detection area in the reference area as wellIn addition the improved method accelerates the panoramicstitching time efficiency and obtains a high-resolution high-quality panorama image Compared with the traditionalmethod the improved method proposed in this paper startsstitching from the middle position of the image sequenceThe middle image is taken as the reference image Then weobtain the affine matrix for any image in the sequence to thereference image according to the statistics information of allaffine transformation matrixes between the adjacent imagesMeanwhile the improved method dynamically selects thenext new input image to join the stitching process basedon the number of statistical matching points of the adjacentimages The experimental results verify that the improvedstitching process can accelerate time efficiency and reduce thedistortion of the panorama image

0

100

200

300

400

500

600

Scene 1 Scene 2 Scene 3

The t

otal

tim

e for

stitc

hing

the s

cene

TraditionalImproved

Figure 11 The comparison data of stitching time between thetraditional method and the improved method

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

12 Mathematical Problems in Engineering

Table 4 The comparison data of distortion degree between the traditional method and the improved method

Scene distortion degree info proportionThe traditional method The improved method The traditional method The improved method

Figure 7(a) 02027 01173 814 936Figure 8(a) 01879 01080 828 947Figure 9(a) 01923 00961 854 950

Acknowledgments

This work is supported by Chongqing Frontier and AppliedBasic Research Project under Grant no cstc2014jcyjA1347Chongqing Science and Technology Research Project ofChongqing Municipal Education Commission under Grantno KJ1402001 and Outstanding Achievements Transforma-tion Projects of University in Chongqing under Grant noKJZH14219 The authors wish to thank the associate editorsand anonymous reviewers for their valuable comments andsuggestions on this paper

References

[1] H-K Kim K-W Lee J-Y Jung S-W Jung and S-J Ko ldquoAcontent-aware image stitching algorithm formobilemultimediadevicesrdquo IEEE Transactions on Consumer Electronics vol 57 no4 pp 1875ndash1882 2011

[2] Z Song S Zhou and J Guan ldquoA novel image registration algo-rithm for remote sensing under affine transformationrdquo IEEETransactions on Geoscience and Remote Sensing vol 52 no 8pp 4895ndash4912 2014

[3] R-F Chang K-C Chang-Chien E Takada et al ldquoRapidimage stitching and computer-aided detection for multipassautomated breast ultrasoundrdquoMedical Physics vol 37 no 5 pp2063ndash2073 2010

[4] X Qiu S Liu and F Liu ldquoAn adaptive kernel-based targettracking method based on multiple features fusionrdquo IEEJTransactions on Electrical and Electronic Engineering vol 7 no1 pp 91ndash97 2012

[5] V C S Chew and F-L Lian ldquoPanorama stitching usingoverlap area weighted image plane projection and dynamic pro-gramming for visual localizationrdquo in Proceedings of the IEEEASME International Conference on Advanced Intelligent Mecha-tronics (AIM rsquo12) pp 250ndash255 July 2012

[6] D G Lowe ldquoDistinctive image features from scale-invariantkeypointsrdquo International Journal of Computer Vision vol 60 no2 pp 91ndash110 2004

[7] Y Xiong and K Pulli ldquoFast panorama stitching for high-qualitypanoramic images on mobile phonesrdquo IEEE Transactions onConsumer Electronics vol 56 no 2 pp 298ndash306 2010

[8] S Ha H Koo S Lee N Cho and S Kim ldquoPanorama mosaicoptimization for mobile camera systemsrdquo IEEE Transactions onConsumer Electronics vol 53 no 4 pp 1217ndash1225 2007

[9] M Brown and D G Lowe ldquoAutomatic panoramic image stitch-ing using invariant featuresrdquo International Journal of ComputerVision vol 74 no 1 pp 59ndash73 2007

[10] I K Hyung S K Beom and I C Nam ldquoA new method to findan optimal warping function in image stitchingrdquo in Proceedingsof the IEEE International Conference on Acoustics Speech andSignal Processing (ICASSP rsquo09) pp 1289ndash1292 IEEE TaipeiTaiwan April 2009

[11] M S Bascil and F Temurtas ldquoA study on hepatitis diseasediagnosis using multilayer neural network with LevenbergMarquardt training algorithmrdquo Journal of Medical Systems vol35 no 3 pp 433ndash436 2011

[12] Y S KimMGhergherehchi S Y Kim andHAfarideh ldquoRAN-dom sample consensus (RANSAC) algorithm for enhancingoverlapped etched track countingrdquo IET Image Processing vol9 no 2 pp 97ndash106 2015

[13] J Bentolila and J M Francos ldquoHomography and fundamentalmatrix estimation from region matches using an affine errormetricrdquo Journal ofMathematical Imaging andVision vol 49 no2 pp 481ndash491 2014

[14] H Pang D Chen M Pan et al ldquoImprovement of magnetome-ter calibration using Levenberg-Marquardt algorithmrdquo IEEJTransactions on Electrical and Electronic Engineering vol 9 no3 pp 324ndash328 2014

[15] F Hampel C Hennig and E Ronchetti ldquoA smoothing principlefor the Huber and other locationM-estimatorsrdquo ComputationalStatistics amp Data Analysis vol 55 no 1 pp 324ndash337 2011

[16] Z Al Aghbari and A Al-Hamadi ldquoEfficient KNN search bylinear projection of image clustersrdquo International Journal ofIntelligent Systems vol 26 no 9 pp 844ndash865 2011

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 3: Research Article The Improved Algorithm of Fast Panorama ...downloads.hindawi.com/journals/mpe/2015/428076.pdf · Image Sequence and Reducing the Distortion Errors ZhongQu, 1 Si-PengLin,

Mathematical Problems in Engineering 3

Table 1 Experimental data in extracting SIFT features

Number Number of SIFT feature pointsTime(s)

Scale spaceextrema detection

Keypointlocalization

Orientationassignment

Keypointdescriptor Total

Figure 2(a) 2844 1716 1670 0249 2590 5225Figure 2(b) 2269 1635 1451 0203 2012 4319Figure 2(c) 2652 1685 1576 0202 2278 4741Figure 2(d) 3315 1528 1748 0249 2839 5364

(a) Image 1 (b) Image 2

(c) Image 3 (d) Image 4

Figure 2 The original image sequence

iterating new random combinations of sample data until amathematical model that can explain or adapt to distributionof all data sets is found [12] For each feature point of theimage search the matching points based on the minimumEuclidean distance using a k-d tree The coordinate space

mapping relationship betweenmatching points is representedby the 3 times 3 transformation matrix This paper is intended touse RANSAC algorithm to obtain the transformation matrixbetween thematching points and thenmakematching imagesmapped to the same coordinate space by the transformation

4 Mathematical Problems in Engineering

(a) SIFT features in Figure 2(a) (b) SIFT features in Figure 2(b)

(c) SIFT features in Figure 2(c) (d) SIFT features in Figure 2(d)

Figure 3 Extract SIFT feature points for images in Figure 2

matrixes information In this paper image sequences wereshot by a hand-held camera along the same horizontal planeSo the transformation matrix is suitable for the affine matrixThe affine matrix structure [13] is shown as follows

119867 =[[

[

cos 120579 minus sin 120579 119906

sin 120579 cos 120579 V

0 0 1

]]

]

(4)

where the variable 120579 represents the image rotation angle119906 V separately represent the translation distance in 119909 axialdirection and 119910 axial direction In order to calculate theparameters of the affine matrix at least 3 pairs of coordinateinformation pieces ofmatching points are neededWe assume

that (119909119894

119910119894

1)119879 and (119909

1015840

119894

1199101015840

119894

1)119879 represent a pair of matching

feature points The affine matrix can be obtained as follows

119867 =[[[

[

1199091015840

1

1199091015840

2

1199091015840

3

1199101015840

1

1199101015840

2

1199101015840

3

1 1 1

]]]

]

[[

[

1199091

1199092

1199093

1199101

1199102

1199103

1 1 1

]]

]

minus1

(5)

In the panorama image stitching process select 119903 = 3

pairs of matching points at random (Ensure that the 3 pairs offeature points in the input image composite into an invertiblematrix) [10] Through formula (5) it calculates the affinetransformation matrix 119867 and then iterates resampling thenewmatching feature points to find an affinematrix119867 whichcorresponds to the maximum number of inliers (whoseprojections are consistent with 119867 with a tolerance isin pixels)if we assume that 119901

119894

represents the probability that a feature

Mathematical Problems in Engineering 5

Table 2 Experimental data in image registration process

Stitching processing The inliers number after RANSAC The time for stitching (s)Figures 3(a) and 3(b) 79 1026Figures 3(b) and 3(c) 49 977Figures 3(c) and 3(d) 56 1182

(a) RANSAC inliers between Figures 3(a) and 3(b) (b) RANSAC inliers between Figures 3(b) and 3(c)

(c) RANSAC inliers between Figures 3(c) and 3(d)

Figure 4 RANSAC for the adjacent images in Figure 3

point matches correctly between the matching images After119899 times iterations the probability of finding a correct affinematrix is 119875 = 1 minus (1 minus (119901

119894

)119903

)119899 With the iteration number

is increasing the probability 119875 will increase as well When119899 = 100 and 119901

119894

= 05 the probability that a correct affinetransformation matrix is not found approaches 10 times 10

minus6This paper first extracts the image feature points through

SIFT algorithm searches matching feature points in the over-lapping areas of the adjacent images according to the mini-mum Euclidean distance and then uses RANSAC algorithmto findmaximumnumber of inlierswithin the set ofmatchingpoints obtaining the affine transformation matrix Afterrefining the matching points with the RANSAC algorithmthe set of inliers are set up with red lines shown as in Figure 4The inliers number and the time of image registration areshown in Table 2

3 Bundle Adjustment Using L-M Algorithm

L-M (Levenberg-Marquardt) algorithm is a nonlinearoptimization algorithm that combines the Gauss-Newton

method with the gradient descent method making useof known measurement data to estimate the unknownparameters [14] In this paper we use L-M bundle to adjustthe parameters of the affine transformation matrix and try tomake the total matching errors among the matching featurepoints approach a minimum Generally the standard modelof error function is defined as sum

119894

(12)1199032

119894

where 119903119894

representsthe Euclidean distance between the 119894th matching pointsHowever when there is a mismatching point the Euclideandistance is so large that it will impact on the standarderror function with a great weight In order to eliminatethe influence of mismatching points we choose the Huberfunction instead of the standard error function The Huberfunction [9 15] can empower the weight dynamicallyaccording to the matching errors value

ℎ (119903) =

1

2|119903|2

if |119903| lt 120575

120575 |119903| minus1

21205752

if |119903| ge 120575

(6)

6 Mathematical Problems in Engineering

Table 3 The total matching errors comparison data after L-M

Stitching processing The total matching errors before L-M The total matching errors after L-MFigure 4(a) 7265 5969Figure 4(b) 1562 1389Figure 4(c) 4974 3219

119908 (119903) =

1 if |119903| lt 120575

120575

|119903| if |119903| ge 120575

(7)

Formula (6) shows the Huber function and (7) shows theweight function of the Huber One has 120575 = 1345119904 where 119904

represents the standard deviation of the measurement dataThe new error function is expressed as minsum

119894

ℎ(119903119894

) whichis equivalent to minsum

119894

119908(119903)1199032 When |119903| lt 120575 the matching

point is inlier corresponding to the fact that the residual isgiven weight 1 When |119903| ge 120575 the matching point is outliercorresponding the weight for residual trend towards 0

L-M algorithm continues to iterate until finding a setof parameters that make the error function minimize Weassume119867

119896

= [1198861

1198862

119886119898

] represents the solution vector ofunknown parameters in the 119896th iteration process Δ119872 repre-sents the offset vectorThen the next iteration process in L-Malgorithm can be expressed as

119867119896+1

= 119867119896

+ Δ119872

Δ119872 = minus (119869119879

119896

119869119896

+ 119906119896

119868)minus1

119869119879

119896

119890119896

119869119896

=

[[[[[[[[[[

[

1205971199031

(119867119896

)

1205971198861

1205971199031

(119867119896

)

1205971198862

sdot sdot sdot1205971199031

(119867119896

)

120597119886119898

1205971199032

(119867119896

)

1205971198861

1205971199032

(119867119896

)

1205971198862

sdot sdot sdot1205971199032

(119867119896

)

120597119886119898

sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot

120597119903119899

(119867119896

)

1205971198861

120597119903119899

(119867119896

)

1205971198862

sdot sdot sdot120597119903119899

(119867119896

)

120597119886119898

]]]]]]]]]]

]

(8)

where 119869119896

corresponds to the Jacobi matrix under the con-dition of the 119867

119896

119868 represents unit matrix 119890119896

is the residualsum of all matching points under 119867

119896

119906 (119906 ge 0) representsthe damping parameter When 119906 gradually tends to 0 L-M algorithm is similar to the Gauss-Newton method whichcontinuously closes to the ideal value after each iterationprocess When 119906 is large L-M algorithm is similar to thegradient descent method which can find the solution neigh-borhood of the unknown parameters speedily

Table 3 makes a list of comparative data of total matchingerrors before and after L-M bundle adjustment Total match-ing errors are expressed as sum

119898

119894=0

119903 where 119898 represents thematching feature points number Comparative data showsthat L-M algorithm can truly reduce the image matchingerrors

4 The Traditional Stitching Method

After referring to the paper published by Xiong and Pulli [7]and Brown and Lowe [9] we summarize that the traditionalstitching method is shown as in the following steps

Algorithm 1 (the traditional image stitching process) Con-sider the following

Input 119899 ordered image sequence 119878(1198780

1198781

119878119899minus1

) whichmutually have overlapping areas

(1) Select the first two images of the set 119878 to calculate theSIFT feature points respectively

(2) Select the first image in the sequence 119878 as the referenceimage and the second image as the new input imageUse 119870NN (119870 Nearest-Neighbours) algorithm [16] tosearchmatching feature points between the new inputimage and the reference image in accordance with theminimum Euclidean distance

(3) According to thematching feature points data set usethe RANSAC algorithm to calculate the affine matrix119867 which can transform the new input image into thecoordinate space of the reference image

(4) Use the L-M algorithm to optimize the affine matrix119867

(5) Use the optimized 119867 to transform the new inputimage

(6) Search the optimal seam between the affine trans-formation result in step (5) and the reference imagethen along the seam to combine them togetherseamlessly obtain the stitched result 119894119898119892119877119890119904119906119897119905

(7) Add the 119894119898119892119877119890119904119906119897119905 into 119878 to replace the input imageand the reference image In next stitching process the119894119898119892119877119890119904119906119897119905 is selected as the new reference image

(8) Return to step (1) to continuously implement the nextstitching process until there is only one image existingin the 119878 which is the panoramic result

Output A panoramic image

However in traditionalmethod each timewhen an imagestitching is completed the dimension of reference image willcontinue to increase The overlapping area between the newinput image and the reference image accounts for smallerand smaller proportion comparing with the entire referenceimage area Therefore calculating SIFT feature points for thewhole reference image will consume a lot of system resources

Mathematical Problems in Engineering 7

Image[x]

Hminus1

[x] Hminus1

[k minus 2] Hminus1

[k minus 1]H[k] H[k + 1] H[y minus 1]

Image[k minus 2] Image[k minus 1] The reference image Image[k + 1] Image[k + 2] Image[y]middot middot middotmiddot middot middot

prod x=kminus1

x++Hminus1

[x] prody=k

minusminusyH[y]

Figure 5 The process of calculating the affine transformation matrix for arbitrary image

and registration time In addition the approach of the tradi-tional stitching algorithm to selecting the next input imageis relatively single Each time when the adjacent image isselected as the new input image it does not give priority to theoverlapping area size or the matching feature point numberbetween new input image and the reference image Mean-while if there are manymatching errors in image registrationprocess the matching errors will be preserved and affectevery subsequent registration process because the referenceimage is formed by the previous stitched results Finally thepanoramic image will be seriously distorted

5 The Improved Stitching Method

In the image stitching process as we know the accuracyof image registration decides the quality of the panoramicimage and the affine transformationmatrix is the final resultwhich is what wewanted by image registration So it is impor-tant to obtain a precise transformation matrix Thereforewe proposed a new mathematical model to compute thetransformation matrix which is shown as

119867 =

119894=119896minus1

prod

119894++

119867minus1

[119894] 119894 lt 119896

119894=119896

prod

minusminus119894

119867 [119894] 119894 gt 119896

(9)

where 119867[119894] represents the affine transformation matrixobtained from each group of adjacent images and 119896 repre-sents the middle index of the sequence The new mathemati-cal model does not calculate the affine transformationmatrixbetween the result of each stitching process and the newinput image but using the property of transitivity of matrixesobtained the affine transformation matrix for the new inputimage through all adjacent images Figure 5 describes theprocess of calculating the affine transformation matrix forarbitrary image Firstly we do image registrations for all adja-cent images to get the matching feature points informationUsing the information of matching features we can calculatethe affine matrices between all adjacent images and then theaffine matrix mapped from the input image to the referenceimage also can be obtained through the statistical matricesset according to formula (9) Due to the transitivity of thematrixes we can get the affine matrix transformed from anyimage to the reference image

The improved method does not detect the SIFT featurepoints for the whole reference image area but uses thestatistical registration information of all adjacent images tocalculate the affine matrix So the improved method not only

reduces the SIFT feature detection area of the referenceimage but also increases the number of matching featurepoints and improves the efficiency of stitching time

On the other hand in contrast to stitching serially fromleft to right one by one in the traditional method theimproved method takes the middle image as the referenceimage and selects the next input image based on the numberof matching points and completes the image sequence stitch-ing process from middle position dynamically expanding toboth sides In the improved stitching process the maximumaccumulated matching errors are computed from the middleimage to the two sides of the image sequence as shown in(10) reduced to the half level of the traditional method

119864 = MAX(

119896minus1

sum

119894=1

sum

119898isin119908(119894119894+1)

119889119898

119899

sum

119894=119896+1

sum

119898isin119908(119894119894minus1)

119889119898

) (10)

where 119908(119894 119894 + 1) represents the matching points numberbetween the image 119894 and the image 119894+1 and 119889

119898

represents theresidual of the 119898th matching feature points After obtainingthe affine transformation matrix using RANSAC algorithmwe can continuously use L-M algorithm bundle to adjust theaffine matrix to further reduce the accumulated matchingerrors Since the stitching errors are reduced obviously in theimprovedmethod the distortion degree of panorama is lowercompared to the traditional method

Algorithm 2 (the improved image stitching process) Con-sider the following

Input 119899 ordered image sequence 119878(1198780

1198781

119878119899minus1

) whichmutually have overlapping areas

(1) Do image registrations for all adjacent images

(i) Assume the adjacent images are 119878119894

and 119878119894minus1

119894 isin

[1 119899 minus 1] use 119870NN algorithm to search match-ing SIFT feature points between 119878

119894

and 119878119894minus1

inaccordance with the minimum Euclidean dis-tance and then preserve the matching featurepoints data and the matching points numberseparately by using the arrays 119891119890119886119905119906119903119890119871119894119904119905 and119899119906119898119871119894119904119905

(ii) According to the matching feature points dataset 119891119890119886119905119906119903119890119871119894119904119905 compute the affine matrix thatcan be transformed from the coordinate spaceof the image 119878

119894minus1

to the coordinate space of theimage 119878

119894

and then preserve the affine matrix inthe array 119867119871119894119904119905

8 Mathematical Problems in Engineering

(a) Original image sequence (6 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

Figure 6 The panoramic images obtained by the traditional method and the improved method

(iii) Return to step (i) to complete the image regis-trations for the next adjacent images

(2) 119896 represents the middle index of the set 119878 Take 119878119896

asthe reference image According to the array 119899119906119898119871119894119904119905select the image which has larger matching pointsnumber with 119878

119896

as the next new input image(3) According to the index of the new input image and

the array119867119871119894119904119905 calculate the affinematrix119867 betweenthe new input image and the reference image based onformula (9)

(4) Use the L-M algorithm to optimize the affine matrix119867

(5) Use the optimized 119867 to transform the new inputimage

(6) Search the optimal seam between the affine transfor-mation result in step (5) and the reference image thenalong the seam combine them together seamlesslyand obtain the stitched result 119894119898119892119877119890119904119906119897119905

(7) Add the 119894119898119892119877119890119904119906119897119905 into 119878 to replace the input imageand the reference imageTherefore the stitched result119894119898119892119877119890119904119906119897119905 becomes the new middle image of thesequence 119878

(8) Return to step (2) to continuously implement the nextstitching process until there is only one image existingin 119878 which is the panoramic result

Output A panoramic image

Figure 6(a) is the original image sequence of the sceneFigures 6(b) and 6(c) are the panoramic images respec-tively obtained by the traditional method and the improvedmethod Comparing the two panoramic images we canconclude that the result from the improved stitching methodis better The distortion in the traditional stitching result issignificantly reduced by the improved stitching method

6 The Experimental Results and Analysis

61 The Experimental Results In order to demonstrate thestability of the improved method we select image sequencesfrom multiple scenes to implement the improved stitchingalgorithm Figures 7(a) 8(a) and 9(a) are the parts of theexperimental scenes The source image size in Figures 7 and9 is 500 times 747 and the size in Figure 8 is 500 times 697 Figures7(b) and 7(c) show the experimental results of the tradi-tional stitching process and the improved stitching processFigure 7(d) shows the stitching result after adding the L-Madjustment in the improved method Because of the obviousseam in the panorama continue to search the optimal seambetween affine transformation result and the reference imagealong the seam combine them together seamlessly in thestitching process The result is as shown in Figure 7(e) Fig-ure 7(f) shows the panoramic result after cutting the uselessarea In order to detect the stability of the improved stitchingprocess continue to select longer image sequence Figure 8(a)lists 12 computer graphic images and Figure 9(a) lists 16building images The rest of the images in Figures 8 and 9show the experimental results corresponding with the imagesin Figure 7

The experimental results in Figures 7 8 and 9 showthat the improved stitching method is adaptable for thelonger image sequences as well The stitching process cansignificantly improve the panorama distortions obtaininghigh-resolution and high-quality panorama

62 Estimation of Performance This paper takes the middleimage of the sequence as the reference image Do imageregistrations first for all adjacent images Then we calculatethe affine transformationmatrix according to the overlappingareas transitivity among the adjacent images instead of calcu-lating the affine transformationmatrix between the new inputimage and the reference image directly In addition we canget more matching feature points by the improved method

Mathematical Problems in Engineering 9

(a) Original image sequence of the grass scene (8 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitching method

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 7 Experimental results for 8 source images sequence

So we can provide more sample data for RANSAC algorithmwhich can increase the accuracy of the affine transformationmatrix and assure that we can obtain high-quality panoramaat last

Figures 10(a) 10(b) and 10(c) show the comparative dataof matching feature points number between the traditionalmethod and the improved method the results correspond tothe scenes of Figures 7(a) 8(a) and 9(a) The three scenesrespectively have 8 12 and 16 images in the sequenceWe use119875119894

to represent the 119894th stitching processThe three charts showthat the improvedmethod has better performance which canget more matching feature points

Figure 11 shows the comparative data of stitching timebetween the traditional method and the improved methodThe stitching time is recorded from the beginning of thestitching process to the end of finishing the last imagestitching The chart shows that the improved method hasfaster time efficiency Moreover the time efficiency will beimproved more obviously for the longer image sequence

At the same time from Figures 7 8 and 9 we can see thatthe improved algorithmobviously eliminates the distortion ofthe traditional results and gets better panoramic results Weassume that (119909 119910) represents the center of the input image

after being transformed by the affine matrix 119867 and wepreserve the center point of each stitching process in the set ofthe variable 119888119890119899119905119890119903119878119890119905 To some extent 119888119890119899119905119890119903119878119890119905 could reflectthe degree of panorama distortion We use formula (11) toexpress the distortion degree in which the Slope representsa function of computing slope between two points

distortion degree = Max Slope (119894 119895)

119894 119895 isin centerSet(11)

In addition we also define the variable 119894119899119891119900 119901119903119900119901119900119905119894119900119899which represents the ratio between the panorama image pixelnumber after removing the useless black pixels and the entirepanorama pixels number For example in Figure 9(e) thereare some black background pixels which are useless andwould be cut in Figure 9(f) The 119894119899119891119900 119901119903119900119901119900119905119894119900119899 expressionis showed as formula (12) and the 119908119894119889119905ℎ ℎ119890119894119892ℎ119905 are thepanorama dimensions

info proportion = 1 minusblack pixels

width times height (12)

10 Mathematical Problems in Engineering

(a) Original image sequence of the computer graphic scene (12 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 8 Experimental results for 12 source images sequence

(a) Original image sequence of the building scene (16 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 9 Experimental results for 16 source images sequence

Mathematical Problems in Engineering 11

20

40

60

80

100

120

140

160

P1 P2 P3 P4 P5 P6 P7

The m

atch

ing

poin

ts nu

mbe

r

Stitching process

ImprovedTraditional

(a) The matching feature points number of Figure 7(a)

2030405060708090

100110120

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11Stitching process

(b) The matching feature points number of Figure 8(a)

0

100

200

300

400

500

600

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10P11P12P13 P15P14Stitching process

(c) The matching feature points number of Figure 9(a)

Figure 10 The comparison data of matching feature points number between the traditional method and the improved method

From Table 4 we can see that the 119889119894119904119905119900119903119905119894119900119899 119889119890119892119903119890119890 and119894119899119891119900 119901119903119900119901119900119905119894119900119899 compared with the traditional method havebeen pleasingly improved

7 Conclusion

This paper increases the number of thematching SIFT featurepoints by improving the traditional method reducing theunnecessary SIFT detection area in the reference area as wellIn addition the improved method accelerates the panoramicstitching time efficiency and obtains a high-resolution high-quality panorama image Compared with the traditionalmethod the improved method proposed in this paper startsstitching from the middle position of the image sequenceThe middle image is taken as the reference image Then weobtain the affine matrix for any image in the sequence to thereference image according to the statistics information of allaffine transformation matrixes between the adjacent imagesMeanwhile the improved method dynamically selects thenext new input image to join the stitching process basedon the number of statistical matching points of the adjacentimages The experimental results verify that the improvedstitching process can accelerate time efficiency and reduce thedistortion of the panorama image

0

100

200

300

400

500

600

Scene 1 Scene 2 Scene 3

The t

otal

tim

e for

stitc

hing

the s

cene

TraditionalImproved

Figure 11 The comparison data of stitching time between thetraditional method and the improved method

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

12 Mathematical Problems in Engineering

Table 4 The comparison data of distortion degree between the traditional method and the improved method

Scene distortion degree info proportionThe traditional method The improved method The traditional method The improved method

Figure 7(a) 02027 01173 814 936Figure 8(a) 01879 01080 828 947Figure 9(a) 01923 00961 854 950

Acknowledgments

This work is supported by Chongqing Frontier and AppliedBasic Research Project under Grant no cstc2014jcyjA1347Chongqing Science and Technology Research Project ofChongqing Municipal Education Commission under Grantno KJ1402001 and Outstanding Achievements Transforma-tion Projects of University in Chongqing under Grant noKJZH14219 The authors wish to thank the associate editorsand anonymous reviewers for their valuable comments andsuggestions on this paper

References

[1] H-K Kim K-W Lee J-Y Jung S-W Jung and S-J Ko ldquoAcontent-aware image stitching algorithm formobilemultimediadevicesrdquo IEEE Transactions on Consumer Electronics vol 57 no4 pp 1875ndash1882 2011

[2] Z Song S Zhou and J Guan ldquoA novel image registration algo-rithm for remote sensing under affine transformationrdquo IEEETransactions on Geoscience and Remote Sensing vol 52 no 8pp 4895ndash4912 2014

[3] R-F Chang K-C Chang-Chien E Takada et al ldquoRapidimage stitching and computer-aided detection for multipassautomated breast ultrasoundrdquoMedical Physics vol 37 no 5 pp2063ndash2073 2010

[4] X Qiu S Liu and F Liu ldquoAn adaptive kernel-based targettracking method based on multiple features fusionrdquo IEEJTransactions on Electrical and Electronic Engineering vol 7 no1 pp 91ndash97 2012

[5] V C S Chew and F-L Lian ldquoPanorama stitching usingoverlap area weighted image plane projection and dynamic pro-gramming for visual localizationrdquo in Proceedings of the IEEEASME International Conference on Advanced Intelligent Mecha-tronics (AIM rsquo12) pp 250ndash255 July 2012

[6] D G Lowe ldquoDistinctive image features from scale-invariantkeypointsrdquo International Journal of Computer Vision vol 60 no2 pp 91ndash110 2004

[7] Y Xiong and K Pulli ldquoFast panorama stitching for high-qualitypanoramic images on mobile phonesrdquo IEEE Transactions onConsumer Electronics vol 56 no 2 pp 298ndash306 2010

[8] S Ha H Koo S Lee N Cho and S Kim ldquoPanorama mosaicoptimization for mobile camera systemsrdquo IEEE Transactions onConsumer Electronics vol 53 no 4 pp 1217ndash1225 2007

[9] M Brown and D G Lowe ldquoAutomatic panoramic image stitch-ing using invariant featuresrdquo International Journal of ComputerVision vol 74 no 1 pp 59ndash73 2007

[10] I K Hyung S K Beom and I C Nam ldquoA new method to findan optimal warping function in image stitchingrdquo in Proceedingsof the IEEE International Conference on Acoustics Speech andSignal Processing (ICASSP rsquo09) pp 1289ndash1292 IEEE TaipeiTaiwan April 2009

[11] M S Bascil and F Temurtas ldquoA study on hepatitis diseasediagnosis using multilayer neural network with LevenbergMarquardt training algorithmrdquo Journal of Medical Systems vol35 no 3 pp 433ndash436 2011

[12] Y S KimMGhergherehchi S Y Kim andHAfarideh ldquoRAN-dom sample consensus (RANSAC) algorithm for enhancingoverlapped etched track countingrdquo IET Image Processing vol9 no 2 pp 97ndash106 2015

[13] J Bentolila and J M Francos ldquoHomography and fundamentalmatrix estimation from region matches using an affine errormetricrdquo Journal ofMathematical Imaging andVision vol 49 no2 pp 481ndash491 2014

[14] H Pang D Chen M Pan et al ldquoImprovement of magnetome-ter calibration using Levenberg-Marquardt algorithmrdquo IEEJTransactions on Electrical and Electronic Engineering vol 9 no3 pp 324ndash328 2014

[15] F Hampel C Hennig and E Ronchetti ldquoA smoothing principlefor the Huber and other locationM-estimatorsrdquo ComputationalStatistics amp Data Analysis vol 55 no 1 pp 324ndash337 2011

[16] Z Al Aghbari and A Al-Hamadi ldquoEfficient KNN search bylinear projection of image clustersrdquo International Journal ofIntelligent Systems vol 26 no 9 pp 844ndash865 2011

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 4: Research Article The Improved Algorithm of Fast Panorama ...downloads.hindawi.com/journals/mpe/2015/428076.pdf · Image Sequence and Reducing the Distortion Errors ZhongQu, 1 Si-PengLin,

4 Mathematical Problems in Engineering

(a) SIFT features in Figure 2(a) (b) SIFT features in Figure 2(b)

(c) SIFT features in Figure 2(c) (d) SIFT features in Figure 2(d)

Figure 3 Extract SIFT feature points for images in Figure 2

matrixes information In this paper image sequences wereshot by a hand-held camera along the same horizontal planeSo the transformation matrix is suitable for the affine matrixThe affine matrix structure [13] is shown as follows

119867 =[[

[

cos 120579 minus sin 120579 119906

sin 120579 cos 120579 V

0 0 1

]]

]

(4)

where the variable 120579 represents the image rotation angle119906 V separately represent the translation distance in 119909 axialdirection and 119910 axial direction In order to calculate theparameters of the affine matrix at least 3 pairs of coordinateinformation pieces ofmatching points are neededWe assume

that (119909119894

119910119894

1)119879 and (119909

1015840

119894

1199101015840

119894

1)119879 represent a pair of matching

feature points The affine matrix can be obtained as follows

119867 =[[[

[

1199091015840

1

1199091015840

2

1199091015840

3

1199101015840

1

1199101015840

2

1199101015840

3

1 1 1

]]]

]

[[

[

1199091

1199092

1199093

1199101

1199102

1199103

1 1 1

]]

]

minus1

(5)

In the panorama image stitching process select 119903 = 3

pairs of matching points at random (Ensure that the 3 pairs offeature points in the input image composite into an invertiblematrix) [10] Through formula (5) it calculates the affinetransformation matrix 119867 and then iterates resampling thenewmatching feature points to find an affinematrix119867 whichcorresponds to the maximum number of inliers (whoseprojections are consistent with 119867 with a tolerance isin pixels)if we assume that 119901

119894

represents the probability that a feature

Mathematical Problems in Engineering 5

Table 2 Experimental data in image registration process

Stitching processing The inliers number after RANSAC The time for stitching (s)Figures 3(a) and 3(b) 79 1026Figures 3(b) and 3(c) 49 977Figures 3(c) and 3(d) 56 1182

(a) RANSAC inliers between Figures 3(a) and 3(b) (b) RANSAC inliers between Figures 3(b) and 3(c)

(c) RANSAC inliers between Figures 3(c) and 3(d)

Figure 4 RANSAC for the adjacent images in Figure 3

point matches correctly between the matching images After119899 times iterations the probability of finding a correct affinematrix is 119875 = 1 minus (1 minus (119901

119894

)119903

)119899 With the iteration number

is increasing the probability 119875 will increase as well When119899 = 100 and 119901

119894

= 05 the probability that a correct affinetransformation matrix is not found approaches 10 times 10

minus6This paper first extracts the image feature points through

SIFT algorithm searches matching feature points in the over-lapping areas of the adjacent images according to the mini-mum Euclidean distance and then uses RANSAC algorithmto findmaximumnumber of inlierswithin the set ofmatchingpoints obtaining the affine transformation matrix Afterrefining the matching points with the RANSAC algorithmthe set of inliers are set up with red lines shown as in Figure 4The inliers number and the time of image registration areshown in Table 2

3 Bundle Adjustment Using L-M Algorithm

L-M (Levenberg-Marquardt) algorithm is a nonlinearoptimization algorithm that combines the Gauss-Newton

method with the gradient descent method making useof known measurement data to estimate the unknownparameters [14] In this paper we use L-M bundle to adjustthe parameters of the affine transformation matrix and try tomake the total matching errors among the matching featurepoints approach a minimum Generally the standard modelof error function is defined as sum

119894

(12)1199032

119894

where 119903119894

representsthe Euclidean distance between the 119894th matching pointsHowever when there is a mismatching point the Euclideandistance is so large that it will impact on the standarderror function with a great weight In order to eliminatethe influence of mismatching points we choose the Huberfunction instead of the standard error function The Huberfunction [9 15] can empower the weight dynamicallyaccording to the matching errors value

ℎ (119903) =

1

2|119903|2

if |119903| lt 120575

120575 |119903| minus1

21205752

if |119903| ge 120575

(6)

6 Mathematical Problems in Engineering

Table 3 The total matching errors comparison data after L-M

Stitching processing The total matching errors before L-M The total matching errors after L-MFigure 4(a) 7265 5969Figure 4(b) 1562 1389Figure 4(c) 4974 3219

119908 (119903) =

1 if |119903| lt 120575

120575

|119903| if |119903| ge 120575

(7)

Formula (6) shows the Huber function and (7) shows theweight function of the Huber One has 120575 = 1345119904 where 119904

represents the standard deviation of the measurement dataThe new error function is expressed as minsum

119894

ℎ(119903119894

) whichis equivalent to minsum

119894

119908(119903)1199032 When |119903| lt 120575 the matching

point is inlier corresponding to the fact that the residual isgiven weight 1 When |119903| ge 120575 the matching point is outliercorresponding the weight for residual trend towards 0

L-M algorithm continues to iterate until finding a setof parameters that make the error function minimize Weassume119867

119896

= [1198861

1198862

119886119898

] represents the solution vector ofunknown parameters in the 119896th iteration process Δ119872 repre-sents the offset vectorThen the next iteration process in L-Malgorithm can be expressed as

119867119896+1

= 119867119896

+ Δ119872

Δ119872 = minus (119869119879

119896

119869119896

+ 119906119896

119868)minus1

119869119879

119896

119890119896

119869119896

=

[[[[[[[[[[

[

1205971199031

(119867119896

)

1205971198861

1205971199031

(119867119896

)

1205971198862

sdot sdot sdot1205971199031

(119867119896

)

120597119886119898

1205971199032

(119867119896

)

1205971198861

1205971199032

(119867119896

)

1205971198862

sdot sdot sdot1205971199032

(119867119896

)

120597119886119898

sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot

120597119903119899

(119867119896

)

1205971198861

120597119903119899

(119867119896

)

1205971198862

sdot sdot sdot120597119903119899

(119867119896

)

120597119886119898

]]]]]]]]]]

]

(8)

where 119869119896

corresponds to the Jacobi matrix under the con-dition of the 119867

119896

119868 represents unit matrix 119890119896

is the residualsum of all matching points under 119867

119896

119906 (119906 ge 0) representsthe damping parameter When 119906 gradually tends to 0 L-M algorithm is similar to the Gauss-Newton method whichcontinuously closes to the ideal value after each iterationprocess When 119906 is large L-M algorithm is similar to thegradient descent method which can find the solution neigh-borhood of the unknown parameters speedily

Table 3 makes a list of comparative data of total matchingerrors before and after L-M bundle adjustment Total match-ing errors are expressed as sum

119898

119894=0

119903 where 119898 represents thematching feature points number Comparative data showsthat L-M algorithm can truly reduce the image matchingerrors

4 The Traditional Stitching Method

After referring to the paper published by Xiong and Pulli [7]and Brown and Lowe [9] we summarize that the traditionalstitching method is shown as in the following steps

Algorithm 1 (the traditional image stitching process) Con-sider the following

Input 119899 ordered image sequence 119878(1198780

1198781

119878119899minus1

) whichmutually have overlapping areas

(1) Select the first two images of the set 119878 to calculate theSIFT feature points respectively

(2) Select the first image in the sequence 119878 as the referenceimage and the second image as the new input imageUse 119870NN (119870 Nearest-Neighbours) algorithm [16] tosearchmatching feature points between the new inputimage and the reference image in accordance with theminimum Euclidean distance

(3) According to thematching feature points data set usethe RANSAC algorithm to calculate the affine matrix119867 which can transform the new input image into thecoordinate space of the reference image

(4) Use the L-M algorithm to optimize the affine matrix119867

(5) Use the optimized 119867 to transform the new inputimage

(6) Search the optimal seam between the affine trans-formation result in step (5) and the reference imagethen along the seam to combine them togetherseamlessly obtain the stitched result 119894119898119892119877119890119904119906119897119905

(7) Add the 119894119898119892119877119890119904119906119897119905 into 119878 to replace the input imageand the reference image In next stitching process the119894119898119892119877119890119904119906119897119905 is selected as the new reference image

(8) Return to step (1) to continuously implement the nextstitching process until there is only one image existingin the 119878 which is the panoramic result

Output A panoramic image

However in traditionalmethod each timewhen an imagestitching is completed the dimension of reference image willcontinue to increase The overlapping area between the newinput image and the reference image accounts for smallerand smaller proportion comparing with the entire referenceimage area Therefore calculating SIFT feature points for thewhole reference image will consume a lot of system resources

Mathematical Problems in Engineering 7

Image[x]

Hminus1

[x] Hminus1

[k minus 2] Hminus1

[k minus 1]H[k] H[k + 1] H[y minus 1]

Image[k minus 2] Image[k minus 1] The reference image Image[k + 1] Image[k + 2] Image[y]middot middot middotmiddot middot middot

prod x=kminus1

x++Hminus1

[x] prody=k

minusminusyH[y]

Figure 5 The process of calculating the affine transformation matrix for arbitrary image

and registration time In addition the approach of the tradi-tional stitching algorithm to selecting the next input imageis relatively single Each time when the adjacent image isselected as the new input image it does not give priority to theoverlapping area size or the matching feature point numberbetween new input image and the reference image Mean-while if there are manymatching errors in image registrationprocess the matching errors will be preserved and affectevery subsequent registration process because the referenceimage is formed by the previous stitched results Finally thepanoramic image will be seriously distorted

5 The Improved Stitching Method

In the image stitching process as we know the accuracyof image registration decides the quality of the panoramicimage and the affine transformationmatrix is the final resultwhich is what wewanted by image registration So it is impor-tant to obtain a precise transformation matrix Thereforewe proposed a new mathematical model to compute thetransformation matrix which is shown as

119867 =

119894=119896minus1

prod

119894++

119867minus1

[119894] 119894 lt 119896

119894=119896

prod

minusminus119894

119867 [119894] 119894 gt 119896

(9)

where 119867[119894] represents the affine transformation matrixobtained from each group of adjacent images and 119896 repre-sents the middle index of the sequence The new mathemati-cal model does not calculate the affine transformationmatrixbetween the result of each stitching process and the newinput image but using the property of transitivity of matrixesobtained the affine transformation matrix for the new inputimage through all adjacent images Figure 5 describes theprocess of calculating the affine transformation matrix forarbitrary image Firstly we do image registrations for all adja-cent images to get the matching feature points informationUsing the information of matching features we can calculatethe affine matrices between all adjacent images and then theaffine matrix mapped from the input image to the referenceimage also can be obtained through the statistical matricesset according to formula (9) Due to the transitivity of thematrixes we can get the affine matrix transformed from anyimage to the reference image

The improved method does not detect the SIFT featurepoints for the whole reference image area but uses thestatistical registration information of all adjacent images tocalculate the affine matrix So the improved method not only

reduces the SIFT feature detection area of the referenceimage but also increases the number of matching featurepoints and improves the efficiency of stitching time

On the other hand in contrast to stitching serially fromleft to right one by one in the traditional method theimproved method takes the middle image as the referenceimage and selects the next input image based on the numberof matching points and completes the image sequence stitch-ing process from middle position dynamically expanding toboth sides In the improved stitching process the maximumaccumulated matching errors are computed from the middleimage to the two sides of the image sequence as shown in(10) reduced to the half level of the traditional method

119864 = MAX(

119896minus1

sum

119894=1

sum

119898isin119908(119894119894+1)

119889119898

119899

sum

119894=119896+1

sum

119898isin119908(119894119894minus1)

119889119898

) (10)

where 119908(119894 119894 + 1) represents the matching points numberbetween the image 119894 and the image 119894+1 and 119889

119898

represents theresidual of the 119898th matching feature points After obtainingthe affine transformation matrix using RANSAC algorithmwe can continuously use L-M algorithm bundle to adjust theaffine matrix to further reduce the accumulated matchingerrors Since the stitching errors are reduced obviously in theimprovedmethod the distortion degree of panorama is lowercompared to the traditional method

Algorithm 2 (the improved image stitching process) Con-sider the following

Input 119899 ordered image sequence 119878(1198780

1198781

119878119899minus1

) whichmutually have overlapping areas

(1) Do image registrations for all adjacent images

(i) Assume the adjacent images are 119878119894

and 119878119894minus1

119894 isin

[1 119899 minus 1] use 119870NN algorithm to search match-ing SIFT feature points between 119878

119894

and 119878119894minus1

inaccordance with the minimum Euclidean dis-tance and then preserve the matching featurepoints data and the matching points numberseparately by using the arrays 119891119890119886119905119906119903119890119871119894119904119905 and119899119906119898119871119894119904119905

(ii) According to the matching feature points dataset 119891119890119886119905119906119903119890119871119894119904119905 compute the affine matrix thatcan be transformed from the coordinate spaceof the image 119878

119894minus1

to the coordinate space of theimage 119878

119894

and then preserve the affine matrix inthe array 119867119871119894119904119905

8 Mathematical Problems in Engineering

(a) Original image sequence (6 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

Figure 6 The panoramic images obtained by the traditional method and the improved method

(iii) Return to step (i) to complete the image regis-trations for the next adjacent images

(2) 119896 represents the middle index of the set 119878 Take 119878119896

asthe reference image According to the array 119899119906119898119871119894119904119905select the image which has larger matching pointsnumber with 119878

119896

as the next new input image(3) According to the index of the new input image and

the array119867119871119894119904119905 calculate the affinematrix119867 betweenthe new input image and the reference image based onformula (9)

(4) Use the L-M algorithm to optimize the affine matrix119867

(5) Use the optimized 119867 to transform the new inputimage

(6) Search the optimal seam between the affine transfor-mation result in step (5) and the reference image thenalong the seam combine them together seamlesslyand obtain the stitched result 119894119898119892119877119890119904119906119897119905

(7) Add the 119894119898119892119877119890119904119906119897119905 into 119878 to replace the input imageand the reference imageTherefore the stitched result119894119898119892119877119890119904119906119897119905 becomes the new middle image of thesequence 119878

(8) Return to step (2) to continuously implement the nextstitching process until there is only one image existingin 119878 which is the panoramic result

Output A panoramic image

Figure 6(a) is the original image sequence of the sceneFigures 6(b) and 6(c) are the panoramic images respec-tively obtained by the traditional method and the improvedmethod Comparing the two panoramic images we canconclude that the result from the improved stitching methodis better The distortion in the traditional stitching result issignificantly reduced by the improved stitching method

6 The Experimental Results and Analysis

61 The Experimental Results In order to demonstrate thestability of the improved method we select image sequencesfrom multiple scenes to implement the improved stitchingalgorithm Figures 7(a) 8(a) and 9(a) are the parts of theexperimental scenes The source image size in Figures 7 and9 is 500 times 747 and the size in Figure 8 is 500 times 697 Figures7(b) and 7(c) show the experimental results of the tradi-tional stitching process and the improved stitching processFigure 7(d) shows the stitching result after adding the L-Madjustment in the improved method Because of the obviousseam in the panorama continue to search the optimal seambetween affine transformation result and the reference imagealong the seam combine them together seamlessly in thestitching process The result is as shown in Figure 7(e) Fig-ure 7(f) shows the panoramic result after cutting the uselessarea In order to detect the stability of the improved stitchingprocess continue to select longer image sequence Figure 8(a)lists 12 computer graphic images and Figure 9(a) lists 16building images The rest of the images in Figures 8 and 9show the experimental results corresponding with the imagesin Figure 7

The experimental results in Figures 7 8 and 9 showthat the improved stitching method is adaptable for thelonger image sequences as well The stitching process cansignificantly improve the panorama distortions obtaininghigh-resolution and high-quality panorama

62 Estimation of Performance This paper takes the middleimage of the sequence as the reference image Do imageregistrations first for all adjacent images Then we calculatethe affine transformationmatrix according to the overlappingareas transitivity among the adjacent images instead of calcu-lating the affine transformationmatrix between the new inputimage and the reference image directly In addition we canget more matching feature points by the improved method

Mathematical Problems in Engineering 9

(a) Original image sequence of the grass scene (8 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitching method

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 7 Experimental results for 8 source images sequence

So we can provide more sample data for RANSAC algorithmwhich can increase the accuracy of the affine transformationmatrix and assure that we can obtain high-quality panoramaat last

Figures 10(a) 10(b) and 10(c) show the comparative dataof matching feature points number between the traditionalmethod and the improved method the results correspond tothe scenes of Figures 7(a) 8(a) and 9(a) The three scenesrespectively have 8 12 and 16 images in the sequenceWe use119875119894

to represent the 119894th stitching processThe three charts showthat the improvedmethod has better performance which canget more matching feature points

Figure 11 shows the comparative data of stitching timebetween the traditional method and the improved methodThe stitching time is recorded from the beginning of thestitching process to the end of finishing the last imagestitching The chart shows that the improved method hasfaster time efficiency Moreover the time efficiency will beimproved more obviously for the longer image sequence

At the same time from Figures 7 8 and 9 we can see thatthe improved algorithmobviously eliminates the distortion ofthe traditional results and gets better panoramic results Weassume that (119909 119910) represents the center of the input image

after being transformed by the affine matrix 119867 and wepreserve the center point of each stitching process in the set ofthe variable 119888119890119899119905119890119903119878119890119905 To some extent 119888119890119899119905119890119903119878119890119905 could reflectthe degree of panorama distortion We use formula (11) toexpress the distortion degree in which the Slope representsa function of computing slope between two points

distortion degree = Max Slope (119894 119895)

119894 119895 isin centerSet(11)

In addition we also define the variable 119894119899119891119900 119901119903119900119901119900119905119894119900119899which represents the ratio between the panorama image pixelnumber after removing the useless black pixels and the entirepanorama pixels number For example in Figure 9(e) thereare some black background pixels which are useless andwould be cut in Figure 9(f) The 119894119899119891119900 119901119903119900119901119900119905119894119900119899 expressionis showed as formula (12) and the 119908119894119889119905ℎ ℎ119890119894119892ℎ119905 are thepanorama dimensions

info proportion = 1 minusblack pixels

width times height (12)

10 Mathematical Problems in Engineering

(a) Original image sequence of the computer graphic scene (12 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 8 Experimental results for 12 source images sequence

(a) Original image sequence of the building scene (16 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 9 Experimental results for 16 source images sequence

Mathematical Problems in Engineering 11

20

40

60

80

100

120

140

160

P1 P2 P3 P4 P5 P6 P7

The m

atch

ing

poin

ts nu

mbe

r

Stitching process

ImprovedTraditional

(a) The matching feature points number of Figure 7(a)

2030405060708090

100110120

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11Stitching process

(b) The matching feature points number of Figure 8(a)

0

100

200

300

400

500

600

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10P11P12P13 P15P14Stitching process

(c) The matching feature points number of Figure 9(a)

Figure 10 The comparison data of matching feature points number between the traditional method and the improved method

From Table 4 we can see that the 119889119894119904119905119900119903119905119894119900119899 119889119890119892119903119890119890 and119894119899119891119900 119901119903119900119901119900119905119894119900119899 compared with the traditional method havebeen pleasingly improved

7 Conclusion

This paper increases the number of thematching SIFT featurepoints by improving the traditional method reducing theunnecessary SIFT detection area in the reference area as wellIn addition the improved method accelerates the panoramicstitching time efficiency and obtains a high-resolution high-quality panorama image Compared with the traditionalmethod the improved method proposed in this paper startsstitching from the middle position of the image sequenceThe middle image is taken as the reference image Then weobtain the affine matrix for any image in the sequence to thereference image according to the statistics information of allaffine transformation matrixes between the adjacent imagesMeanwhile the improved method dynamically selects thenext new input image to join the stitching process basedon the number of statistical matching points of the adjacentimages The experimental results verify that the improvedstitching process can accelerate time efficiency and reduce thedistortion of the panorama image

0

100

200

300

400

500

600

Scene 1 Scene 2 Scene 3

The t

otal

tim

e for

stitc

hing

the s

cene

TraditionalImproved

Figure 11 The comparison data of stitching time between thetraditional method and the improved method

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

12 Mathematical Problems in Engineering

Table 4 The comparison data of distortion degree between the traditional method and the improved method

Scene distortion degree info proportionThe traditional method The improved method The traditional method The improved method

Figure 7(a) 02027 01173 814 936Figure 8(a) 01879 01080 828 947Figure 9(a) 01923 00961 854 950

Acknowledgments

This work is supported by Chongqing Frontier and AppliedBasic Research Project under Grant no cstc2014jcyjA1347Chongqing Science and Technology Research Project ofChongqing Municipal Education Commission under Grantno KJ1402001 and Outstanding Achievements Transforma-tion Projects of University in Chongqing under Grant noKJZH14219 The authors wish to thank the associate editorsand anonymous reviewers for their valuable comments andsuggestions on this paper

References

[1] H-K Kim K-W Lee J-Y Jung S-W Jung and S-J Ko ldquoAcontent-aware image stitching algorithm formobilemultimediadevicesrdquo IEEE Transactions on Consumer Electronics vol 57 no4 pp 1875ndash1882 2011

[2] Z Song S Zhou and J Guan ldquoA novel image registration algo-rithm for remote sensing under affine transformationrdquo IEEETransactions on Geoscience and Remote Sensing vol 52 no 8pp 4895ndash4912 2014

[3] R-F Chang K-C Chang-Chien E Takada et al ldquoRapidimage stitching and computer-aided detection for multipassautomated breast ultrasoundrdquoMedical Physics vol 37 no 5 pp2063ndash2073 2010

[4] X Qiu S Liu and F Liu ldquoAn adaptive kernel-based targettracking method based on multiple features fusionrdquo IEEJTransactions on Electrical and Electronic Engineering vol 7 no1 pp 91ndash97 2012

[5] V C S Chew and F-L Lian ldquoPanorama stitching usingoverlap area weighted image plane projection and dynamic pro-gramming for visual localizationrdquo in Proceedings of the IEEEASME International Conference on Advanced Intelligent Mecha-tronics (AIM rsquo12) pp 250ndash255 July 2012

[6] D G Lowe ldquoDistinctive image features from scale-invariantkeypointsrdquo International Journal of Computer Vision vol 60 no2 pp 91ndash110 2004

[7] Y Xiong and K Pulli ldquoFast panorama stitching for high-qualitypanoramic images on mobile phonesrdquo IEEE Transactions onConsumer Electronics vol 56 no 2 pp 298ndash306 2010

[8] S Ha H Koo S Lee N Cho and S Kim ldquoPanorama mosaicoptimization for mobile camera systemsrdquo IEEE Transactions onConsumer Electronics vol 53 no 4 pp 1217ndash1225 2007

[9] M Brown and D G Lowe ldquoAutomatic panoramic image stitch-ing using invariant featuresrdquo International Journal of ComputerVision vol 74 no 1 pp 59ndash73 2007

[10] I K Hyung S K Beom and I C Nam ldquoA new method to findan optimal warping function in image stitchingrdquo in Proceedingsof the IEEE International Conference on Acoustics Speech andSignal Processing (ICASSP rsquo09) pp 1289ndash1292 IEEE TaipeiTaiwan April 2009

[11] M S Bascil and F Temurtas ldquoA study on hepatitis diseasediagnosis using multilayer neural network with LevenbergMarquardt training algorithmrdquo Journal of Medical Systems vol35 no 3 pp 433ndash436 2011

[12] Y S KimMGhergherehchi S Y Kim andHAfarideh ldquoRAN-dom sample consensus (RANSAC) algorithm for enhancingoverlapped etched track countingrdquo IET Image Processing vol9 no 2 pp 97ndash106 2015

[13] J Bentolila and J M Francos ldquoHomography and fundamentalmatrix estimation from region matches using an affine errormetricrdquo Journal ofMathematical Imaging andVision vol 49 no2 pp 481ndash491 2014

[14] H Pang D Chen M Pan et al ldquoImprovement of magnetome-ter calibration using Levenberg-Marquardt algorithmrdquo IEEJTransactions on Electrical and Electronic Engineering vol 9 no3 pp 324ndash328 2014

[15] F Hampel C Hennig and E Ronchetti ldquoA smoothing principlefor the Huber and other locationM-estimatorsrdquo ComputationalStatistics amp Data Analysis vol 55 no 1 pp 324ndash337 2011

[16] Z Al Aghbari and A Al-Hamadi ldquoEfficient KNN search bylinear projection of image clustersrdquo International Journal ofIntelligent Systems vol 26 no 9 pp 844ndash865 2011

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 5: Research Article The Improved Algorithm of Fast Panorama ...downloads.hindawi.com/journals/mpe/2015/428076.pdf · Image Sequence and Reducing the Distortion Errors ZhongQu, 1 Si-PengLin,

Mathematical Problems in Engineering 5

Table 2 Experimental data in image registration process

Stitching processing The inliers number after RANSAC The time for stitching (s)Figures 3(a) and 3(b) 79 1026Figures 3(b) and 3(c) 49 977Figures 3(c) and 3(d) 56 1182

(a) RANSAC inliers between Figures 3(a) and 3(b) (b) RANSAC inliers between Figures 3(b) and 3(c)

(c) RANSAC inliers between Figures 3(c) and 3(d)

Figure 4 RANSAC for the adjacent images in Figure 3

point matches correctly between the matching images After119899 times iterations the probability of finding a correct affinematrix is 119875 = 1 minus (1 minus (119901

119894

)119903

)119899 With the iteration number

is increasing the probability 119875 will increase as well When119899 = 100 and 119901

119894

= 05 the probability that a correct affinetransformation matrix is not found approaches 10 times 10

minus6This paper first extracts the image feature points through

SIFT algorithm searches matching feature points in the over-lapping areas of the adjacent images according to the mini-mum Euclidean distance and then uses RANSAC algorithmto findmaximumnumber of inlierswithin the set ofmatchingpoints obtaining the affine transformation matrix Afterrefining the matching points with the RANSAC algorithmthe set of inliers are set up with red lines shown as in Figure 4The inliers number and the time of image registration areshown in Table 2

3 Bundle Adjustment Using L-M Algorithm

L-M (Levenberg-Marquardt) algorithm is a nonlinearoptimization algorithm that combines the Gauss-Newton

method with the gradient descent method making useof known measurement data to estimate the unknownparameters [14] In this paper we use L-M bundle to adjustthe parameters of the affine transformation matrix and try tomake the total matching errors among the matching featurepoints approach a minimum Generally the standard modelof error function is defined as sum

119894

(12)1199032

119894

where 119903119894

representsthe Euclidean distance between the 119894th matching pointsHowever when there is a mismatching point the Euclideandistance is so large that it will impact on the standarderror function with a great weight In order to eliminatethe influence of mismatching points we choose the Huberfunction instead of the standard error function The Huberfunction [9 15] can empower the weight dynamicallyaccording to the matching errors value

ℎ (119903) =

1

2|119903|2

if |119903| lt 120575

120575 |119903| minus1

21205752

if |119903| ge 120575

(6)

6 Mathematical Problems in Engineering

Table 3 The total matching errors comparison data after L-M

Stitching processing The total matching errors before L-M The total matching errors after L-MFigure 4(a) 7265 5969Figure 4(b) 1562 1389Figure 4(c) 4974 3219

119908 (119903) =

1 if |119903| lt 120575

120575

|119903| if |119903| ge 120575

(7)

Formula (6) shows the Huber function and (7) shows theweight function of the Huber One has 120575 = 1345119904 where 119904

represents the standard deviation of the measurement dataThe new error function is expressed as minsum

119894

ℎ(119903119894

) whichis equivalent to minsum

119894

119908(119903)1199032 When |119903| lt 120575 the matching

point is inlier corresponding to the fact that the residual isgiven weight 1 When |119903| ge 120575 the matching point is outliercorresponding the weight for residual trend towards 0

L-M algorithm continues to iterate until finding a setof parameters that make the error function minimize Weassume119867

119896

= [1198861

1198862

119886119898

] represents the solution vector ofunknown parameters in the 119896th iteration process Δ119872 repre-sents the offset vectorThen the next iteration process in L-Malgorithm can be expressed as

119867119896+1

= 119867119896

+ Δ119872

Δ119872 = minus (119869119879

119896

119869119896

+ 119906119896

119868)minus1

119869119879

119896

119890119896

119869119896

=

[[[[[[[[[[

[

1205971199031

(119867119896

)

1205971198861

1205971199031

(119867119896

)

1205971198862

sdot sdot sdot1205971199031

(119867119896

)

120597119886119898

1205971199032

(119867119896

)

1205971198861

1205971199032

(119867119896

)

1205971198862

sdot sdot sdot1205971199032

(119867119896

)

120597119886119898

sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot

120597119903119899

(119867119896

)

1205971198861

120597119903119899

(119867119896

)

1205971198862

sdot sdot sdot120597119903119899

(119867119896

)

120597119886119898

]]]]]]]]]]

]

(8)

where 119869119896

corresponds to the Jacobi matrix under the con-dition of the 119867

119896

119868 represents unit matrix 119890119896

is the residualsum of all matching points under 119867

119896

119906 (119906 ge 0) representsthe damping parameter When 119906 gradually tends to 0 L-M algorithm is similar to the Gauss-Newton method whichcontinuously closes to the ideal value after each iterationprocess When 119906 is large L-M algorithm is similar to thegradient descent method which can find the solution neigh-borhood of the unknown parameters speedily

Table 3 makes a list of comparative data of total matchingerrors before and after L-M bundle adjustment Total match-ing errors are expressed as sum

119898

119894=0

119903 where 119898 represents thematching feature points number Comparative data showsthat L-M algorithm can truly reduce the image matchingerrors

4 The Traditional Stitching Method

After referring to the paper published by Xiong and Pulli [7]and Brown and Lowe [9] we summarize that the traditionalstitching method is shown as in the following steps

Algorithm 1 (the traditional image stitching process) Con-sider the following

Input 119899 ordered image sequence 119878(1198780

1198781

119878119899minus1

) whichmutually have overlapping areas

(1) Select the first two images of the set 119878 to calculate theSIFT feature points respectively

(2) Select the first image in the sequence 119878 as the referenceimage and the second image as the new input imageUse 119870NN (119870 Nearest-Neighbours) algorithm [16] tosearchmatching feature points between the new inputimage and the reference image in accordance with theminimum Euclidean distance

(3) According to thematching feature points data set usethe RANSAC algorithm to calculate the affine matrix119867 which can transform the new input image into thecoordinate space of the reference image

(4) Use the L-M algorithm to optimize the affine matrix119867

(5) Use the optimized 119867 to transform the new inputimage

(6) Search the optimal seam between the affine trans-formation result in step (5) and the reference imagethen along the seam to combine them togetherseamlessly obtain the stitched result 119894119898119892119877119890119904119906119897119905

(7) Add the 119894119898119892119877119890119904119906119897119905 into 119878 to replace the input imageand the reference image In next stitching process the119894119898119892119877119890119904119906119897119905 is selected as the new reference image

(8) Return to step (1) to continuously implement the nextstitching process until there is only one image existingin the 119878 which is the panoramic result

Output A panoramic image

However in traditionalmethod each timewhen an imagestitching is completed the dimension of reference image willcontinue to increase The overlapping area between the newinput image and the reference image accounts for smallerand smaller proportion comparing with the entire referenceimage area Therefore calculating SIFT feature points for thewhole reference image will consume a lot of system resources

Mathematical Problems in Engineering 7

Image[x]

Hminus1

[x] Hminus1

[k minus 2] Hminus1

[k minus 1]H[k] H[k + 1] H[y minus 1]

Image[k minus 2] Image[k minus 1] The reference image Image[k + 1] Image[k + 2] Image[y]middot middot middotmiddot middot middot

prod x=kminus1

x++Hminus1

[x] prody=k

minusminusyH[y]

Figure 5 The process of calculating the affine transformation matrix for arbitrary image

and registration time In addition the approach of the tradi-tional stitching algorithm to selecting the next input imageis relatively single Each time when the adjacent image isselected as the new input image it does not give priority to theoverlapping area size or the matching feature point numberbetween new input image and the reference image Mean-while if there are manymatching errors in image registrationprocess the matching errors will be preserved and affectevery subsequent registration process because the referenceimage is formed by the previous stitched results Finally thepanoramic image will be seriously distorted

5 The Improved Stitching Method

In the image stitching process as we know the accuracyof image registration decides the quality of the panoramicimage and the affine transformationmatrix is the final resultwhich is what wewanted by image registration So it is impor-tant to obtain a precise transformation matrix Thereforewe proposed a new mathematical model to compute thetransformation matrix which is shown as

119867 =

119894=119896minus1

prod

119894++

119867minus1

[119894] 119894 lt 119896

119894=119896

prod

minusminus119894

119867 [119894] 119894 gt 119896

(9)

where 119867[119894] represents the affine transformation matrixobtained from each group of adjacent images and 119896 repre-sents the middle index of the sequence The new mathemati-cal model does not calculate the affine transformationmatrixbetween the result of each stitching process and the newinput image but using the property of transitivity of matrixesobtained the affine transformation matrix for the new inputimage through all adjacent images Figure 5 describes theprocess of calculating the affine transformation matrix forarbitrary image Firstly we do image registrations for all adja-cent images to get the matching feature points informationUsing the information of matching features we can calculatethe affine matrices between all adjacent images and then theaffine matrix mapped from the input image to the referenceimage also can be obtained through the statistical matricesset according to formula (9) Due to the transitivity of thematrixes we can get the affine matrix transformed from anyimage to the reference image

The improved method does not detect the SIFT featurepoints for the whole reference image area but uses thestatistical registration information of all adjacent images tocalculate the affine matrix So the improved method not only

reduces the SIFT feature detection area of the referenceimage but also increases the number of matching featurepoints and improves the efficiency of stitching time

On the other hand in contrast to stitching serially fromleft to right one by one in the traditional method theimproved method takes the middle image as the referenceimage and selects the next input image based on the numberof matching points and completes the image sequence stitch-ing process from middle position dynamically expanding toboth sides In the improved stitching process the maximumaccumulated matching errors are computed from the middleimage to the two sides of the image sequence as shown in(10) reduced to the half level of the traditional method

119864 = MAX(

119896minus1

sum

119894=1

sum

119898isin119908(119894119894+1)

119889119898

119899

sum

119894=119896+1

sum

119898isin119908(119894119894minus1)

119889119898

) (10)

where 119908(119894 119894 + 1) represents the matching points numberbetween the image 119894 and the image 119894+1 and 119889

119898

represents theresidual of the 119898th matching feature points After obtainingthe affine transformation matrix using RANSAC algorithmwe can continuously use L-M algorithm bundle to adjust theaffine matrix to further reduce the accumulated matchingerrors Since the stitching errors are reduced obviously in theimprovedmethod the distortion degree of panorama is lowercompared to the traditional method

Algorithm 2 (the improved image stitching process) Con-sider the following

Input 119899 ordered image sequence 119878(1198780

1198781

119878119899minus1

) whichmutually have overlapping areas

(1) Do image registrations for all adjacent images

(i) Assume the adjacent images are 119878119894

and 119878119894minus1

119894 isin

[1 119899 minus 1] use 119870NN algorithm to search match-ing SIFT feature points between 119878

119894

and 119878119894minus1

inaccordance with the minimum Euclidean dis-tance and then preserve the matching featurepoints data and the matching points numberseparately by using the arrays 119891119890119886119905119906119903119890119871119894119904119905 and119899119906119898119871119894119904119905

(ii) According to the matching feature points dataset 119891119890119886119905119906119903119890119871119894119904119905 compute the affine matrix thatcan be transformed from the coordinate spaceof the image 119878

119894minus1

to the coordinate space of theimage 119878

119894

and then preserve the affine matrix inthe array 119867119871119894119904119905

8 Mathematical Problems in Engineering

(a) Original image sequence (6 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

Figure 6 The panoramic images obtained by the traditional method and the improved method

(iii) Return to step (i) to complete the image regis-trations for the next adjacent images

(2) 119896 represents the middle index of the set 119878 Take 119878119896

asthe reference image According to the array 119899119906119898119871119894119904119905select the image which has larger matching pointsnumber with 119878

119896

as the next new input image(3) According to the index of the new input image and

the array119867119871119894119904119905 calculate the affinematrix119867 betweenthe new input image and the reference image based onformula (9)

(4) Use the L-M algorithm to optimize the affine matrix119867

(5) Use the optimized 119867 to transform the new inputimage

(6) Search the optimal seam between the affine transfor-mation result in step (5) and the reference image thenalong the seam combine them together seamlesslyand obtain the stitched result 119894119898119892119877119890119904119906119897119905

(7) Add the 119894119898119892119877119890119904119906119897119905 into 119878 to replace the input imageand the reference imageTherefore the stitched result119894119898119892119877119890119904119906119897119905 becomes the new middle image of thesequence 119878

(8) Return to step (2) to continuously implement the nextstitching process until there is only one image existingin 119878 which is the panoramic result

Output A panoramic image

Figure 6(a) is the original image sequence of the sceneFigures 6(b) and 6(c) are the panoramic images respec-tively obtained by the traditional method and the improvedmethod Comparing the two panoramic images we canconclude that the result from the improved stitching methodis better The distortion in the traditional stitching result issignificantly reduced by the improved stitching method

6 The Experimental Results and Analysis

61 The Experimental Results In order to demonstrate thestability of the improved method we select image sequencesfrom multiple scenes to implement the improved stitchingalgorithm Figures 7(a) 8(a) and 9(a) are the parts of theexperimental scenes The source image size in Figures 7 and9 is 500 times 747 and the size in Figure 8 is 500 times 697 Figures7(b) and 7(c) show the experimental results of the tradi-tional stitching process and the improved stitching processFigure 7(d) shows the stitching result after adding the L-Madjustment in the improved method Because of the obviousseam in the panorama continue to search the optimal seambetween affine transformation result and the reference imagealong the seam combine them together seamlessly in thestitching process The result is as shown in Figure 7(e) Fig-ure 7(f) shows the panoramic result after cutting the uselessarea In order to detect the stability of the improved stitchingprocess continue to select longer image sequence Figure 8(a)lists 12 computer graphic images and Figure 9(a) lists 16building images The rest of the images in Figures 8 and 9show the experimental results corresponding with the imagesin Figure 7

The experimental results in Figures 7 8 and 9 showthat the improved stitching method is adaptable for thelonger image sequences as well The stitching process cansignificantly improve the panorama distortions obtaininghigh-resolution and high-quality panorama

62 Estimation of Performance This paper takes the middleimage of the sequence as the reference image Do imageregistrations first for all adjacent images Then we calculatethe affine transformationmatrix according to the overlappingareas transitivity among the adjacent images instead of calcu-lating the affine transformationmatrix between the new inputimage and the reference image directly In addition we canget more matching feature points by the improved method

Mathematical Problems in Engineering 9

(a) Original image sequence of the grass scene (8 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitching method

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 7 Experimental results for 8 source images sequence

So we can provide more sample data for RANSAC algorithmwhich can increase the accuracy of the affine transformationmatrix and assure that we can obtain high-quality panoramaat last

Figures 10(a) 10(b) and 10(c) show the comparative dataof matching feature points number between the traditionalmethod and the improved method the results correspond tothe scenes of Figures 7(a) 8(a) and 9(a) The three scenesrespectively have 8 12 and 16 images in the sequenceWe use119875119894

to represent the 119894th stitching processThe three charts showthat the improvedmethod has better performance which canget more matching feature points

Figure 11 shows the comparative data of stitching timebetween the traditional method and the improved methodThe stitching time is recorded from the beginning of thestitching process to the end of finishing the last imagestitching The chart shows that the improved method hasfaster time efficiency Moreover the time efficiency will beimproved more obviously for the longer image sequence

At the same time from Figures 7 8 and 9 we can see thatthe improved algorithmobviously eliminates the distortion ofthe traditional results and gets better panoramic results Weassume that (119909 119910) represents the center of the input image

after being transformed by the affine matrix 119867 and wepreserve the center point of each stitching process in the set ofthe variable 119888119890119899119905119890119903119878119890119905 To some extent 119888119890119899119905119890119903119878119890119905 could reflectthe degree of panorama distortion We use formula (11) toexpress the distortion degree in which the Slope representsa function of computing slope between two points

distortion degree = Max Slope (119894 119895)

119894 119895 isin centerSet(11)

In addition we also define the variable 119894119899119891119900 119901119903119900119901119900119905119894119900119899which represents the ratio between the panorama image pixelnumber after removing the useless black pixels and the entirepanorama pixels number For example in Figure 9(e) thereare some black background pixels which are useless andwould be cut in Figure 9(f) The 119894119899119891119900 119901119903119900119901119900119905119894119900119899 expressionis showed as formula (12) and the 119908119894119889119905ℎ ℎ119890119894119892ℎ119905 are thepanorama dimensions

info proportion = 1 minusblack pixels

width times height (12)

10 Mathematical Problems in Engineering

(a) Original image sequence of the computer graphic scene (12 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 8 Experimental results for 12 source images sequence

(a) Original image sequence of the building scene (16 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 9 Experimental results for 16 source images sequence

Mathematical Problems in Engineering 11

20

40

60

80

100

120

140

160

P1 P2 P3 P4 P5 P6 P7

The m

atch

ing

poin

ts nu

mbe

r

Stitching process

ImprovedTraditional

(a) The matching feature points number of Figure 7(a)

2030405060708090

100110120

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11Stitching process

(b) The matching feature points number of Figure 8(a)

0

100

200

300

400

500

600

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10P11P12P13 P15P14Stitching process

(c) The matching feature points number of Figure 9(a)

Figure 10 The comparison data of matching feature points number between the traditional method and the improved method

From Table 4 we can see that the 119889119894119904119905119900119903119905119894119900119899 119889119890119892119903119890119890 and119894119899119891119900 119901119903119900119901119900119905119894119900119899 compared with the traditional method havebeen pleasingly improved

7 Conclusion

This paper increases the number of thematching SIFT featurepoints by improving the traditional method reducing theunnecessary SIFT detection area in the reference area as wellIn addition the improved method accelerates the panoramicstitching time efficiency and obtains a high-resolution high-quality panorama image Compared with the traditionalmethod the improved method proposed in this paper startsstitching from the middle position of the image sequenceThe middle image is taken as the reference image Then weobtain the affine matrix for any image in the sequence to thereference image according to the statistics information of allaffine transformation matrixes between the adjacent imagesMeanwhile the improved method dynamically selects thenext new input image to join the stitching process basedon the number of statistical matching points of the adjacentimages The experimental results verify that the improvedstitching process can accelerate time efficiency and reduce thedistortion of the panorama image

0

100

200

300

400

500

600

Scene 1 Scene 2 Scene 3

The t

otal

tim

e for

stitc

hing

the s

cene

TraditionalImproved

Figure 11 The comparison data of stitching time between thetraditional method and the improved method

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

12 Mathematical Problems in Engineering

Table 4 The comparison data of distortion degree between the traditional method and the improved method

Scene distortion degree info proportionThe traditional method The improved method The traditional method The improved method

Figure 7(a) 02027 01173 814 936Figure 8(a) 01879 01080 828 947Figure 9(a) 01923 00961 854 950

Acknowledgments

This work is supported by Chongqing Frontier and AppliedBasic Research Project under Grant no cstc2014jcyjA1347Chongqing Science and Technology Research Project ofChongqing Municipal Education Commission under Grantno KJ1402001 and Outstanding Achievements Transforma-tion Projects of University in Chongqing under Grant noKJZH14219 The authors wish to thank the associate editorsand anonymous reviewers for their valuable comments andsuggestions on this paper

References

[1] H-K Kim K-W Lee J-Y Jung S-W Jung and S-J Ko ldquoAcontent-aware image stitching algorithm formobilemultimediadevicesrdquo IEEE Transactions on Consumer Electronics vol 57 no4 pp 1875ndash1882 2011

[2] Z Song S Zhou and J Guan ldquoA novel image registration algo-rithm for remote sensing under affine transformationrdquo IEEETransactions on Geoscience and Remote Sensing vol 52 no 8pp 4895ndash4912 2014

[3] R-F Chang K-C Chang-Chien E Takada et al ldquoRapidimage stitching and computer-aided detection for multipassautomated breast ultrasoundrdquoMedical Physics vol 37 no 5 pp2063ndash2073 2010

[4] X Qiu S Liu and F Liu ldquoAn adaptive kernel-based targettracking method based on multiple features fusionrdquo IEEJTransactions on Electrical and Electronic Engineering vol 7 no1 pp 91ndash97 2012

[5] V C S Chew and F-L Lian ldquoPanorama stitching usingoverlap area weighted image plane projection and dynamic pro-gramming for visual localizationrdquo in Proceedings of the IEEEASME International Conference on Advanced Intelligent Mecha-tronics (AIM rsquo12) pp 250ndash255 July 2012

[6] D G Lowe ldquoDistinctive image features from scale-invariantkeypointsrdquo International Journal of Computer Vision vol 60 no2 pp 91ndash110 2004

[7] Y Xiong and K Pulli ldquoFast panorama stitching for high-qualitypanoramic images on mobile phonesrdquo IEEE Transactions onConsumer Electronics vol 56 no 2 pp 298ndash306 2010

[8] S Ha H Koo S Lee N Cho and S Kim ldquoPanorama mosaicoptimization for mobile camera systemsrdquo IEEE Transactions onConsumer Electronics vol 53 no 4 pp 1217ndash1225 2007

[9] M Brown and D G Lowe ldquoAutomatic panoramic image stitch-ing using invariant featuresrdquo International Journal of ComputerVision vol 74 no 1 pp 59ndash73 2007

[10] I K Hyung S K Beom and I C Nam ldquoA new method to findan optimal warping function in image stitchingrdquo in Proceedingsof the IEEE International Conference on Acoustics Speech andSignal Processing (ICASSP rsquo09) pp 1289ndash1292 IEEE TaipeiTaiwan April 2009

[11] M S Bascil and F Temurtas ldquoA study on hepatitis diseasediagnosis using multilayer neural network with LevenbergMarquardt training algorithmrdquo Journal of Medical Systems vol35 no 3 pp 433ndash436 2011

[12] Y S KimMGhergherehchi S Y Kim andHAfarideh ldquoRAN-dom sample consensus (RANSAC) algorithm for enhancingoverlapped etched track countingrdquo IET Image Processing vol9 no 2 pp 97ndash106 2015

[13] J Bentolila and J M Francos ldquoHomography and fundamentalmatrix estimation from region matches using an affine errormetricrdquo Journal ofMathematical Imaging andVision vol 49 no2 pp 481ndash491 2014

[14] H Pang D Chen M Pan et al ldquoImprovement of magnetome-ter calibration using Levenberg-Marquardt algorithmrdquo IEEJTransactions on Electrical and Electronic Engineering vol 9 no3 pp 324ndash328 2014

[15] F Hampel C Hennig and E Ronchetti ldquoA smoothing principlefor the Huber and other locationM-estimatorsrdquo ComputationalStatistics amp Data Analysis vol 55 no 1 pp 324ndash337 2011

[16] Z Al Aghbari and A Al-Hamadi ldquoEfficient KNN search bylinear projection of image clustersrdquo International Journal ofIntelligent Systems vol 26 no 9 pp 844ndash865 2011

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 6: Research Article The Improved Algorithm of Fast Panorama ...downloads.hindawi.com/journals/mpe/2015/428076.pdf · Image Sequence and Reducing the Distortion Errors ZhongQu, 1 Si-PengLin,

6 Mathematical Problems in Engineering

Table 3 The total matching errors comparison data after L-M

Stitching processing The total matching errors before L-M The total matching errors after L-MFigure 4(a) 7265 5969Figure 4(b) 1562 1389Figure 4(c) 4974 3219

119908 (119903) =

1 if |119903| lt 120575

120575

|119903| if |119903| ge 120575

(7)

Formula (6) shows the Huber function and (7) shows theweight function of the Huber One has 120575 = 1345119904 where 119904

represents the standard deviation of the measurement dataThe new error function is expressed as minsum

119894

ℎ(119903119894

) whichis equivalent to minsum

119894

119908(119903)1199032 When |119903| lt 120575 the matching

point is inlier corresponding to the fact that the residual isgiven weight 1 When |119903| ge 120575 the matching point is outliercorresponding the weight for residual trend towards 0

L-M algorithm continues to iterate until finding a setof parameters that make the error function minimize Weassume119867

119896

= [1198861

1198862

119886119898

] represents the solution vector ofunknown parameters in the 119896th iteration process Δ119872 repre-sents the offset vectorThen the next iteration process in L-Malgorithm can be expressed as

119867119896+1

= 119867119896

+ Δ119872

Δ119872 = minus (119869119879

119896

119869119896

+ 119906119896

119868)minus1

119869119879

119896

119890119896

119869119896

=

[[[[[[[[[[

[

1205971199031

(119867119896

)

1205971198861

1205971199031

(119867119896

)

1205971198862

sdot sdot sdot1205971199031

(119867119896

)

120597119886119898

1205971199032

(119867119896

)

1205971198861

1205971199032

(119867119896

)

1205971198862

sdot sdot sdot1205971199032

(119867119896

)

120597119886119898

sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot sdot

120597119903119899

(119867119896

)

1205971198861

120597119903119899

(119867119896

)

1205971198862

sdot sdot sdot120597119903119899

(119867119896

)

120597119886119898

]]]]]]]]]]

]

(8)

where 119869119896

corresponds to the Jacobi matrix under the con-dition of the 119867

119896

119868 represents unit matrix 119890119896

is the residualsum of all matching points under 119867

119896

119906 (119906 ge 0) representsthe damping parameter When 119906 gradually tends to 0 L-M algorithm is similar to the Gauss-Newton method whichcontinuously closes to the ideal value after each iterationprocess When 119906 is large L-M algorithm is similar to thegradient descent method which can find the solution neigh-borhood of the unknown parameters speedily

Table 3 makes a list of comparative data of total matchingerrors before and after L-M bundle adjustment Total match-ing errors are expressed as sum

119898

119894=0

119903 where 119898 represents thematching feature points number Comparative data showsthat L-M algorithm can truly reduce the image matchingerrors

4 The Traditional Stitching Method

After referring to the paper published by Xiong and Pulli [7]and Brown and Lowe [9] we summarize that the traditionalstitching method is shown as in the following steps

Algorithm 1 (the traditional image stitching process) Con-sider the following

Input 119899 ordered image sequence 119878(1198780

1198781

119878119899minus1

) whichmutually have overlapping areas

(1) Select the first two images of the set 119878 to calculate theSIFT feature points respectively

(2) Select the first image in the sequence 119878 as the referenceimage and the second image as the new input imageUse 119870NN (119870 Nearest-Neighbours) algorithm [16] tosearchmatching feature points between the new inputimage and the reference image in accordance with theminimum Euclidean distance

(3) According to thematching feature points data set usethe RANSAC algorithm to calculate the affine matrix119867 which can transform the new input image into thecoordinate space of the reference image

(4) Use the L-M algorithm to optimize the affine matrix119867

(5) Use the optimized 119867 to transform the new inputimage

(6) Search the optimal seam between the affine trans-formation result in step (5) and the reference imagethen along the seam to combine them togetherseamlessly obtain the stitched result 119894119898119892119877119890119904119906119897119905

(7) Add the 119894119898119892119877119890119904119906119897119905 into 119878 to replace the input imageand the reference image In next stitching process the119894119898119892119877119890119904119906119897119905 is selected as the new reference image

(8) Return to step (1) to continuously implement the nextstitching process until there is only one image existingin the 119878 which is the panoramic result

Output A panoramic image

However in traditionalmethod each timewhen an imagestitching is completed the dimension of reference image willcontinue to increase The overlapping area between the newinput image and the reference image accounts for smallerand smaller proportion comparing with the entire referenceimage area Therefore calculating SIFT feature points for thewhole reference image will consume a lot of system resources

Mathematical Problems in Engineering 7

Image[x]

Hminus1

[x] Hminus1

[k minus 2] Hminus1

[k minus 1]H[k] H[k + 1] H[y minus 1]

Image[k minus 2] Image[k minus 1] The reference image Image[k + 1] Image[k + 2] Image[y]middot middot middotmiddot middot middot

prod x=kminus1

x++Hminus1

[x] prody=k

minusminusyH[y]

Figure 5 The process of calculating the affine transformation matrix for arbitrary image

and registration time In addition the approach of the tradi-tional stitching algorithm to selecting the next input imageis relatively single Each time when the adjacent image isselected as the new input image it does not give priority to theoverlapping area size or the matching feature point numberbetween new input image and the reference image Mean-while if there are manymatching errors in image registrationprocess the matching errors will be preserved and affectevery subsequent registration process because the referenceimage is formed by the previous stitched results Finally thepanoramic image will be seriously distorted

5 The Improved Stitching Method

In the image stitching process as we know the accuracyof image registration decides the quality of the panoramicimage and the affine transformationmatrix is the final resultwhich is what wewanted by image registration So it is impor-tant to obtain a precise transformation matrix Thereforewe proposed a new mathematical model to compute thetransformation matrix which is shown as

119867 =

119894=119896minus1

prod

119894++

119867minus1

[119894] 119894 lt 119896

119894=119896

prod

minusminus119894

119867 [119894] 119894 gt 119896

(9)

where 119867[119894] represents the affine transformation matrixobtained from each group of adjacent images and 119896 repre-sents the middle index of the sequence The new mathemati-cal model does not calculate the affine transformationmatrixbetween the result of each stitching process and the newinput image but using the property of transitivity of matrixesobtained the affine transformation matrix for the new inputimage through all adjacent images Figure 5 describes theprocess of calculating the affine transformation matrix forarbitrary image Firstly we do image registrations for all adja-cent images to get the matching feature points informationUsing the information of matching features we can calculatethe affine matrices between all adjacent images and then theaffine matrix mapped from the input image to the referenceimage also can be obtained through the statistical matricesset according to formula (9) Due to the transitivity of thematrixes we can get the affine matrix transformed from anyimage to the reference image

The improved method does not detect the SIFT featurepoints for the whole reference image area but uses thestatistical registration information of all adjacent images tocalculate the affine matrix So the improved method not only

reduces the SIFT feature detection area of the referenceimage but also increases the number of matching featurepoints and improves the efficiency of stitching time

On the other hand in contrast to stitching serially fromleft to right one by one in the traditional method theimproved method takes the middle image as the referenceimage and selects the next input image based on the numberof matching points and completes the image sequence stitch-ing process from middle position dynamically expanding toboth sides In the improved stitching process the maximumaccumulated matching errors are computed from the middleimage to the two sides of the image sequence as shown in(10) reduced to the half level of the traditional method

119864 = MAX(

119896minus1

sum

119894=1

sum

119898isin119908(119894119894+1)

119889119898

119899

sum

119894=119896+1

sum

119898isin119908(119894119894minus1)

119889119898

) (10)

where 119908(119894 119894 + 1) represents the matching points numberbetween the image 119894 and the image 119894+1 and 119889

119898

represents theresidual of the 119898th matching feature points After obtainingthe affine transformation matrix using RANSAC algorithmwe can continuously use L-M algorithm bundle to adjust theaffine matrix to further reduce the accumulated matchingerrors Since the stitching errors are reduced obviously in theimprovedmethod the distortion degree of panorama is lowercompared to the traditional method

Algorithm 2 (the improved image stitching process) Con-sider the following

Input 119899 ordered image sequence 119878(1198780

1198781

119878119899minus1

) whichmutually have overlapping areas

(1) Do image registrations for all adjacent images

(i) Assume the adjacent images are 119878119894

and 119878119894minus1

119894 isin

[1 119899 minus 1] use 119870NN algorithm to search match-ing SIFT feature points between 119878

119894

and 119878119894minus1

inaccordance with the minimum Euclidean dis-tance and then preserve the matching featurepoints data and the matching points numberseparately by using the arrays 119891119890119886119905119906119903119890119871119894119904119905 and119899119906119898119871119894119904119905

(ii) According to the matching feature points dataset 119891119890119886119905119906119903119890119871119894119904119905 compute the affine matrix thatcan be transformed from the coordinate spaceof the image 119878

119894minus1

to the coordinate space of theimage 119878

119894

and then preserve the affine matrix inthe array 119867119871119894119904119905

8 Mathematical Problems in Engineering

(a) Original image sequence (6 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

Figure 6 The panoramic images obtained by the traditional method and the improved method

(iii) Return to step (i) to complete the image regis-trations for the next adjacent images

(2) 119896 represents the middle index of the set 119878 Take 119878119896

asthe reference image According to the array 119899119906119898119871119894119904119905select the image which has larger matching pointsnumber with 119878

119896

as the next new input image(3) According to the index of the new input image and

the array119867119871119894119904119905 calculate the affinematrix119867 betweenthe new input image and the reference image based onformula (9)

(4) Use the L-M algorithm to optimize the affine matrix119867

(5) Use the optimized 119867 to transform the new inputimage

(6) Search the optimal seam between the affine transfor-mation result in step (5) and the reference image thenalong the seam combine them together seamlesslyand obtain the stitched result 119894119898119892119877119890119904119906119897119905

(7) Add the 119894119898119892119877119890119904119906119897119905 into 119878 to replace the input imageand the reference imageTherefore the stitched result119894119898119892119877119890119904119906119897119905 becomes the new middle image of thesequence 119878

(8) Return to step (2) to continuously implement the nextstitching process until there is only one image existingin 119878 which is the panoramic result

Output A panoramic image

Figure 6(a) is the original image sequence of the sceneFigures 6(b) and 6(c) are the panoramic images respec-tively obtained by the traditional method and the improvedmethod Comparing the two panoramic images we canconclude that the result from the improved stitching methodis better The distortion in the traditional stitching result issignificantly reduced by the improved stitching method

6 The Experimental Results and Analysis

61 The Experimental Results In order to demonstrate thestability of the improved method we select image sequencesfrom multiple scenes to implement the improved stitchingalgorithm Figures 7(a) 8(a) and 9(a) are the parts of theexperimental scenes The source image size in Figures 7 and9 is 500 times 747 and the size in Figure 8 is 500 times 697 Figures7(b) and 7(c) show the experimental results of the tradi-tional stitching process and the improved stitching processFigure 7(d) shows the stitching result after adding the L-Madjustment in the improved method Because of the obviousseam in the panorama continue to search the optimal seambetween affine transformation result and the reference imagealong the seam combine them together seamlessly in thestitching process The result is as shown in Figure 7(e) Fig-ure 7(f) shows the panoramic result after cutting the uselessarea In order to detect the stability of the improved stitchingprocess continue to select longer image sequence Figure 8(a)lists 12 computer graphic images and Figure 9(a) lists 16building images The rest of the images in Figures 8 and 9show the experimental results corresponding with the imagesin Figure 7

The experimental results in Figures 7 8 and 9 showthat the improved stitching method is adaptable for thelonger image sequences as well The stitching process cansignificantly improve the panorama distortions obtaininghigh-resolution and high-quality panorama

62 Estimation of Performance This paper takes the middleimage of the sequence as the reference image Do imageregistrations first for all adjacent images Then we calculatethe affine transformationmatrix according to the overlappingareas transitivity among the adjacent images instead of calcu-lating the affine transformationmatrix between the new inputimage and the reference image directly In addition we canget more matching feature points by the improved method

Mathematical Problems in Engineering 9

(a) Original image sequence of the grass scene (8 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitching method

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 7 Experimental results for 8 source images sequence

So we can provide more sample data for RANSAC algorithmwhich can increase the accuracy of the affine transformationmatrix and assure that we can obtain high-quality panoramaat last

Figures 10(a) 10(b) and 10(c) show the comparative dataof matching feature points number between the traditionalmethod and the improved method the results correspond tothe scenes of Figures 7(a) 8(a) and 9(a) The three scenesrespectively have 8 12 and 16 images in the sequenceWe use119875119894

to represent the 119894th stitching processThe three charts showthat the improvedmethod has better performance which canget more matching feature points

Figure 11 shows the comparative data of stitching timebetween the traditional method and the improved methodThe stitching time is recorded from the beginning of thestitching process to the end of finishing the last imagestitching The chart shows that the improved method hasfaster time efficiency Moreover the time efficiency will beimproved more obviously for the longer image sequence

At the same time from Figures 7 8 and 9 we can see thatthe improved algorithmobviously eliminates the distortion ofthe traditional results and gets better panoramic results Weassume that (119909 119910) represents the center of the input image

after being transformed by the affine matrix 119867 and wepreserve the center point of each stitching process in the set ofthe variable 119888119890119899119905119890119903119878119890119905 To some extent 119888119890119899119905119890119903119878119890119905 could reflectthe degree of panorama distortion We use formula (11) toexpress the distortion degree in which the Slope representsa function of computing slope between two points

distortion degree = Max Slope (119894 119895)

119894 119895 isin centerSet(11)

In addition we also define the variable 119894119899119891119900 119901119903119900119901119900119905119894119900119899which represents the ratio between the panorama image pixelnumber after removing the useless black pixels and the entirepanorama pixels number For example in Figure 9(e) thereare some black background pixels which are useless andwould be cut in Figure 9(f) The 119894119899119891119900 119901119903119900119901119900119905119894119900119899 expressionis showed as formula (12) and the 119908119894119889119905ℎ ℎ119890119894119892ℎ119905 are thepanorama dimensions

info proportion = 1 minusblack pixels

width times height (12)

10 Mathematical Problems in Engineering

(a) Original image sequence of the computer graphic scene (12 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 8 Experimental results for 12 source images sequence

(a) Original image sequence of the building scene (16 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 9 Experimental results for 16 source images sequence

Mathematical Problems in Engineering 11

20

40

60

80

100

120

140

160

P1 P2 P3 P4 P5 P6 P7

The m

atch

ing

poin

ts nu

mbe

r

Stitching process

ImprovedTraditional

(a) The matching feature points number of Figure 7(a)

2030405060708090

100110120

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11Stitching process

(b) The matching feature points number of Figure 8(a)

0

100

200

300

400

500

600

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10P11P12P13 P15P14Stitching process

(c) The matching feature points number of Figure 9(a)

Figure 10 The comparison data of matching feature points number between the traditional method and the improved method

From Table 4 we can see that the 119889119894119904119905119900119903119905119894119900119899 119889119890119892119903119890119890 and119894119899119891119900 119901119903119900119901119900119905119894119900119899 compared with the traditional method havebeen pleasingly improved

7 Conclusion

This paper increases the number of thematching SIFT featurepoints by improving the traditional method reducing theunnecessary SIFT detection area in the reference area as wellIn addition the improved method accelerates the panoramicstitching time efficiency and obtains a high-resolution high-quality panorama image Compared with the traditionalmethod the improved method proposed in this paper startsstitching from the middle position of the image sequenceThe middle image is taken as the reference image Then weobtain the affine matrix for any image in the sequence to thereference image according to the statistics information of allaffine transformation matrixes between the adjacent imagesMeanwhile the improved method dynamically selects thenext new input image to join the stitching process basedon the number of statistical matching points of the adjacentimages The experimental results verify that the improvedstitching process can accelerate time efficiency and reduce thedistortion of the panorama image

0

100

200

300

400

500

600

Scene 1 Scene 2 Scene 3

The t

otal

tim

e for

stitc

hing

the s

cene

TraditionalImproved

Figure 11 The comparison data of stitching time between thetraditional method and the improved method

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

12 Mathematical Problems in Engineering

Table 4 The comparison data of distortion degree between the traditional method and the improved method

Scene distortion degree info proportionThe traditional method The improved method The traditional method The improved method

Figure 7(a) 02027 01173 814 936Figure 8(a) 01879 01080 828 947Figure 9(a) 01923 00961 854 950

Acknowledgments

This work is supported by Chongqing Frontier and AppliedBasic Research Project under Grant no cstc2014jcyjA1347Chongqing Science and Technology Research Project ofChongqing Municipal Education Commission under Grantno KJ1402001 and Outstanding Achievements Transforma-tion Projects of University in Chongqing under Grant noKJZH14219 The authors wish to thank the associate editorsand anonymous reviewers for their valuable comments andsuggestions on this paper

References

[1] H-K Kim K-W Lee J-Y Jung S-W Jung and S-J Ko ldquoAcontent-aware image stitching algorithm formobilemultimediadevicesrdquo IEEE Transactions on Consumer Electronics vol 57 no4 pp 1875ndash1882 2011

[2] Z Song S Zhou and J Guan ldquoA novel image registration algo-rithm for remote sensing under affine transformationrdquo IEEETransactions on Geoscience and Remote Sensing vol 52 no 8pp 4895ndash4912 2014

[3] R-F Chang K-C Chang-Chien E Takada et al ldquoRapidimage stitching and computer-aided detection for multipassautomated breast ultrasoundrdquoMedical Physics vol 37 no 5 pp2063ndash2073 2010

[4] X Qiu S Liu and F Liu ldquoAn adaptive kernel-based targettracking method based on multiple features fusionrdquo IEEJTransactions on Electrical and Electronic Engineering vol 7 no1 pp 91ndash97 2012

[5] V C S Chew and F-L Lian ldquoPanorama stitching usingoverlap area weighted image plane projection and dynamic pro-gramming for visual localizationrdquo in Proceedings of the IEEEASME International Conference on Advanced Intelligent Mecha-tronics (AIM rsquo12) pp 250ndash255 July 2012

[6] D G Lowe ldquoDistinctive image features from scale-invariantkeypointsrdquo International Journal of Computer Vision vol 60 no2 pp 91ndash110 2004

[7] Y Xiong and K Pulli ldquoFast panorama stitching for high-qualitypanoramic images on mobile phonesrdquo IEEE Transactions onConsumer Electronics vol 56 no 2 pp 298ndash306 2010

[8] S Ha H Koo S Lee N Cho and S Kim ldquoPanorama mosaicoptimization for mobile camera systemsrdquo IEEE Transactions onConsumer Electronics vol 53 no 4 pp 1217ndash1225 2007

[9] M Brown and D G Lowe ldquoAutomatic panoramic image stitch-ing using invariant featuresrdquo International Journal of ComputerVision vol 74 no 1 pp 59ndash73 2007

[10] I K Hyung S K Beom and I C Nam ldquoA new method to findan optimal warping function in image stitchingrdquo in Proceedingsof the IEEE International Conference on Acoustics Speech andSignal Processing (ICASSP rsquo09) pp 1289ndash1292 IEEE TaipeiTaiwan April 2009

[11] M S Bascil and F Temurtas ldquoA study on hepatitis diseasediagnosis using multilayer neural network with LevenbergMarquardt training algorithmrdquo Journal of Medical Systems vol35 no 3 pp 433ndash436 2011

[12] Y S KimMGhergherehchi S Y Kim andHAfarideh ldquoRAN-dom sample consensus (RANSAC) algorithm for enhancingoverlapped etched track countingrdquo IET Image Processing vol9 no 2 pp 97ndash106 2015

[13] J Bentolila and J M Francos ldquoHomography and fundamentalmatrix estimation from region matches using an affine errormetricrdquo Journal ofMathematical Imaging andVision vol 49 no2 pp 481ndash491 2014

[14] H Pang D Chen M Pan et al ldquoImprovement of magnetome-ter calibration using Levenberg-Marquardt algorithmrdquo IEEJTransactions on Electrical and Electronic Engineering vol 9 no3 pp 324ndash328 2014

[15] F Hampel C Hennig and E Ronchetti ldquoA smoothing principlefor the Huber and other locationM-estimatorsrdquo ComputationalStatistics amp Data Analysis vol 55 no 1 pp 324ndash337 2011

[16] Z Al Aghbari and A Al-Hamadi ldquoEfficient KNN search bylinear projection of image clustersrdquo International Journal ofIntelligent Systems vol 26 no 9 pp 844ndash865 2011

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 7: Research Article The Improved Algorithm of Fast Panorama ...downloads.hindawi.com/journals/mpe/2015/428076.pdf · Image Sequence and Reducing the Distortion Errors ZhongQu, 1 Si-PengLin,

Mathematical Problems in Engineering 7

Image[x]

Hminus1

[x] Hminus1

[k minus 2] Hminus1

[k minus 1]H[k] H[k + 1] H[y minus 1]

Image[k minus 2] Image[k minus 1] The reference image Image[k + 1] Image[k + 2] Image[y]middot middot middotmiddot middot middot

prod x=kminus1

x++Hminus1

[x] prody=k

minusminusyH[y]

Figure 5 The process of calculating the affine transformation matrix for arbitrary image

and registration time In addition the approach of the tradi-tional stitching algorithm to selecting the next input imageis relatively single Each time when the adjacent image isselected as the new input image it does not give priority to theoverlapping area size or the matching feature point numberbetween new input image and the reference image Mean-while if there are manymatching errors in image registrationprocess the matching errors will be preserved and affectevery subsequent registration process because the referenceimage is formed by the previous stitched results Finally thepanoramic image will be seriously distorted

5 The Improved Stitching Method

In the image stitching process as we know the accuracyof image registration decides the quality of the panoramicimage and the affine transformationmatrix is the final resultwhich is what wewanted by image registration So it is impor-tant to obtain a precise transformation matrix Thereforewe proposed a new mathematical model to compute thetransformation matrix which is shown as

119867 =

119894=119896minus1

prod

119894++

119867minus1

[119894] 119894 lt 119896

119894=119896

prod

minusminus119894

119867 [119894] 119894 gt 119896

(9)

where 119867[119894] represents the affine transformation matrixobtained from each group of adjacent images and 119896 repre-sents the middle index of the sequence The new mathemati-cal model does not calculate the affine transformationmatrixbetween the result of each stitching process and the newinput image but using the property of transitivity of matrixesobtained the affine transformation matrix for the new inputimage through all adjacent images Figure 5 describes theprocess of calculating the affine transformation matrix forarbitrary image Firstly we do image registrations for all adja-cent images to get the matching feature points informationUsing the information of matching features we can calculatethe affine matrices between all adjacent images and then theaffine matrix mapped from the input image to the referenceimage also can be obtained through the statistical matricesset according to formula (9) Due to the transitivity of thematrixes we can get the affine matrix transformed from anyimage to the reference image

The improved method does not detect the SIFT featurepoints for the whole reference image area but uses thestatistical registration information of all adjacent images tocalculate the affine matrix So the improved method not only

reduces the SIFT feature detection area of the referenceimage but also increases the number of matching featurepoints and improves the efficiency of stitching time

On the other hand in contrast to stitching serially fromleft to right one by one in the traditional method theimproved method takes the middle image as the referenceimage and selects the next input image based on the numberof matching points and completes the image sequence stitch-ing process from middle position dynamically expanding toboth sides In the improved stitching process the maximumaccumulated matching errors are computed from the middleimage to the two sides of the image sequence as shown in(10) reduced to the half level of the traditional method

119864 = MAX(

119896minus1

sum

119894=1

sum

119898isin119908(119894119894+1)

119889119898

119899

sum

119894=119896+1

sum

119898isin119908(119894119894minus1)

119889119898

) (10)

where 119908(119894 119894 + 1) represents the matching points numberbetween the image 119894 and the image 119894+1 and 119889

119898

represents theresidual of the 119898th matching feature points After obtainingthe affine transformation matrix using RANSAC algorithmwe can continuously use L-M algorithm bundle to adjust theaffine matrix to further reduce the accumulated matchingerrors Since the stitching errors are reduced obviously in theimprovedmethod the distortion degree of panorama is lowercompared to the traditional method

Algorithm 2 (the improved image stitching process) Con-sider the following

Input 119899 ordered image sequence 119878(1198780

1198781

119878119899minus1

) whichmutually have overlapping areas

(1) Do image registrations for all adjacent images

(i) Assume the adjacent images are 119878119894

and 119878119894minus1

119894 isin

[1 119899 minus 1] use 119870NN algorithm to search match-ing SIFT feature points between 119878

119894

and 119878119894minus1

inaccordance with the minimum Euclidean dis-tance and then preserve the matching featurepoints data and the matching points numberseparately by using the arrays 119891119890119886119905119906119903119890119871119894119904119905 and119899119906119898119871119894119904119905

(ii) According to the matching feature points dataset 119891119890119886119905119906119903119890119871119894119904119905 compute the affine matrix thatcan be transformed from the coordinate spaceof the image 119878

119894minus1

to the coordinate space of theimage 119878

119894

and then preserve the affine matrix inthe array 119867119871119894119904119905

8 Mathematical Problems in Engineering

(a) Original image sequence (6 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

Figure 6 The panoramic images obtained by the traditional method and the improved method

(iii) Return to step (i) to complete the image regis-trations for the next adjacent images

(2) 119896 represents the middle index of the set 119878 Take 119878119896

asthe reference image According to the array 119899119906119898119871119894119904119905select the image which has larger matching pointsnumber with 119878

119896

as the next new input image(3) According to the index of the new input image and

the array119867119871119894119904119905 calculate the affinematrix119867 betweenthe new input image and the reference image based onformula (9)

(4) Use the L-M algorithm to optimize the affine matrix119867

(5) Use the optimized 119867 to transform the new inputimage

(6) Search the optimal seam between the affine transfor-mation result in step (5) and the reference image thenalong the seam combine them together seamlesslyand obtain the stitched result 119894119898119892119877119890119904119906119897119905

(7) Add the 119894119898119892119877119890119904119906119897119905 into 119878 to replace the input imageand the reference imageTherefore the stitched result119894119898119892119877119890119904119906119897119905 becomes the new middle image of thesequence 119878

(8) Return to step (2) to continuously implement the nextstitching process until there is only one image existingin 119878 which is the panoramic result

Output A panoramic image

Figure 6(a) is the original image sequence of the sceneFigures 6(b) and 6(c) are the panoramic images respec-tively obtained by the traditional method and the improvedmethod Comparing the two panoramic images we canconclude that the result from the improved stitching methodis better The distortion in the traditional stitching result issignificantly reduced by the improved stitching method

6 The Experimental Results and Analysis

61 The Experimental Results In order to demonstrate thestability of the improved method we select image sequencesfrom multiple scenes to implement the improved stitchingalgorithm Figures 7(a) 8(a) and 9(a) are the parts of theexperimental scenes The source image size in Figures 7 and9 is 500 times 747 and the size in Figure 8 is 500 times 697 Figures7(b) and 7(c) show the experimental results of the tradi-tional stitching process and the improved stitching processFigure 7(d) shows the stitching result after adding the L-Madjustment in the improved method Because of the obviousseam in the panorama continue to search the optimal seambetween affine transformation result and the reference imagealong the seam combine them together seamlessly in thestitching process The result is as shown in Figure 7(e) Fig-ure 7(f) shows the panoramic result after cutting the uselessarea In order to detect the stability of the improved stitchingprocess continue to select longer image sequence Figure 8(a)lists 12 computer graphic images and Figure 9(a) lists 16building images The rest of the images in Figures 8 and 9show the experimental results corresponding with the imagesin Figure 7

The experimental results in Figures 7 8 and 9 showthat the improved stitching method is adaptable for thelonger image sequences as well The stitching process cansignificantly improve the panorama distortions obtaininghigh-resolution and high-quality panorama

62 Estimation of Performance This paper takes the middleimage of the sequence as the reference image Do imageregistrations first for all adjacent images Then we calculatethe affine transformationmatrix according to the overlappingareas transitivity among the adjacent images instead of calcu-lating the affine transformationmatrix between the new inputimage and the reference image directly In addition we canget more matching feature points by the improved method

Mathematical Problems in Engineering 9

(a) Original image sequence of the grass scene (8 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitching method

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 7 Experimental results for 8 source images sequence

So we can provide more sample data for RANSAC algorithmwhich can increase the accuracy of the affine transformationmatrix and assure that we can obtain high-quality panoramaat last

Figures 10(a) 10(b) and 10(c) show the comparative dataof matching feature points number between the traditionalmethod and the improved method the results correspond tothe scenes of Figures 7(a) 8(a) and 9(a) The three scenesrespectively have 8 12 and 16 images in the sequenceWe use119875119894

to represent the 119894th stitching processThe three charts showthat the improvedmethod has better performance which canget more matching feature points

Figure 11 shows the comparative data of stitching timebetween the traditional method and the improved methodThe stitching time is recorded from the beginning of thestitching process to the end of finishing the last imagestitching The chart shows that the improved method hasfaster time efficiency Moreover the time efficiency will beimproved more obviously for the longer image sequence

At the same time from Figures 7 8 and 9 we can see thatthe improved algorithmobviously eliminates the distortion ofthe traditional results and gets better panoramic results Weassume that (119909 119910) represents the center of the input image

after being transformed by the affine matrix 119867 and wepreserve the center point of each stitching process in the set ofthe variable 119888119890119899119905119890119903119878119890119905 To some extent 119888119890119899119905119890119903119878119890119905 could reflectthe degree of panorama distortion We use formula (11) toexpress the distortion degree in which the Slope representsa function of computing slope between two points

distortion degree = Max Slope (119894 119895)

119894 119895 isin centerSet(11)

In addition we also define the variable 119894119899119891119900 119901119903119900119901119900119905119894119900119899which represents the ratio between the panorama image pixelnumber after removing the useless black pixels and the entirepanorama pixels number For example in Figure 9(e) thereare some black background pixels which are useless andwould be cut in Figure 9(f) The 119894119899119891119900 119901119903119900119901119900119905119894119900119899 expressionis showed as formula (12) and the 119908119894119889119905ℎ ℎ119890119894119892ℎ119905 are thepanorama dimensions

info proportion = 1 minusblack pixels

width times height (12)

10 Mathematical Problems in Engineering

(a) Original image sequence of the computer graphic scene (12 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 8 Experimental results for 12 source images sequence

(a) Original image sequence of the building scene (16 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 9 Experimental results for 16 source images sequence

Mathematical Problems in Engineering 11

20

40

60

80

100

120

140

160

P1 P2 P3 P4 P5 P6 P7

The m

atch

ing

poin

ts nu

mbe

r

Stitching process

ImprovedTraditional

(a) The matching feature points number of Figure 7(a)

2030405060708090

100110120

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11Stitching process

(b) The matching feature points number of Figure 8(a)

0

100

200

300

400

500

600

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10P11P12P13 P15P14Stitching process

(c) The matching feature points number of Figure 9(a)

Figure 10 The comparison data of matching feature points number between the traditional method and the improved method

From Table 4 we can see that the 119889119894119904119905119900119903119905119894119900119899 119889119890119892119903119890119890 and119894119899119891119900 119901119903119900119901119900119905119894119900119899 compared with the traditional method havebeen pleasingly improved

7 Conclusion

This paper increases the number of thematching SIFT featurepoints by improving the traditional method reducing theunnecessary SIFT detection area in the reference area as wellIn addition the improved method accelerates the panoramicstitching time efficiency and obtains a high-resolution high-quality panorama image Compared with the traditionalmethod the improved method proposed in this paper startsstitching from the middle position of the image sequenceThe middle image is taken as the reference image Then weobtain the affine matrix for any image in the sequence to thereference image according to the statistics information of allaffine transformation matrixes between the adjacent imagesMeanwhile the improved method dynamically selects thenext new input image to join the stitching process basedon the number of statistical matching points of the adjacentimages The experimental results verify that the improvedstitching process can accelerate time efficiency and reduce thedistortion of the panorama image

0

100

200

300

400

500

600

Scene 1 Scene 2 Scene 3

The t

otal

tim

e for

stitc

hing

the s

cene

TraditionalImproved

Figure 11 The comparison data of stitching time between thetraditional method and the improved method

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

12 Mathematical Problems in Engineering

Table 4 The comparison data of distortion degree between the traditional method and the improved method

Scene distortion degree info proportionThe traditional method The improved method The traditional method The improved method

Figure 7(a) 02027 01173 814 936Figure 8(a) 01879 01080 828 947Figure 9(a) 01923 00961 854 950

Acknowledgments

This work is supported by Chongqing Frontier and AppliedBasic Research Project under Grant no cstc2014jcyjA1347Chongqing Science and Technology Research Project ofChongqing Municipal Education Commission under Grantno KJ1402001 and Outstanding Achievements Transforma-tion Projects of University in Chongqing under Grant noKJZH14219 The authors wish to thank the associate editorsand anonymous reviewers for their valuable comments andsuggestions on this paper

References

[1] H-K Kim K-W Lee J-Y Jung S-W Jung and S-J Ko ldquoAcontent-aware image stitching algorithm formobilemultimediadevicesrdquo IEEE Transactions on Consumer Electronics vol 57 no4 pp 1875ndash1882 2011

[2] Z Song S Zhou and J Guan ldquoA novel image registration algo-rithm for remote sensing under affine transformationrdquo IEEETransactions on Geoscience and Remote Sensing vol 52 no 8pp 4895ndash4912 2014

[3] R-F Chang K-C Chang-Chien E Takada et al ldquoRapidimage stitching and computer-aided detection for multipassautomated breast ultrasoundrdquoMedical Physics vol 37 no 5 pp2063ndash2073 2010

[4] X Qiu S Liu and F Liu ldquoAn adaptive kernel-based targettracking method based on multiple features fusionrdquo IEEJTransactions on Electrical and Electronic Engineering vol 7 no1 pp 91ndash97 2012

[5] V C S Chew and F-L Lian ldquoPanorama stitching usingoverlap area weighted image plane projection and dynamic pro-gramming for visual localizationrdquo in Proceedings of the IEEEASME International Conference on Advanced Intelligent Mecha-tronics (AIM rsquo12) pp 250ndash255 July 2012

[6] D G Lowe ldquoDistinctive image features from scale-invariantkeypointsrdquo International Journal of Computer Vision vol 60 no2 pp 91ndash110 2004

[7] Y Xiong and K Pulli ldquoFast panorama stitching for high-qualitypanoramic images on mobile phonesrdquo IEEE Transactions onConsumer Electronics vol 56 no 2 pp 298ndash306 2010

[8] S Ha H Koo S Lee N Cho and S Kim ldquoPanorama mosaicoptimization for mobile camera systemsrdquo IEEE Transactions onConsumer Electronics vol 53 no 4 pp 1217ndash1225 2007

[9] M Brown and D G Lowe ldquoAutomatic panoramic image stitch-ing using invariant featuresrdquo International Journal of ComputerVision vol 74 no 1 pp 59ndash73 2007

[10] I K Hyung S K Beom and I C Nam ldquoA new method to findan optimal warping function in image stitchingrdquo in Proceedingsof the IEEE International Conference on Acoustics Speech andSignal Processing (ICASSP rsquo09) pp 1289ndash1292 IEEE TaipeiTaiwan April 2009

[11] M S Bascil and F Temurtas ldquoA study on hepatitis diseasediagnosis using multilayer neural network with LevenbergMarquardt training algorithmrdquo Journal of Medical Systems vol35 no 3 pp 433ndash436 2011

[12] Y S KimMGhergherehchi S Y Kim andHAfarideh ldquoRAN-dom sample consensus (RANSAC) algorithm for enhancingoverlapped etched track countingrdquo IET Image Processing vol9 no 2 pp 97ndash106 2015

[13] J Bentolila and J M Francos ldquoHomography and fundamentalmatrix estimation from region matches using an affine errormetricrdquo Journal ofMathematical Imaging andVision vol 49 no2 pp 481ndash491 2014

[14] H Pang D Chen M Pan et al ldquoImprovement of magnetome-ter calibration using Levenberg-Marquardt algorithmrdquo IEEJTransactions on Electrical and Electronic Engineering vol 9 no3 pp 324ndash328 2014

[15] F Hampel C Hennig and E Ronchetti ldquoA smoothing principlefor the Huber and other locationM-estimatorsrdquo ComputationalStatistics amp Data Analysis vol 55 no 1 pp 324ndash337 2011

[16] Z Al Aghbari and A Al-Hamadi ldquoEfficient KNN search bylinear projection of image clustersrdquo International Journal ofIntelligent Systems vol 26 no 9 pp 844ndash865 2011

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 8: Research Article The Improved Algorithm of Fast Panorama ...downloads.hindawi.com/journals/mpe/2015/428076.pdf · Image Sequence and Reducing the Distortion Errors ZhongQu, 1 Si-PengLin,

8 Mathematical Problems in Engineering

(a) Original image sequence (6 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

Figure 6 The panoramic images obtained by the traditional method and the improved method

(iii) Return to step (i) to complete the image regis-trations for the next adjacent images

(2) 119896 represents the middle index of the set 119878 Take 119878119896

asthe reference image According to the array 119899119906119898119871119894119904119905select the image which has larger matching pointsnumber with 119878

119896

as the next new input image(3) According to the index of the new input image and

the array119867119871119894119904119905 calculate the affinematrix119867 betweenthe new input image and the reference image based onformula (9)

(4) Use the L-M algorithm to optimize the affine matrix119867

(5) Use the optimized 119867 to transform the new inputimage

(6) Search the optimal seam between the affine transfor-mation result in step (5) and the reference image thenalong the seam combine them together seamlesslyand obtain the stitched result 119894119898119892119877119890119904119906119897119905

(7) Add the 119894119898119892119877119890119904119906119897119905 into 119878 to replace the input imageand the reference imageTherefore the stitched result119894119898119892119877119890119904119906119897119905 becomes the new middle image of thesequence 119878

(8) Return to step (2) to continuously implement the nextstitching process until there is only one image existingin 119878 which is the panoramic result

Output A panoramic image

Figure 6(a) is the original image sequence of the sceneFigures 6(b) and 6(c) are the panoramic images respec-tively obtained by the traditional method and the improvedmethod Comparing the two panoramic images we canconclude that the result from the improved stitching methodis better The distortion in the traditional stitching result issignificantly reduced by the improved stitching method

6 The Experimental Results and Analysis

61 The Experimental Results In order to demonstrate thestability of the improved method we select image sequencesfrom multiple scenes to implement the improved stitchingalgorithm Figures 7(a) 8(a) and 9(a) are the parts of theexperimental scenes The source image size in Figures 7 and9 is 500 times 747 and the size in Figure 8 is 500 times 697 Figures7(b) and 7(c) show the experimental results of the tradi-tional stitching process and the improved stitching processFigure 7(d) shows the stitching result after adding the L-Madjustment in the improved method Because of the obviousseam in the panorama continue to search the optimal seambetween affine transformation result and the reference imagealong the seam combine them together seamlessly in thestitching process The result is as shown in Figure 7(e) Fig-ure 7(f) shows the panoramic result after cutting the uselessarea In order to detect the stability of the improved stitchingprocess continue to select longer image sequence Figure 8(a)lists 12 computer graphic images and Figure 9(a) lists 16building images The rest of the images in Figures 8 and 9show the experimental results corresponding with the imagesin Figure 7

The experimental results in Figures 7 8 and 9 showthat the improved stitching method is adaptable for thelonger image sequences as well The stitching process cansignificantly improve the panorama distortions obtaininghigh-resolution and high-quality panorama

62 Estimation of Performance This paper takes the middleimage of the sequence as the reference image Do imageregistrations first for all adjacent images Then we calculatethe affine transformationmatrix according to the overlappingareas transitivity among the adjacent images instead of calcu-lating the affine transformationmatrix between the new inputimage and the reference image directly In addition we canget more matching feature points by the improved method

Mathematical Problems in Engineering 9

(a) Original image sequence of the grass scene (8 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitching method

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 7 Experimental results for 8 source images sequence

So we can provide more sample data for RANSAC algorithmwhich can increase the accuracy of the affine transformationmatrix and assure that we can obtain high-quality panoramaat last

Figures 10(a) 10(b) and 10(c) show the comparative dataof matching feature points number between the traditionalmethod and the improved method the results correspond tothe scenes of Figures 7(a) 8(a) and 9(a) The three scenesrespectively have 8 12 and 16 images in the sequenceWe use119875119894

to represent the 119894th stitching processThe three charts showthat the improvedmethod has better performance which canget more matching feature points

Figure 11 shows the comparative data of stitching timebetween the traditional method and the improved methodThe stitching time is recorded from the beginning of thestitching process to the end of finishing the last imagestitching The chart shows that the improved method hasfaster time efficiency Moreover the time efficiency will beimproved more obviously for the longer image sequence

At the same time from Figures 7 8 and 9 we can see thatthe improved algorithmobviously eliminates the distortion ofthe traditional results and gets better panoramic results Weassume that (119909 119910) represents the center of the input image

after being transformed by the affine matrix 119867 and wepreserve the center point of each stitching process in the set ofthe variable 119888119890119899119905119890119903119878119890119905 To some extent 119888119890119899119905119890119903119878119890119905 could reflectthe degree of panorama distortion We use formula (11) toexpress the distortion degree in which the Slope representsa function of computing slope between two points

distortion degree = Max Slope (119894 119895)

119894 119895 isin centerSet(11)

In addition we also define the variable 119894119899119891119900 119901119903119900119901119900119905119894119900119899which represents the ratio between the panorama image pixelnumber after removing the useless black pixels and the entirepanorama pixels number For example in Figure 9(e) thereare some black background pixels which are useless andwould be cut in Figure 9(f) The 119894119899119891119900 119901119903119900119901119900119905119894119900119899 expressionis showed as formula (12) and the 119908119894119889119905ℎ ℎ119890119894119892ℎ119905 are thepanorama dimensions

info proportion = 1 minusblack pixels

width times height (12)

10 Mathematical Problems in Engineering

(a) Original image sequence of the computer graphic scene (12 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 8 Experimental results for 12 source images sequence

(a) Original image sequence of the building scene (16 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 9 Experimental results for 16 source images sequence

Mathematical Problems in Engineering 11

20

40

60

80

100

120

140

160

P1 P2 P3 P4 P5 P6 P7

The m

atch

ing

poin

ts nu

mbe

r

Stitching process

ImprovedTraditional

(a) The matching feature points number of Figure 7(a)

2030405060708090

100110120

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11Stitching process

(b) The matching feature points number of Figure 8(a)

0

100

200

300

400

500

600

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10P11P12P13 P15P14Stitching process

(c) The matching feature points number of Figure 9(a)

Figure 10 The comparison data of matching feature points number between the traditional method and the improved method

From Table 4 we can see that the 119889119894119904119905119900119903119905119894119900119899 119889119890119892119903119890119890 and119894119899119891119900 119901119903119900119901119900119905119894119900119899 compared with the traditional method havebeen pleasingly improved

7 Conclusion

This paper increases the number of thematching SIFT featurepoints by improving the traditional method reducing theunnecessary SIFT detection area in the reference area as wellIn addition the improved method accelerates the panoramicstitching time efficiency and obtains a high-resolution high-quality panorama image Compared with the traditionalmethod the improved method proposed in this paper startsstitching from the middle position of the image sequenceThe middle image is taken as the reference image Then weobtain the affine matrix for any image in the sequence to thereference image according to the statistics information of allaffine transformation matrixes between the adjacent imagesMeanwhile the improved method dynamically selects thenext new input image to join the stitching process basedon the number of statistical matching points of the adjacentimages The experimental results verify that the improvedstitching process can accelerate time efficiency and reduce thedistortion of the panorama image

0

100

200

300

400

500

600

Scene 1 Scene 2 Scene 3

The t

otal

tim

e for

stitc

hing

the s

cene

TraditionalImproved

Figure 11 The comparison data of stitching time between thetraditional method and the improved method

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

12 Mathematical Problems in Engineering

Table 4 The comparison data of distortion degree between the traditional method and the improved method

Scene distortion degree info proportionThe traditional method The improved method The traditional method The improved method

Figure 7(a) 02027 01173 814 936Figure 8(a) 01879 01080 828 947Figure 9(a) 01923 00961 854 950

Acknowledgments

This work is supported by Chongqing Frontier and AppliedBasic Research Project under Grant no cstc2014jcyjA1347Chongqing Science and Technology Research Project ofChongqing Municipal Education Commission under Grantno KJ1402001 and Outstanding Achievements Transforma-tion Projects of University in Chongqing under Grant noKJZH14219 The authors wish to thank the associate editorsand anonymous reviewers for their valuable comments andsuggestions on this paper

References

[1] H-K Kim K-W Lee J-Y Jung S-W Jung and S-J Ko ldquoAcontent-aware image stitching algorithm formobilemultimediadevicesrdquo IEEE Transactions on Consumer Electronics vol 57 no4 pp 1875ndash1882 2011

[2] Z Song S Zhou and J Guan ldquoA novel image registration algo-rithm for remote sensing under affine transformationrdquo IEEETransactions on Geoscience and Remote Sensing vol 52 no 8pp 4895ndash4912 2014

[3] R-F Chang K-C Chang-Chien E Takada et al ldquoRapidimage stitching and computer-aided detection for multipassautomated breast ultrasoundrdquoMedical Physics vol 37 no 5 pp2063ndash2073 2010

[4] X Qiu S Liu and F Liu ldquoAn adaptive kernel-based targettracking method based on multiple features fusionrdquo IEEJTransactions on Electrical and Electronic Engineering vol 7 no1 pp 91ndash97 2012

[5] V C S Chew and F-L Lian ldquoPanorama stitching usingoverlap area weighted image plane projection and dynamic pro-gramming for visual localizationrdquo in Proceedings of the IEEEASME International Conference on Advanced Intelligent Mecha-tronics (AIM rsquo12) pp 250ndash255 July 2012

[6] D G Lowe ldquoDistinctive image features from scale-invariantkeypointsrdquo International Journal of Computer Vision vol 60 no2 pp 91ndash110 2004

[7] Y Xiong and K Pulli ldquoFast panorama stitching for high-qualitypanoramic images on mobile phonesrdquo IEEE Transactions onConsumer Electronics vol 56 no 2 pp 298ndash306 2010

[8] S Ha H Koo S Lee N Cho and S Kim ldquoPanorama mosaicoptimization for mobile camera systemsrdquo IEEE Transactions onConsumer Electronics vol 53 no 4 pp 1217ndash1225 2007

[9] M Brown and D G Lowe ldquoAutomatic panoramic image stitch-ing using invariant featuresrdquo International Journal of ComputerVision vol 74 no 1 pp 59ndash73 2007

[10] I K Hyung S K Beom and I C Nam ldquoA new method to findan optimal warping function in image stitchingrdquo in Proceedingsof the IEEE International Conference on Acoustics Speech andSignal Processing (ICASSP rsquo09) pp 1289ndash1292 IEEE TaipeiTaiwan April 2009

[11] M S Bascil and F Temurtas ldquoA study on hepatitis diseasediagnosis using multilayer neural network with LevenbergMarquardt training algorithmrdquo Journal of Medical Systems vol35 no 3 pp 433ndash436 2011

[12] Y S KimMGhergherehchi S Y Kim andHAfarideh ldquoRAN-dom sample consensus (RANSAC) algorithm for enhancingoverlapped etched track countingrdquo IET Image Processing vol9 no 2 pp 97ndash106 2015

[13] J Bentolila and J M Francos ldquoHomography and fundamentalmatrix estimation from region matches using an affine errormetricrdquo Journal ofMathematical Imaging andVision vol 49 no2 pp 481ndash491 2014

[14] H Pang D Chen M Pan et al ldquoImprovement of magnetome-ter calibration using Levenberg-Marquardt algorithmrdquo IEEJTransactions on Electrical and Electronic Engineering vol 9 no3 pp 324ndash328 2014

[15] F Hampel C Hennig and E Ronchetti ldquoA smoothing principlefor the Huber and other locationM-estimatorsrdquo ComputationalStatistics amp Data Analysis vol 55 no 1 pp 324ndash337 2011

[16] Z Al Aghbari and A Al-Hamadi ldquoEfficient KNN search bylinear projection of image clustersrdquo International Journal ofIntelligent Systems vol 26 no 9 pp 844ndash865 2011

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 9: Research Article The Improved Algorithm of Fast Panorama ...downloads.hindawi.com/journals/mpe/2015/428076.pdf · Image Sequence and Reducing the Distortion Errors ZhongQu, 1 Si-PengLin,

Mathematical Problems in Engineering 9

(a) Original image sequence of the grass scene (8 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitching method

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 7 Experimental results for 8 source images sequence

So we can provide more sample data for RANSAC algorithmwhich can increase the accuracy of the affine transformationmatrix and assure that we can obtain high-quality panoramaat last

Figures 10(a) 10(b) and 10(c) show the comparative dataof matching feature points number between the traditionalmethod and the improved method the results correspond tothe scenes of Figures 7(a) 8(a) and 9(a) The three scenesrespectively have 8 12 and 16 images in the sequenceWe use119875119894

to represent the 119894th stitching processThe three charts showthat the improvedmethod has better performance which canget more matching feature points

Figure 11 shows the comparative data of stitching timebetween the traditional method and the improved methodThe stitching time is recorded from the beginning of thestitching process to the end of finishing the last imagestitching The chart shows that the improved method hasfaster time efficiency Moreover the time efficiency will beimproved more obviously for the longer image sequence

At the same time from Figures 7 8 and 9 we can see thatthe improved algorithmobviously eliminates the distortion ofthe traditional results and gets better panoramic results Weassume that (119909 119910) represents the center of the input image

after being transformed by the affine matrix 119867 and wepreserve the center point of each stitching process in the set ofthe variable 119888119890119899119905119890119903119878119890119905 To some extent 119888119890119899119905119890119903119878119890119905 could reflectthe degree of panorama distortion We use formula (11) toexpress the distortion degree in which the Slope representsa function of computing slope between two points

distortion degree = Max Slope (119894 119895)

119894 119895 isin centerSet(11)

In addition we also define the variable 119894119899119891119900 119901119903119900119901119900119905119894119900119899which represents the ratio between the panorama image pixelnumber after removing the useless black pixels and the entirepanorama pixels number For example in Figure 9(e) thereare some black background pixels which are useless andwould be cut in Figure 9(f) The 119894119899119891119900 119901119903119900119901119900119905119894119900119899 expressionis showed as formula (12) and the 119908119894119889119905ℎ ℎ119890119894119892ℎ119905 are thepanorama dimensions

info proportion = 1 minusblack pixels

width times height (12)

10 Mathematical Problems in Engineering

(a) Original image sequence of the computer graphic scene (12 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 8 Experimental results for 12 source images sequence

(a) Original image sequence of the building scene (16 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 9 Experimental results for 16 source images sequence

Mathematical Problems in Engineering 11

20

40

60

80

100

120

140

160

P1 P2 P3 P4 P5 P6 P7

The m

atch

ing

poin

ts nu

mbe

r

Stitching process

ImprovedTraditional

(a) The matching feature points number of Figure 7(a)

2030405060708090

100110120

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11Stitching process

(b) The matching feature points number of Figure 8(a)

0

100

200

300

400

500

600

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10P11P12P13 P15P14Stitching process

(c) The matching feature points number of Figure 9(a)

Figure 10 The comparison data of matching feature points number between the traditional method and the improved method

From Table 4 we can see that the 119889119894119904119905119900119903119905119894119900119899 119889119890119892119903119890119890 and119894119899119891119900 119901119903119900119901119900119905119894119900119899 compared with the traditional method havebeen pleasingly improved

7 Conclusion

This paper increases the number of thematching SIFT featurepoints by improving the traditional method reducing theunnecessary SIFT detection area in the reference area as wellIn addition the improved method accelerates the panoramicstitching time efficiency and obtains a high-resolution high-quality panorama image Compared with the traditionalmethod the improved method proposed in this paper startsstitching from the middle position of the image sequenceThe middle image is taken as the reference image Then weobtain the affine matrix for any image in the sequence to thereference image according to the statistics information of allaffine transformation matrixes between the adjacent imagesMeanwhile the improved method dynamically selects thenext new input image to join the stitching process basedon the number of statistical matching points of the adjacentimages The experimental results verify that the improvedstitching process can accelerate time efficiency and reduce thedistortion of the panorama image

0

100

200

300

400

500

600

Scene 1 Scene 2 Scene 3

The t

otal

tim

e for

stitc

hing

the s

cene

TraditionalImproved

Figure 11 The comparison data of stitching time between thetraditional method and the improved method

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

12 Mathematical Problems in Engineering

Table 4 The comparison data of distortion degree between the traditional method and the improved method

Scene distortion degree info proportionThe traditional method The improved method The traditional method The improved method

Figure 7(a) 02027 01173 814 936Figure 8(a) 01879 01080 828 947Figure 9(a) 01923 00961 854 950

Acknowledgments

This work is supported by Chongqing Frontier and AppliedBasic Research Project under Grant no cstc2014jcyjA1347Chongqing Science and Technology Research Project ofChongqing Municipal Education Commission under Grantno KJ1402001 and Outstanding Achievements Transforma-tion Projects of University in Chongqing under Grant noKJZH14219 The authors wish to thank the associate editorsand anonymous reviewers for their valuable comments andsuggestions on this paper

References

[1] H-K Kim K-W Lee J-Y Jung S-W Jung and S-J Ko ldquoAcontent-aware image stitching algorithm formobilemultimediadevicesrdquo IEEE Transactions on Consumer Electronics vol 57 no4 pp 1875ndash1882 2011

[2] Z Song S Zhou and J Guan ldquoA novel image registration algo-rithm for remote sensing under affine transformationrdquo IEEETransactions on Geoscience and Remote Sensing vol 52 no 8pp 4895ndash4912 2014

[3] R-F Chang K-C Chang-Chien E Takada et al ldquoRapidimage stitching and computer-aided detection for multipassautomated breast ultrasoundrdquoMedical Physics vol 37 no 5 pp2063ndash2073 2010

[4] X Qiu S Liu and F Liu ldquoAn adaptive kernel-based targettracking method based on multiple features fusionrdquo IEEJTransactions on Electrical and Electronic Engineering vol 7 no1 pp 91ndash97 2012

[5] V C S Chew and F-L Lian ldquoPanorama stitching usingoverlap area weighted image plane projection and dynamic pro-gramming for visual localizationrdquo in Proceedings of the IEEEASME International Conference on Advanced Intelligent Mecha-tronics (AIM rsquo12) pp 250ndash255 July 2012

[6] D G Lowe ldquoDistinctive image features from scale-invariantkeypointsrdquo International Journal of Computer Vision vol 60 no2 pp 91ndash110 2004

[7] Y Xiong and K Pulli ldquoFast panorama stitching for high-qualitypanoramic images on mobile phonesrdquo IEEE Transactions onConsumer Electronics vol 56 no 2 pp 298ndash306 2010

[8] S Ha H Koo S Lee N Cho and S Kim ldquoPanorama mosaicoptimization for mobile camera systemsrdquo IEEE Transactions onConsumer Electronics vol 53 no 4 pp 1217ndash1225 2007

[9] M Brown and D G Lowe ldquoAutomatic panoramic image stitch-ing using invariant featuresrdquo International Journal of ComputerVision vol 74 no 1 pp 59ndash73 2007

[10] I K Hyung S K Beom and I C Nam ldquoA new method to findan optimal warping function in image stitchingrdquo in Proceedingsof the IEEE International Conference on Acoustics Speech andSignal Processing (ICASSP rsquo09) pp 1289ndash1292 IEEE TaipeiTaiwan April 2009

[11] M S Bascil and F Temurtas ldquoA study on hepatitis diseasediagnosis using multilayer neural network with LevenbergMarquardt training algorithmrdquo Journal of Medical Systems vol35 no 3 pp 433ndash436 2011

[12] Y S KimMGhergherehchi S Y Kim andHAfarideh ldquoRAN-dom sample consensus (RANSAC) algorithm for enhancingoverlapped etched track countingrdquo IET Image Processing vol9 no 2 pp 97ndash106 2015

[13] J Bentolila and J M Francos ldquoHomography and fundamentalmatrix estimation from region matches using an affine errormetricrdquo Journal ofMathematical Imaging andVision vol 49 no2 pp 481ndash491 2014

[14] H Pang D Chen M Pan et al ldquoImprovement of magnetome-ter calibration using Levenberg-Marquardt algorithmrdquo IEEJTransactions on Electrical and Electronic Engineering vol 9 no3 pp 324ndash328 2014

[15] F Hampel C Hennig and E Ronchetti ldquoA smoothing principlefor the Huber and other locationM-estimatorsrdquo ComputationalStatistics amp Data Analysis vol 55 no 1 pp 324ndash337 2011

[16] Z Al Aghbari and A Al-Hamadi ldquoEfficient KNN search bylinear projection of image clustersrdquo International Journal ofIntelligent Systems vol 26 no 9 pp 844ndash865 2011

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 10: Research Article The Improved Algorithm of Fast Panorama ...downloads.hindawi.com/journals/mpe/2015/428076.pdf · Image Sequence and Reducing the Distortion Errors ZhongQu, 1 Si-PengLin,

10 Mathematical Problems in Engineering

(a) Original image sequence of the computer graphic scene (12 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 8 Experimental results for 12 source images sequence

(a) Original image sequence of the building scene (16 images)

(b) The panorama obtained by the traditional stitchingmethod

(c) The panorama obtained by the improved stitchingmethod

(d) The panorama after L-M adjustment (e) The panorama after eliminating the stitching seam

(f) The panorama after cutting the useless area

Figure 9 Experimental results for 16 source images sequence

Mathematical Problems in Engineering 11

20

40

60

80

100

120

140

160

P1 P2 P3 P4 P5 P6 P7

The m

atch

ing

poin

ts nu

mbe

r

Stitching process

ImprovedTraditional

(a) The matching feature points number of Figure 7(a)

2030405060708090

100110120

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11Stitching process

(b) The matching feature points number of Figure 8(a)

0

100

200

300

400

500

600

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10P11P12P13 P15P14Stitching process

(c) The matching feature points number of Figure 9(a)

Figure 10 The comparison data of matching feature points number between the traditional method and the improved method

From Table 4 we can see that the 119889119894119904119905119900119903119905119894119900119899 119889119890119892119903119890119890 and119894119899119891119900 119901119903119900119901119900119905119894119900119899 compared with the traditional method havebeen pleasingly improved

7 Conclusion

This paper increases the number of thematching SIFT featurepoints by improving the traditional method reducing theunnecessary SIFT detection area in the reference area as wellIn addition the improved method accelerates the panoramicstitching time efficiency and obtains a high-resolution high-quality panorama image Compared with the traditionalmethod the improved method proposed in this paper startsstitching from the middle position of the image sequenceThe middle image is taken as the reference image Then weobtain the affine matrix for any image in the sequence to thereference image according to the statistics information of allaffine transformation matrixes between the adjacent imagesMeanwhile the improved method dynamically selects thenext new input image to join the stitching process basedon the number of statistical matching points of the adjacentimages The experimental results verify that the improvedstitching process can accelerate time efficiency and reduce thedistortion of the panorama image

0

100

200

300

400

500

600

Scene 1 Scene 2 Scene 3

The t

otal

tim

e for

stitc

hing

the s

cene

TraditionalImproved

Figure 11 The comparison data of stitching time between thetraditional method and the improved method

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

12 Mathematical Problems in Engineering

Table 4 The comparison data of distortion degree between the traditional method and the improved method

Scene distortion degree info proportionThe traditional method The improved method The traditional method The improved method

Figure 7(a) 02027 01173 814 936Figure 8(a) 01879 01080 828 947Figure 9(a) 01923 00961 854 950

Acknowledgments

This work is supported by Chongqing Frontier and AppliedBasic Research Project under Grant no cstc2014jcyjA1347Chongqing Science and Technology Research Project ofChongqing Municipal Education Commission under Grantno KJ1402001 and Outstanding Achievements Transforma-tion Projects of University in Chongqing under Grant noKJZH14219 The authors wish to thank the associate editorsand anonymous reviewers for their valuable comments andsuggestions on this paper

References

[1] H-K Kim K-W Lee J-Y Jung S-W Jung and S-J Ko ldquoAcontent-aware image stitching algorithm formobilemultimediadevicesrdquo IEEE Transactions on Consumer Electronics vol 57 no4 pp 1875ndash1882 2011

[2] Z Song S Zhou and J Guan ldquoA novel image registration algo-rithm for remote sensing under affine transformationrdquo IEEETransactions on Geoscience and Remote Sensing vol 52 no 8pp 4895ndash4912 2014

[3] R-F Chang K-C Chang-Chien E Takada et al ldquoRapidimage stitching and computer-aided detection for multipassautomated breast ultrasoundrdquoMedical Physics vol 37 no 5 pp2063ndash2073 2010

[4] X Qiu S Liu and F Liu ldquoAn adaptive kernel-based targettracking method based on multiple features fusionrdquo IEEJTransactions on Electrical and Electronic Engineering vol 7 no1 pp 91ndash97 2012

[5] V C S Chew and F-L Lian ldquoPanorama stitching usingoverlap area weighted image plane projection and dynamic pro-gramming for visual localizationrdquo in Proceedings of the IEEEASME International Conference on Advanced Intelligent Mecha-tronics (AIM rsquo12) pp 250ndash255 July 2012

[6] D G Lowe ldquoDistinctive image features from scale-invariantkeypointsrdquo International Journal of Computer Vision vol 60 no2 pp 91ndash110 2004

[7] Y Xiong and K Pulli ldquoFast panorama stitching for high-qualitypanoramic images on mobile phonesrdquo IEEE Transactions onConsumer Electronics vol 56 no 2 pp 298ndash306 2010

[8] S Ha H Koo S Lee N Cho and S Kim ldquoPanorama mosaicoptimization for mobile camera systemsrdquo IEEE Transactions onConsumer Electronics vol 53 no 4 pp 1217ndash1225 2007

[9] M Brown and D G Lowe ldquoAutomatic panoramic image stitch-ing using invariant featuresrdquo International Journal of ComputerVision vol 74 no 1 pp 59ndash73 2007

[10] I K Hyung S K Beom and I C Nam ldquoA new method to findan optimal warping function in image stitchingrdquo in Proceedingsof the IEEE International Conference on Acoustics Speech andSignal Processing (ICASSP rsquo09) pp 1289ndash1292 IEEE TaipeiTaiwan April 2009

[11] M S Bascil and F Temurtas ldquoA study on hepatitis diseasediagnosis using multilayer neural network with LevenbergMarquardt training algorithmrdquo Journal of Medical Systems vol35 no 3 pp 433ndash436 2011

[12] Y S KimMGhergherehchi S Y Kim andHAfarideh ldquoRAN-dom sample consensus (RANSAC) algorithm for enhancingoverlapped etched track countingrdquo IET Image Processing vol9 no 2 pp 97ndash106 2015

[13] J Bentolila and J M Francos ldquoHomography and fundamentalmatrix estimation from region matches using an affine errormetricrdquo Journal ofMathematical Imaging andVision vol 49 no2 pp 481ndash491 2014

[14] H Pang D Chen M Pan et al ldquoImprovement of magnetome-ter calibration using Levenberg-Marquardt algorithmrdquo IEEJTransactions on Electrical and Electronic Engineering vol 9 no3 pp 324ndash328 2014

[15] F Hampel C Hennig and E Ronchetti ldquoA smoothing principlefor the Huber and other locationM-estimatorsrdquo ComputationalStatistics amp Data Analysis vol 55 no 1 pp 324ndash337 2011

[16] Z Al Aghbari and A Al-Hamadi ldquoEfficient KNN search bylinear projection of image clustersrdquo International Journal ofIntelligent Systems vol 26 no 9 pp 844ndash865 2011

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 11: Research Article The Improved Algorithm of Fast Panorama ...downloads.hindawi.com/journals/mpe/2015/428076.pdf · Image Sequence and Reducing the Distortion Errors ZhongQu, 1 Si-PengLin,

Mathematical Problems in Engineering 11

20

40

60

80

100

120

140

160

P1 P2 P3 P4 P5 P6 P7

The m

atch

ing

poin

ts nu

mbe

r

Stitching process

ImprovedTraditional

(a) The matching feature points number of Figure 7(a)

2030405060708090

100110120

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11Stitching process

(b) The matching feature points number of Figure 8(a)

0

100

200

300

400

500

600

The m

atch

ing

poin

ts nu

mbe

r

ImprovedTraditional

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10P11P12P13 P15P14Stitching process

(c) The matching feature points number of Figure 9(a)

Figure 10 The comparison data of matching feature points number between the traditional method and the improved method

From Table 4 we can see that the 119889119894119904119905119900119903119905119894119900119899 119889119890119892119903119890119890 and119894119899119891119900 119901119903119900119901119900119905119894119900119899 compared with the traditional method havebeen pleasingly improved

7 Conclusion

This paper increases the number of thematching SIFT featurepoints by improving the traditional method reducing theunnecessary SIFT detection area in the reference area as wellIn addition the improved method accelerates the panoramicstitching time efficiency and obtains a high-resolution high-quality panorama image Compared with the traditionalmethod the improved method proposed in this paper startsstitching from the middle position of the image sequenceThe middle image is taken as the reference image Then weobtain the affine matrix for any image in the sequence to thereference image according to the statistics information of allaffine transformation matrixes between the adjacent imagesMeanwhile the improved method dynamically selects thenext new input image to join the stitching process basedon the number of statistical matching points of the adjacentimages The experimental results verify that the improvedstitching process can accelerate time efficiency and reduce thedistortion of the panorama image

0

100

200

300

400

500

600

Scene 1 Scene 2 Scene 3

The t

otal

tim

e for

stitc

hing

the s

cene

TraditionalImproved

Figure 11 The comparison data of stitching time between thetraditional method and the improved method

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

12 Mathematical Problems in Engineering

Table 4 The comparison data of distortion degree between the traditional method and the improved method

Scene distortion degree info proportionThe traditional method The improved method The traditional method The improved method

Figure 7(a) 02027 01173 814 936Figure 8(a) 01879 01080 828 947Figure 9(a) 01923 00961 854 950

Acknowledgments

This work is supported by Chongqing Frontier and AppliedBasic Research Project under Grant no cstc2014jcyjA1347Chongqing Science and Technology Research Project ofChongqing Municipal Education Commission under Grantno KJ1402001 and Outstanding Achievements Transforma-tion Projects of University in Chongqing under Grant noKJZH14219 The authors wish to thank the associate editorsand anonymous reviewers for their valuable comments andsuggestions on this paper

References

[1] H-K Kim K-W Lee J-Y Jung S-W Jung and S-J Ko ldquoAcontent-aware image stitching algorithm formobilemultimediadevicesrdquo IEEE Transactions on Consumer Electronics vol 57 no4 pp 1875ndash1882 2011

[2] Z Song S Zhou and J Guan ldquoA novel image registration algo-rithm for remote sensing under affine transformationrdquo IEEETransactions on Geoscience and Remote Sensing vol 52 no 8pp 4895ndash4912 2014

[3] R-F Chang K-C Chang-Chien E Takada et al ldquoRapidimage stitching and computer-aided detection for multipassautomated breast ultrasoundrdquoMedical Physics vol 37 no 5 pp2063ndash2073 2010

[4] X Qiu S Liu and F Liu ldquoAn adaptive kernel-based targettracking method based on multiple features fusionrdquo IEEJTransactions on Electrical and Electronic Engineering vol 7 no1 pp 91ndash97 2012

[5] V C S Chew and F-L Lian ldquoPanorama stitching usingoverlap area weighted image plane projection and dynamic pro-gramming for visual localizationrdquo in Proceedings of the IEEEASME International Conference on Advanced Intelligent Mecha-tronics (AIM rsquo12) pp 250ndash255 July 2012

[6] D G Lowe ldquoDistinctive image features from scale-invariantkeypointsrdquo International Journal of Computer Vision vol 60 no2 pp 91ndash110 2004

[7] Y Xiong and K Pulli ldquoFast panorama stitching for high-qualitypanoramic images on mobile phonesrdquo IEEE Transactions onConsumer Electronics vol 56 no 2 pp 298ndash306 2010

[8] S Ha H Koo S Lee N Cho and S Kim ldquoPanorama mosaicoptimization for mobile camera systemsrdquo IEEE Transactions onConsumer Electronics vol 53 no 4 pp 1217ndash1225 2007

[9] M Brown and D G Lowe ldquoAutomatic panoramic image stitch-ing using invariant featuresrdquo International Journal of ComputerVision vol 74 no 1 pp 59ndash73 2007

[10] I K Hyung S K Beom and I C Nam ldquoA new method to findan optimal warping function in image stitchingrdquo in Proceedingsof the IEEE International Conference on Acoustics Speech andSignal Processing (ICASSP rsquo09) pp 1289ndash1292 IEEE TaipeiTaiwan April 2009

[11] M S Bascil and F Temurtas ldquoA study on hepatitis diseasediagnosis using multilayer neural network with LevenbergMarquardt training algorithmrdquo Journal of Medical Systems vol35 no 3 pp 433ndash436 2011

[12] Y S KimMGhergherehchi S Y Kim andHAfarideh ldquoRAN-dom sample consensus (RANSAC) algorithm for enhancingoverlapped etched track countingrdquo IET Image Processing vol9 no 2 pp 97ndash106 2015

[13] J Bentolila and J M Francos ldquoHomography and fundamentalmatrix estimation from region matches using an affine errormetricrdquo Journal ofMathematical Imaging andVision vol 49 no2 pp 481ndash491 2014

[14] H Pang D Chen M Pan et al ldquoImprovement of magnetome-ter calibration using Levenberg-Marquardt algorithmrdquo IEEJTransactions on Electrical and Electronic Engineering vol 9 no3 pp 324ndash328 2014

[15] F Hampel C Hennig and E Ronchetti ldquoA smoothing principlefor the Huber and other locationM-estimatorsrdquo ComputationalStatistics amp Data Analysis vol 55 no 1 pp 324ndash337 2011

[16] Z Al Aghbari and A Al-Hamadi ldquoEfficient KNN search bylinear projection of image clustersrdquo International Journal ofIntelligent Systems vol 26 no 9 pp 844ndash865 2011

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 12: Research Article The Improved Algorithm of Fast Panorama ...downloads.hindawi.com/journals/mpe/2015/428076.pdf · Image Sequence and Reducing the Distortion Errors ZhongQu, 1 Si-PengLin,

12 Mathematical Problems in Engineering

Table 4 The comparison data of distortion degree between the traditional method and the improved method

Scene distortion degree info proportionThe traditional method The improved method The traditional method The improved method

Figure 7(a) 02027 01173 814 936Figure 8(a) 01879 01080 828 947Figure 9(a) 01923 00961 854 950

Acknowledgments

This work is supported by Chongqing Frontier and AppliedBasic Research Project under Grant no cstc2014jcyjA1347Chongqing Science and Technology Research Project ofChongqing Municipal Education Commission under Grantno KJ1402001 and Outstanding Achievements Transforma-tion Projects of University in Chongqing under Grant noKJZH14219 The authors wish to thank the associate editorsand anonymous reviewers for their valuable comments andsuggestions on this paper

References

[1] H-K Kim K-W Lee J-Y Jung S-W Jung and S-J Ko ldquoAcontent-aware image stitching algorithm formobilemultimediadevicesrdquo IEEE Transactions on Consumer Electronics vol 57 no4 pp 1875ndash1882 2011

[2] Z Song S Zhou and J Guan ldquoA novel image registration algo-rithm for remote sensing under affine transformationrdquo IEEETransactions on Geoscience and Remote Sensing vol 52 no 8pp 4895ndash4912 2014

[3] R-F Chang K-C Chang-Chien E Takada et al ldquoRapidimage stitching and computer-aided detection for multipassautomated breast ultrasoundrdquoMedical Physics vol 37 no 5 pp2063ndash2073 2010

[4] X Qiu S Liu and F Liu ldquoAn adaptive kernel-based targettracking method based on multiple features fusionrdquo IEEJTransactions on Electrical and Electronic Engineering vol 7 no1 pp 91ndash97 2012

[5] V C S Chew and F-L Lian ldquoPanorama stitching usingoverlap area weighted image plane projection and dynamic pro-gramming for visual localizationrdquo in Proceedings of the IEEEASME International Conference on Advanced Intelligent Mecha-tronics (AIM rsquo12) pp 250ndash255 July 2012

[6] D G Lowe ldquoDistinctive image features from scale-invariantkeypointsrdquo International Journal of Computer Vision vol 60 no2 pp 91ndash110 2004

[7] Y Xiong and K Pulli ldquoFast panorama stitching for high-qualitypanoramic images on mobile phonesrdquo IEEE Transactions onConsumer Electronics vol 56 no 2 pp 298ndash306 2010

[8] S Ha H Koo S Lee N Cho and S Kim ldquoPanorama mosaicoptimization for mobile camera systemsrdquo IEEE Transactions onConsumer Electronics vol 53 no 4 pp 1217ndash1225 2007

[9] M Brown and D G Lowe ldquoAutomatic panoramic image stitch-ing using invariant featuresrdquo International Journal of ComputerVision vol 74 no 1 pp 59ndash73 2007

[10] I K Hyung S K Beom and I C Nam ldquoA new method to findan optimal warping function in image stitchingrdquo in Proceedingsof the IEEE International Conference on Acoustics Speech andSignal Processing (ICASSP rsquo09) pp 1289ndash1292 IEEE TaipeiTaiwan April 2009

[11] M S Bascil and F Temurtas ldquoA study on hepatitis diseasediagnosis using multilayer neural network with LevenbergMarquardt training algorithmrdquo Journal of Medical Systems vol35 no 3 pp 433ndash436 2011

[12] Y S KimMGhergherehchi S Y Kim andHAfarideh ldquoRAN-dom sample consensus (RANSAC) algorithm for enhancingoverlapped etched track countingrdquo IET Image Processing vol9 no 2 pp 97ndash106 2015

[13] J Bentolila and J M Francos ldquoHomography and fundamentalmatrix estimation from region matches using an affine errormetricrdquo Journal ofMathematical Imaging andVision vol 49 no2 pp 481ndash491 2014

[14] H Pang D Chen M Pan et al ldquoImprovement of magnetome-ter calibration using Levenberg-Marquardt algorithmrdquo IEEJTransactions on Electrical and Electronic Engineering vol 9 no3 pp 324ndash328 2014

[15] F Hampel C Hennig and E Ronchetti ldquoA smoothing principlefor the Huber and other locationM-estimatorsrdquo ComputationalStatistics amp Data Analysis vol 55 no 1 pp 324ndash337 2011

[16] Z Al Aghbari and A Al-Hamadi ldquoEfficient KNN search bylinear projection of image clustersrdquo International Journal ofIntelligent Systems vol 26 no 9 pp 844ndash865 2011

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 13: Research Article The Improved Algorithm of Fast Panorama ...downloads.hindawi.com/journals/mpe/2015/428076.pdf · Image Sequence and Reducing the Distortion Errors ZhongQu, 1 Si-PengLin,

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of