Fast high precision matching method

Information

  • Patent Grant
  • 7463773
  • Patent Number
    7,463,773
  • Date Filed
    Wednesday, November 26, 2003
    21 years ago
  • Date Issued
    Tuesday, December 9, 2008
    16 years ago
Abstract
An initial search method uses the input image and the template to create an initial search result output. A high precision match uses the initial search result, the input image, and the template to create a high precision match result output. The high precision match method estimates high precision parameters by image interpolation and interpolation parameter optimization. The method also performs robust matching by limiting pixel contribution or pixel weighting. An invariant high precision match method estimates subpixel position and subsampling scale and rotation parameters by image interpolation and interpolation parameter optimization on the log-converted radial-angular transformation domain.
Description
TECHNICAL FIELD

This invention relates to a method for fast high precision matching.


BACKGROUND OF THE INVENTION

Pattern search is a simple yet powerful machine vision tool. Given a template pattern and an image, its objective is to find all instances of the patterns in the image. It involves two steps, a search step and a matching step. The search step places the pattern at all valid poses (locations, rotation angles, sizes) of the image being searched. The matching step determines the goodness of the match between the pattern at a given pose and the subset of the image corresponding to the pose. For advanced applications, it is desirable that the matching step produces high precision (that is, subpixel position, subsampling scale and rotation) results.


Normalized correlation method (Manickam, Swami, Roth, Scott D., Bushman, Thomas, “Intelligent and Optimal Normalized correlation for High-Speed Pattern Matching”, NEPCON WEST 2000, February 2000) of fixed rotation and scale has been widely used as the matching method in many machine vision applications. The match score of normalized correlation is largely independent of linear variations in object shading caused by reflectivity or illumination variations.


A rotation and scale invariant pattern matching method was disclosed (Rotation and Scale Invariant Pattern Matching Method, U.S. Pat. No. 6,640,008) that generates a polar coordinate representation of the pattern template image that allows for fast linear search of scale along the radius axis and rotation along the angular axis. A fast regular shaped pattern search method was disclosed (Fast Regular Shaped Pattern Searching, U.S. patent application Ser. No. 10/255,016) that performs fast pattern matching with flexible projection kernels to construct regular-shaped patterns using an accumulation method. A fast invariant searching method was disclosed (Fast Invariant Pattern Search, U.S. patent application Ser. No. 10/302,466). It generates rotation and scale invariant profiles for fast invariant search using the fast regular shaped pattern construction method. In addition, a fast pattern searching method was disclosed (Fast Pattern Searching, U.S. patent application Ser. No. 10/283,380) that performs fast scale and aspect ratio invariant search.


The above prior art approaches are not designed for highly precise sub-pixel and sub-sampling matching. They return the discrete pixel position that yields the best match and the coarse rotation and scale estimate. A surface fitting approach (Gleason, S. S., M. A. Hunt, and W. B. Jatko, “Subpixel Measurement of Image Features Based on Paraboloid Surface fit”, SPEE Vol. 1386. Machine Vision Systems Integration in Industry, 1990) is attempted for subpixel matching. This approach fits the surface of the template matching scores (such as normalized correlation values) and estimates the maximum position from the surface for subpixel matching results. The fitting method suffers from the underlying nonlinear matching functions whose scores cannot be well characterized by the fitting surfaces. This, therefore, could yield misleading subpixel (for shift) or subsampling (for rotation and/or scale) matching results. It is reported that the error of the template matching score fitting based method is about 13% (Frischchlz Robert W. and Spinnler, Klaus P. “Class of algorithms for real-time subpixel registration” Proc. SPIE Vol. 1989, p. 50-59, Computer Vision for Industry, Donald W. Braggins; Ed).


A more accurate approach is to perform subpixel and subsampling interpolation in the image domain. Then, template matching is performed on the interpolated higher resolution image. This could yield more accurate results than performing interpolation on the matching score surface. Depending on the interpolation method, system noise and the number of bits per pixel used to quantized the data, it is expected that a midrange error of 0.01 to 0.05 pixel could be achieved using this method (Frischchlz Robert W. and Spinnler, Klaus P. “Class of algorithms for real-time subpixel registration” Proc. SPIE Vol. 1989, p. 50-59, Computer Vision for Industry, Donald W. Braggins; Ed). However, interpolation on the image domain for high precision matching requires large data volume and matching computation, which is too expensive for deployment in practical applications.


A prior art approach (“Golden template comparison for rotated and/or scaled images” U.S. Pat. No. 5,850,466) stores, in an array, a varied plurality of golden template images, each golden template image being characterized by a different combination of rotation and/or scale and/or sub-pixel translation. The array is indexed by the respective quantized rotation and/or quantized scale and/or sub-pixel translation of each version of the golden template image. This approach still requires a large number of template storage and computational cost for matching at high precision. So it is still impractical.


OBJECTS AND ADVANTAGES

This invention provides a fast method for high precision matching with the equivalent subpixel and subsampling interpolation in the image or template domain without actual performing the subpixel interpolation and/or subsampling. It achieves the high precision through sampling parameter optimization. Therefore, very fine sampling precision can be accomplished without the difficulty of high resolution image/template storage and expensive computation for actual matching at high resolution.


This invention includes a robust high precision matching method that allows the matching of noisy or imperfect data by limiting the contribution from each pixel and/or weighting the pixels by their significance/reliability, etc. The speed advantage is applicable to the robust matching methods of this invention.


This invention is generalized to include the high precision scale and rotation invariant matching through parameter optimization on log-converted radial-angular coordinate. This invention can be easily generalized to three-dimensional or higher dimensional invariant high precision pattern search and can achieve even greater speed advantage comparing to the prior art methods. Therefore, it can be used in applications such as 3D medical imaging, dynamic medical imaging, confocal microscopy, live cell assays in drug discovery, or ultrasound imaging.


A further objective of this invention is to allow the software implementation of the fast high precision matching method in a general computer platform without any special hardware to reduce cost and system complexity.


SUMMARY OF THE INVENTION

