homography estimation from planar contours in image sequence

7
Homography estimation from planar contours in image sequence Ming Zhai Shanghai Jiao Tong University School of Electronic Information and Electrical Engineering 800 Dongchuan Road Shanghai, 200240 China E-mail: [email protected] Shan Fu Zhongliang Jing Shanghai Jiao Tong University Institute of Aerospace Science and Technology 800 Dongchuan Road Shanghai, 200240 China Abstract. Homography can be estimated from corresponding points, lines, or textures. But in some scenarios these features are not always available. As a supplement, the newly developed contour-based method is presented, which can be used to estimate the homography between any two planar contours of an image sequence. The proposed method improves the random sampling consensus RANSAC method into an iterative form. In the iterations, the random sample process of RANSAC is constrained by the previous iteration results. It reduces the blind sample process and ensures fast convergence speed. The experimental results demonstrate that the proposed method is effective. © 2010 Society of Photo-Optical Instrumentation Engineers. DOI: 10.1117/1.3364071 Subject terms: homography estimation; random sampling consensus; image contour. Paper 090361RR received May 19, 2009; revised manuscript received Jan. 18, 2010; accepted for publication Jan. 26, 2010; published online Mar. 22, 2010. 1 Introduction Homography estimation takes an important role in many applications such as camera calibration, metric rectification, 3-D reconstruction, visual servo, image registration, and pattern recognition. 112 Many researchers have put their ef- forts on homography estimation. Homography can be de- scribed by a 3 3 matrix, called a homography matrix, and the matrix can be formulated by parameterized equations. By solving the equations with the known corresponding features, the homography can be obtained. These corre- sponding features include points, lines, conics, contours, textures, etc. According to corresponding features, homog- raphy estimation methods can be roughly classified into several categories: frequency-domain-based methods, high primitives-based methods, and low primitives-based methods. The frequency-domain-based methods often formulate homography in the frequency domain, and then utilize the known corresponding features in the frequency domain to compute homography. The Fourier transformation of corre- sponding textures is often used as features, 12,13 and Fourier descriptors FDs 1416 of corresponding contours are also used as features to compute homography. 1719 Unlike those methods mentioned before, the high-order primitives-based methods use high-order geometrical primitives such as conics and polygons, to solve the ho- mography estimation problem. 2022 These methods have demonstrated better results in many applications than low- order primitives-based methods. But in many scenarios these features are not always available, so it limits the ap- plications of the high-order primitives-based methods. Compared with the high-order primitives-based method, low primitives-based methods are widely used because low primitives, such as points and lines, are easily obtained in most cases. Within this category, direct linear transforma- tion DLT has been popularly used. To enhance the nu- merical stability of DLT, normalization procedures are of- ten needed. 23 But due to noise, mismatch inevitably exists, which will deteriorate the result of DLT. So robust methods like maximum likelihood estimates and random sample consensus RANSAC 24 are proposed. But accurate corre- sponding features are hard to obtain in real situations, so some nonlinear methods like Levenberg-Marquardt 25,26 and Gauss-Newton 25 are normally applied to refine the results of these robust methods. Contours have many good properties for homography estimation, e.g., they exist in most scenarios, and are easy to abstract and match. Therefore, our emphases are placed on the research of homography estimation from planar con- tours. The RANSAC method can be applied to estimate homography from contours, as is suggested in Ref. 24. However, if RANSAC is directly used, the computation is huge. The huge computation often arises from the blind random sample processes of RANSAC. To reduce the blind sample processes and ensure precision of the result, we present a contour-based method that combines RANSAC with the iterative closest point ICP algorithm. 27 The newly developed method takes an iterative form similar to ICP. However, unlike ICP, in the iterations of the proposed method, RANSAC is used to estimate homography. More- over, the random sample processes in RANSAC of the cur- rent iteration are constrained by the result of the previous iteration. It reduces the blind sample process and therefore ensures fast convergence speed. The experimental results demonstrate that the proposed method is effective. This work is organized as follows. Section 1 is the in- troduction; Sec. 2 describes the Iterative RANSAC homog- raphy estimation; Sec. 3 shows the implementation; and Sec. 4 is the conclusions. 0091-3286/2010/$25.00 © 2010 SPIE Optical Engineering 493, 037202 March 2010 Optical Engineering March 2010/Vol. 493 037202-1 Downloaded From: http://opticalengineering.spiedigitallibrary.org/ on 05/12/2013 Terms of Use: http://spiedl.org/terms

Upload: shan

Post on 10-Dec-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Hi

MSS

8SE

SZSI8S

1

Ha3pfstBfstrspm

hkcsdu

ppmdotp

lpm

0

Optical Engineering 49�3�, 037202 �March 2010�

O

Downloaded Fro

omography estimation from planar contours inmage sequence

