CN102052901B - Displacement match-measuring method using two-dimensional trichromatic contrast ratio as characteristic frame - Google Patents

Displacement match-measuring method using two-dimensional trichromatic contrast ratio as characteristic frame Download PDF

Info

Publication number
CN102052901B
CN102052901B CN2009101913209A CN200910191320A CN102052901B CN 102052901 B CN102052901 B CN 102052901B CN 2009101913209 A CN2009101913209 A CN 2009101913209A CN 200910191320 A CN200910191320 A CN 200910191320A CN 102052901 B CN102052901 B CN 102052901B
Authority
CN
China
Prior art keywords
frame
comparison
pixel
correlation
primary colours
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.)
Expired - Fee Related
Application number
CN2009101913209A
Other languages
Chinese (zh)
Other versions
CN102052901A (en
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.)
Chongqing Technology and Business University
Original Assignee
Chongqing Technology and Business University
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 Chongqing Technology and Business University filed Critical Chongqing Technology and Business University
Priority to CN2009101913209A priority Critical patent/CN102052901B/en
Publication of CN102052901A publication Critical patent/CN102052901A/en
Application granted granted Critical
Publication of CN102052901B publication Critical patent/CN102052901B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a displacement match-measuring method and device using two-dimensional trichromatic contrast ratio as a characteristic frame. The device consists of a common computer and a camera. The displacement measuring method comprises the following steps: extracting two-dimensional contrast ratio characteristics about an image brightness frame and a trichromatic frame along the x-axis and the y-axis respectively, calculating the self-relevance coefficient of the side data of the image brightness frame respectively, finding an optimum comparative window pixel array suitable for the reflecting plane of a measured target, performing a cross correlation match calculation for the side data on the comparative window of the trichromatic frame and the sample frame corresponding to the trichromatic frame, and using the average value of the optimum matching as the displacement in the measurement; and adjusting the position of the comparative window or updating the reference frame, and adjusting the scale of a cross correlation match operator array to ensure the accuracy of the next measurement and reduce the calculation amount. According to the invention, the information of the photoelectric sensor is fully utilized, and the influence of the non-trichromatic wave length on the measurement in the environmental light is overcome; and the method and device provided by the invention have the advantages of advanced technology and low cost.

Description