A fast high precision matching method receives an input image and a template. An initial search method uses the input image and the template to create an initial search result output. A high precision match uses the initial search result, the input image, and the template to create a high precision match result output. The high precision match method estimates high precision parameters by image interpolation and interpolation parameter optimization. The high precision match method also performs robust matching by limiting pixel contribution or pixel weighting. An invariant high precision match method estimates subpixel position and subsampling scale and rotation parameters by image interpolation and interpolation parameter optimization on the log-converted radial-angular transformation domain.





BRIEF DESCRIPTION OF THE DRAWINGS

The preferred embodiment and other aspects of the invention will become apparent from the following detailed description of the invention when read in conjunction with the accompanying drawings, which are provided for the purpose of describing embodiments of the invention and not for limiting same, in which:



FIG. 1 shows the processing flow for the fast high precision matching method;



FIG. 2 shows the processing flow for the high precision match within one pixel range;



FIG. 3 shows the processing flow for the high precision match beyond one pixel range;



FIG. 4 shows a matching function maximization method that finds the best α and β values;



FIG. 5 shows the processing flow of the fast high precision projection match;



FIG. 6 shows A matching function maximization method that finds the best α, β, γ, and δ values.





DETAILED DESCRIPTION OF THE INVENTION

I. Application Scenarios


A high precision matching produces highly precise results such as subpixel matching positions, high precision angles, scales, and/or focus positions. The processing flow of a fast high precision matching application scenario of this invention is shown in FIG. 1.


As shown in FIG. 1, the input image 100 and the template 102 are processed by an initial search 104 step. This results in an initial search result 108 output. The initial search 104 method searches through a large volume of data to identify the initial locations, scale, and angles that correspond to the match candidates. The initial match is fast but results are often not precise. In one embodiment of the invention, a “Fast Pattern Searching”, U.S. patent application Ser. No. 10/283,380 and a “Fast Invariant Pattern Search”, U.S. patent application Ser. No. 10/302,466 is used for initial search. Those skilled in the art should recognize that other methods such as standard normalized correlation method or geometric pattern matching method could be used for initial search. The initial search results are refined by the high precision match 106 step to create a high precision match result 110 output having subpixel matching positions, high precision angles, scales, and/or focus positions.


The initial search includes non-invariant and invariant searches. Similarly, the high precision match includes non-invariant and invariant high precision matches. Non-invariant search and match methods search and match template position(s) from an input image 100. The invariant search and match methods search and match template 102 and input image position subject to rotation, scale, and other variations such as focus changes, etc.


II. Non-Invariant High Precision Match


The non-invariant high precision match method produces sub-pixel matching results. In one embodiment of the invention, the basic formula of the non-invariant high precision match is described in the following section.


II.1. Matching Function


The typical matching operation is based on the normalized correlation method. The normalized correlation based matching function between two images I and J, Mat(I,J), can be described by the following formula:







Mat


(

I
,
J

)


=


COV


(

I
,
J

)





VAR


(
I
)




VAR


(
J
)










Where COV(I,J) is the covariance between images I and J and is described by the following formula







COV


(

I
,
J

)


=



1
N






x
,
y













I


[
x
]




[
y
]





J


[
x
]




[
y
]





-


(


1
N






x
,
y












I


[
x
]




[
y
]




)



(


1
N






x
,
y












J


[
x
]




[
y
]




)








and the variance of image I, VAR(I) is described as







VAR


(
I
)


=



1
N






x
,
y













I


[
x
]




[
y
]





I


[
x
]




[
y
]





-


(


1
N






x
,
y












I


[
x
]




[
y
]




)




(


1
N






x
,
y












I


[
x
]




[
y
]




)

.







The image region area N is described as






N
=




x
,
y










1.





The variance of image J, VAR(J) can be similarly defined.


II.2. High Precision by Image Interpolation


The high precision is achieved by image interpolation. In one embodiment of the invention, the image interpolation is performed by linear interpolation. As an example, we describe bilinear interpolation between four pixels in this section.


Let the interpolated image of input image I be Kαβ. Where α and β (0≦α,β<1) are subpixel values in x and y dimensions. In the bilinear interpolation method, the pixel value of the interpolated image is described by the following formula:

Kαβ[x][y]=(1−α)(1−β)I[x][y]+α(1−β)I[x+1][y]+β(1−α)I[x][y+1]+αβI[x+1][y+1]


Those skilled of art should recognize that any linear interpolation method such as weighted linear interpolation could be used in the invention for high precision matching. Furthermore, the interpolation could include more than 4 pixels.


The covariance of the Kαβ and J can be written as






















COV


(


K

α





β


,
J

)


=





x
,
y














K

α





β




[
x
]




[
y
]





J


[
x
]




[
y
]




-


(




x
,
y













K

α





β




[
x
]




[
y
]



)



(




x
,
y












J


[
x
]




[
y
]



)














=



(

1
-
α

)



(

1
-
β

)



COV


(


I
00

,
J

)



+


α


(

1
-
β

)




COV


(


I
10

,
J

)



+


















β


(

1
-
α

)




COV


(


I
01

,
J

)



+

α





β






COV


(


I
11

,
J

)












Where









COV


(


I

l





m


,
J

)


=



1
N






x
,
y













I


[

x
+
l

]




[

y
+
m

]





J


[
x
]




[
y
]





-




















(


1
N






x
,
y












I


[

x
+
l

]




[

y
+
m

]




)



(


1
N






x
,
y












J


[
x
]




[
y
]




)













for





l

,

m
=
0

,
1.















The variance of the Kαβ and J can be written as














VAR


(

K

α





β


)


=







x
,
y














K

α





β




[
x
]




[
y
]






K

α





β




[
x
]




[
y
]




-


(




x
,
y













K

α





β




[
x
]




[
y
]



)



(




x
,
y













K
αβ



[
x
]




[
y
]



)









=






(

1
-
α

)

2




(

1
-
β

)

2



VAR


(

I
00

)



+




α
2



(

1
-
β

)


2



VAR


(

I
10

)



+














β
2



(

1
-
α

)


2



COV


(

I
01

)



+


α
2







β
2







COV


(

I
11

)



+











2


α


(

1
-
α

)





(

1
-
β

)

2



COV


(


I
00

,

I
10


)



+











2

β


(

1
-
β

)




(

1
-
α

)

2



COV


(


I
00

,

I
01


)



+











2