ing Zhaihanghai Jiao Tong Universitychool of Electronic Information and Electrical

Engineering00 Dongchuan Roadhanghai, 200240 China-mail: [email protected]

han Fuhongliang Jinghanghai Jiao Tong University

nstitute of Aerospace Science and Technology00 Dongchuan Roadhanghai, 200240 China

Abstract. Homography can be estimated from corresponding points,lines, or textures. But in some scenarios these features are not alwaysavailable. As a supplement, the newly developed contour-based methodis presented, which can be used to estimate the homography betweenany two planar contours of an image sequence. The proposed methodimproves the random sampling consensus �RANSAC� method into aniterative form. In the iterations, the random sample process of RANSACis constrained by the previous iteration results. It reduces the blindsample process and ensures fast convergence speed. The experimentalresults demonstrate that the proposed method is effective. © 2010 Societyof Photo-Optical Instrumentation Engineers. �DOI: 10.1117/1.3364071�

Subject terms: homography estimation; random sampling consensus; imagecontour.

Paper 090361RR received May 19, 2009; revised manuscript received Jan. 18,2010; accepted for publication Jan. 26, 2010; published online Mar. 22, 2010.

Introduction

omography estimation takes an important role in manypplications such as camera calibration, metric rectification,-D reconstruction, visual servo, image registration, andattern recognition.1–12 Many researchers have put their ef-orts on homography estimation. Homography can be de-cribed by a 3�3 matrix, called a homography matrix, andhe matrix can be formulated by parameterized equations.y solving the equations with the known corresponding

eatures, the homography can be obtained. These corre-ponding features include points, lines, conics, contours,extures, etc. According to corresponding features, homog-aphy estimation methods can be roughly classified intoeveral categories: frequency-domain-based methods, highrimitives-based methods, and low primitives-basedethods.The frequency-domain-based methods often formulate

omography in the frequency domain, and then utilize thenown corresponding features in the frequency domain toompute homography. The Fourier transformation of corre-ponding textures is often used as features,12,13 and Fourierescriptors �FDs�14–16 of corresponding contours are alsosed as features to compute homography.17–19

Unlike those methods mentioned before, the high-orderrimitives-based methods use high-order geometricalrimitives such as conics and polygons, to solve the ho-ography estimation problem.20–22 These methods have

emonstrated better results in many applications than low-rder primitives-based methods. But in many scenarioshese features are not always available, so it limits the ap-lications of the high-order primitives-based methods.

Compared with the high-order primitives-based method,ow primitives-based methods are widely used because lowrimitives, such as points and lines, are easily obtained inost cases. Within this category, direct linear transforma-

091-3286/2010/$25.00 © 2010 SPIE

ptical Engineering 037202-

m: http://opticalengineering.spiedigitallibrary.org/ on 05/12/2013 Terms of U

tion �DLT� has been popularly used. To enhance the nu-merical stability of DLT, normalization procedures are of-ten needed.23 But due to noise, mismatch inevitably exists,which will deteriorate the result of DLT. So robust methodslike maximum likelihood estimates and random sampleconsensus �RANSAC�24 are proposed. But accurate corre-sponding features are hard to obtain in real situations, sosome nonlinear methods like Levenberg-Marquardt25,26 andGauss-Newton25 are normally applied to refine the resultsof these robust methods.

Contours have many good properties for homographyestimation, e.g., they exist in most scenarios, and are easyto abstract and match. Therefore, our emphases are placedon the research of homography estimation from planar con-tours. The RANSAC method can be applied to estimatehomography from contours, as is suggested in Ref. 24.However, if RANSAC is directly used, the computation ishuge. The huge computation often arises from the blindrandom sample processes of RANSAC. To reduce the blindsample processes and ensure precision of the result, wepresent a contour-based method that combines RANSACwith the iterative closest point �ICP� algorithm.27 Thenewly developed method takes an iterative form similar toICP. However, unlike ICP, in the iterations of the proposedmethod, RANSAC is used to estimate homography. More-over, the random sample processes in RANSAC of the cur-rent iteration are constrained by the result of the previousiteration. It reduces the blind sample process and thereforeensures fast convergence speed. The experimental resultsdemonstrate that the proposed method is effective.

This work is organized as follows. Section 1 is the in-troduction; Sec. 2 describes the Iterative RANSAC homog-raphy estimation; Sec. 3 shows the implementation; andSec. 4 is the conclusions.

March 2010/Vol. 49�3�1

se: http://spiedl.org/terms

2

2

Gttt

y

wtaxTmTr

SXf�

S�drap

Sis

twpfBsba

H

wctvlpombt

Zhai, Shan, and Jing: Homography estimation from planar contours…

O

Downloaded Fro

Iterative Random Sample ConsensusHomography Estimation