With two-dimentional three primary colours contrast is the method for characteristic frame coupling Displacement Measurement
Technical field
The present invention relates to the digital picture field of measuring technique, particularly adopt the method and the device thereof of the two-dimentional micro-displacement of computing machine camera Measuring Object.
Background technology
Function for the photosensor arrays of bringing into play the computing machine camera; " camera that uses a computer is measured the method and the device of small two-dimension displacement " (application for a patent for invention number: 200910104277.8) and the application for a patent for invention of submitting to recently " the camera three primary colours that use a computer are measured the method and the device of small two-dimension displacement " a kind of method and device of association matching technique Measuring Object micro-displacement have been proposed respectively; It two all is directed against the light intensity pattern, is suitable for the metastable situation of luminance picture of lighting condition and reflection object face.(the application for a patent for invention number: that " take the contrast " 200910190926.0) with " is method and the device that the characteristic frame matees Displacement Measurement with the two-dimensional contrast " (application for a patent for invention number: 200910190925.6) as the method and the device of the displacement of characteristic frame coupling measure two dimensional; Respectively with the reflectance signature of the two-dimentional light and shade contrast of a peacekeeping of pattern as the testee surface; The variation that has overcome ambient lighting has effectively been expanded the application scenario to the negative effect that measurement brings; But these two kinds of technical schemes are not utilized the performance of photodetection sensor as yet fully.The application for a patent for invention of submitting to recently " with method and the device of three primary colours contrast by the displacement of characteristic frame coupling measure two dimensional " thinks that the reflectance signature on testee surface is made up of red, green and blue luminance contrast characteristic; Overcome the interference that the illumination of other wavelength brings; But, this application has only been considered the three primary colours contrast situation of one dimension.
Summary of the invention
In view of the foregoing; It is the method and the device of characteristic frame coupling Displacement Measurement with two-dimentional three primary colours contrast that the present invention provides a kind of; It utilizes the computing machine camera, through taking, Measuring Object with the perpendicular plane of the optical axis of camera on two-dimension displacement vector and velocity.
The technical solution adopted for the present invention to solve the technical problems is: the computing machine that a Daepori is logical is installed a computing machine camera, and disposes camera shooting and two-dimentional three primary colours edge direction Frame coupling Displacement Measurement program; It is the method that characteristic is passed through frame coupling Displacement Measurement that this program has embodied with two-dimentional three primary colours contrast, comprising:
Step 1, with the form of bitmap (M * N, M, N ∈ positive integer), take the image of a frame testee, as a reference frame; First locations of pixels with this frame pel array upper left corner is an initial point, and direction is the x direction of principal axis to the right, and vertical downward direction is the y direction of principal axis; Central authorities at said pel array choose a zone, and size is m 0* n 0, m 0, n 0The ∈ positive integer is referred to as comparison window, and the horizontal direction of the said pel array of its distance and the edge pixel of vertical direction respectively have h and v pixel, promptly have: m 0+ 2h=M, n 0+ 2v=N, h, v ∈ positive integer;
Step 2, for above-mentioned reference frame; By pixel column, by pixel column ground derive respectively along X-direction and Y direction about pixel intensity, red, green and blue edge direction data; And represent positive limit wherein, marginal and the 3rd type of limit respectively: { reference with the binary numeral 001,010 and 100 of 3bit x(x, y) }, { reference Red x(x, y) }, { reference Green x(x, y) } and { reference Blue x(x, y) } and { reference y(x, y) }, { reference Red y(x, y) }, { reference Green y(x, y) } and { reference Blue y(x, y) }, wherein; X in the subscript or y represent the direction of the coordinate axis on institute edge respectively, and the pairing three primary colours of the textual representation in the subscript do not have the edge direction data of the corresponding said pixel intensity of this expression of expression of explanatory note in the subscript; Symbol " { } " expression is along all pixel (x in the change in coordinate axis direction comparison window that wherein the function subscript is indicated; A set of the respective pixel brightness of y) locating or the edge direction data of primary colours, the expression mode of the relevant function in back is therewith roughly the same preserved these data;
Step 3, for the edge direction data of above-mentioned two frames about pixel intensity, calculate the auto correlation matching factor of comparison window in the said reference frame respectively:
auto _ correlatio n x ( a , b ) = Σ y = v + 1 v + 1 + n 0 Σ x = h + 1 h + 1 + m 0 [ referenc e x ( x , y ) · referenc e x ( x + a , y + b ) ]
auto _ correlatio n y ( a , b ) = Σ y = v + 1 v + 1 + n 0 Σ x = h + 1 h + 1 + m 0 [ referenc e y ( x , y ) · referenc e y ( x + a , y + b ) ]
In the formula, sign of operation is represented binary logic and computing, its operation result or be logical zero or for logical one, the pairing numerical value of logical operation function is wherein got in sign of operation " [] " expression; Or be numerical value 0, or be numerical value 1, parametric variable a, the combination of b has determined the scale of associated match operator array; If get 3 * 3 associated match operator: a=-1,0,1, b=-1; 0,1, therefore, each will produce 9 auto correlation coefficient auto_correlation about pixel intensity along each change in coordinate axis direction x(a, b) and auto_correlation y(a, b);
Step 4, on the basis of step 3, search for respectively and find and under present body surface situation and illuminating position, can carry out matching ratio best comparison window pel array:
m x=m 0-step,n x=n 0-step,2h=M-m x,2v=N-n x
And m y=m 0-step, n y=n 0-step, 2h=M-m y, 2v=N-n y,
In the formula, subscript x, y represent respectively its value corresponding along X-direction and Y direction; Get the scale that big person is the comparison window array in this two class value: m * n;
After step 5, the above-mentioned shooting, warp is Δ t after a while, takes the second framing bit figure, as the sampling frame;
Line by line, by pixel in fixed this sampling frame of Lieque along X-direction and Y direction about pixel intensity, red, green and blue edge direction data; Respectively with the binary numeral 001 of 3bit; 010 and 100 represent positive limit, marginal and the 3rd type of limits wherein, so obtain eight frame edge direction data of said sampling frame: { comparison x(x, y) }, { comparison Red x(x, y) }, { comparison Green x(x, y) } and { comparison Blue x(x, y) } and { comparison y(x, y) }, { comparison Red y(x, y) }, { comparison Green y(x, y) } and { comparison Blue y(x, y) }, preserve these data;
Step 6, along X-direction and Y direction, in said sampling frame scope, carry out 9 * 9 cross correlations coupling (a=-4 ,-3 ,-2 ,-1,0 to comparison window in the said reference frame; + 1 ,+2 ,+3 ,+4, b=-4;-3 ,-2 ,-1,0 ,+1; + 2 ,+3 ,+4),, calculate and obtain the cross correlation matching factor of 3 * 2=6 group respectively: { cross_correlation about the three primary colours frame for said reference frame and each self-corresponding 3 * 2=6 frame three primary colours edge direction data of said sampling frame Red x(a, b) }, { cross_correlation Green x(a, b) } and { cross_correlation Blue x(a, b) } and { cross_correlation Red y(a, b) }, { cross_correlation Green y(a, b) } and { cross_correlation Blue y(a, b) };
Step 7, for the above-mentioned cross correlation matching factor of respectively organizing; Get its intermediate value the maximum respectively, direction that moves along X-direction and Y direction respectively relative to the corresponding three primary colours frame of said reference frame as the corresponding three primary colours frame of said sampling frame and mobile amplitude:
Δ Red xX=a 1, Δ Red xY=b 1, Δ Green xX=a 2, Δ Green xY=b 2, Δ Blue xX=a 3, Δ Blue xY=b 3
Δ Red yX=a 4, Δ Red yY=b 4, Δ Green yX=a 5, Δ Green yY=b 5, Δ Blue yX=a 6, Δ Blue yY=b 6
In the formula, subscript x, y represent the change in coordinate axis direction on each edge direction data institute edge respectively;
During this was measured, along X-direction and Y direction, direction that said sampling frame moves relative to said reference frame and mobile amplitude were respectively:
Δx ( i , j ) = a 1 + a 2 + a 3 + a 4 + a 5 + a 6 6 = e , Δy ( i , j ) = b 1 + b 2 + b 3 + b 4 + b 5 + b 6 6 = f
In the formula, i representes this and measures the sequential counting of taking that j representes the sequential counting of the reference frame of getting;
In the measuring process, the total relative displacement vector of object is:
Δx 0(i,j)=Δx 0(i-1,j)+Δx(i,j)=Δx 0(i-1,j)+e,
Δy 0(i,j)=Δy 0(i-1,j)+Δy(i,j)=Δy 0(i-1,j)+f
In the formula, (Δ x 0(i-1, j), Δ y 0(i-1, j)) representes this and measures the displacement of accumulation before;
The velocity of step 8, ohject displacement is:
Δv x(i,j)=Δx(i,j)/Δt=e/Δt,Δv y(i,j)=Δy(i,j)/Δt=f/Δt;
If step 9 | Δ x 0(i, j)-Δ x 0(k, j-1) |>=2m/5, or | Δ y 0(i, j)-Δ y 0(k, j-1) |>=2n/5, wherein; K=max (i) | last sequential counting value of taking under the situation that (j-1) to be illustrated in said reference frame sequential counting be j-1; Promptly under the condition that said reference frame does not change, the accumulation of the relative displacement that comparison window wherein takes place exceeded this comparison window amplitude 2/5, at this moment; Sampling frame with up-to-date replaces said reference frame, and its comparison window is repositioned at the central part of new reference frame;
If | Δ x 0(i, j)-Δ x 0(k, j-1) |<2m/5 and | Δ y 0(i, j)-Δ y 0(k, j-1) |<2n/5, do not upgrade said reference frame, but the comparison window generation relative displacement Δ x=-e in the said reference frame, Δ y=-f;
If step 10 has been upgraded reference frame, imitative step 3 is calculated the auto correlation coefficient auto_correlation about pixel intensity of said new reference frame x(a, b) and auto_correlation y(a, b); Imitative step 4 is watched surface texture featur, determines the scale of its comparison window array: m * n again;
If do not upgrade reference frame, the size of the coupling of cross correlation described in the set-up procedure six operator array:
If | e|≤3 and | f|≤3, change and get 7 * 7:a=-3 ,-2 ,-1,0 ,+1 ,+2 ,+3, b=-3 ,-2 ,-1,0 ,+1 ,+2 ,+3,
If | e|≤2 and | f|≤2, change and get 5 * 5:a=-2 ,-1,0 ,+1 ,+2, b=-2 ,-1,0 ,+1 ,+2,
Otherwise, still be taken as 9 * 9 associated match operator arrays;
After step 11, the above-mentioned shooting, through Δ t after a while, take the 3rd framing bit figure, again as new sampling frame;
By pixel column, by pixel column derive respectively this sampling frame along X-direction and Y direction about pixel intensity, red, green and blue edge direction data; And with the binary numeral 001 of 3bit; 010 and 100 represent positive limit, marginal and the 3rd type of limit wherein respectively, so obtain 4 * 2=8 frame edge direction data of said new sampling frame: { comparison x(x, y) }, { comparison Red x(x, y) }, { comparison Green x(x, y) } and { comparison Blue x(x, y) } and { comparison y(x, y) }, { comparison Red y(x, y) }, { comparison Green y(x, y) } and { comparison Blue y(x, y) }, preserve these data;
Step 12, according to the cross correlation coupling operator array of confirming in the step 10; Similar step 6; Along X-direction and Y direction, carry out the cross correlation coupling to three primary colours edge direction data corresponding in the comparison window in the said reference frame corresponding three primary colours edge direction data in said new sampling frame scope and calculate respectively;
Step 13, jump to step 7, continue to measure.
In the actual measurement process, can also further implement to measure calibration, take this to obtain direct measurement result.
The definition of edge direction data described in the above-mentioned steps two, five and 11 is:
In the pel array, along the X axle or along Y direction, if the brightness value of one of the brightness value of a pixel or its three primary colours (red green or blue) is than the also little error margin value error of second corresponding brightness value of pixel of its back, if promptly
I (X, Y)<I (X+2, Y)-error or I (X, Y)<I (X, Y+2)-error
Then define and have this axial positive limit, an edge between these two pixels about pixel intensity or these primary colours; If a pixel the brightness value of one of brightness value or its three primary colours (red green or blue) than the also big error margin value error of second corresponding brightness value of pixel of its back, if promptly
I (X, Y)>I (X+2, Y)+error or I (X, Y)>I (X, Y+2)+error
Then define between these two pixels and to have this axial marginal about pixel intensity or these primary colours of an edge; The limit that so obtains is positioned at first locations of pixels after this pixel, also promptly is positioned on that pixel in the centre position of participating in two pixels relatively; If a pixel second corresponding brightness value of pixel of brightness value and its back of one of brightness value or its three primary colours (red green or blue) approaching, its value differs and is no more than an error margin value error, if promptly
I(X+2,Y)-error<I(X,Y)<I(X+2,Y)+error
Or I (X, Y+2)-error<I (X, Y)<I (X, Y+2)+error;
Then think not have corresponding " limit " about pixel intensity or these primary colours along this direction of principal axis between these two pixels, or be referred to as the 3rd type of limit;
Along some change in coordinate axis direction, all positive limit of corresponding pixel column or pixel column, marginal and the 3rd type of limit about pixel intensity or certain primary colours form this row maybe should row along the edge direction data about pixel intensity or these primary colours of this change in coordinate axis direction; Error margin value in the above-listed formula can be predisposed to a little numerical value, for example: error=10 according to concrete light conditions; There are not the edge direction data in four limits in the pel array and the location of pixels on the angle.
The method of the best comparison window pel array of search described in the above-mentioned steps four comprises:
For associated match operator array a * b (a, b ∈ integer), can produce a * b auto correlation matching factor along certain change in coordinate axis direction, compare these auto correlation matching factors by following inequality:
auto_correlation(a,b)≥auto_correlation(0,0)×similarity
In the formula, similarity has described the similarity degree of the pel array of comparison window and its contiguous identical scale, for example gets similarity=60%, can be provided with in advance, or debug and select according to the quality on light conditions and measured object surface;
If the auto correlation coefficient that satisfies above-mentioned inequality more than a * b * 1/3, need to enlarge each step of scope of comparison window capable with the step row: make m=m 0+ step, n=n 0+ step, wherein, step is a stepped parameter; Initial value is 1, needs the scale of expansion comparison window just to increase by 1 at every turn, recomputates the auto correlation coefficient of new comparison window; And carry out above-mentioned comparison, up to the just no more than a * b of the auto correlation matching factor that satisfies above-mentioned inequality * 1/3, at this moment; Think and found best comparison window pel array: 2h=M-m, 2v=N-n;
If exceed predetermined scope in the frame, also do not find suitable comparison window, think that then this part reflecting surface of this object is inappropriate for the surveying work of this device, and provide the prompting warning;
If satisfy the no more than a * b of auto correlation matching factor of above-mentioned inequality * 1/3; The architectural feature on surface that subject is described is enough meticulous; Value between the neighborhood pixels can be distinguished; Can further attempt dwindling the capable and step row of each step of scope of comparison window, to reduce amount of calculation: make m=m 0-step, n=n 0-step; Recomputate the auto correlation coefficient of comparison window; And carry out above-mentioned comparison, wherein, the parameter s of going forward one by one tep is each to increase by 1; The number that satisfies the auto correlation coefficient of above-mentioned inequality up to selected comparison window zone just is not less than a * b * 1/3, thinks at this moment to have searched best comparison window pel array.
The coupling of cross correlation described in the above-mentioned steps six and 12 Calculation Method is:
Respectively along X-direction or along Y direction; The three primary colours frame edge direction data { reference (x of this corresponding change in coordinate axis direction of comparison window in the said reference frame; Y) } the edge direction data of the corresponding primary colours of this corresponding change in coordinate axis direction { comparison (x+a, y+b) } are carried out following coupling comparison operation in said sampling frame scope:
cross _ correlation ( a , b ) = Σ y = v + 1 v + 1 + n Σ x = h + 1 h + 1 + m [ reference ( x , y ) · comparison ( x + a , y + b ) ]
In the formula, each edge direction data representes with the 3bit binary value that all sign of operation is represented binary logic and computing; Its operation result or be logical zero or for logical one, the pairing numerical value of logical operation function is wherein got in sign of operation " [] " expression, or is numerical value 0; Or be numerical value 1, parametric variable a, the combination of b has determined the scale of associated match operator array and the number of the cross correlation coefficient that produced; The result constitutes a set { cross_correlation (a, b) }.
The invention has the beneficial effects as follows; Its exploded view picture frame is three kinds of primary colours frames; And further investigate the contrast metric of the two dimension of each three primary colours frame; Through implementing frame-frame matching ratio, the information of having utilized the photodetection sensor array to be produced all sidedly is used for measuring, and has overcome ambient lighting effectively and has changed for the influence of measuring.
Description of drawings
Fig. 1 is a measurement mechanism block scheme of the present invention.
Fig. 2 is the synoptic diagram of the photoelectric sensor chip pel array that carries out producing after the opto-electronic conversion.
Among Fig. 1,1. computing machine camera, 2. optical lens, 3. photoelectric sensor chip; 4.USB interface, 5. computer system, 6.USB interface, 7.CPU; 8. internal memory, 9. display card and display, 10. hard disk, 11. keyboards and mouse; 12. operating system, 13. webcam driver programs, 14. cameras are taken and two-dimentional three primary colours edge direction Frame coupling Displacement Measurement program, 15. light fixture.
Among Fig. 2,20. 1 frame pel arrays, the comparison window of choosing in 21. reference frames, associated match zone illustrated embodiment in the 22. sampling frames, the contingent extreme position of comparison window in 23. reference frames.
Embodiment
Fig. 1 is the block scheme of measurement mechanism of the present invention.
Go up the webcam driver program (13) of operation the placing in computer system (5), be connected camera (1) with (6) to computing machine (5) through USB interface (4).Then, let camera focal imaging object being measured.
In the selection course, allow ambient lighting that certain variation takes place, still, the light and shade contrast that should not change object being measured significantly and formed images.Light fixture (15) can be selected for use, helps to guarantee to stablize the contrast metric that is formed images.Can select for use material to make target with more careful surface reflection characteristic.
The operation camera is taken and two-dimentional three primary colours edge direction Frame coupling Displacement Measurement program (14), implements real-time Displacement Measurement.It is the method for characteristic frame coupling Displacement Measurement that this program (14) has comprised with two-dimentional three primary colours contrast, and concrete steps see that " summary of the invention " describe, and are following with regard to its general condensed summary below.
Fig. 2 has represented that photoelectric sensor chip (3) carries out producing corresponding pel array (20) after the opto-electronic conversion; Comprise the band of position (associated match zone in the frame of promptly taking a sample) (22) that comparison window selected in its middle section (21) zone, comparison window possibly belong to after being subjected to displacement, and the extreme position of comparison window displacement (23).
Consider the resolution and the frame per second index of camera, can select the initial value of the scale in comparison window zone in the said reference frame of step 1 arbitrarily, for example, choose: m 0=80, n 0=80; This fine degree with the architectural feature of reflection object face is relevant, is related to (coupling) measuring accuracy, is determining amount of calculation, affects the speed of response of measurement mechanism.
Step 4 and ten; Utilize the fine degree of the architectural feature of auto correlation coefficient analysis measured object surface; See that under current photoenvironment can the scale of comparison window pel array demonstrate abundant details in the reference frame; Be beneficial to the associated match algorithm, and then find the comparison window pel array of optimum macro.Said preset parameter similarity has described the similarity degree of comparison window with the pel array of its contiguous identical scale, can preset or select through debugging according to light conditions and the surperficial quality of measured object.Said " satisfying the number of the auto correlation matching factor of above-mentioned inequality " also not necessarily must equal a * b * 1/3, can be according to material, illumination and measured actual conditions such as movement velocity adjustment.Result according to step 4 search is, can obtain best comparison window pel array separately along X-direction and Y direction, get its big person and be the comparison window pel array, if for quick measurement, and can be only at one dimension direction search the best comparison window pel array.
Basic thought in the step 6, ten and 12 is that the displacement of confirming that frame of pixels takes place is taken this in the zone of adopting the interior relatively frame of fairly large cross correlation operator matrix search and reference frame to be complementary most earlier.Then, according to the displacement size that is obtained, the scale of adjustment cross correlation operator matrix is in the hope of reducing calculated amount.The scale of cross correlation operator matrix should be greater than contingent displacement range.Along X-direction and Y direction; All there are two frames in the edge direction data of every kind of primary colours; The contrast that is every kind of primary colours is parsed into two dimension, and the cross correlation result calculated produces two displacement vectors separately, and three kinds of primary colours common properties are given birth to six displacement vectors; They should be more or less the same, and get its mean value as this measurement result.
Before measuring each time; In order to guarantee that comparison window has considerable overlapping region with the corresponding associated region of sampling frame in the said reference frame; Get rid of repeatedly to take and measure cumulative measurement error afterwards; To reflect measuring accuracy less than a pixel unit; Implemented the position of comparison window in the mobile reference frame in the step 9 or upgraded the method for reference frame, its principle is referring to " camera that uses a computer is measured the method and the device of small two-dimension displacement " (application for a patent for invention number: 2009101042778).But, the condition of renewal reference frame: | Δ x 0(i, j)-Δ x 0(k, j-1) |>=2m/5, or | Δ y 0(i, j)-Δ y 0(k, j-1) |>=2n/5, i.e. it is 2/5 that the displacement of accumulation exceeds the amplitude of comparison window, is to adjust according to the situation such as scale of frame and comparison window.