α






β


(

1
-
α

)





(

1
-
β

)



[


COV


(


I
00

,

I
11


)


+

COV


(


I
10

,

I
01


)



]



+











2


α
2



β


(

1
-
β

)




COV


(


I
10

,

I
11


)



+

2

α







β
2



(

1
-
α

)




COV


(


I
01

,

I
11


)













Where







COV


(


I

l





m


,

I
qr


)


=



1
N






x
,
y













I


[

x
+
l

]




[

y
+
m

]





I


[

x
+
q

]




[

y
+
r

]





-













(


1
N






x
,
y












I


[

x
+
l

]




[

y
+
m

]




)



(


1
N






x
,
y












I


[

x
+
q

]




[

y
+
r

]




)









for





q

,

r
=

0





and





1.





And









VAR


(

I

l





m


)


=



1
N






x
,
y













I


[

x
+
l

]




[

y
+
m

]





I


[

x
+
l

]




[

y
+
m

]





-













(


1
N






x
,
y












I


[

x
+
l

]




[

y
+
m

]




)



(


1
N






x
,
y












I


[

x
+
l

]




[

y
+
m

]




)










From the above formula, the matching function Mat(I,J), can be described as a function of the subpixel values α and β.


The high precision match result around a pixel position (x,y) is the subpixel values a and β correspond to the maximum value of the above matching function. When the initial search accuracy is within one pixel precision, the high precision match can be performed for the optimal subpixel values within each of the initial search result position (x,y). The processing flow of the high precision match within one pixel range is shown in FIG. 2. The input image 100 and the initial search result position (x,y) 200 are used along with the template 102 for matching function maximization 202. This results in the optimal subpixel values 204.


Those skilled in the art should recognize that multiple within one pixel range high precision matches can be used if the initial search result includes multiple candidate positions.


When the initial search result is not within one pixel precision, the high precision match can be performed for the optimal subpixel values within the pixel or the neighboring pixel of each of the initial search result position (x,y). The subpixel position whose maximum matching function is the highest among those of the pixel or the neighboring pixel is the optimal subpixel position of the high precision matching. The processing flow of the high precision match beyond one pixel range is shown in FIG. 3.


As shown in FIG. 3, a neighboring position creation module 300 takes the initial search result position (x,y) 200 and creates s number of neighboring positions, 302, . . . , 304. In one embodiment of the invention, the 3 by 3 adjacent neighbors of (x,y) are selected. That is, s=8. In another embodiment of the invention, the pixels immediate above, immediate below, immediate to the left, and immediate to the right of (x,y) are selected. Therefore, s=4. Those skilled in the art should recognize that other methods of neighboring position generation could be used and they are all within the scope of the current invention.


The initial search result position (x,y) 200 and its neighboring positions, 302, . . . , 304, are used to perform matching function maximization 202 for their respective within one pixel position. The maximum values for each position 306, 308, . . . , 310, are compared and the global maximum is selected by the maximum and position determination module 312. The optimal subpixel values 204 are the values correspond to the position having the highest matching function value among the initial search result position (x,y) 200 and its neighboring positions, 302, . . . , 304.


In another embodiment of the invention, the beyond one pixel range high precision matches is performed by using more than four pixels for bi-linear interpolation. For example 16 pixels could be used for interpolation.


Those skilled in the art should recognize that multiple beyond one pixel range high precision matches can be applied if the initial search result includes multiple candidate positions.


II.3. Matching Function Maximization


The matching function maximization method finds the maximum parameters that yield the maximum matching function. The matching function maximization can be performed using optimization methods such as the random optimization method, first order, second order, or quadratic fitting, etc.


To determine Mat(I,J) as a function of α and β, Mat(α,β), we rewrite COV(Kαβ,J) and VAR(Kαβ) as:

COV(Kαβ,J)=A1αβ+A2α+A3β+A4

Where

  • A1=COV(I00,J)+COV(I11,J)−COV(I10,J)−COV(I01,J),
  • A2=COV(I10,J)−COV(I00,J), A3=COV(I01,J)−COV(I00,J), A4=COV(I00,J),


    and

    VAR(Kαβ)=B1α2β2+B2α2β+B3αβ2+B4αβ+B5α2+B6β+B7α+B8β8+B9

    Where
  • B1=VAR(I00)+VAR(I10)+VAR(I01)+VAR(I11)+2COV(I00,I11)+2COV(I10,I01)−2COV(I00,I10)−2COV(I00,I01)−2COV(I10,I11)−2COV(I01,I11),
  • B2=−2VAR(I00)−2VAR(I10)+4COV(I00, I10)+2COV(I00,I01)−2COV(I00,I11)−2COV(I10,I01)(I10,I01)+2COV(I10,I11),
  • B3=−2VAR(I00)−2VAR(I01)+2COV(I00,I10)+4COV(I00,I01)−2COV(I00,I11)−2COV(I10,I01)(I10,I01)+2COV(I01,I11),
  • B4=4VAR(I00)−4COV(I00,I10)−4COV(I00,I01)+2COV(I00,I01)+2COV(I10,I01),
  • B5=VAR(I00)+VAR(I10)−2COV(I00,I10), B6=VAR(I00)+VAR(I01)−2COV(I00,I01),
  • B7=−2VAR(I00)+2COV(I00,I10), B8=−2VAR(I00)+2COV(I00,I01), and B9=VAR(I00).


The necessary condition for maximizing the matching function is










MAT


(

α
,
β

)





α


=


0





and









MAT


(

α
,
β

)





β



=
0






Equivalently,










M


(

α
,
β

)





α


=


0





and









M


(

α
,
β

)





β



=
0






Where M(α,β)=[MAT(α,β)]2. This results in










2


VAR


(

K

α





β


)







COV


(


K

α





β


,
J

)





α



=


COV


(


K

α





β


,
J

)







VAR


(

K

α





β


)





α








and






2


VAR


(

K

α





β


)







COV


(


K

α





β


,
J

)





β



=


COV


(


K

α





β


,
J

)







VAR


(

K

α





β


)





β











From the above formula, for a given β (0≦β<1), the best α can be determined by the following formula:






α
=

-




p
3



β
3


+


p
5



β
2


+


p
6


β