.1 Practical Issues of Directly Using RandomSample Consensus

iven two contours denoted by X and Y, respectively, thewo contours are generated by the same planar object inwo different views. The homography between the two con-ours can be formulated as

�sy� � Hx�sx� = 0, �1�

here H is a 3�3 matrix, called the homography matrix,he sx’th point of contour X and the sy’th point of contour Yre assumed to be a corresponding point pair, and y�sy� and�sy� are the homogeneous coordinates of the two points.he RANSAC method can be applied to estimate the ho-ography of the two contours, as is suggested in Ref. 24.he direct way to apply RANSAC to estimate the homog-

aphy between contour X and Y is summarized as follows.

tep 1. Random sample four points A1, A2, A3, and A4 in�any three of them are not on the same line�, and find the

our corresponding points B1, B2, B3, and B4 in Y using Eq.1� with the initial homography estimation Hinitial.

tep 2. Define the neighborhood point set �s of point Bs

Bs�Y�, ∀P��s satisfying P�Y and d�P ,Bs��d0, where

0 is a constant. In the neighborhood point set �s of Bs,andomly selected one point Bs� �s=1,2 ,3 ,4�. Assuming As

nd Bs� �s=1,2 ,3 ,4� are a corresponding point pair, com-ute the new homography Hnew by solving Eq. �1�.

tep 3. If Hnew satisfies the convergence conditions, thent ends and Hnew is the final estimation, otherwise go totep 1.

If the initial homography estimation Hinitial is not known,hen B1, B2, B3, and B4 should be random sampled from thehole contour Y, and the neighborhood point set �s ofoint Bs �s=1,2 ,3 ,4� should be the whole contour. There-ore, when Hinitial is not known, the computation is huge.ut if the two contours are abstracted from the two succes-

ive frames of an image sequence, and then the differenceetween the two contours is small, then it is reasonable tossume

initial = �1 0 CX1 − CY1

0 1 CX2 − CY2

0 0 1� ,

here �CX1 ,CX2� and �CY1 ,CY2� are the mass centers ofontour X and Y, respectively. Denote the point number ofhe neighborhood point set �s by N�s

�s=1,2 ,3 ,4�. Thealue of N�s

determines the convergence speed. If N�sis

arger, the speed is slower because the blind random samplerocesses and the error computing in RANSAC waste mostf the time. On the contrary, if N�s

is smaller, the speeday be faster, but the correct corresponding point may not

e included in the neighborhood point set, so it will affecthe precision of the estimation. It is a dilemma to choose

ptical Engineering 037202-

m: http://opticalengineering.spiedigitallibrary.org/ on 05/12/2013 Terms of U

the value of N�sto balance the precision and computation

complexity. Moreover, even if N�sis given, it is hard to

judge whether the correct corresponding points are in-cluded in the neighborhood sets.

Usually the upper limit of the sample times of RANSACcan be estimated by the following equation:24

k =log�1 − ��

log�1 − w��, �2�

where � is the probability that RANSAC in some iterationselects only inliers, � is the point number needed for esti-mating a model, and w is the probability of choosing aninlier. In our case �=4, and in a neighborhood point set,there is only one inlier point, i.e., the corresponding point,so with Eq. �2� the upper limit of the sample times ofRANSAC in our case is

kR =log�1 − ��

log�1 − �1/N�0�4�, �3�

where N�0=max1�s�4�N�s�. Because there is only one in-

lier point in one neighborhood set, the probability of theoutlier is high and therefore the upper limit of the sampletimes of RANSAC computed from Eq. �3� is huge.

The upper limit of sample times in RANSAC determinesthe computation complexity and stability. To reduce theblind sample process and ensure the precision of the result,we present a method that combines the RANSAC with theiterative closest point �ICP� algorithm.27 The newly devel-oped method takes an iterative form like ICP, and more-over, in the iteration process, the random sample processesin RANSAC are constrained by the result of the previousiteration. It reduces the blind sample and therefore ensuresfast convergence speed.

2.2 Simplified Iterative Random Sample ConsensusHomography Estimation

To illustrate the proposed method clearly, we first put for-ward the simplified method to estimate the homographybetween contours X and Y. The simplified method is sum-marized as follows.

Initial step. With the initial estimation Hinitial, calculate theinitial error Einitial using the method showed in Fig. 1, andrandom sample four points A1, A2, A3, and A4 from contourX, of which any three points are not on the same line.

Step 1. In contour Y, by solving Eq. �4�, find the fourcorresponding points B1, B2, B3, and B4 of the four selectedpoints A1, A2, A3, and A4.

B�s� � HinitialA�s� = 0, s = 1,2,3,4, �4�

where A�s� and B�s� are the homogeneous coordinates of As

