CN103971119A - RGB vector matching fast recognition method in surface mounting equipment - Google Patents

RGB vector matching fast recognition method in surface mounting equipment Download PDF

Info

Publication number
CN103971119A
CN103971119A CN201410117675.4A CN201410117675A CN103971119A CN 103971119 A CN103971119 A CN 103971119A CN 201410117675 A CN201410117675 A CN 201410117675A CN 103971119 A CN103971119 A CN 103971119A
Authority
CN
China
Prior art keywords
image
identified
template image
template
eta
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410117675.4A
Other languages
Chinese (zh)
Inventor
杜娟
胡跃明
冯颖
戚其丰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN201410117675.4A priority Critical patent/CN103971119A/en
Publication of CN103971119A publication Critical patent/CN103971119A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a RGB vector matching fast recognition method in surface mounting equipment. The method includes: determining a to-be-recognized image and a template image, respectively calculating the energy functions of the template image and the to-be-recognized image and two images after prolongation, acquiring the quaternion correlation functions of the images after prolongation, and performing Fourier transformation to determine whether the to-be-recognized image is matched with the template image or not. The method has the advantages that the Fourier transformation is introduced to perform image processing, calculation speed of direct quaternion correlation is increased evidently, and speed and accuracy for recognizing color images are increased at the same time.

Description