Claims (4)

1. one kind is the method for characteristic frame coupling Displacement Measurement with two-dimentional three primary colours contrast, and it utilizes the logical computing machine of a Daepori to cooperate camera to measure small two-dimension displacement, it is characterized in that this method comprises the steps:
Step 1, take the image of a frame testee, M, N ∈ positive integer, frame as a reference with the form of bitmap M * N; For this frame pel array and follow-up photographed frame are chosen plane right-angle coordinate; Central authorities at said pel array choose a zone, and its size is m 0* n 0, m 0, n 0The ∈ positive integer is referred to as comparison window, and the horizontal direction of the said pel array of its distance and the edge pixel of vertical direction respectively have h and v pixel, promptly have: m 0+ 2h=M, n 0+ 2v=N, h, v ∈ positive integer;
Step 2, for above-mentioned reference frame; By pixel column, by pixel column ground derive respectively along X-direction and Y direction about pixel intensity, red, green and blue edge direction data; And represent positive limit wherein, marginal and the 3rd type of limit respectively with the binary numeral 001,010 and 100 of 3bit, therefore; Corresponding captured reference frame has constituted brightness, redness, green and the blue edge direction data of 4 * 2=8 frame about pixel altogether: { reference x(x, y) }, { reference Red x(x, y) }, { reference Green x(x, y) } and { reference Blue x(x, y) } and { reference y(x, y) }, { reference Red y(x, y) }, { reference Green y(x, y) } and { reference Blue y(x, y) }, wherein; The pairing primary colours of textual representation in the subscript do not have the brightness of the respective pixel of explanatory note primary colours in the subscript, x in the subscript or y represent the direction of the coordinate axis on edge direction data institute edge respectively; (x y) is positioned at its pel array (x, the edge direction data of y) locating in the expression reference frame to function reference; (x y) locates along the set about the edge direction data of pixel intensity or primary colours of X-direction and Y direction all pixels in symbol " { } " the expression reference frame; After state in the step relevant function the expression mode therewith roughly the same; Preserve these data;
Step 3, for above-mentioned reference frame, along X-direction and Y direction two frame edge direction data { reference about pixel intensity x(x, y) } and { reference y(x, y) } calculate all auto correlation matching factors of comparison window in the reference frame respectively according to following expression:
Figure FSB00000682958800011
Figure FSB00000682958800012
In the formula, subscript x and y represent that respectively (x y) locates change in coordinate axis direction under the edge direction data of respective pixel brightness, and sign of operation is represented binary logic and computing for auto correlation matching factor and comparison window interior pixel; Its operation result is logical zero or is logical one that the pairing numerical value of logical operation function is wherein got in sign of operation " [] " expression, or is numerical value 0, or is numerical value 1; Parametric variable a, the combination of b has determined the scale of auto correlation coupling operator array, is 3 * 3 if take from the scale of associated match operator array, then parametric variable a; The value of b is to having: a=-1,0,1; B=-1,0,1; Therefore, each will produce 3 * 3=9 the auto correlation matching factor about pixel intensity along each change in coordinate axis direction, constitutes set { auto_correlation respectively x(a, b) } and set { auto_correlation y(a, b) };
Step 4, on the basis of step 3; Search for respectively and find and under present body surface situation and illuminating position, can carry out matching ratio best comparison window pel array along X-direction and Y direction, and the larger person who gets pel array in the two scale of window pel array: m * n as a comparison;
Step 5, warp be Δ t after a while, takes the second framing bit figure, as the sampling frame;
Line by line, by pixel in fixed this sampling frame of Lieque along X-direction and Y direction about pixel intensity, red, green and blue edge direction data; And with the binary numeral 001 of 3bit; 010 and 100 represent positive limit, marginal and the 3rd type of limit wherein respectively; So, for this sampling frame, obtain brightness, redness, green and blue 4 * 2=8 frame edge direction data altogether: { comparison about pixel x(x, y) }, { comparison Red x(x, y) }, { comparison Green x(x, y) } and { comparison Blue x(x, y) } and { comparison y(x, y) }, { comparison Red y(x, y) }, { comparison Green y(x, y) } and { comparison Blue y(x, y) }, wherein, (x y) is positioned at its pel array (x, the edge direction data of y) locating in the expression sampling frame to function comparison; Preserve these data;
Step 6, to select the scale of associated match operator array for use be 9 * 9:a=-4 ,-3 ,-2 ,-1,0 ,+1; + 2 ,+3 ,+4, b=-4 ,-3 ,-2;-1,0 ,+1 ,+2 ,+3; + 4, in said sampling frame scope, carry out the cross correlation coupling to comparison window in the said reference frame and calculate, because said reference frame and said sampling frame separately to the edge direction data of 3 * 2=6 frame about primary colours should be arranged, therefore, obtain the cross correlation matching factor of 3 * 2=6 group about primary colours altogether: { cross_correlation Red x(a, b) }, { cross_correlation Green x(a, b) } and { cross_correlation Blue x(a, b) } and { cross_correlation Red y(a, b) }, { cross_correlation Green y(a, b) } and { cross_correlation Blue y(a, b) };
Step 7,3 * 2=6 group cross correlation matching factor that calculating obtains for the cross correlation coupling; Select each class mean the maximum; With its corresponding parameters variable a, the displacement that b takes place along pairing change in coordinate axis direction as pairing this primary colours frame of the said relatively reference frame of the corresponding primary colours frame of said sampling frame respectively:
Δ Red xX=a 1, Δ Red xY=b 1, Δ Green xX=a 2, Δ Green xY=b 2, Δ Blue xX=a 3, Δ Blue xY=b 3
Δ Red yX=a 4, Δ Red yY=b 4, Δ Green yX=a 5, Δ Green yY=b 5, Δ Blue yX=a 6, Δ Blue yY=b 6
In the formula; Δ x, Δ y represent respectively along the displacement of X-direction and Y direction generation; Subscript x, y represent the change in coordinate axis direction that this displacement is corresponding respectively; The corresponding primary colours of this displacement of textual representation in the subscript, the numeric suffix on equality the right is in order to distinguish 3 * 2=6 kind displacement situation, and these displacement situations correspond respectively to the implication of the expression formula on the equal sign left side;
During this was measured, along X-direction and Y direction, direction that said sampling frame moves relative to said reference frame and mobile amplitude were respectively:
Figure FSB00000682958800032
In the formula, i representes this and measures the sequential counting of taking that j representes the sequential counting of the reference frame of getting;
In the measuring process, the total relative displacement vector of object is:
Δx 0(i,j)=Δx 0(i-1,j)+Δx(i,j)=Δx 0(i-1,j)+e,
Δy 0(i,j)=Δy 0(i-1,j)+Δy(i,j)=Δy 0(i-1,j)+f
In the formula, (Δ x 0(i-1, j), Δ y 0(i-1, j)) representes this and measures the displacement of accumulation before;
The velocity of step 8, ohject displacement is:
Δv x(i,j)=Δx(i,j)/Δt=e/Δt,Δv y(i,j)=Δy(i,j)/Δt=f/Δt;
If step 9 | Δ x 0(i, j)-Δ x 0(k, j-1) |>=2m/5, or | Δ y 0(i, j)-Δ y 0(k, j-1) |>=2n/5, wherein; K=max (i) | last sequential counting value of taking under the situation that (j-1) to be illustrated in said reference frame sequential counting be j-1; Promptly under the condition that said reference frame does not change, the accumulation of the relative displacement that comparison window wherein takes place exceeded this comparison window amplitude 2/5, at this moment; Sampling frame with up-to-date replaces said reference frame, and its comparison window is repositioned at the central part of new reference frame;
If | Δ x 0(i, j)-Δ x 0(k, j-1) |<2m/5 and | Δ y 0(i, j)-Δ y 0(k, j-1) |<2n/5, do not upgrade said reference frame, but the comparison window generation relative displacement Δ x=-e in the said reference frame, Δ y=-f;
If step 10 has been upgraded reference frame, imitative step 3 is calculated the auto correlation matching factor { auto_correlation about pixel intensity of said new reference frame x(a, b) } and { auto_correlation y(a, b) }; Imitative step 4 is watched surface texture featur, determines the scale of the comparison window pel array of this new reference frame: m * n again;
If do not upgrade reference frame, the size of the coupling of cross correlation described in the set-up procedure six operator array:
If | e|≤3 and | f|≤3 change that to get cross correlation coupling operator array be 7 * 7:
a=-3,-2,-1,0,+1,+2,+3,b=-3,-2,-1,0,+1,+2,+3,
If | e|≤2 and | f|≤2 change that to get cross correlation coupling operator array be 5 * 5:
a=-2,-1,0,+1,+2,b=-2,-1,0,+1,+2,
Otherwise still getting cross correlation coupling operator array is 9 * 9;
Step 11, again through Δ t after a while, take a new framing bit figure, as new sampling frame;
By pixel column, by pixel column derive respectively this new sampling frame along X-direction and Y direction about pixel intensity, red, green and blue edge direction data; And with the binary numeral 001 of 3bit; 010 and 100 represent positive limit, marginal and the 3rd type of limit wherein respectively; So, for this new sampling frame, obtain brightness, redness, green and blue 4 * 2=8 frame edge direction data altogether: { comparison about pixel x(x, y) }, { comparison Red x(x, y) }, { comparison Green x(x, y) } and { comparison Blue x(x, y) } and { comparison y(x, y) }, { comparison Red y(x, y) }, { comparison Green y(x, y) } and { comparison Blue y(x, y) }, preserve these data;
Step 12, according to the cross correlation coupling operator array of confirming in the step 10; Similar step 6; Respectively along X-direction and Y direction, carry out cross correlation to corresponding three primary colours edge direction data in three primary colours edge direction data corresponding in the comparison window in the said reference frame and the said new sampling frame scope and mate calculating;
Step 13, jump to step 7, continue to measure.
2. according to claim 1 is the method for characteristic frame coupling Displacement Measurement with two-dimentional three primary colours contrast; It is characterized in that; The definition of said step 2, five and 11 said edge direction data is: in the pel array; Along the X axle or along Y direction, if the brightness value of the brightness value of a pixel or its a kind of primary colours is than the also little error margin value error of second corresponding brightness value of pixel of its back, if promptly
I (X, Y)<I (X+2, Y)-error or I (X, Y)<I (X, Y+2)-error
Then define and have this axial positive limit, an edge between these two pixels about pixel intensity or these primary colours; If a pixel the brightness value of brightness value or its a kind of primary colours than the also big error margin value error of second corresponding brightness value of pixel of its back, if promptly
I (X, Y)>I (X+2, Y)+error or I (X, Y)>I (X, Y+2)+error
Then define between these two pixels and to have this axial marginal about pixel intensity or these primary colours of an edge; The limit that so obtains is positioned at first locations of pixels after this pixel, also promptly is positioned on that pixel in the centre position of participating in two pixels relatively; If a pixel second corresponding brightness value of pixel of brightness value and its back of brightness value or its a kind of primary colours approaching, its value differs and is no more than an error margin value error, if promptly
I(X+2,Y)-error<I(X,Y)<I(X+2,Y)+error
Or I (X, Y+2)-error<I (X, Y)<I (X, Y+2)+error;
Then think not have corresponding " limit " about pixel intensity or these primary colours along this direction of principal axis between these two pixels, or be referred to as the 3rd type of limit;
Along some change in coordinate axis direction, all positive limit of corresponding pixel column or pixel column, marginal and the 3rd type of limit about pixel intensity or certain primary colours form this row maybe should row along the edge direction data about pixel intensity or these primary colours of this change in coordinate axis direction; Error margin value in the above-listed formula can be predisposed to a little numerical value according to concrete light conditions; There are not the edge direction data in four limits in the pel array and the location of pixels on the angle.
3. according to claim 1 is the method for characteristic frame coupling Displacement Measurement with two-dimentional three primary colours contrast, it is characterized in that, the method for the best comparison window pel array of search described in the said step 4 comprises:
For the scale of the auto correlation selected for use coupling operator array, can produce the auto correlation matching factor of respective number along certain change in coordinate axis direction, by following inequality relatively these auto correlation matching factors auto_correlation (a, size b):
auto_correlation(a,b)≥auto_correlation(0,0)×similarity
In the formula, similarity has described the similarity degree of the pel array of comparison window and its contiguous identical scale, representes with percentage, can set in advance, or debug and select according to the quality on light conditions and measured object surface;
For certain change in coordinate axis direction, if the auto correlation matching factor that satisfies above-mentioned inequality then need enlarge comparison window m more than along 1/3 of the total auto correlation matching factor number of this change in coordinate axis direction 0* n 0Each step of scope capable with step row: make m=m 0+ step, n=n 0+ step, wherein, step is a stepped parameter; Initial value is 1, needs the scale of expansion comparison window just to increase by 1, then at every turn; Recomputate the auto correlation matching factor of the new comparison window in expansion back, and they are carried out above-mentioned size relatively along this change in coordinate axis direction, just no more than up to the auto correlation matching factor that satisfies above-mentioned inequality along 1/3 of the total auto correlation matching factor number of this change in coordinate axis direction; At this moment, think and found best comparison window pel array: 2h=M-m, 2v=N-n;
If exceed predetermined scope in the frame, also do not find suitable comparison window, think that then this part reflecting surface of this object is inappropriate for the surveying work of this device, and provide the prompting warning;
If it is no more than along 1/3 of the total auto correlation matching factor number of this change in coordinate axis direction to satisfy the auto correlation matching factor of above-mentioned inequality; The architectural feature on surface that subject is described is enough meticulous; Value between the neighborhood pixels can be distinguished; Then further attempt dwindling the capable and step row of each step of scope of comparison window, to reduce amount of calculation: make m=m 0-step, n=n 0-step, wherein, step is a stepped parameter; Initial value is 1, and the scale that at every turn need dwindle comparison window just increases by 1, then; Recomputate and dwindle the auto correlation matching factor of the new comparison window in back along this change in coordinate axis direction; And they are carried out above-mentioned size compare, the number that satisfies the auto correlation matching factor of above-mentioned inequality up to selected comparison window zone just is not less than along 1/3 of the total auto correlation matching factor number of this change in coordinate axis direction, thinks at this moment to have searched best comparison window pel array.
4. according to claim 1 is the method for characteristic frame coupling Displacement Measurement with two-dimentional three primary colours contrast, it is characterized in that,
The coupling of cross correlation described in said step 6 and step 12 Calculation Method is:
Respectively along X-direction or along Y direction; The edge direction data { reference (x about primary colours of this corresponding change in coordinate axis direction of comparison window in the said reference frame; Y) } the edge direction data of the corresponding primary colours of this corresponding change in coordinate axis direction { comparison (x+a, y+b) } are carried out following coupling comparison operation in said sampling frame scope:
Figure FSB00000682958800061
In the formula, each edge direction data is all represented with the binary numeral 001,010 and 100 of 3bit; Their respectively corresponding positive limits, marginal and the 3rd type of limit, sign of operation is represented binary logic and computing, its operation result or be logical zero or be logical one; The pairing numerical value of logical operation function is wherein got in sign of operation " [] " expression, or is numerical value 0, or is numerical value 1; Parametric variable a, the combination of b has determined the scale of associated match operator array, thus the number of the cross correlation matching factor that has determined to be produced; Its result constitutes a set { cross_correlation (a, b) }.
CN2009101913209A 2009-11-02 2009-11-02 Displacement match-measuring method using two-dimensional trichromatic contrast ratio as characteristic frame Expired - Fee Related CN102052901B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101913209A CN102052901B (en) 2009-11-02 2009-11-02 Displacement match-measuring method using two-dimensional trichromatic contrast ratio as characteristic frame

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101913209A CN102052901B (en) 2009-11-02 2009-11-02 Displacement match-measuring method using two-dimensional trichromatic contrast ratio as characteristic frame