and Bs �s=1,2 ,3 ,4�, respectively. If the point with coordi-nate B�s� calculated by Eq. �4� is not on contour Y, thenchoose the point of Y nearest to B�s� as point B .

s

March 2010/Vol. 49�3�2

se: http://spiedl.org/terms

Sratpfl

B

R

SiE

B

wc

H

i

Foco

Zhai, Shan, and Jing: Homography estimation from planar contours…

O

Downloaded Fro

tep 2. Find the neighborhood point set �s of Bs. In �s,andomly select one point Bs� �s=1,2 ,3 ,4�. Assuming As

nd Bs� �s=1,2 ,3 ,4� is a corresponding point pair, computehe new homography Hnew by solving Eq. �5� and recom-uting the new error Enew with the procedure shown in theowchart of Fig. 1.

��s� � HnewA�s� = 0, s = 1,2,3,4. �5�

epeat step 2 until Enew�Einitial.

tep 3. If Enew is small enough, then it ends and Hnew

s the final estimation, otherwise let Hinitial=Hnew,

initial=Enew, and go to step 1.Equations �4� and �5� are directly obtained from Eq. �1�.

y reorganizing Eq. �4� or �5�, Eq. �6� is obtained.

�0T − VsT Us

yVsT

VsT 0T − Us

xVsT �h1

h2

h3 = Ash = 0, s = 1,2,3,4, �6�

here Us= �Usx Us

y 1�T, Vs= �Vsx Vs

y 1�T are homogeneousoordinates of the s’th corresponding point pair and

= h1T

h2T

h3T

s a homography matrix and

ig. 1 The flowchart for computing the error. N is the point numberf contour X, D0 is the threshold to judge the outlier, Nout is theounter for the outlier, and n0 is the max acceptable proportion ofutliers.

ptical Engineering 037202-

m: http://opticalengineering.spiedigitallibrary.org/ on 05/12/2013 Terms of U

As = �0T − VsT Us

yVsT

VsT 0T − Us

xVsT�, h = h1

h2

h3 .

Then h can be solved from Eq. �6� by some numericalmethods like the SVD-based method.23

The computation of the simplified iterative RANSAChomography estimation method can be estimated. DenoteBs

0 as the correct corresponding point of point As

�s=1,2 ,3 ,4�. Assume there are Ds point intervals betweenthe correct corresponding point Bs

0 and the assumedcorresponding point Bs or Bs� �s=1,2 ,3 ,4�. DenoteDmax=max1�s�4�Ds�. In step 2, there are two possiblechoices to select the assumed corresponding point Bs��s=1,2 ,3 ,4�. One is nearer to the correct correspondingpoint, and the other is farther away from it. Usually three ofthe four points chosen nearer to the correct match pointswill make step 2 finish. We assume that three of the fourpoints are chosen nearer to the correct match points, sowith Eq. �2� it needs at most log�1−�� / log�1−0.53� timesof samples to make Step 2 finish. Assume Dmax only de-creases one point when step 2 finished. Then the upperlimit of the sample times of the simplified method is

kS =log�1 − ��

log�1 − 0.53�Dmax

0 + �N�0 − 1�4, �7�

where we assume N�0=max1�s�4�N�s� and Dmax

0 is thevalue of Dmax in step 1. The value of N�0 in the traditionalRANSAC should be selected large enough to ensure thatthe corresponding points are included in the neighborhoodpoint set, but in the proposed method, N�0 is smaller andtherefore the proposed method needs less computation. Forexample, if �=0.99 and Dmax

0 =7, for the traditionalRANSAC N�0 should be at least 2Dmax

0 to ensure that thecorresponding points are included in the neighborhoodpoint set and the upper limit of the sample times computedwith Eq. �3� is huge. The huge upper limit of sample timesindicates unstable computation complexity. For the pro-posed method, usually N�0=3 is enough, and therefore withEq. �7�, the upper limit of the sample times of the simpli-fied method is 261. The smaller upper limit of sample timesof the proposed method indicates more stable computationcomplexity.

In every new iteration, the points B1, B2, B3, and B4 inthe second contour are recomputed according to the previ-ous estimation. It ensures the right searching direction. Therandom sampling process used to search the correspondingpoints is limited in the small point sets, which are deter-mined by the estimation of the previous iteration. It reducesthe blind sample processes, so the iterative form ofRANSAC converges fast and the computation is stable.

2.3 Practical Issues of the Proposed MethodAlthough the simplified method can reduce computationcomplexity, some practical issues needed to be noticedwhen applying it. Above all, how to choose N

�s

March 2010/Vol. 49�3�3

se: http://spiedl.org/terms

�spicwtttsilNtcm2ct

�mmcddtssbth

Fsert

FiN

Zhai, Shan, and Jing: Homography estimation from planar contours…

O

Downloaded Fro