One RGB vector matching method for quickly identifying in surface-mounting equipment
Technical field
The present invention relates to the image processing field in surface-mounting equipment, be specifically related to one RGB vector matching method for quickly identifying in surface-mounting equipment.
Background technology
Manufacture in series equipment at precise electronic, surface-mounting equipment is for PCB is carried out to the equipment that components and parts mount.PCB defect has a variety of, comprises that Solder-Paste Printing defect, components and parts are placed with defect and weld defects etc.Wherein components and parts are placed with defect, for example less part, wrong part, components and parts polarity are anti-etc., only relate to two-dimensional signal, and these defects show obviously on gray level image, by adopting the template matches based on gray level image just can detect easily, but the coplanarity defect in weld defects, relates to three-dimensional information, on gray level image, almost do not reflect.Solder joint detects except space required information judges its size, also needs three-dimensional depth information could judge the height of solder joint, therefore on the gray level image that can only pass on two-dimensional signal, can not reflect the difference of fine or not solder joint.
For above-mentioned PCB coplanarity defect and the difficult problem detecting of welding point defect, main two kinds of methods solutions, the algorithm (single-lens color light source stereoscopic vision) of the algorithm of the gray level image of taking based on monochromatic source tilting camera and the single lens coloured image based on particular architectures light source of adopting at present.
Monochromatic source tilting camera observed pattern is the same with manual optical observation method therefor, can become with level 45 degree observation printed circuit boards, and coplanarity defect identifiability improves greatly.But use tilting camera need to there is the knowledge of calibration and the supplementary aspect of gray scale.If system is only equipped a tilting camera, system itself may not just necessarily need to have the ability that continues monitoring calibration, because phase function is carried out self-calibrating within the specific limits.But for combination camera system, software must make to keep calibration balance between camera, monitors it and is no more than the basic calibration limit simultaneously.The observation of tilting camera also needs the distortion that compensates printed circuit board to subside in addition, and than rectilinear camera observed pattern, the observation of tilting camera must solve the ultimate challenge that software field runs into, because it has increased the function (at least four principal direction) of distinguishing different observation angles, therefore have higher requirement to software development, programme more complicated, data computation requirement is higher.
The image that single-lens color light source stereo visual system obtains, has increased chrominance information, and by adopting blue, red, green three-color light source framework, captured two dimensional image has been passed on three-dimensional information, has met the requirement that PCB solder joint detects.In addition, coloured image more can reflect actual human eye vision, and along with the increase of computer capacity, the raising at full speed of processing speed, the speed issue that before hinders the algorithm development based on coloured image does not exist, therefore people have started to pay close attention to and the algorithm of research based on coloured image, and have been used to more and more various fields.
Adopt the recognizer based on coloured image, could realize better the detection to defects such as PCB solder joint, coplanarities.The conventional algorithm based on coloured image, is all that the color characteristic of the rgb color space based on image mates image at present.They regard the image of each color space of coloured image as a gray level image, and respectively every one-dimensional space are processed, and obtain a testing result I of every one-dimensional space r(x, y), I g(x, y), I b(x, y), then account for the ratio of whole image pixel value summation according to the pixel value of every kind of color, i.e. color component weight coefficient K r, K g, K b, synthesize last result,
I′(x,y)=K R×I R(x,y)+K G×I G(x,y)+K B×I B(x,y). (1)
The method has been destroyed the relation between the each color of coloured image originally, and the selection of weight system directly affects matching result, and the calculating of every one-dimensional space all can introduce error, so even can cause the mistake of last recognition result.
Summary of the invention
The shortcoming and deficiency that exist in order to overcome prior art, the invention provides one RGB vector matching method for quickly identifying in surface-mounting equipment.
The present invention adopts following technical scheme:
One RGB vector matching method for quickly identifying in surface-mounting equipment, comprises the steps:
S1 obtains image h to be identified (τ, η), determines template image f (τ, η), and wherein image size to be identified is P × Q, and template size is M × N;
f(τ,η)=f R(τ,η)i+f G(τ,η)j+f B(τ,η)k,h(τ,η)=h R(τ,η)i+h G(τ,η)j+h B(τ,η)k;
S2 calculation template image energy function E f,
S3 calculates the energy function E of image to be identified h(m, n), wherein 0≤m<P-M+1,0≤n<Q-N+1;
S4 calculates two width image f after continuation e(τ, η) and h e(τ, η), is specially:
S4.1 determines that image to be identified and template image have identical cycle D at the same period C of x direction and in y direction, and C and D meet:
C &GreaterEqual; M + P - 1 D &GreaterEqual; N + Q - 1 ;
M, n, τ, η is the coordinate function of choosing arbitrarily in image;
S4.2 expansion f (τ, η) and h (τ, η) form following periodic sequence
S5 is according to hypercomplex number correlation formula b ( m , n ) = &Sigma; &tau; = 0 M - 1 &Sigma; &eta; = 0 N - 1 f ( &tau; , &eta; ) h ( &tau; - m , &eta; - n ) &OverBar; , Calculate two width image f after continuation e(τ, η) and h ethe hypercomplex number relevance function b (m, n) of (τ, η), and hypercomplex number relevance function is carried out to Fourier transform be embodied as, g ( &tau; , &eta; ) = IQFT ( 3 ) ( F ( q 3 ) ( w , v ) H a ( q 3 ) ( w , v ) &OverBar; - F ( q 3 ) ( - w , - v ) &CenterDot; j H b ( q 3 ) ( - w , - v ) ) ; Wherein IQFT (3)represent the inverse quaternion Fourier transform of the third type;
S6 is by b (m, n), the E of above-mentioned steps gained f, E h(m, n), calculates the hypercomplex number relevance function after normalization g ( m , n ) = b ( m , n ) / ( E f E h ( m , n ) ) ;
S7 judges in image h to be identified (τ, η) whether contain template image f (τ, η), if contained, enters step S8;
S8 selects threshold value C 1, C 2, D 1, described C 1<1<C 2, D 1<1, and C 1, C 2, D 1all close to 1; Judgement | g (m s, n s) | whether meet following formula:
C 1 < | g ( m s , n s ) | < C 2 &rho; = | g r ( m s , n s ) | | g r ( m s , n s ) | + | g i ( m s , n s ) | + | g j ( m s , n s ) | + | g k ( m s , n s ) | > D 1 , If meet, position (m in h be described s, n s) locate to exist one to there is the object of same shape, size, color and brightness with template image,
Wherein, | g (m s, n s) | refer to matching degree, ρ is certificate parameter.
Described C and D are 2 index powers.
In described judgement image h to be identified (τ, η), whether contain template image f (τ, η), if contained, enter step S8; Be specially:
As h (m, n)=f (m-m 0, n-n 0) time,
think in image h to be identified (τ, η) and contain template image f (τ, η);
As h (m, n) ≠ f (m-m 0, n-n 0) time,
think in image h to be identified (τ, η) and do not contain template image f (τ, η).
Beneficial effect of the present invention:
(1) the present invention utilizes the Fourier transform of hypercomplex number correlativity to carry out images match, has accelerated recognition speed, and process is simple, workable;
(2) the present invention effectively detection and location go out the given object of template, detect the defect such as Short Item, distinguish same shape;
(3) the present invention can, the in the situation that of different brightness, by introducing Fourier transform, significantly improve the computing velocity of direct hypercomplex number correlativity.
Brief description of the drawings
Fig. 1 is the image capturing system using in the embodiment of the present invention;
Fig. 2 is workflow diagram of the present invention;
Fig. 3 is that the present invention adopts Fourier transform to carry out the process flow diagram of identification fast.
Embodiment
Below in conjunction with embodiment and accompanying drawing, the present invention is described in further detail, but embodiments of the present invention are not limited to this.
Embodiment
A kind of in surface-mounting equipment RGB vector matching method for quickly identifying, the acquisition system of employing as shown in Figure 1, the components and parts 2 on pcb board 1, at green glow 3, ruddiness 4, the light source of blue light 5 frameworks, gathers image by camera 6.The image that single-lens color light source stereo visual system obtains has increased chrominance information, and by adopting the light source framework shown in Fig. 1, captured two dimensional image has been passed on three-dimensional information, has met the requirement that PCB solder joint detects.
As shown in Figure 2, concrete identification step is:
The picture that S1 takes by acquisition system described in colour TV camera or Fig. 1, as image to be identified, i.e. h (τ, η), calibrate representative CHIP chip image, as template image f (τ, η), wherein image size to be identified is P × Q, and template size is M × N;
f(τ,η)=f R(τ,η)i+f G(τ,η)j+f B(τ,η)k,h(τ,η)=h R(τ,η)i+h G(τ,η)j+h B(τ,η)k;
As shown in Figure 3, S2 calculation template image energy function E f,
Calculate the energy function E of image to be identified h(m, n), wherein 0≤m<P-M+1,0≤n<Q-N+1;
S4 calculates two width image f after continuation e(τ, η) and h e(τ, η), is specially:
S4.1 determines that image to be identified and template image have identical cycle D at the same period C of x direction and in y direction, and C and D are 2 index powers, and C and D meet:
C &GreaterEqual; M + P - 1 D &GreaterEqual; N + Q - 1 ;
M, n, τ, η is the coordinate function of choosing arbitrarily in image;
S4.2 expansion f (τ, η) and h (τ, η) form following periodic sequence
S5 is according to hypercomplex number correlation formula b ( m , n ) = &Sigma; &tau; = 0 M - 1 &Sigma; &eta; = 0 N - 1 f ( &tau; , &eta; ) h ( &tau; - m , &eta; - n ) &OverBar; , Calculate two width image f after continuation e(τ, η) and h ethe hypercomplex number relevance function b (m, n) of (τ, η), and hypercomplex number relevance function is carried out to Fourier transform,
Specifically the Fourier transform formula of hypercomplex number correlativity is,
g ( &tau; , &eta; ) = IQFT ( 3 ) ( F ( q 3 ) ( w , v ) H a ( q 3 ) ( w , v ) &OverBar; - F ( q 3 ) ( - w , - v ) &CenterDot; j H b ( q 3 ) ( - w , - v ) ) ; Use this formula, improved computing velocity.
Wherein IQFT (3)represent the inverse quaternion Fourier transform of the third type, F (w, v) and H (w, v) represent respectively the Fourier transform of f (τ, η) and h (τ, η), and convolution theorem can be expressed as follows by formula:
wherein " * " represents convolution operation.Definition
h(x,y)=h r(x,y)+h i(x,y)i+h j(x,y)j+h k(x,y)k.
S6 is by b (m, n), the E of above-mentioned steps gained f, E h(m, n), calculates the hypercomplex number relevance function after normalization g ( m , n ) = b ( m , n ) / ( E f E h ( m , n ) ) ;
S7 judges in image h to be identified (τ, η) whether contain template image f (τ, η), if contained, enters step S8; Judge in h whether have f, whether have (m 0, n 0), make h (m, n)=f (m-m 0, n-n 0).
Be specially:
As h (m, n)=f (m-m 0, n-n 0) time,
think in image h to be identified (τ, η) and contain template image f (τ, η);
As h (m, n) ≠ f (m-m 0, n-n 0) time,
think in image h to be identified (τ, η) and do not contain template image f (τ, η).
S8 selects threshold value C 1, C 2, D 1, described C 1<1<C 2, D 1<1, and C 1, C 2, D 1all close to 1;
Judgement | g (m s, n s) | whether meet following formula:
C 1 < | g ( m s , n s ) | < C 2 &rho; = | g r ( m s , n s ) | | g r ( m s , n s ) | + | g i ( m s , n s ) | + | g j ( m s , n s ) | + | g k ( m s , n s ) | > D 1 , If meet, position (m in h be described s, n s) locate to exist one to there is the object of same shape, size, color and brightness with template image,
Wherein, | g (m s, n s) | refer to matching degree, ρ is certificate parameter.
The x occurring in above-mentioned formula, y, m, n, τ, η is the corresponding coordinate function of choosing arbitrarily in image to be identified and template image, m 0, n 0, m s, n s, be match point coordinate.
Hypercomplex number is the vector that contains four components, represents the pixel value of coloured image by hypercomplex number, and three components wherein represent respectively R, G, the B component value of a certain pixel location of coloured image, just realizes the bulk treatment of RGB tri-color spaces to coloured image.Utilize known sample template and image to be matched to contrast, from the upper left corner of image to be matched, with going contrast in a region onesize in sample template and image to be matched, obtain its related coefficient, then move to next pixel, repeat same operation, until sample template has contrasted all regions, that piece region of related coefficient maximum is exactly the region that will look for subject image place.The calculating of related coefficient all adopts cross-correlation operation (cross-correlation operation) conventionally.Cross-correlation operation is exactly a kind of convolution algorithm, and the image of sample template and image to be matched corresponding region is carried out convolution operation by it.Hypercomplex number correlativity formula is applied to color image recognition process, and utilizes the Fourier transform of hypercomplex number correlativity to accelerate recognition speed
Above-described embodiment is preferably embodiment of the present invention; but embodiments of the present invention are not limited by the examples; other any do not deviate from change, the modification done under Spirit Essence of the present invention and principle, substitutes, combination, simplify; all should be equivalent substitute mode, within being included in protection scope of the present invention.