Publications (2)

Publication Number Publication Date
CN102052901A CN102052901A (en) 2011-05-11
CN102052901B true CN102052901B (en) 2012-03-21

Family

ID=43957469

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101913209A Expired - Fee Related CN102052901B (en) 2009-11-02 2009-11-02 Displacement match-measuring method using two-dimensional trichromatic contrast ratio as characteristic frame

Country Status (1)

Country Link
CN (1) CN102052901B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1818545A (en) * 2006-03-02 2006-08-16 浣石 Small-displacement measuring system in long-distance plane
US7122781B2 (en) * 2001-12-05 2006-10-17 Em Microelectronic-Marin Sa Method and sensing device for motion detection in an optical pointing device, such as an optical mouse

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7122781B2 (en) * 2001-12-05 2006-10-17 Em Microelectronic-Marin Sa Method and sensing device for motion detection in an optical pointing device, such as an optical mouse
CN1818545A (en) * 2006-03-02 2006-08-16 浣石 Small-displacement measuring system in long-distance plane

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Bernhard Froba,et al.Robust Face Detection at Video Frame Rate Based on Edge Orientation Features.《Proceedings of the Fifth IEEE International Conference on Automatic Face and Gesture Recognition》.2002,342-347. *
JP特开2007-172500A 2007.07.05
Shyi-Chyi Cheng,et al.Subpixel edge detection of color images by principal axis analysis and moment-preserving principle.《Pattern Recognition》.2005,第38卷527-537. *
张宁.基于关联基准的单目视觉距离坐标测量方法的研究.《CNKI中国优秀硕士学位论文全文数据库》.2008,全文. *