s=1,2 ,3 ,4�, the point number of the neighborhood pointet, needs to be arranged because N�s

is related to the com-utation complexity. The Monte Carlo test28,29 is used tollustrate the relationship between N�s

and the amount ofomputation. With the two contours generated by computerithout noise, the simplified iterative RANSAC method is

ested by the 100-run Monte Carlo tests, that is, to carry outhe simplified method 100 times respectively and calculatehe average error with the sample times. The results arehown in Fig. 2. The sample times can be considered as thendex of computation complexity. Figure 2 shows thatarger N�s

leads to more computation. On the contrary, if

�sis too small, for example N�s

=3 �s=1,2 ,3 ,4�, if all thehree points are stained by noise and all the tried samplesannot satisfy the ending condition, then the simplifiedethod will be probably trapped in an endless loop in step

. So it is important to choose a proper N�sfor reducing

omputation, and some techniques are needed to deal withhe occurrence of endless loop.

If we randomly select a point in the neighborhood set �ss=1,2 ,3 ,4�, there exist two choices: nearer to the correctatch point and farther away from it. The first choice mayake the estimation more accurate, and this direction is

onsidered to be a correct direction. The probability of ran-omly selecting a point in the set �s lying in the correctirection is 1 /2, so if we randomly sample four points fromhe four neighborhoods, the probability of all the fourampled points lying in the correct directions is 1 /16. As-ume the probability that one point in contour Y is stainedy noise and becomes an outlier point �. An outlier point ishe point that will cause large error if used to computeomography.

The probability that the successive N�s/2 points of �s

s=1,2 ,3 ,4� lying in the proper direction are all outliers is

p = ��

2�N�s

/2. �8�

or less computation, N�sshould be smaller; however, N�s

hould be big enough to make p tend to zero to avoidndless loop. When � is 0.1, 0.2, and 0.3, respectively, theelationship of p and N�s

is shown in Fig. 3. Figure 3 showshat p decreases sharply when N increases, so when end-

ig. 2 The result of 100-run Monte Carlo tests for the simplifiedterative RANSAC when N�s

is set to 5, 7, 9, respectively. Smaller�s

converges faster.

�s

ptical Engineering 037202-

m: http://opticalengineering.spiedigitallibrary.org/ on 05/12/2013 Terms of U

less loop occurs it is effective to increase N�sa little to help

it jump out of endless loop. Given p and �, a reference tochoose N�s

is given in Eq. �9�.

N�s�

2 lg p

lg �/2. �9�

For detecting and dealing with endless loop, the thresh-old Nt is used. If in an iteration the sample times exceed Nt,then the endless loop is considered to occur. Increasing N�sa little will help to jump out of endless loop. The maximumsampling choice in step 2 for an iteration is N�s

4 , so Nt canbe set to N�s

4 . In fact, N�s

4 is too large; in our experiments,Nt is set to N�s

4 /16.If at least one of the four sampled points A1, A2, A3, or

A4 in contour X in step 1 is an outlier, endless loop mayoccur too. If after adjusting N�s

the endless loop occursagain, then it can be considered that at least one of the foursampled points A1, A2, A3, or A4 is an outlier. If so, we needto resample four points in contour X and restart the estima-tion. It will help to skip the outliers in contour X.

To improve the precision of the estimation, interpolationis needed. The B-spline interpolation is suggested. Intheory, denser interpolation leads to more accurate results,but from our experience, when the density of interpolationreaches a certain level, increasing the density of interpola-tion is no good but increases computation. In our experi-ments, three interpolation times are used.

2.4 Whole Iterative Random Sample ConsensusHomography Estimation

The whole iterative RANSAC homography estimation con-sidering noise, endless loop, and other problems is summa-rized as follows.

Initial step. Set Hinitial and computed Einitial; set N�sac-

cording to Eq. �5�; set Hcurrent=Hinitial, Ecurrent=Einitial.

Step 1. Random select four points A , A , A , and A in

Fig. 3 The relationship of p and N�swhen � is given.

1 2 3 4

March 2010/Vol. 49�3�4

se: http://spiedl.org/terms

tl

Srl

Spnsnn

attpe

Ft

Zhai, Shan, and Jing: Homography estimation from planar contours…

O

Downloaded Fro

he first contour, any three of which are not on the sameine; let count=0.

tep 2. With Hcurrent using Eq. �4�, compute the four cor-esponding points B1, B2, B3, and B4 in the second contour;et N�s

� =N�s.

tep 3. Find the neighborhood point set �s of Bs with N�s�

oints �s=1,2 ,3 ,4�. Randomly select one point Bs� in theeighborhood point set �s �s=1,2 ,3 ,4�, respectively. As-uming As and Bs� are a corresponding point pair, obtain theew homography Hnew by solving Eq. �5� and compute theew error Enew.

