









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Department of Electrical Engineering, Yuan Ze University, Taoyuan, Taiwan, ROC Received 20 March 2003; received in revised form 19 September 2003; accepted 30 September 2003
Abstract
This paper proposes a novel edge-based stitching method to detect moving objects and construct mosaics from images. The method is a coarse-to-fine scheme which first estimates a good initialization of camera parameters with two complementary methods and then refines the solution through an optimization process. The two complementary methods are the edge alignment and correspondence-based approaches, respectively. The edge alignment method estimates desired image translations by checking the consistencies of edge positions between images. This method has better capabilities to overcome larger displacements and lighting variations between images. The correspondence- based approach estimates desired parameters from a set of correspondences by using a new feature extraction scheme and a new correspondence building method. The method can solve more general camera motions than the edge alignment method. Since these two methods are complementary to each other, the desired initial estimate can be obtained more robustly. After that, a Monte-Carlo style method is then proposed for integrating these two methods together. In this approach, a grid partition scheme is proposed to increase the accuracy of each try for finding the correct parameters. After that, an optimization process is then applied to refine the above initial parameters. Different from other optimization methods minimizing errors on the whole images, the proposed scheme minimizes errors only on positions of features points. Since the found initialization is very close to the exact solution and only errors on feature positions are considered, the optimization process can be achieved very quickly. Experimental results are provided to verify the superiority of the proposed method. q 2004 Elsevier B.V. All rights reserved.
Keywords: Image registration; Image-based rendering; Mosaics; Moving object detection; Video retrieval
Image stitching is the process of recovering the existing camera motions between images and then compositing them together. This technique has been successfully applied to many different applications like video compression [1], video indexing [2,3], object tracking [9], or creation of virtual environments [5– 8,12]. For example, Shum and Szeliski [7,8] proposed methods to stitch a set of images together to form a panorama. In addition, Irani and Anandan [2] used this technique to represent and index different video contents. Moreover, Jin et al. [9] used this technique to compensate unwanted camera motions for extracting desired objects from video sequences. For most methods in this field, an affine camera model is used to approximate the possible motions between two consecutive frames.
Then, the parameters of this model can be recovered from pair of images by two common methods, i.e. the correlation- based approach and the optimization-based one. For the first approach, the measure ‘correlation’ can be calculated in frequency domain or spatial domain. For example, Kuglin and Hines [4] presented a phase-correlation method to estimate the displacement between two adjacent images in frequency domain. For the approaches in spatial domain, Sawhney and Ayer [1] proposed a feature matching approach to estimate the dominant and multiple camera motions. In addition, Zoghlami et al. [11] proposed a corner- based approach to build a set of correspondences for computing the transformation parameters from pair of images. However, the establishment of good correspon- dences is a challenging work when images have nonlinear intensity changes [14]. In order to avoid this problem, some researchers [6,13] treated the stitching problem as a global optimization problem. For examples, Szeliski [6] proposed a nonlinear minimization algorithm for automatically
0262-8856/$ - see front matter q 2004 Elsevier B.V. All rights reserved. doi:10.1016/j.imavis.2003.09.
Image and Vision Computing 22 (2004) 291– www.elsevier.com/locate/imavis
registering images by minimizing the discrepancy in intensities between images. In addition, Davis [13] proposed an optimization scheme to obtain a least-square solution by globally optimizing all pair-wise registrations. In compari- son with the correlation-based method, the global optimiz- ation approach performs more robustly but will be trapped on a local minimum if the starting point is not properly initialized. In this paper, we present an edge-based stitching technique to detect moving objects and construct mosaics from consecutive images. In general, the transformations between consecutive images can be described by a planar perspective motion model. Since the transformation is nonlinear, the paper uses a coarse-to-fine approach to robustly and accurately recover the desired model par- ameters. Firstly, at the coarse stage, two complementary methods, i.e. the edge alignment and the correspondence- based approaches, are proposed to get respective initial estimates from images. Then, at the fine stage, the found initial estimate can be further refined through an optimiz- ation process. The edge alignment method finds possible image translations by checking the consistencies of edge positions between different images. It is simple and efficient without involving any optimization process or building any correspondences. In addition, the method has better capabilities to overcome large displacements and lighting variations between images. On the other hand, the correspondence-based method obtains desired model par- ameters from a set of correspondences by using a new feature extraction and a new correspondence building method. Especially, when building correspondences, a new measure is defined to measure the goodness of each match such that all false correspondences between features can be eliminated as well as possible. Compared with the edge alignment method, the correspondence-based approach can solve more general camera motion model but fails to work when images have large lighting changes. Therefore, due to the complementary property of the two methods, we can obtain the desired initial estimate more robustly. After that, a Monte-Carlo style method with gird partition is then proposed to integrate these methods together. The grid partition scheme can much enhance the accuracy of each try for deriving the correct parameters. Then, the found parameters are further refined through an optimization process. Sine the minimization is only applied to the positions of matching pairs, the optimization process can be performed very efficiently. From experimental results, the proposed method indeed achieves great improvements in terms of stitching accuracy, robustness, and stability. The rest of the paper is organized as follows. In Section 2, we will present an affine model to approximate the motions of a video camera. Then, details of the proposed method for recovering the parameters of this model are described in Section 3. Section 4 reports the experimental results. Finally, conclusions will be presented in Section 5.
Assume that input images are captured by a video camera from a static scene. Then, the relationship between two adjacent images can be described by a planar perspective motion model [6– 12] as follows:
x^0 ¼
m 0 x þ m 1 y þ m 2 m 6 x þ m 7 y þ 1
and y^0 ¼
m 3 x þ m 4 y þ m 5 m 6 x þ m 7 y þ 1
; ð 1 Þ
where ðx; yÞ is the coordinate of a pixel in the current frame I 0 ; ðx^0 ; y^0 Þ the coordinate of its corresponding point in the next frame I 1 ; and M ¼ ðm 0 ; m 1 ; …; m 7 Þ the parameters associated with the focal length, rotation angle, and scaling of the camera. Clearly, Eq. (1) is a nonlinear transformation. In the past, the parameters of this model were obtained by minimizing the error function EðMÞ as follows [6]:
EðMÞ ¼
i
½I 1 ðx^0 i; y^0 iÞ 2 I 0 ðx (^) i; yiÞ^2 ¼
i
e^2 i ; ð 2 Þ
where e (^) i ¼ I 1 ðx^0 i; y^0 iÞ 2 I 0 ðx (^) i; y (^) iÞ; the intensity difference of a pixel between I 0 and I 1 : Let
b (^) k ¼
i
e (^) i ›e (^) i ›m (^) k
and
a (^) kn ¼
i
›e (^) i ›m (^) k
›e (^) i ›m (^) n
The M can be obtained by the iterative form: M T^ ˆ M T^ þ DM T^ ; ð 3 Þ where DM T^ ¼ ðA þ lIÞ^21 B; T means the transpose matrix, A ¼ ½a (^) kn; B ¼ ½b (^) k; and l is a coefficient obtained by the Levenber –Marquardt method [15]. The method works well if the initial value to the correct M is close enough. However, it suffers from low convergence and gets trapped in local minimum if the initialization is not proper, especially when images have large displacements. It is noticed that Eq. (3) tries to find desired solutions by minimizing intensity errors of all pixels between images. When the number of iterations increases, the calculation of intensity errors will become very time-consuming. There- fore, in what follows, we will propose a fast edge-based algorithm for tacking all the above problems.
As described before, due to the nonlinearity of Eq. (1), the best method to estimate the affine model is through an optimization approach [6 –8]. In this paper, a coarse-to-fine approach is proposed to guide the optimization process. At the coarse stage, an edge-based approach is proposed to find a good initial estimate which will be further refined through an optimization process. The initial estimate is got from two
where N (^) bv is the number of elements in P vb: Let Td denote a threshold and set to be 4. Given a number k; we want to determine the number N vp of elements in P va whose d (^) vði; kÞ is less than T (^) d: In addition, we denote the average value of d (^) vði; kÞ for these N (^) pv elements as E vk; which can be used as an index to measure the goodness of k to see whether it is a suitable translation solution. If E vk is smaller enough and N (^) pv is larger enough, the position k can be considered as a good horizontal translation. More precisely, if E vk # Te and N (^) pv $ Tp; the k is collected as an element of the set S (^) x of possible horizontal translations, where the two thresholds T (^) p and T (^) e are set to be 5 and 2, respectively. Let Wb be the width of the input image Ib: Through examining different k for all lkl , Wb; the set S (^) x can be obtained. On the other hand, let P ha and P hb be the sets of horizontal edge positions in Ia and I (^) b; respectively. With P ha and P hb; we can define a distance function d (^) h as follows:
d (^) hði; kÞ ¼ min 1 #j#N hb
lP haðiÞ 2 k 2 P hbðjÞl; ð 5 Þ
where N (^) bh is the number of elements in P hb: Let H (^) b denote the height of the input image Ib: According to d (^) h; with the similar method to obtain S (^) x; by examining different k for all lkl , H (^) b; the set S (^) y of possible vertical translations can be obtained. With S (^) x and S (^) y; the set S (^) xy of possible translations can be obtained as follows: S (^) xy ¼ {ðx; yÞlx [ S (^) x; y [ S (^) y}: Once S (^) xy is obtained, we want to determine the best translation from S (^) xy through a correlation technique. In this technique, two commonly used measures are the sum of intensity differences and the normalized cross-correlation, respectively, defined as:
Dðp; qÞ ¼
xX;y¼K
x;y¼ 2 K
lI (^) aðx þ p (^) x; y þ p (^) yÞ
2 ma 2 I (^) bðx þ q (^) x; y þ q (^) yÞ þ mbl; ð 6 Þ
and
Cðp; qÞ ¼
sa sbð 2 K þ 1 Þ^2
x; Xy¼K
x;y¼ 2 K
½I (^) aðx þ p (^) x; y þ p (^) yÞ
2 ma½Ibðx þ q (^) x; y þ q (^) yÞ 2 mb; ð 7 Þ
where mi and si are the local mean and variance of Ii; respectively; ð 2 K þ 1 Þ^2 represents the area of matching window. When considering efficiency, the measure Dðp; qÞ is preferred and adopted in this paper. It is well known the computation of the sum of differences is time-consuming. In order to solve this problem, this paper uses a branch-and- bounded (or pruning) technique to speed up the calculations of Dðp; qÞ: First, a matrix is obtained by recording all the temporary values when accumulating the previous sum of differences. The matrix is then used to check the accumulating result when calculating the sum of differ- ences. If current result is larger than its corresponding threshold stored in this matrix, further accumulation for getting the final sum of differences is not necessary. Since the set S (^) xy is small and many unnecessary accumulations have been avoided, the best solution of translations can be quickly obtained. In addition, since many impossible translations have been filtered out in advance by edge alignment, the proposed method has better capabilities to overcome the problem of image lighting changes. Fig. 3 shows the block diagram of this edge-based translation estimation algorithm. Details of the whole algorithm are summarized as follows.
3.1.1. Edge-based translation estimation algorithm I (^) a and I (^) b : two adjacent images prepared to be stitched.
Step 1. Apply a vertical edge detector to find the sets P va and P vb of vertical edge positions from I (^) a and Ib; respectively. Step 2. Determine the set S (^) x of possible horizontal translations from P va and P vb based on d (^) vði; kÞ (see Eq. (4)). Step 3. Apply a horizontal edge detector to find the sets P ha and P hb of horizontal edges from I (^) a and Ib; respectively. Step 4. Determine the set S (^) y of possible vertical translations from P ha and P hb based on d (^) hði; kÞ (see Eq. (5)). Step 5. Let S (^) xy denote the set of possible translations, i.e. S (^) xy ¼ {ðx; yÞlx [ S (^) x; y [ S (^) y}: Step 6. Determine the best solution ðt (^) x; tyÞ from S (^) xy through a correlation technique and a branch-and- bounded method.
Fig. 3. Flowchart of our edge alignment method.
When the translation ðtx; tyÞ is found, the M of Eq. (1) can be set as: m 0 ¼ 1 ; m 1 ¼ 0 ; m 2 ¼ 2 tx; m 3 ¼ 0 ; m 4 ¼ 1 ; m 5 ¼ 2 ty; m 6 ¼ 0 ; and m 7 ¼ 0 :
3.2. Motion parameter estimation by feature matching
As described in Fig. 1, two strategies are used to find respective initial estimates of camera parameters for further optimization process. In this section, details of the correspondence-based method are described. In Section 3.2.1, we will propose a new method to extract a set of useful feature points from images based on edges. Then, details of building correspondences between features are described in Section 3.2.2. However, due to noise, many false matches will also be generated. In Section 3.2.3, a new scheme is proposed to eliminate all impossible false matches.
3.2.1. Feature extraction In this section, we will use several edge operators to extract a set of useful feature points as keys to derive desired registration parameters. First of all, let G^ sðx; yÞ be denoted as the 2D Gaussian smoothing function as follows:
G^ sðx; yÞ ¼ exp 2
x^2 þ y^2 2 s^2
where s is a standard deviation of the associated probability distribution. Let G^ s x ðx; yÞ and G^ s y ðx; yÞ denote the first partial derivatives of G^ s^ in the x and y directions, respectively, i.e.
G^ s x ðx; yÞ ¼ 2
x s^2
exp 2
x^2 þ y^2 2 s^2
and G^ s y ðx; yÞ
y s^2
exp 2
x^2 þ y^2 2 s^2
The gradients of an image Iðx; yÞ smoothed by G^ sðx; yÞ at scale s in the x and y directions can be then defined, respectively, as:
I^ s x ðx; yÞ ¼ IpG^ s x ðx; yÞ and I^ s y ðx; yÞ ¼ IpG^ s y ðx; yÞ;
where p means a convolution operation. Then, the modulus of the gradient vector of Iðx; yÞ is:
l 7 I^ sðx; yÞl ¼
ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi lI x^ s ðx; yÞl^2 þ lI y^ s ðx; yÞl^2
q : If all the local maxima of l 7 I^ sðx; yÞl are located and thresholded with a preset value, then all edge points of Iðx; yÞ at scale s can be detected. Since we are interested in some specific feature points for image stitching, additional constraints have to be introduced. Basically, this paper defines the feature point as the one whose edge response is the strongest with a local area. In addition, in order to suppress the effect of noise, s is set to 2. In what follows, the two conditions adopted here for judging whether a point Pðx; yÞ is a feature point or not are summarized as follows:
Condition 1. Pðx; yÞ must be an edge point of the image Iðx; yÞ: This means that Pðx; yÞ is a local maxima of l 7 I^ sðx; yÞl s¼ 2 and l 7 I^ sðx; yÞl s¼ 2. a threshold, i.e. 20; Condition 2. l 7 I^ sðx; yÞl s¼ 2 ¼ maxðx (^0) ;y (^0) Þ[N (^) p {l 7 I^ sðx^0 ; y^0 Þl s¼ 2 }; where Np is a neighborhood of Pðx; yÞ within a 27 £ 27 window.
3.2.2. Correspondence establishment In Section 3.2.1, we have described how the feature points between Iaðx; yÞ and I (^) bðx; yÞ are derived. Now, we are ready to find the matching pairs between I (^) a and Ib: Let FP (^) I (^) a ¼ {p (^) i ¼ ðp ix; p iyÞ} and FP (^) I (^) b ¼ {q (^) i ¼ ðq ix; q iyÞ} be two sets of feature points extracted from two images Ia and Ib; respectively. In addition, Nf (^) a and Nf (^) b represent the number of elements in FP (^) I (^) a and FP (^) I (^) b ; respectively. The similarity between two feature points p and q is measured by their normalized cross-correlation. For each point p (^) i in FP (^) I (^) a ; find the maximum peak of the similarity measure as its best matching point q in another image Ib: Then, a pair {p (^) i , q (^) i} is qualified as a matching pair if two conditions are satisfied:
C (^) I (^) a I (^) b ðp (^) i;q (^) iÞ ¼ max q (^) k [FP (^) Ib CI (^) a I (^) b ðp (^) i;q (^) kÞ and CI (^) a I (^) b ðp (^) i;q (^) iÞ $ Tc; ð 8 Þ
where T (^) c ¼ 0 : 75 : The first condition enforces to find a feature point q (^) k [ FP (^) I (^) b such that the measure CI (^) a ;I (^) b is maximized. As for Condition 2, it forces the value CI (^) a ;I (^) b of a marching pair to be larger than a threshold (0.75 in this case).
3.2.3. Eliminating false matches In the previous section, through matching, a set of matching pairs has been extracted. However, if the relative geometries of features are considered, the matching results can be refined more accurately. Therefore, in this section, we will define a matching goodness for refining the matching results. Let MP (^) I (^) a;I (^) b ¼ {p (^) i , q (^) i}i¼ 1 ; 2 … be the set of matching pairs, where p (^) i is an element in FP (^) I (^) a and q (^) i another element in FP (^) I (^) b : Let Ne (^) I (^) a ðp (^) iÞ and Ne (^) I (^) b ðq (^) iÞ be denoted as the neighbors of p (^) i and q (^) i within a disc of radius R; respectively, where R is set to 200 in this paper. Assume that NP (^) p (^) i q (^) j ¼ {n^1 k , n^2 k }k¼ 1 ; 2 … is the set of matching pairs, where n^1 k [ Ne (^) I (^) a ðp (^) iÞ; n^2 k [ Ne (^) I (^) b ðq (^) jÞ; and all elements of NP (^) pi q (^) j belong to MP (^) I (^) a ;I (^) b : The proposed method is based on a concept that if {p (^) i , q (^) i} and {p (^) j , q (^) j} are two good matches, the relation between p (^) i and p (^) j should be similar to the one between q (^) i and q (^) j: Based on this assumption, we can measure the goodness of a matching pair {p (^) i , q (^) i} according to how many matches {n^1 k , n^2 k } in NP (^) pi qi whose distance dðp (^) i; n^1 k Þ is similar to the distance dðq (^) i; n^2 k Þ; where dðu (^) i; u (^) jÞ ¼ ku (^) i 2 u (^) jk; the Euclidean distance between two points u (^) i and u (^) j: With this concept, the measure of goodness for a match {p (^) i , q (^) i} can be defined as:
G (^) I (^) a I (^) b ðiÞ ¼
{n^1 k ,n^2 k }[NPpi qi
Cðn^1 k ; n^2 k Þrði; kÞ 1 þ distði; kÞ
Assume M i^ ¼ ðmi 0 ; mi 1 ; …; m i 7 Þ is the solution got from the ith try. The verification process can be achieved by comparing how many matching pairs in MP (^) r are consistent to M i: Let {p $ q} be a matching pair and the consistent error eðp; q; M iÞ of this pair to M i^ be defined as:
For each matching pair {p (^) k $ q (^) k} in MP (^) r ; if eðp (^) k; q (^) k; M iÞ , Te; the pair {p (^) k $ q (^) k} is said to be consistent to M i; where T (^) e is a threshold set to 6 for the consistency check. Based on Eq. (10), a counter cðM iÞ is used to record how many matching pairs in MP (^) r which are consistent to M i: After several tries, the best solution M can be obtained as follows:
M^ ¼ arg max M i
cðM iÞ: ð 11 Þ
When initialization ði ¼ 0 Þ; M^0 is got from the edge alignment approach (see Section 3.1). Based on above descriptions, details of the proposed method can be summarized as follows:
3.3.1. Integrated parameter estimation algorithm MaxIterations. Maximum number of iterations and set to be 300 here. L: grid dimension and set to be 8 here, M: the desired solution.
Step 1. Use the edge alignment approach (see Section 3.1) to get the initial solution M^0 : Calculate cðM^0 Þ; the number of elements in MP (^) r which are consistent to M^0 : Step 2. Divide the input image into L £ L grids. From the L^2 grids, collect all the girds if it includes at least one matching pairs as the set S (^) g: Step 3. For each gird k in S (^) g; denote NGridðkÞ as the number of matching pairs in this grid. Calculate the probability p (^) M (^) r ðkÞ of elements in MP (^) r which will appear in the kth gird, i.e. p (^) M (^) r ðkÞ ¼ ðN (^) Grid ðkÞÞ=Nr : Obtain the cumulative distribution PrðkÞ as
Pk 21 j¼ 0 p^ M (^) r ðjÞ:
Step 4. Let i ¼ 1 ; k ¼ 0 ; C ¼ cðM^0 Þ; and M ¼ M^0 : Repeat the following steps: Step 4.1. Randomly generate four different real numbers { am}m¼ 1 ;…; 4 such that 0 # am , 1 ; Step 4.2. Determine four different integers {b (^) m}m¼ 1 ;…; 4
satisfying Prðb (^) mÞ # am , Prðb (^) m þ 1 Þ: If the set {b (^) m}m¼ 1 ;…; 4 fails to be found, go to Step 4.1; Step 4.2. Obtain the set S iP of four matching pairs by selecting one matching pair from the b (^) mth gird for m ¼ 1 ; 2 ; …; 4 ; Step 4.3. Get the solution M i^ from S iP by solving Eq. (9); Step 4.4. Calculate cðM iÞ; the number of matching pairs in MPr which are consistent to M i; Step 4.5. If cðM iÞ. C then C ¼ cðM iÞ and M ¼ M i; Step 4.6. i ¼ i þ 1 ; If i , MaxIterations; go to Step 4.1;
3.4. Parameter refinement through optimization
With the Monte Carlo method, the best estimate M can be found from MP (^) r : However, if an optimization process is applied, M can be further refined. In Section 2, a method
eðp; q; M iÞ ¼
ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
q x^2
m i 0 p x^ þ m i 1 p y^ þ mi 2 mi 6 p x^ þ mi 7 p y^ þ 1
þ q y^2
m i 3 p x^ þ m i 4 p y^ þ mi 5 mi 6 p x^ þ m i 7 p y^ þ 1
vu! 2 ut : ð 10 Þ
Fig. 4. Intensity adjustment: (a) original images I (^) a and I (^) b; (b) after adjusting, the intensities between Ia and Ib are getting closer.
Fig. 5. Example to explain the blending technique.
for deriving desired parameters has been described by minimizing the discrepancy in intensities of all pixels between two images. In this section, instead of minimizing the whole image, we will describe a method to find desired
parameters by minimizing errors only on positions of feature points. In Section 3.2, two sets of feature points, i.e. FP (^) I (^) a and FP (^) I (^) b ; have been extracted from two images I (^) a and I (^) b;
Table 1 Two sets of synthetic camera motions used to generate the synthetic images of Figs. 6 and 7, respectively
Images Parameters
m 0 m 1 m 2 m 3 m 4 m 5 m 6 m 7
Synthetic image pair1 Real values 1.0 0.1 242.0 0.1 1.0 220.0 0.0 0. Estimated 1.00003 0.09960 241.35 0.09954 1.00034 220.587 0.0000018 0.
Synthetic image pair 2 Real values 1.0 0.1 240 2 0.1 1.05 290 0.0 0. Estimated 1.00005 0.0993 239.01 2 0.0998 1.05006 289.5 0.0000078 0. The estimation results of model parameters are shown in rows 4 and 6, respectively.
Fig. 6. Stitching result of two synthetic temple images generated with the camera parameters m 0 ¼ 1 : 0 ; m 1 ¼ 0 : 1 ; m 2 ¼ 242 ; m 3 ¼ 0 : 1 ; m 4 ¼ 1 : 0 ; m 5 ¼ 220 ; m 6 ¼ 0 ; and m 7 ¼ 0 ; (a) and (b) are the pair of synthetic images and (c) is the stitching result.
converges since only the coordinates of feature positions are considered into minimization and the initial estimate of M is very close to the final solution.
3.5. Blending technique for mosaic construction
In general, when stitching two adjacent images together, some unwanted discontinuities of intensity will exist between their common areas. In what follows, a two- stage scheme will be proposed to smooth such intensity discontinuities. First, an intensity adjustment method is proposed for adjusting two adjacent images to have similar intensities. Then, a blending technique is used to construct a sealess mosaic according to a distance weighting function. Like Fig. 4, let DI be the average intensity difference between the overlapping areas of Ia and I (^) b calculated by
lAl
i[A
ðIbðq (^) iÞ 2 I (^) aðp (^) iÞÞ; ð 14 Þ
where lAl is the overlapping area of I (^) a and I (^) b; p (^) i a pixel in I (^) a; and q (^) i its corresponding pixel in I (^) b: Assume W (^) a and W (^) b are the widths of I (^) a and I (^) b; respectively. According to DI; W (^) a and W (^) b; the intensities of I (^) a and I (^) b will be adjusted as:
I (^) aðpðx; yÞÞ ¼ Iaðpðx; yÞÞ þ x
2 W (^) a and I (^) bðqðx; yÞÞ
¼ Ibðqðx; yÞÞ þ ðx 2 wbÞ
2 W (^) b
: ð 15 Þ
After adjusting, the intensities of Ia and Ib in Fig. 4(a) will be gradually changed into the intensity line EF in Fig. 4(b). Furthermore, at the second stage, in order to make the overlapping area between I (^) a and I (^) b more smoothly, a ray-casting method is then used to blend the intensities of different pixels together. Like Fig. 5, p (^) i is a pixel in I (^) a; q (^) i is its corresponding pixel in Ib; and l (^) a and lb are two boundary lines of I (^) a and I (^) b; respectively. With p (^) i and q (^) i; the intensity of the corresponding pixel r (^) i in the composite image Ic can
Fig. 8. Stitching results when different feature masks are used. (a) and (b) Pairs of results of feature extraction and matching. The sizes of used masks are 15 £ 15, 23 £ 23, 35 £ 35 and 51 £ 51 masks, respectively. (c) Stitching results obtained by accordingly stitching pairs of images in (a) and (b).
be obtained by:
I (^) cðr (^) iÞ ¼
d eb I (^) aðp (^) iÞ þ d ea I (^) bðq (^) iÞ d (^) ae þ d eb
; ð 16 Þ
where d (^) a is the distance between p (^) i and la; d (^) b the distance between q (^) i and lb; and e an exponential order for weighting.
With Eq. (16), the intensities of I (^) a will be gradually changed to Ib:
3.6. Complexity analysis
In order to understand the efficiency of the proposed method, in what follows, details of complexity analysis of
Table 2 Estimation results of camera parameters obtained from pairs of images shown in Fig. 8 when different feature masks are used
Mask size Parameters
m 0 m 1 m 2 m 3 m 4 m 5 m 6 m 7
True values 1.0 0.1 242.0 0.1 1.0 220.0 0.0 0. 15 £ 15 mask 1.00001 0.09999 241.55 0.09997 1.00024 220.224 0.0000019 0. 23 £ 23 mask 1.00002 0.09989 241.15 0.09955 1.00025 220.157 0.0000017 0. 27 £ 27 mask 1.00003 0.09960 241.35 0.09954 1.00034 220.587 0.0000018 0. 35 £ 35 mask 0.99995 0.09998 242.01 0.09994 1.00023 219.998 0.0000016 0. 43 £ 43 mask 0.99991 0.09999 241.45 0.09996 1.00034 220.614 0.0000012 0. 51 £ 51 mask 0.99991 0.09999 241.45 0.09996 1.00034 220.614 0.0000012 0.
Fig. 9. Stitching result of a series of panoramic images. (a) Series of panoramic images. (b) Stitching result.
Fig. 11. Stitching result when images have moving objects. (a and b) Two adjacent images with moving objects. (c) Stitching result.
Fig. 12. Stitching result when the camera has some rotation change. (a and b) Two adjacent images. (c) Stitching result.
23 £ 23,…, and 51 £ 51. For this examination, the edge alignment method (see Section 3.1) is not used. Fig. 8(a) and b show the results of feature extraction and matching listed according to the sizes 15 £ 15, 23 £ 23, 35 £ 35 and 51 £ 51, respectively. Table 2 shows details of camera parameters estimated when these masks are used. Clearly, even though different masks are used, proper matching pairs still can be found and thus desired camera parameters can be very accurately estimated. The proposed method failed to stitch images when a 55 £ 55 mask is used since too few features are extracted for matching. Fig. 9 shows the result for mosaic construction when a series of panoramic images are used. In this case, before stitching, all the images are projected into a cylindrical map [5]. Then, only the translation parameters need to be estimated. Fig. 10 shows the case when images have larger intensity differences: (a) and (b) are the original images and (c) is the stitching result. The large lighting changes will lead to the instability of feature matching in the traditional matching techniques like block matching or phase correlation. However, in this paper, the proposed edge alignment algorithm tries to find all possible translations by checking the consistence of edge positions instead of comparing the intensity similarity of images. Therefore, even though images have
larger lighting changes, the proposed method still works well to find all desired camera parameters for stitching. Fig. 11 shows the case when images have some moving objects. The moving object will disturb the work of image stitching. However, the proposed method still successfully stitches them together. Fig. 12 shows the result when images have some rotation and skewing effects. In this case, the proposed Monte Carlo method still works well to find the correct camera parameters. The proposed method also can be used in camera compensation for extracting moving objects from video sequence. Fig. 13 shows two frames got from a movie. In order to detect the moving object, a static background should be constructed. With the proposed method, the camera motion between Fig. 13(a) and (b) can be well found and compensated. Fig. 13(c) is the mosaic of Fig. 13(a) and (b). Then, the moving object can be detected by image differencing like Fig. 13(d). The detection result is very useful for various applications like intelligent transportation system, video indexing, video surveillance, and, etc. Fig. 14 is another case when a moving car appears in the video sequence. From the experimental results, it is obvious that the proposed method is indeed an efficient, robust, and accurate method for image stitching.
Fig. 13. Mosaic construction and object detection when images have a moving object: (a and b) are two adjacent images; (c) is the mosaic result of (a) and (b); (d) is the object detection result by image differencing.
References
[1] H. Sawhney, S. Ayer, Compact representation of video through dominant and multiple motion estimation, IEEE Trans. Pattern Anal. Machine Intell. 18 (Aug) (1997) 814–830. [2] M. Irani, P. Anandan, Video indexing based on mosaic representation, Proc. IEEE 86 (May) (1998) 905–921. [3] M. Bonnet, Mosaic representation for video shot description, Proc. MPEG-7 Eval. Ad Hoc Meeting 636 (Feb) (1999). [4] C. Kuglin, D. Hines, The phase correlation image alignment method, Proc. IEEE Int. Conf. Cybernet. Soc. (1975) 163–165. [5] S. Chen, Quicktime VR—an image-based approach to virtual environment navigation, Proc. SIGGRAPH’95 (1995) 29– 38. [6] R. Szeliski, Video mosaics for virtual environments, IEEE Comput. Graph Appl. 16 (March) (1996) 22–30. [7] H.Y. Shum, R. Szeliski, Systems and experiment paper: construction of panoramic image mosaics with global and local alignment, Int. J. Comput. Vis. 36 (2) (2000) 101–130. [8] R. Szeliski, H.Y. Shum, Creating full view panoramic image moaics and environment maps, Proc. Comput. Graphics Annu. Conf. Ser. (1997) 251–259. [9] J.S. Jin, Z. Zhu, G. Xu, A stable vision system for moving vehicles, IEEE Trans. Intell. Transport. Syst. 1 (1) (2000) 32–39. [10] H. Nicolas, New methods for dynamic mosaicking, IEEE Trans. Image Processing 10 (8) (2001) 1239–1251.
[11] I. Zoghlami, O. Faugera, R. Deriche, Using geometric corners to build a 2D mosaic from a set of images, Proc. Conf. Comput. Vis. Pattern Recognit., Puerto Rico (1997) 420–425. [12] C.T. Hsu, Feature-based video mosaic, Proc. ICIP, Vancouver, Canada 2 (Sep) (2000) 887–890. [13] J. Davis, Mosaics of scenes with moving objects, IEEE Proc. CVPR (1998). [14] M. Sonka, V. Hlavac, R. Boyle, Image Processing, Analysis and Machine Vision, Chapman and Hall, London, UK, 1993. [15] W. H. Press, S. A. Teukolsky, W. T. Vetterling, B. P. Flannery, Numerical Recipes in C: the Art of Scientific Computing, Cambridge University Press, Cambridge, January 1993.
Further reading
C. Guestrin, F. Cozman, E. Krotkov, Fast software image stabilization with color registration, In Proc. Intell. Robots Syst. Conf., Victoria, Canada October (1998) 19 –24. J.W. Hsieh, H.Y. Mark Liao, K.C. Fan, M.T. Ko, Y.P. Hung, Image registration using a new edge-based approach, Comput. Vis. Image Understand. 67 (1997) 112–130. S. Mann, R.W. Picard, Virtual bellows: constructing high-quality images for video, Proc. ICIP (1994) 363–367.