0% found this document useful (0 votes)
23 views

A New Method For Image Matching

Uploaded by

Penny Sheldon
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

A New Method For Image Matching

Uploaded by

Penny Sheldon
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

2012 19th International Conference on Mechatronics and Machine Vision in Practice (M2VIP), 28-30th Nov 2012, Auckland, New-Zealand

A New Method for Image Matching

Fang Chen* Jinfei Shi


School of Mechanical Engineering School of Mechanical Engineering
Southeast University Nanjing Institute of Technology
Nanjing, China Nanjing, China
[email protected] [email protected]
Cunji Zhang Ping Chen
School of Mechanical Engineering School of Mechanical Engineering
Southeast University Southeast University
Nanjing, China Nanjing, China
[email protected] [email protected]

Abstract—To achieve accurate measurements of large scale much more efficient when there are features on machine parts.
machine parts with machine vision techniques, a mosaic method It normally has very high match speed. However, the match
for image sequences is selected. And the key technique of mosaic precision of it is not as high as that of the normalized cross
is image matching, which mainly affects measure speed and correlation (NCC) algorithm. When machine parts have no
precision. This paper aims at improving measure speed. The feature, the method is of no use. The other two methods will
proposed method bases on a straight profile. It mainly consists of come into play. The method based on transform processing
two stages: One is adjusting image sequences to the same often has a higher anti-noise effect. But it consumes much time
direction of coordinate axis to eliminate rotating deviation. It is and is limited on product line of industrial applications. Then
realized by searching the straight profile with chain code. The
the third method based on gray value is selected. One classic
other is sequences matching to eliminate shifting deviation. The
algorithm of them is the NCC. It owns higher precision and
new algorithm focuses on the eliminating shifting deviation. It
makes good use of differences of nearest neighbor gray values.
speed among methods based on template matching of image
Two templates are taken separately from two neighbor gray values. It is a good selection if machine parts have no
sequences. Those templates complete matching by the minimum feature. In fact this happens often in image mosaic.
value of the sum of adjacent-pixel-difference. In experiments, the In our recent previous work, to measure large scale parts
new method is contrasted with the classical algorithm of the we proposed a novel algorithm for image mosaic [5] using
normalized cross correlation method. Experimental result parts surface linear texture. The algorithm shows the great
demonstrates that the proposed algorithm is more effective than
advantages of speed in image matching. But there are two
the NCC for image mosaic.
main factors limiting its applicaton. One is there are linear
Keywords—machine vision; image sequences; image matching; textures on parts surface and these linear textures are on one
straight profile; template direction. The other is the algorithm detecting the direction of
linear texture has not been demonstrated high reliability. Then
in this paper we proposed another algorithm of image
I. INTRODUCTION matching to large scale parts without features. The new
An important application of machine vision is measuring algorithm based on the correlation of nearest neighboring gray
the size of machine parts accurately and efficiently. Some values. Abundant experiments prove that it almost has the
effective methods for microstructure or small scale parts have same precision as the NCC while it takes less time than the
been developed [1]-[3]. However, those methods cannot be NCC.
applied to a general or large scale parts due to the limited
range of a single image. An alternative method is enlarging the The rest of this paper is structured as follows: Eliminating
range of the image by reducing the inspection resolution. rotating deviation is described in brief in Section II. In Section
However a low inspection resolution will cause a poor III, eliminating shifting deviation is represented in detail.
precision of measurement. To solve that issue, mosaic Section IV states the process of experiments and the result of
technique of image sequences is developed [4]. At present, it is those experiments. Section V draws a conclusion.
the main way to obtain dimensions of large scale machine
parts with machine vision. II. ELIMINATE ROTATING DEVIATION
Obviously, image matching technique is the key of mosaic Chain code searching method is first proposed by Freeman.
in measuring large scale machine parts. There are generally The idea is used in a more compelling way [6] and briefly
three kinds of match methods used in the mosaic of image explained as follows: After the usual image processing [7],
sequences. They separately base on features, gray values and including image filter, image division and edge detection,
transform processing. The method based on characteristics is chain code searching method only follows track in one
direction because of the known straight profile. The number of

* Corresponding author. School of Mechanical Engineering, Southeast University, Nanjing, Jiangsu, China 211189
Tel. : +86 25 52090529; Fax. : +86 25 52090529
Email address: [email protected]