+

p
8





p
1



β
3


+


p
2



β
2


+


p
4


β

+

p
7









Where

  • p1=A1B3−2A3B1, p2=A1B4+A2B3−2A3B2−2A4B1,
  • p3=2A1B6−A3B3, p4=A1B7+A2B4−2A3B5−2A4B2,
  • p5=2A1B8+2A2B6−A3B4−A4B3, P6=2A1B9+2A2B8−A3B7−A4B4,
  • p7=A2B7−2A4B4, p8=2A2B9−A4B7


Since α is between 0 and 1. So we set α=0 if the above ax calculation results in α<0. Similarly, we set α=1 if the above a calculation results in α>1. The formula for determining the best β value when an a is given, can be calculated using a similar method.


In one embodiment of the invention, the matching function maximization method that finds the α and β is performed by an iterative procedure as shown in FIG. 4.


As shown in FIG. 4, an initial β value 400 is selected. The value could be randomly selected between 0 and 1 or could be a pre-determined value such as 0.5, etc. Using the initial β value, the best a value can be found 402 by the above close form solution. The best α value is in term used to find the best β value 404. The best β value can then be applied back to the best α finding 402 and then best β finding 404 processes. This process is iterated until the α and β values are stable (having little change per iteration) or an exit condition such as the maximum number of iterations is reached. The resulting α and β values are the best α and β values 406.


Those skilled in the art should recognize that other methods of optimization could be applied to determine the optimal subpixel values.


II.4. Fast High Precision Match


The matching function, Mat(I,J), described in section II.1 matches two images I and J. If we assume that I is the input image and J is the template, then we need to calculate the variance parameters B1, B2, B3, B4, B5, B6, B7, B8, and B9 for each candidate regions of the input image since the interpolation is performed on the input image. This could be time consuming if there are many candidate regions for matching. A fast high precision matching can be achieved by interpolating on the template. In this case, the matching function can be described as:







Mat


(

I
,

I
tmp


)


=


COV


(

I
,

I
tmp


)





VAR


(
I
)




VAR


(

I
tmp

)










Wherein the variance parameters B1, B2, B3, B4, B5, B6, B7, B8, and B9 of the variance VAR[Itmp(α,β)] can be pre-calculated for the fixed template. Therefore, only the covariance parameters A1, A2, A3, and A4 of the covariance term COV[I,Itmp(α,β)] has to be calculated during the high precision matching process for each input region.


II.5. Fast High Precision Projection Match


Image projection is often performed in fast template search to reduce the search dimensions. A fast regular shaped pattern search method was disclosed (Fast Regular Shaped Pattern Searching, U.S. patent application Ser. No. 10/255,016) that performs fast pattern matching with flexible projection kernels to construct regular-shaped patterns using an accumulation method. The high precision match method of this invention could be applied to projected images.


The image projection profile P of an image I can be described as the summation over a given geometric region R.








P


[
x
]




[
y
]


=






(

u
,
v

)


R













I


[

x
+
u

]




[

y
+
v

]







We interpolate image pixel values by bilinear combination as follows:

Iαβ[x][y]=(1−α)(1−β)I[x][y]+α(1−β)I[x+1][y]+β(1−α)I[x][y+1]+αβI[x+1][y+1]


Then the projection profile values of the interpolate image pixel values are the bilinear combination of the non-interpolated projection values. That is, image interpolation first then projection is equal to image projection first and then interpolate on the projection profiles.












P
αβ



[
x
]




[
y
]


=







(

u
,
v

)


R