Count=count+1if Enew is small enough then end and Hnew is the finalestimationif Enew�Ecurrent, then Ecurrent=Enew, Hcurrent=Hnew,count=0, go to step 2if countN�s

�4 /16, then N�s� =N�s

� +2, count=0if N�s

� N�s+4, then go to step 1

if Enew�Ecurrent then repeat step 3.

Unlike the simplified method, some techniques aredded to deal with endless loop and to dynamically adjusthe point number of the neighborhood set. In fact, step 3 ishe process using RANSAC to find the correspondingoints. A new iteration begins if and only if the currentrror in step 3 is smaller than the error of the previous

ig. 4 Some example contours used in the experiments. The con-ours vary in their shape, curvature properties, number of points, etc.

ptical Engineering 037202-

m: http://opticalengineering.spiedigitallibrary.org/ on 05/12/2013 Terms of U

iteration. It ensures that the error is not increasing with theiterations, so the proposed method will converge.

Compared with the normal RANSAC method, we neednot care whether the correct corresponding points are in-cluded in the neighborhood set, because the neighborhoodpoint sets refreshed in the iterations will move toward thecorrect corresponding points gradually. Therefore, N�s

canbe set smaller than in the normal RANSAC method, andaccordingly the computation is smaller.

3 ImplementationSupposed an image sequence of a planar object has beenobtained. Denote the homography between any two succes-sive frames by Hm,m+1 �m=1,2 ,3 , . . . �. Hm,m+1 can be esti-mated by the proposed method from the two contours in them’th frame and the �m+1�’th frame with the initial estima-tion

Hinitial = �1 0 CX1 − CY1

0 1 CX2 − CY2

0 0 1� ,

where �CX1 ,CX2� and �Cy1 ,Cy2� are the mass centers of thecontours in the m’th and the �m+1�’th frame, respectively.The homography between the first frame and the m’thframe �m2�, denoted by H1,m, can be estimated by theproposed method from the two contours in the first and them’th frame with Hinitial=H1,m−1, where H1,m−1 can be esti-mated by

H1,m−1 = 2

m−1

Hi−1,i.

With the transitivity of homography, the homography be-tween frame s and frame t �ts� is Hs,t=H1,s

−1H1,t. To obtainprecise estimation of Hs,t, we estimate Hs,t from the con-tours in the s’th and the t’th frame using the proposedmethod with Hinitial=H1,s

−1H1,t.First we test the proposed method by estimating the ho-

mography from two successive contours, that is, to estimateHm,m+1. Some example contours are used to generate thesuccessive contours. The example contours used in the ex-periment are selected after carefully considering the com-plexity, the variety of curvature, the number of points, etc.Some of the example contours are shown in Fig. 4. A pairof successive contours, called a contour pair, is obtained by

Table 1 The average sample times in different noise levels.

2 4 6

2 24.6 25.1 26.0

5 39.3 43.2 45.5

8 80.5 87.1 90.3

March 2010/Vol. 49�3�5

se: http://spiedl.org/terms

aatit��otsttisrF+npGacpm

H

Itn

pnvsmamtsf

mof

Zhai, Shan, and Jing: Homography estimation from planar contours…

O

Downloaded Fro

virtual camera. Assume the virtual camera is moving-round the plane of example contour �which coincides withhe Z=0 plane�. Obtain one contour of the contour pair bymaging the example contour with the virtual camera at thehree given rotation angles around axis X, Y, Z, denoted by, �, and , respectively. After that, add three small angles1, �2, and �3 to �, �, and , respectively, to obtain thether contour of the contour pair. Assume the frame rate ofhe virtual camera is more than 20 Hz and the rotationpeed of the virtual camera around each axis is no morehan 200 deg per second so �s �s=1,2 ,3� is limited lesshan 10 deg. Other contour pairs can be obtained by chang-ng �� ,� , � and �s �s=1,2 ,3�. The advantage with thischeme of generating contours is that it covers the mostealistic poses at which actual images are generally taken.or each example contour, at �� ,� , �= �−60 deg5 degm ,−60 deg+5 degn ,0 deg�, where m=1,2 , . . .24,=1 ,2 , . . .24, obtain contour pairs. It means 576 contourairs are obtained for each example contour. We addaussian noise with standard deviation � �2,4 ,6� pixels

long each coordinate to �% ��� �2,5 ,8�� points of theontour pairs. For each example contour, the 576 contourairs are used to estimate the homography by the proposedethod with the initial homography estimation

initial = �1 0 CX1 − CY1

0 1 CX2 − CY2

0 0 1� .

n the experiment, the proposed method converges fast andhe average sample times at convergence times at differentoise levels are shown in Table 1.

With some selected contour pairs, we compare the pro-osed method with the normal RANSAC method. If N�s