Also Published As

Publication number Publication date
CN102052901A (en) 2011-05-11

Similar Documents

Publication Publication Date Title
CN109883533B (en) Low-frequency vibration measurement method based on machine vision
CN101101509B (en) Index input system input and correction method
CN102891966B (en) Focusing method and device for digital imaging device
CN106780297A (en) Image high registration accuracy method under scene and Varying Illumination
CN103162617A (en) Multicolor confocal microscopy system and signal processing method thereof
Huang et al. Correlation and local feature based cloud motion estimation
CN106155299A (en) A kind of method and device that smart machine is carried out gesture control
CN103793113A (en) Imaging locating method of optical touch module and optical touch control equipment
CN110837769B (en) Image processing and deep learning embedded far infrared pedestrian detection method
US20220311925A1 (en) Information processing method and electronic apparatus
CN102022982B (en) Method and device for matching measured displacement with two-dimensional contrast as characteristic frame
CN102095375B (en) Method for measuring displacement along optical axis direction by using contrasts of three primary colors as characteristics
CN110332886A (en) A kind of precision visual method for rapidly positioning
CN102052901B (en) Displacement match-measuring method using two-dimensional trichromatic contrast ratio as characteristic frame
CN108401108A (en) A kind of fast automatic focus adjustment method of push-broom type EO-1 hyperion camera
CN111461003A (en) Coal-fired working condition identification method based on video image sequence feature extraction
CN102102981B (en) Method and device for frame matching displacement measurement by using two-dimensional single color contrast ratio as characteristics
CN102095374B (en) Method and device for measuring displacement along optical axis direction by using peaks and valleys of three primary colors as characteristics
Liu et al. Pedestrian detection method in infrared image based on improved YOLOv7
CN102052899B (en) Take trichromatic contrast ratio as method and the device of characteristic frame Matched measurement two-dimension displacement
CN102022983B (en) Method and device for measuring two-dimensional displacement by matching contrast serving as characteristic frame
CN102052898B (en) Method for measuring small two-dimensional displacement by using three primary colors of computer camera
CN102052900B (en) Peak valley motion detection method and device for quickly measuring sub-pixel displacement
CN102609928A (en) Visual variance positioning based image mosaic method
US8218004B2 (en) Displacement sensing system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120321

Termination date: 20121102