Claims (3)

1. a RGB vector matching method for quickly identifying in surface-mounting equipment, is characterized in that, comprises the steps:
S1 obtains image h to be identified (τ, η), determines template image f (τ, η), and wherein image size to be identified is P × Q, and template size is M × N;
f(τ,η)=f R(τ,η)i+f G(τ,η)j+f B(τ,η)k,h(τ,η)=h R(τ,η)i+h G(τ,η)j+h B(τ,η)k;
S2 calculation template image energy function E f,
S3 calculates the energy function E of image to be identified h(m, n), wherein 0≤m<P-M+1,0≤n<Q-N+1;
S4 calculates two width image f after continuation e(τ, η) and h e(τ, η), is specially:
S4.1 determines that image to be identified and template image have identical cycle D at the same period C of x direction and in y direction, and C and D meet:
C &GreaterEqual; M + P - 1 D &GreaterEqual; N + Q - 1 ;
M, n, τ, η is the coordinate function of choosing arbitrarily in image;
S4.2 expansion f (τ, η) and h (τ, η) form following periodic sequence
S5 is according to hypercomplex number correlation formula b ( m , n ) = &Sigma; &tau; = 0 M - 1 &Sigma; &eta; = 0 N - 1 f ( &tau; , &eta; ) h ( &tau; - m , &eta; - n ) &OverBar; , Calculate two width image f after continuation e(τ, η) and h ethe hypercomplex number relevance function b (m, n) of (τ, η), and hypercomplex number relevance function is carried out to Fourier transform be embodied as, g ( &tau; , &eta; ) = IQFT ( 3 ) ( F ( q 3 ) ( w , v ) H a ( q 3 ) ( w , v ) &OverBar; - F ( q 3 ) ( - w , - v ) &CenterDot; j H b ( q 3 ) ( - w , - v ) ) ; Wherein IQFT (3)represent the inverse quaternion Fourier transform of the third type;
S6 is by b (m, n), the E of above-mentioned steps gained f, E h(m, n), calculates the hypercomplex number relevance function after normalization g ( m , n ) = b ( m , n ) / ( E f E h ( m , n ) ) ;
S7 judges in image h to be identified (τ, η) whether contain template image f (τ, η), if contained, enters step S8;
S8 selects threshold value C 1, C 2, D 1, described C 1<1<C 2, D 1<1, and C 1, C 2, D 1all close to 1; Judgement | g (m s, n s) | whether meet following formula:
C 1 < | g ( m s , n s ) | < C 2 &rho; = | g r ( m s , n s ) | | g r ( m s , n s ) | + | g i ( m s , n s ) | + | g j ( m s , n s ) | + | g k ( m s , n s ) | > D 1 , If meet, position (m in h be described s, n s) locate to exist one to there is the object of same shape, size, color and brightness with template image,
Wherein, | g (m s, n s) | refer to matching degree, ρ is certificate parameter.
2. recognition methods according to claim 1, is characterized in that, described C and D are 2 index powers.
3. recognition methods according to claim 1, is characterized in that, whether contains template image f (τ, η) in described judgement image h to be identified (τ, η), if contained, enters step S8; Be specially:
As h (m, n)=f (m-m 0, n-n 0) time,
think in image h to be identified (τ, η) and contain template image f (τ, η);
As h (m, n) ≠ f (m-m 0, n-n 0) time,
think in image h to be identified (τ, η) and do not contain template image f (τ, η).
CN201410117675.4A 2014-03-26 2014-03-26 RGB vector matching fast recognition method in surface mounting equipment Pending CN103971119A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410117675.4A CN103971119A (en) 2014-03-26 2014-03-26 RGB vector matching fast recognition method in surface mounting equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410117675.4A CN103971119A (en) 2014-03-26 2014-03-26 RGB vector matching fast recognition method in surface mounting equipment