Copyright
Authorized AUT
licensed use University
limited Auckland,New-Zealand
to: J.R.D. 190
Tata Memorial Library Indian Institute of Science Bengaluru. Downloaded on April 11,2022 at 15:01:19 UTC from IEEE Xplore. Restrictions apply.
the chain code along coordinate axis is just the cotangent in two tables. Therefore, comparing the gray value of the two
principle. Then the rotating angle can be gained by inverse templates directly will generate low match probability. The
cotangent and the rotating deviation is eliminated. The detailed new algorithm compares the nearest neighbor gray values. The
process is described in [6]. gray value of rear column subtracts that of front column and
the result is recorded to form a new table. Then Tab. Ⅰ and
III. ELIMINATE TRANSLATION DEVIATION Tab. Ⅱ are operated to produce Tab. III and Tab. IV
To introduce the principle of eliminating shifting deviation, separately.
two of rotated sequences of machine parts with overlap are
shown in Fig. 1. Template A and template B are selected TABLE III. RESULTS OF TABLE Ⅰ
separately from the overlapping region.
-2 0 1 1 8 5 2 -1 0 1
-3 1 1 1 5 6 2 0 1 3
-4 1 -1 1 5 7 3 0 -1 2
1 1 -2 1 5 6 1 0 0 0
0 0 -4 0 6 3 -1 -1 2 -1
0 0 -4 0 6 2 -3 0 0 1
2 1 -5 -3 5 0 -2 1 -1 1
2 1 -5 -1 3 -2 -1 0 -1 1
3 -1 -3 -1 3 -1 1 -1 -4 4
Template Template 1 -3 -4 1 3 -1 2 1 -5 6
B A
TABLE IV. RESULTS OF TABLE Ⅱ
Figure 1. Two Templates taken from the rotated sequences
2 1 1 1 -3 -1 1 2 2 0
Suppose Template A is a 40×40 matrix and Template B is
1 1 2 2 -2 -3 2 2 1 -2
a 20×20 matrix. Tab. Ⅰand Tab. Ⅱ show parts of the gray
1 -1 0 3 -1 -3 4 3 -1 -2
values of Template A and Template B respectively.
1 0 -3 -1 0 2 3 1 0 -2
2 -1 -1 0 0 1 2 -1 1 -2
TABLE I. PART GRAY VALUES OF TEMPLATE A 0 -1 2 3 -3 -1 1 0 -1 0
58 56 56 57 58 66 71 73 72 72 -2 0 2 1 -4 -2 2 3 0 0
58 55 56 57 58 63 69 71 71 72 -1 -1 1 -1 -1 -1 3 2 0 1
59 55 56 55 56 61 68 71 71 70 3 -2 0 1 -1 -1 3 0 1 -1
2 -1 1 2 0 0 -1 0 2 0
59 60 61 59 60 65 71 72 72 72
70 70 70 66 66 72 75 74 73 75
72 72 72 68 68 74 76 73 73 73 Tab. Ⅰ, Tab. Ⅱ, Tab. III and Tab. IV also form to four
73 75 76 71 68 73 73 71 72 71 corresponding matrixes, matrix A, matrix B, matrix C and
matrix D.
74 76 77 72 71 74 72 71 71 70
75 78 77 74 73 76 75 76 75 71 Take out matrix E which is the same size as matrix D from
76 77 74 70 71 74 73 75 76 71 matrix C successively by circulation scanning from the first
value to the last. And matrix F is as follows:
TABLE II. PART GRAY VALUES OF TEMPLATE B Define
95 97 98 99 100 97 96 97 99 101
Fi , j = Ei , j − D (1)
94 95 96 98 100 98 95 97 99 100
95 96 95 95 98 97 94 98 101 100
i = 1,2" 21 , j = 1,2" 21 .
97 98 98 95 94 94 96 99 100 100
96 98 97 96 96 96 97 99 98 99
Define the element of matrix Fi , j is ami , ,jn .
97 97 96 98 101 98 97 98 98 97
99 97 97 99 100 96 94 96 99 99 (1 ≤ m ≤ 20, 1 ≤ n ≤ 19)
99 98 97 98 97 96 95 98 100 100
20 19
97 100 98 98 99 98 97 100 100 101
Calculate Si , j = ∑∑ ami , ,jn . (2)
96 98 97 98 100 100 100 99 99 101 m =1 n =1

The gray values of Template A and Template B are Find the minimum Si , j . It is the optimum matching
generally different in the overlapping area because of unstable position. The workflow of the algorithm is showed as follows
measure environment. And it can be seen easily from above (Fig.2):

191
Authorized licensed use limited to: J.R.D. Tata Memorial Library Indian Institute of Science Bengaluru. Downloaded on April 11,2022 at 15:01:19 UTC from IEEE Xplore. Restrictions apply.
Firstly, MV-D1024-28-CL-10 CMOS camera made by
Photonfocus company was chosen. And the image acquisition
card was X64-CL iPro made by Canada CORECO company.
The experiment was running on a computer with 1 GB
memory and Intel ® Core ™ 2 Duo CPU T6670 @ 2.20 GHz
processor.
Secondly, to observe easily and directly, steel rulers were
selected as experimental objects for their marks and a series of
standard gauge blocks were also choosed, which were easy to
be calibrated and be tested results.
Thirdly, red LED was the light source. The camera was
sensitive to it.
Finally, adjustable conveyor provided the possibility to
acquire image sequences.
Then the LED, the camera, the ruler or the standard gauge
block and the conveyor were adjusted to gain high quality
image sequences. Fig. 4 showed one group of image sequences.

(1) Sequence1 (2) Sequence 2

Figure 2. A flow chart of the algorithm

IV. EXPERIMENTS AND RESULTS