isot properly set, the normal RANSAC method will not con-erge at the given precision. To make the comparison fea-ible, some contour pairs are selected, with which the nor-al RANSAC method does converge when N�s

�9. Theverage sample times of the proposed method and the nor-al RANSAC method are obtained by 50-run Monte Carlo

ests, respectively. The results are shown in Table 2. Table 2howed that with the same precision, our method outper-ormed the normal RANSAC method.

We also use real image sequences to test the proposedethod. The image sequences used in this experiment are

btained by translating and rotating a digital camera. Dif-erent combinations of rotation and translation with differ-

Table 2 Some average sample times of the propselected contour pairs �the noise level is =4,

The example contour usedto generate the contour pair

Fig. 4�a�

The average sample timesof the propose method

39.5

The average sample timesof the normal RANSAC

403.8

osed method and the normal RANSAC method for the�=5�.

Fig. 4�b�

Fig. 4�c�

Fig. 4�d�

Fig. 4�e�

Fig. 4�f�

53.3 47.5 39.0 48.5 55.2

588.2 441.1 503.9 527.2 602.9

ptical Engineering 037202-

m: http://opticalengineering.spiedigitallibrary.org/ on 05/12/2013 Terms of U

Fig. 5 Some experimental results of real image sequences. Sixgroups of results are presented. Ai �i=1,2, . . . ,6� is the first frame ofthe six image sequences, respectively, and the contours labeled bygreen are used to estimate the homography; Bi �i=1,2, . . . ,6� isanother frame of the six sequences, respectively; Ci �i=1,2, . . . ,6�are the overlap result of Ai with Bi wrapped by the estimated homog-raphy, respectively. �Color online only.�

March 2010/Vol. 49�3�6

se: http://spiedl.org/terms

eIar

4Asfstasttrb

R

1

1

1

1

1

1

Zhai, Shan, and Jing: Homography estimation from planar contours…

O

Downloaded Fro

nt speeds are considered when obtaining these sequences.n this experiment, the homography between the first framend the m’th �m90� frame, i.e., H1,m, is estimated. Someesults are shown in Fig. 5.

Conclusions and Discussionscontour-based homography estimation method is pre-

ented. The newly developed method takes an iterativeorm, which combines RANSAC and ICP. The randomample process in RANSAC is constrained by the result ofhe previous iteration. It reduces the blind sample processnd ensures fast convergence speed. The experimental re-ults show that our technique is effective. It is found thathe distortion caused by camera lens and the precision ofhe contour abstraction method will affect the estimationesults. It will be our future work to improve the techniquey considering these factors.

eferences

1. R. Y. Tsai, “Estimating three-dimensional motion parameters of arigid planar patch,” IEEE Trans. Acoust., Speech, Signal Process.29�6�, 1147–1152 �1981�.

2. Y. Fang and D. M. Dawson, “Homography-based visual servoing ofwheeled mobile robots,” Proc. 41st IEEE Conf. Decision Control,Vol. 3, pp. 2866–2871 �2002�.

3. L. Lucchese, “Closed-form pose estimation from metric rectificationof coplanar points,” in IEE Proc. Vision Image Signal Process.153�3�, 364–378 �2006�.

4. E. Montijano and C. Sagues, “Position-based navigation using mul-tiple homographies,” in Proc. IEEE Intl. Conf. Emerging Technol.Factory Automation, pp. 994–1001 �2008�.

5. G. Cross, A. W. Fitzgibbon, and A. Zisserman, “Parallax geometry ofsmooth surfaces in multiple views,” in Proc. 7th IEEE Intl. Conf.Computer Vision, Vol. 1, pp. 323–329 �1999�.

6. Z. Chuan and T. D. Long, “A planar homography estimation methodfor camera calibration,” in Proc. 2003 IEEE Intl. Symp. Comput.Intell., Vol. 1, pp. 424–429 �2003�.

7. T. Ueshiba and F. Tomita, “Plane-based calibration algorithm formulti-camera systems via factorization of homography matrices,” inProc. 9th IEEE Intl. Conf. Computer Vision, Vol. 2, pp. 966–973�2003�.

8. Z. Zhang, “A flexible new technique for camera calibration,” IEEETrans. Pattern Anal. Mach. Intell. 22, 1330–1334 �2001�.

9. S. J. D. Prince, “Augmented reality camera tracking with homogra-phies,” IEEE Comput. Graphics Appl. 22�6�, 39–45 �2002�.

0. D. Q. Huynh, “Affine reconstruction from monocular vision in thepresence of a symmetry plane,” in Proc. 7th IEEE Intl. Conf. Com-puter Vision, Vol. 1, pp. 476–482 �1999�.

1. R. Y. Tsai, “Estimating three-dimensional motion parameters of arigid planar patch, II: singular-value decomposition,” IEEE Trans.Acoust., Speech, Signal Process. 30�4�, 525–534 �1982�.