Publications (1)

Publication Number Publication Date
CN103971119A true CN103971119A (en) 2014-08-06

Family

ID=51240590

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410117675.4A Pending CN103971119A (en) 2014-03-26 2014-03-26 RGB vector matching fast recognition method in surface mounting equipment

Country Status (1)

Country Link
CN (1) CN103971119A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102222335A (en) * 2011-05-30 2011-10-19 广东工业大学 Quaternions matching method for color images
CN103065333A (en) * 2012-12-11 2013-04-24 华中科技大学 Color snake image segmentation method based on quaternion
CN103559499A (en) * 2013-10-09 2014-02-05 华南理工大学 RGB vector matching rapid-recognition system and method
US8855406B2 (en) * 2010-09-10 2014-10-07 Honda Motor Co., Ltd. Egomotion using assorted features

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8855406B2 (en) * 2010-09-10 2014-10-07 Honda Motor Co., Ltd. Egomotion using assorted features
CN102222335A (en) * 2011-05-30 2011-10-19 广东工业大学 Quaternions matching method for color images
CN103065333A (en) * 2012-12-11 2013-04-24 华中科技大学 Color snake image segmentation method based on quaternion
CN103559499A (en) * 2013-10-09 2014-02-05 华南理工大学 RGB vector matching rapid-recognition system and method