To evaluate the effectiveness of the new method, we
installed a set of easy-operate equipment and performed (3) Sequence 3 (4) Sequence 4
abundance experiments on machine parts with it. The
computer measurement equipment mainly included camera,
lighting, machine parts and conveyor, as seen in Fig. 3.

(5) Sequence 5 (6) Sequence 6

Figure 3. Computer measurement equipment (7) Sequence 7 (8) Sequence 8

192
Authorized licensed use limited to: J.R.D. Tata Memorial Library Indian Institute of Science Bengaluru. Downloaded on April 11,2022 at 15:01:19 UTC from IEEE Xplore. Restrictions apply.
TABLE V. PART RESULTS OF EXPERIMENTS
Size Fr NCC New algorithm
(mm) am Results Error Time Results Error Time
es (mm) (%) (s) (mm) (%) (s)
328 11 327.421 0.177 1.23 328.023 0.007 0.71
533 18 534.947 0.365 2.02 530.748 0.423 1.17
1033 35 1037.375 0.424 3.93 1036.423 0.331 2.27

(9) Sequence 9 (10) Sequence 10 The size of these two templates is vital to match probability,
match speed and match precision. The more sequences a large
scale machine part owns, the more time is saved by the new
algorithm. Moreover, under the same conditions, the higher the
precision requires, the more sequences with overlap a machine
part owns. Therefore, to a large scale machine part which
usually owns abundance sequences, the new method shows
much more superiority than the NCC method.

V. CONCLUSION
(11) Sequence 11
The algorithm provides a new way in image matching. It is
Figure 4. Image sequences of a ruler well used in matching images of machine parts without
features. It owns both high speed and high precision.
Compared to the conventional NCC method, the new
In the process of filming, the camera including its lens was
algorithm has higher match speed and keeps the same
fixed and only the ruler moved with the conveyor. Then object
precision. It is feasible in measuring large scale machine parts.
distance, focal distance remained unchanged. Therefore, the
distortion of zoom in and zoom out was omitted. The rotating
deviation and shifting deviation were main problems of ACKNOWLEDGMENT
sequences mosaic. After all sequences were preprocessed and The research is supported in part by the National Natural
rotated to coordinate axis, templates were chosen from Science Foundation of China (Grant No. 50805023), the
sequences to eliminate shifting deviation by above algorithm. Natural Science Foundation of Jiangsu Province (Grant No.
To observe easily and directly, we selected three BK2011608), Science and Technology Support Plan
panoramagrams matched by above algorithm to show in Fig. 5. Foundation of Jiangsu (Grant No. BE2008081) and “Six
Talents Peak” Foundation of Jiangsu (Grant No. 2008144).

REFERENCES
(a) a ruler marked 300 mm
[1] H. S. Yoon and S. C. Chung, “Vision inspection of micro-drilling
processes on the machine tool,” Transactions of the North American
Manufacturing Research Institute of SME, vol. 32, pp. 391-398, 2004.
[2] Y. J. Kwon, T. L. Tseng, and Y. Ertekin, “Characterization of
closedloop measurement accuracy in precision CNC milling,” Robotics
(b) a ruler marked 500 mm
and Computer-Integrated Manufacturing, vol. 22, no. 4, pp. 288-
296,2006.
[3] Q. He, L. Wang, Q. Liu, and G. Li, “Precision measurement for small
size parts based on support vector regression,” Optics and Precision
Engineering, vol. 15, no. 4, pp. 557-563, 2007.
(c) a ruler marked 1000 mm [4] X. Wang and Z. Zhao, “High-precision image mosaic method in big
frame measurement [C].” 1st International Symposium on Systems and
Figure 5. panoramagrams of rulers Control in Aerospace and Astronautics,” Piscataway, United States:
Institute of Electrical and Electronics Engineers Computer Society, pp.
Meanwhile all sequences were matched by the traditional 203-207, 2006.
NCC to compare the computing time and measurement [5] Fang Chen, Yifang Zhou , Binwen Zhao, Song Pan, Jinfei Shi, “A novel
precision. Tab. V showed results of above three parts with algorithm for image mosaic using linear texture match [C].” The Tenth
International Conference on Electronic Measurement & Instruments,
these two methods. All prepared parts including rulers and IEEE Press, vol. Ⅲ,119-122, ICEMI 2011
blocks were tested and experimental results showed that the
[6] Chen Fang, Chen Kai, Zhao Binwen, Shi Jinfei “A novel method of
time the new algorithm spent was no more than 60% of that eliminating rotation deviation of sequential images mosaic of parts with
NCC spent. And the precision of new algorithm was almost a linear profile,” Unpublished.
the same as the NCC. Then it provided a new way in template [7] Milan Sonka,Vaclav Hlavac,Roger Boyle. “Image Processing,analysis,
matching and it obtained a good result in measuring large scale and machine vision,” Tsinghua University Press, pp. 79–128, 2011
machine parts.

193
Authorized licensed use limited to: J.R.D. Tata Memorial Library Indian Institute of Science Bengaluru. Downloaded on April 11,2022 at 15:01:19 UTC from IEEE Xplore. Restrictions apply.

You might also like