`










I
αβ



[

x
+
u

]




[

y
+
v

]









=





(

1
-
α

)



(

1
-
β

)




P


[
x
]




[
y
]



+


α


(

1
-
β

)





P


[

x
+
1

]




[
y
]



+












β


(

1
-
α

)





P


[
x
]




[

y
+
1

]



+

αβ







P


[

x
+
1

]




[

y
+
1

]











Based on this property, the above disclosed matching function optimization method could be similarly applied to achieve fast high precision match on projected image. The processing flow of the fast high precision projection match is shown in FIG. 5.


As shown in FIG. 5, the input projection profile 500 and the template profile 502 are subject to high precision projection match 504. The high precision projection match 504 can be performed by either interpolating the input project profile 500 or interpolating the template profile 502. The high precision match 504 process optimizes the interpolation parameters by maximizing the projection domain matching function using the same or similar methods as described above. The resulting optimal interpolation parameters are the high precision projection match result 506.


II.6. Robust Matching


In many practical applications the input image could be degraded due to noise, artifact, distortion, missing features, etc. To achieve high precision matching results, robust matching scheme may be required. Two high precision robust matching methods are provided in this invention: limiting pixel contribution and pixel weighting. The speed advantage is applicable to the high precision robust matching methods of this invention.


In one embodiment of the invention, the limiting pixel contribution method limits the contribution of each pixel to the covariance value calculation by the following rule:










COV


(

I
,
J

)


=





1
N






x
,
y











Min


(




I


[
x
]




[
y
]





J


[
x
]




[
y
]



,

C
max


)




-











(


1
N






x
,
y












I


[
x
]




[
y
]




)



(


1
N






x
,
y












J


[
x
]




[
y
]




)










Where Cmax is the maximum allowable cross product value for a pixel.


Based on the new covariance calculation formula, the matching function, Mat(I,J), is updated and the same procedure for high precision parameter estimation applies. Therefore, the speed advantage is preserved.


In another embodiment of the invention, the robust matching is accomplished by weighing pixels with their significance/reliability. Pixels with noise, distortion, etc. are given lower weights for matching.


In this case, the variance and covariance can be calculated by the following rule:










COV


(

I
,
J

)


=





1

W
T







x
,
y













W


[
x
]




[
y
]





I


[
x
]




[
y
]





J


[
x
]




[
y
]





-











(


1

W
T







x
,
y













W


[
x
]




[
y
]





I


[
x
]




[
y
]





)



(


1

W
T







x
,
y









W


[
x
]




[
y
]





J


[
x
]




[
y
]





)















VAR


(
I
)


=





1

W
T







x
,
y













W


[
x
]




[
y
]





I


[
x
]




[
y
]





I


[
x
]




[
y
]





-











(


1

W
T







x
,
y













W


[
x
]




[
y
]





I


[
x
]




[
y
]





)



(


1

W
T







x
,
y









W


[
x
]




[
y
]





I


[
x
]




[
y
]





)










Where the total weight







W
T

=




x
,
y












W


[
x
]




[
y
]







Based on the new variance and covariance calculation formula, the matching function, Mat(I,J), is updated and the same procedure for high precision parameter estimation applies. Therefore, the speed advantage is maintained.


In yet another embodiment of the invention, the limiting pixel contribution and the pixel weighting methods can be combined. The combined covariance calculation formula is as follows:










COV


(

I
,
J

)


=





1

W
T







x
,
y











Min


(




W


[
x
]




[
y
]





I


[
x
]




[
y
]





J


[
x
]




[
y
]



,

C
max


)




-











(


1

W
T







x
,
y













W


[
x
]




[
y
]





I


[
x
]




[
y
]





)



(


1

W
T







x
,
y









W


[
x
]




[
y
]




J


[
x
]















The combined covariance can be used for fast high precision match.


III. Invariant High Precision Match


The invariant high precision match method handles scale and rotation invariant matching and produces sub-pixel position and high precision rotation angle and scale values as matching results. In one embodiment of the invention, the basic formula for the high precision scale and rotation invariant match is described in the following section.


III.1. Matching Function with Scale and Rotation Invariance


In addition to the sub-pixel matching, the scale and rotation invariant matching requires sub-sampling on scale and rotation adjustment. The scale and rotation sampling is nonlinear in regular pixel coordinate. The prior art approach performs nonlinear re-sampling to achieve scale and rotation invariance, which is time consuming and error prone.


Therefore, we perform radial-angular coordinate transformation first. The rotation angle is linear in the radial-angular coordinate. However, the scale factor is still nonlinear in the radial-angular coordinate. This invention performs log-converted radial-angular transformation that is linear in both scale and rotation sampling.


III.2. Log-Converted Radial-Angular Transformation


The log-converted radial-angular coordinate transformation takes advantage of the relationship log(θr)=log θ+log r to the radial-angular coordinate transformed domain. Therefore, the effect of the scale factor is an offset in the log-converted radial-angular coordinate system.


Considering the radial-angular (r, θ) coordinate system, where r denotes radial distance from the center (xc, yc) and θ denotes angle. Any (x,y) point can be represented in radial-angular coordinates (r, θ):






r
=




(

x
-

x
c


)

2

+


(

y
-

y
c


)

2









θ
=


tan

-
1




(


y
-

y
c



x
-

x
c



)






Let ρ=log r, the coordinate transformation between the Cartesian coordinate system and the log-converted radial-angular coordinate system is described by the following formula:

x=exp(ρ)cos θ
y=exp(ρ)sin θ

The area element is

dxdy=exp(2ρ)dρdθ=r2dσdθ.


Let the image Ψ be the weighted transform image of the log-converted radial-angular coordinate as follows:

Ψ[θ][ρ]=exp(ρ)I[θ][ρ].


In the transformed domain, the matching function for images Ψ, Φ can be defined as







Mat


(

Ψ
,
Φ

)


=


COV


(

Ψ
,
Φ

)





VAR


(
Ψ
)




VAR


(
Φ
)










Where









COV


(

Ψ
,
Φ

)


=





1
N






θ
,
ρ













Ψ


[
θ
]




[
ρ
]





Φ


[
θ
]




[
ρ
]





-











(


1
N






θ
,
ρ








Ψ


[
θ
]




[
ρ
]




)



(


1
N






θ
,
ρ








Ψ


[
θ
]




[
ρ
]




)















VAR


(
Ψ
)


=





1
N






θ
,
ρ













Ψ


[
θ
]




[
ρ
]





Φ


[
θ
]




[
ρ
]





-











(


1
N






θ
,
ρ








Ψ


[
θ
]




[
ρ
]




)



(


1
N






θ
,
ρ








Ψ


[
θ
]




[
ρ
]




)










Where






N
=




θ
,
ρ










1.






This matching function bears the same form as the shift invariant matching function. Therefore, the bilinear interpolation or other linear interpolation methods can be used for invariant high precision match.


III.3. Sub-Pixel and Sub-Sampling Shift, Rotation and Scale Invariant Matching


In this invention, sub-pixel and sub-sampling image interpolation are used for high precision shift, rotation and scale invariant matching. In the following we describe the method in two dimensional case. Those skilled in the art should recognize that this method is also applicable to higher dimensional case by adding more interpolation parameters for optimization.


In the two dimensional case, the shift, rotation and scale invariant matching is accomplished by interpolation using four parameters. Two of the parameters, α and β, are interpolation parameters for position shift (translation). The other two parameters, γ and δ, are interpolation parameters for fine rotation and scale values. The quad-linear interpolated images in log-converted radial-angular coordinate system is represented as











Ψ


[
θ
]




[
ρ
]


=




(

1
-
α

)



(

1
-
β

)



{



(

1
-
γ

)



(

1
-
δ

)





Ψ
00



[
θ
]




[
ρ
]



+

γ


(

1
-
δ

)

















Ψ
00



[

θ
+
1

]




[
ρ
]


+


δ


(

1
-
γ

)






Ψ
00



[
θ
]




[

ρ
+
1

]



+

δ





γ







Ψ
00

[

θ
+

α
(

1
-















β
)



{



(

1
-
γ

)



(

1
-
δ

)





Ψ
10



[
θ
]




[
ρ
]



+


γ


(

1
-
δ

)






Ψ
10



[

θ
+
1

]




[
ρ
]



+

δ
(

1
-
















γ
)





Ψ
10



[
θ
]




[

ρ
+
1

]



+

δ








γΨ
10



[

θ
+
1

]




[

ρ
+
1

]




}

+


β


(

1
-
α

)




{

(

1
-














γ
)



(

1
-
δ

)





Ψ
01



[
θ
]




[
ρ
]



+


γ


(

1
-
δ

)






Ψ
01



[

θ
+
1

]




[
ρ
]



+

δ
(

1
-














γ
)





Ψ
01



[
θ
]




[

ρ
+
1

]



+



δγΨ
01



[

θ
+
1

]




[

ρ
+
1

]



}

+

αβ


{


(

1
-
γ

)



(

1
-















δ
)





Ψ
11



[
θ
]




[
ρ
]



+


γ


(

1
-
δ

)






Ψ
11



[

θ
+
1

]




[
ρ
]



+


δ


(

1
-
γ

)






Ψ
11



[
θ
]


[

ρ
+













1
]

+



δγΨ
11



[

θ
+
1

]




[

ρ
+
1

]



}








Where Ψ00[θ][ρ] is the weighted log-converted radial-angular coordinate transformed image of (x0, y0). Ψ10[θ][ρ] is the weighted log-converted radial-angular coordinate transformed image of (x0+1, y0). Ψ01[θ][ρ] is the weighted log-converted radial-angular coordinate transformed image of (x0, y0+1), and Ψ11[θ][ρ] is the weighted log-converted radial-angular coordinate transformed image of (x0+1, y0+1). Rewriting the above equation as








Ψ


[
θ
]




[
ρ
]


=




k
=
1

16





f
k



(

α
,
β
,
γ
,
δ

)






Λ
k



[
θ
]




[
ρ
]









Where

  • f1=(α,β,γ,δ)=(1−α)(1−β)(1−γ), f2(α,β,γ,δ)=(1−α)(1−β)γ(1−δ),
  • f3(α,β,γ,δ)=(1−α)(1−β)(1−δ), f4(α,β,γ,δ)=(1−α)(1−β)γδ,
  • f5(α,β,γ, δ)=α(1−β)(1−γ)(1−δ), f6(α,β,γ,δ)=α(1−β)γ(1−δ),
  • f7(α,β,γ,δ)=α(1−β)(1−γ)δ, f8(α,β,γ,δ)=α(1−α)βγ(1−δ),
  • f9(α,β,γ,δ)=(1−α)β(1−γ)(1−δ), f10(α,β,γ,δ)=(1−α)βγδ,
  • f11(α,β,γ,δ)=(1−α)β(1−γ)δ, f12(α,β,γ,δ)=(1−α)βγδ,
  • f13(α,β,γ,δ)=αβ(1−γ)(1−δ), f14(α,β,γ,δ)=αβγ(1−δ),
  • f15(α,β,γ,δ)=αβ(1−γ)δ, and f16(α,β,γ,δ)=αβγδ.


    Also,
  • Λ1[θ][ρ]=Ψ00[θ][ρ], Λ2[θ][ρ]=Ψ00[θ+1][ρ],
  • Λ3[θ][ρ]=Ψ00[θ][ρ+1], Λ4[θ][ρ]=Ψ00[θ+1][ρ+1],
  • Λ5[θ][ρ]=Ψ10[θ][ρ], Λ6[θ][ρ]=Ψ10[θ+1][ρ],
  • Λ7[θ][ρ]=Ψ10[θ][ρ+1], Λ8[θ][ρ]=Ψ10[θ+1][ρ+1],
  • Λ9[θ][ρ]=Ψ01[θ][ρ], Λ10[θ][ρ]=Ψ01[θ+1][ρ],
  • Λ11[θ][ρ]=Ψ01[θ][ρ+1], Λ12[θ][ρ]=Ψ01[θ+1][ρ+1],
  • Λ13[θ][ρ]=Ψ11[θ][ρ], Λ14[θ][ρ]=Ψ11,[θ+1][ρ],
  • Λ15[θ][ρ]=Ψ11[θ][ρ+1], and Λ16[θ][ρ]=Ψ11[θ+1][ρ+1].


The covariance of Ψ, Φ is therefore







COV


(

Ψ
,
Φ

)


=




k
=
1

16





f
k



(

α
,
β
,
γ
,
δ

)




COV


(


Λ
k

,
Φ

)









and the variance of Ψ is










VAR


(
Ψ
)


=







k
=
1

16





[


f
k



(

α
,
β
,
γ
,
δ

)


]

2



VAR


(

Λ
k

)




+










2





k
>
m

16





f
k



(

α
,
β
,
γ
,
δ

)





f
m



(

α
,
β
,
γ
,
δ

)




COV


(


Λ
k

,

Λ
m


)












The matching score between Ψ, Φ as a function of the high precision interpolation parameters is







Mat


(

Ψ
,

Φ
;
α

,
β
,
γ
,
δ

)


=


COV


(

Ψ
,
Φ

)





VAR


(
Ψ
)




VAR


(
Φ
)









The best subpixel and subsampling matching can be determined by finding parameters α, β, γ, δ and a that correspond to the maximum value of the MatΨ(Φ;α,β,γ,δ). The parameters are the invariant high precision match result. This is an optimization problem similar to the above non-invariant high precision match. Many optimization methods can be used for determining the four parameters. Typical methods include random optimization (RO), bi-directional RO (BRO), improved BRO (IBRO), gradient method, alternative gradient method, and golden section method, etc.


In one embodiment of the invention, the method to find α, β, γ, and δ is described as follows.


Rewriting the COV(Ψ,Φ) and VAR(Ψ) as

COV(Ψ,Φ)={right arrow over (u)}T{right arrow over (f)}
and
VAR(Ψ)=fTΩ{right arrow over (f)}

where {right arrow over (f)}=[f1, f2, f16]T, {right arrow over (u)}=[COV(Λ1,Φ), COV(Λ2,Φ), . . . , COV(Λ16,Φ)]T, and










Ω
=












[




COV


(


Λ
1

,

Λ
1


)





COV


(


Λ
1

,

Λ
2


)








COV


(


Λ
1

,

Λ
16


)







COV


(


Λ
2

,

Λ
1


)





COV


(


Λ
2

,

Λ
2


)








COV


(


Λ
2

,

Λ
16


)





















COV


(


Λ
16

,

Λ
1


)





COV


(


Λ
16

,

Λ
2


)








COV


(


Λ
16

,

Λ
16


)





]








Given β, γ, and δ, the value a for the optimum matching function is






α
=

-




(



u


T




g


α


)



(



g


α
T


Ω







f


α


)


-


(



u


T




f


α


)



(



g


α
T


Ω







g


α


)






(



u


T




g


α


)



(



f


α
T


Ω







f


α


)


-


(



u


T




f


α


)



(



g


α
T


Ω







f


α


)









Similarly, for given α, γ and δ, the value β for the optimum matching function is






β
=

-




(



u


T




g


β


)



(



g


β
T


Ω







f


β


)


-


(



u


T




f


β


)



(



g


β
T


Ω







g


β


)






(



u


T




g


β


)



(



f


β
T


Ω







f


β


)


-


(



u


T




f


β


)



(



g


β
T


Ω







f


β


)









For given α, β, and γ, the value δ for the optimum matching function is






γ
=

-




(



u


T




g


γ


)



(



g


γ
T


Ω







f


γ


)


-


(



u


T




f


γ


)



(



g


γ
T


Ω







g


γ


)






(



u


T




g


γ


)



(



f


γ
T


Ω







f


γ


)


-


(



u


T




f


γ


)



(



g


γ
T


Ω







f


γ


)









For given α, β, and γ, the value δ for the optimum matching function is






δ
=

-




(



u


T




g


δ


)



(



g


δ
T


Ω







f


δ


)


-


(



u


T




f


δ


)



(



g


δ
T


Ω







g


δ


)






(



u


T




g


δ


)



(



f


δ
T


Ω







f


δ


)


-


(



u


T




f


δ


)



(



g


δ
T


Ω







f


δ


)










Where








f


α

=

[





-

(

1
-
β

)




(

1
-
γ

)



(

1
-
δ

)








-

(

1
-
β

)




γ


(

1
-
δ

)









-

(

1
-
β

)




(

1
-
γ

)


δ







-

(

1
-
β

)



γδ







(

1
-
β

)



(

1
-
γ

)



(

1
-
δ

)








(

1
-
β

)



γ


(

1
-
δ

)









(

1
-
β

)



(

1
-
γ

)


δ







(

1
-
β

)


γδ







-

β


(

1
-
γ

)





(

1
-
δ

)







-

βγ


(

1
-
δ

)









-

β


(

1
-
γ

)




δ






-
βγδ







β


(

1
-
γ

)




(

1
-
δ

)







βγ


(

1
-
δ

)








β


(

1
-
γ

)



δ





βγδ



]


,







g


α

=

[





(

1
-
β

)



(

1
-
γ

)



(

1
-
δ

)








(

1
-
β

)



γ


(

1
-
δ

)









(

1
-
β

)



(

1
-
γ

)


δ







(

1
-
β

)


γδ





0




0




0




0






β


(

1
-
γ

)




(

1
-
δ

)







βγ


(

1
-
δ

)








β


(

1
-
γ

)



δ





βγδ




0




0




0




0



]











f


β

=

[





-

(

1
-
α

)




(

1
-
γ

)



(

1
-
δ

)








-

(

1
-
α

)




γ


(

1
-
δ

)









-

(

1
-
α

)




(

1
-
γ

)


δ







-

(

1
-
α

)



γδ







-

α


(

1
-
γ

)





(

1
-
δ

)







-

αγ


(

1
-
δ

)









-

α


(

1
-
γ

)




δ






-
αγδ







(

1
-
α

)



(

1
-
γ

)



(

1
-
δ

)








(

1
-
α

)



γ


(

1
-
δ

)









(

1
-
α

)



(

1
-
γ

)


δ







(

1
-
α

)


γδ







α


(

1
-
γ

)




(

1
-
δ

)







αγ


(

1
-
δ

)








α


(

1
-
γ

)



δ





αγδ



]


,







g


β

=

[





(

1
-
α

)



(

1
-
γ

)



(

1
-
δ

)








(

1
-
α

)



γ


(

1
-
δ

)









(

1
-
α

)



(

1
-
γ

)


δ







(

1
-
α

)


γδ







α


(

1
-
γ

)




(

1
-
δ

)







αγ


(

1
-
δ

)








α


(

1
-
γ

)



δ





αγδ




0




0




0




0




0




0




0




0



]











f


γ

=

[





-

(

1
-
α

)




(

1
-
β

)



(

1
-
δ

)








(

1
-
α

)



(

1
-
β

)



(

1
-
δ

)








-

(

1
-
α

)




(

1
-
β

)


δ







(

1
-
α

)



(

1
-
β

)


δ







-

α


(

1
-
β

)





(

1
-
δ

)








α


(

1
-
β

)




γ


(

1
-
δ

)









-

α


(

1
-
β

)




δ







α


(

1
-
β

)



δ







-

(

1
-
α

)




β


(

1
-
δ

)









(

1
-
α

)



β


(

1
-
δ

)









-

(

1
-
α

)



βδ







(

1
-
α

)


βδ






-

αβ


(

1
-
δ

)








αβ


(

1
-
δ

)







-
αβδ





αβδ



]


,







g


γ

=

[





(

1
-
α

)



(

1
-
β

)



(

1
-
δ

)






0






(

1
-
α

)



(

1
-
β

)


δ





0






α


(

1
-
β

)




(

1
-
δ

)






0






α


(

1
-
β

)



δ





0






(

1
-
α

)



β


(

1
-
δ

)







0






(

1
-
α

)


βδ





0





αβ


(

1
-
δ

)






0




αβδ




0



]











f


δ

=

[





-

(

1
-
α

)




(

1
-
β

)



(

1
-
γ

)








-

(

1
-
α

)




(

1
-
β

)


γ







(

1
-
α

)



(

1
-
β

)



(

1
-
γ

)








(

1
-
α

)



(

1
-
β

)


γ







-

α


(

1
-
β

)





(

1
-
γ

)








-

α


(

1
-
β

)




γ







α


(

1
-
β

)




(

1
-
γ

)








α


(

1
-
β

)



γ







-

(

1
-
α

)




β


(

1
-
γ

)









-

(

1
-
α

)



βγ







(

1
-
α

)



β


(

1
-
γ

)









(

1
-
α

)


βγ






-

αβ


(

1
-
γ

)








-
αβγ






αβ


(

1
-
γ

)






αβγ



]


,







g


δ

=

[





(

1
-
α

)



(

1
-
β

)



(

1
-
γ

)








(

1
-
α

)



(

1
-
β

)


γ





0




0






α


(

1
-
β

)




(

1
-
γ

)








α


(

1
-
β

)



γ





0




0






(

1
-
α

)



β


(

1
-
γ

)









(

1
-
α

)


βγ





0




0





αβ


(

1
-
γ

)






αβγ




0




0



]






In one embodiment of the invention, the matching function maximization method that finds α, β, γ, and δ is performed by an iterative procedure as shown in FIG. 6.


As shown in FIG. 6, the α, β, γ, and δ values are initialized 600 to initial values. The values could be randomly selected between the valid ranges or could be set to the middle of ranges or to expected values from initial search, etc. Using the initial parameters values, {right arrow over (f)}α and {right arrow over (g)}α are calculated 602. This allows the calculation of the best a value given the α, γ, and δ values 604. The best α value is used along with the initial γ and δ values to calculate the {right arrow over (f)}β and {right arrow over (g)}β values 606. This allows the calculation of the best β value given α, γ, and δ values 608. This process continues to calculate the best γ and δ values, 616, 614, 612, 610. The calculated α, β, γ, and δ values 620 are used to repeat the estimation calculation. This process is iterated until the α, β, γ, and δ values are stable (having little change per iteration) or an exit condition such as the maximum number of iterations is reached. The resulting α, β, γ, and a values are the optimal subpixel and subsampling values.


Those skilled in the art should recognize that other methods of optimization could be applied to determine the optimal subpixel and subsampling values.


When Ψ is the template image and the Φ is the input image, the terms in VAR(Ψ) can be pre-calculated from the template. Only the terms of COV(Ψ,Φ) have to be calculated for each input image regions of interest. This will speed up the invariant high precision match process.


III.3. Robust Matching


The robust matching method described in section II.6 for non-invariant high precision match can be similarly applied for invariant high precision match. The robust matching methods include limiting pixel contribution and pixel weighting.


The invention has been described herein in considerable detail in order to comply with the Patent Statutes and to provide those skilled in the art with the information needed to apply the novel principles and to construct and use such specialized components as are required. However, it is to be understood that the inventions can be carried out by specifically different equipment and devices, and that various modifications, both as to the equipment details and operating procedures, can be accomplished without departing from the scope of the invention itself.

Claims
  • 1. A fast high precision matching method comprising the steps of: a) Input an image;b) Input a template;c) Perform initial search using the input image and the template based on a matching function to create an initial search result output containing only matching function values at discrete (x,y) positions;d) Create high precision matching function by interpolating the matching function values of discrete (x,y) positions making them matching function values of subpixel positions or of invariant high precision parameters;e) Perform high precision match by high precision matching function maximization directly using the matching function values at discrete (x,y) positions from the step (c), the input image, and the same template from step (b) to create a high precision match result output without image matching wherein the high precision match result output around a pixel position (x,y) is the subpixel values α and β and other parameters correspond to the maximum value of the high precision matching function.
  • 2. The method of claim 1 wherein the matching function maximization for the subpixel values or invariant high precision parameters is performed using optimization methods.
  • 3. A fast high precision matching method comprising the steps of: a) Input an image;b) Input a template containing pre-calculated template variance parameters;c) Perform initial search using the input image and the template based on a matching function to create an initial search result output containing only matching function values at discrete (x,y) position;d) Create high precision matching function by interpolating the matching function values of discrete (x,y) positions making them matching function values of subpixel positions of invariant high precision parameters;e) Perform high precision match by high precision matching function maximization directly using the matching function values at discrete (x,y) positions from step (c), the input image, and the same template from step (b) to create a high precision match result output without image matching wherein the high precision match result output around a pixel position (x,y) is the subpixel values α and β and other parameters correspond to the maximum value of the high precision matching function.
  • 4. A fast high precision projection matching method comprising the steps of: a) Input a projection profile;b) Input a template profile;c) Create high precision matching function by interpolating matching function values at discrete (x,y) positions and samples parameters making them matching function values of subpixel positions or of subsampling parameters;d) Perform high precision match by high precision matching function maximization using the projection profile, the same template profile from step (b) to create a high precision projection match result output Perform high precision match by high precision matching function maximization directly using the matching function values at discrete (x,y) positions from step (c), the input image, and the same template from step (b) to create a high precision match result output without image matching wherein the high precision match result output around a pixel position (x,y) is the subpixel values α and β and other parameters correspond to the maximum value of the high precision matching function.
  • 5. A fast invariant high precision matching method comprising the steps of: a) Input an image;b) Input a template;c) Perform initial search using the input image and the template based on a matching function to create an initial search result output containing only matching function values at discrete (x,y) position;d) Create high precision matching function by interpolating the matching function values of discrete (x,y) positions making them matching function values of subpixel positions or of invariant high precision parameters;e) Perform invariant high precision match by high precision matching function maximization directly using the matching function values at discrete (x,y) positions from step (c), the input image, and the same template from step (b) to create an invariant high precision match result output without image matching wherein the high precision match result output around a pixel position (x,y) is the subpixel values α and β and other parameters correspond to the maximum value of the high precision matching function.
  • 6. The method of claim 5 wherein interpolating the matching function includes log-converted radial-angular transformation and linear interpolation.
US Referenced Citations (19)
Number Name Date Kind
4567610 McConnell Jan 1986 A
4972499 Kurosawa Nov 1990 A
5982912 Fukui et al. Nov 1999 A
6088483 Nakano et al. Jul 2000 A
6272247 Manickam et al. Aug 2001 B1
6603882 Oh et al. Aug 2003 B2
6640008 Lee et al. Oct 2003 B1
6789925 DeGregorio Sep 2004 B1
6798925 Wagman Sep 2004 B1
6859550 Oh et al. Feb 2005 B2
6944331 Schmidt et al. Sep 2005 B2
7039229 Lin et al. May 2006 B2
7054492 Lee et al. May 2006 B2
7110603 Lee et al. Sep 2006 B2
7139764 Lee Nov 2006 B2
7142718 Lee et al. Nov 2006 B2
7164796 Silver et al. Jan 2007 B1
20030086616 Oh et al. May 2003 A1
20060147105 Lee et al. Jul 2006 A1
Related Publications (1)
Number Date Country
20050114332 A1 May 2005 US