Similar Documents

Publication Publication Date Title
EP3100234B1 (en) Data-processing system and method for calibration of a vehicle surround view system
CN105430376B (en) A kind of detection method and device of panorama camera uniformity
USRE47925E1 (en) Method and multi-camera portable device for producing stereo images
US8121400B2 (en) Method of comparing similarity of 3D visual objects
TWI489395B (en) Apparatus and method for foreground detection
CN106570899B (en) Target object detection method and device
CN103559499B (en) RGB vector matching rapid-recognition system and method
JP2015197745A (en) Image processing apparatus, imaging apparatus, image processing method, and program
CN111539311B (en) Living body judging method, device and system based on IR and RGB double shooting
US20140119644A1 (en) System and method of adaptive color correction for pill recognition in digital images
JP2003244521A (en) Information processing method and apparatus, and recording medium
CN108520514A (en) Printed circuit board electronics member device consistency detecting method based on computer vision
CN113822942B (en) Method for measuring object size by monocular camera based on two-dimensional code
US20150254854A1 (en) Camera calibration method and apparatus using a color-coded structure
CN111325803B (en) Calibration method for evaluating internal and external participation time synchronization of binocular camera
KR20140075042A (en) Apparatus for inspecting of display panel and method thereof
TW201326735A (en) Method and system for measuring width
CN116563391B (en) Automatic laser structure calibration method based on machine vision
WO2017080295A1 (en) Element positioning method and system
TW201445458A (en) Testing device and method for camera
CN109073503B (en) Unevenness evaluation method and unevenness evaluation device
CN103971119A (en) RGB vector matching fast recognition method in surface mounting equipment
CN103888674B (en) Image capture unit and image acquisition method
CN105184736A (en) Image registration method for narrow overlapping dual field high spectral imaging instrument
CN112233164B (en) Method for identifying and correcting error points of disparity map

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140806