2. S. K. A. Calway, “Image registration using multiresolution frequencydomain correlation,” in Br. Mach. Vision Conf. (BMVC), pp. 316–325�1998�.

3. M. P. Kumar, “Planar homography from Fourier domain representa-tion,” in Proc. Intl. Conf. Signal Process. Commun. (SPCOM), pp.560–564 �2004�.

4. C. T. Zahn, “Fourier descriptors for plane closed curves,” IEEETrans. Comput. c-21, 269–281 �1972�.

5. D. Zhang and G. Lu, “Generic Fourier descriptor for shape-basedimage retrieval,” in Proc. 2002 IEEE Intl. Conf. Multimedia Expo,Vol. 1, pp. 425–428 �2002�.

ptical Engineering 037202-

m: http://opticalengineering.spiedigitallibrary.org/ on 05/12/2013 Terms of U

16. I. Kunttu and L. Lepisto, “Shape-based retrieval of industrial surfacedefects using angular radius Fourier descriptor,” IEEE Trans. ImageProcess. 1�2�, 231–236 �2007�.

17. M. P. Kumar, “Discrete contours in multiple views: approximationand recognition,” Image Vis. Comput. 22�14�, 1229–1239 �2004�.

18. S. Kuthirummal, “Planar shape recognition across multiple views,” inProc. Intl. Conf. Patt. Recog. (ICPR), pp. 482–488 �2002�.

19. P. K. Jain and C. V. Jawahar, “Homography estimation from planarcontours,” in Proc. 3rd Intl. Symp. 3D Data Process. Visual. Trans-mission (3DPVT’06), pp. 877–884 �2006�.

20. Y. Chen, “Planar metric rectification by algebraically estimating theimage of the absolute conic,” in Proc. 17th Intl. Conf. Patt. Recog.,Vol. 4, pp. 88–91 �2004�.

21. M. P. Kumar, “Geometric structure computation from conics,” inProc. Indian Conf. Computer Vision, Graphics, Image Process. (ICV-GIP), pp. 9–14 �2004�.

22. A. Sugimoto, “A linear algorithm for computing the homographyfrom conics in correspondence,” J. Math. Imaging Vision 13, 115–130 �2000�.

23. R. Hartley and A. Zisserman, Multiple View Geometry in ComputerVision, Cambridge University Press, Cambridge, UK �2004�.

24. M. A. Fischler and R. C. Bolles, “Random sample consensus: a para-digm for model fitting with applications to image analysis and auto-mated cartography,” Commun. ACM 24, 381–395 �1981�.

25. P. E. Gill and W. Murray, “Algorithms for the solution of the nonlin-ear least-squares problem,” SIAM (Soc. Ind. Appl. Math.) J. Numer.Anal. 15�5�, 977–992 �1978�.

26. D. W. Marquardt, “An algorithm for least-squares estimation of non-linear parameters,” J. Soc. Ind. Appl. Math. 11, 431–441 �1963�.

27. P. J. Besl and N. D. McKay, “A method for registration of 3Dshapes,” IEEE Trans. Pattern Anal. Mach. Intell. 14�2�, 239–256�1992�.

28. N. Metropolis and S. Ulam, “The Monte Carlo method,” J. Am. Stat.Assoc. 44�247�, 335–341 �1949�.

29. G. S. Fishman, Monte Carlo: Concepts, Algorithms, and Applica-tions, Springer Verlag, New York �1995�.

Ming Zhai is currently a PhD candidate in the School of Electronic,Information, and Electrical Engineering at Shanghai Jiao Tong Uni-versity. He obtained his BS and MS degrees from An Hui University,Heifei, China, in 2001 and 2005, respectively. His major researchinterests include image processing, computer vision, and relatedsystem development.

Shan Fu is a professor in the School of Aeronautics and Astronau-tics at Shanghai Jiao Tong University. He obtained his first degree inelectronic engineering from the Northwestern Polytechnic Universityin 1985, and PhD from Heriot-Watt University in 1995. His long-timeresearch interest is in the area of computer vision/image processingand related system development, which has been closely linked toengineering/industry applications, such as computerized visual in-spection and metrology, experimental mechanics, and structuralmaterial engineering.

Zhongliang Jing received his BS, MS, and PhD degrees, all inelectronics and information technology, from Northwestern Poly-technic University, China, in 1983, 1988, and 1994, respectively. Hewas elected as a Cheung Kong Scholar in 1999. He is currently theAssociate Dean of the Institute of Aerospace Science and Technol-ogy of Shanghai Jiao Tong University. His research interests includeinformation fusion, optimal control theory, target tracking, and aero-space control.

March 2010/Vol. 49�3�7

se: http://spiedl.org/terms