CN102022982B - Method and device for matching measured displacement with two-dimensional contrast as characteristic frame - Google Patents
Method and device for matching measured displacement with two-dimensional contrast as characteristic frame Download PDFInfo
- Publication number
- CN102022982B CN102022982B CN2009101909256A CN200910190925A CN102022982B CN 102022982 B CN102022982 B CN 102022982B CN 2009101909256 A CN2009101909256 A CN 2009101909256A CN 200910190925 A CN200910190925 A CN 200910190925A CN 102022982 B CN102022982 B CN 102022982B
- Authority
- CN
- China
- Prior art keywords
- frame
- comparison window
- reference frame
- correlation
- pixel
- 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
Links
Images
Landscapes
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The invention relates to a method and device for matching measured displacement with two-dimensional contrast as a characteristic frame, wherein a computer camera and a common computer are comprised. The method comprises the steps of: extracting side direction data in directions of x and y axis in a reference frame as the two-dimensional characteristic of a reflective image of a measured object; respectively calculating self-correlation coefficients of side direction data in the direction of each axis to obtain respective optimal comparison window pixel arrays suitable for the reflective surface of the measured object and taking the greater one as the comparison window pixel array; then respectively performing side direction data cross correlation matching calculation for the comparison window and a sampling frame in the directions of coordinate axes and taking the one with maximum cross correlation coefficient as an optimal matcher so as to obtain two-dimensional displacements in the direction of axes, and taking the average value of the two-dimensional displacements as the displacement of the current measurement; accordingly, adjusting the position of the comparison window or updating the reference frame and adjusting scale of the cross correlation matching operator sub array to reduce the calculation amount and improve the measurement accuracy. The invention further overcomes the influence of change of ambient light on measurement.
Description
Technical field
The invention belongs to the digital picture field of measuring technique, particularly adopt the computing machine camera to measure method and the device thereof of the two-dimentional micro-displacement of object.
Background technology
For the function of the photosensor arrays of bringing into play the computing machine camera, " using the computing machine camera to measure method and the device of small two-dimension displacement " (application for a patent for invention number: 2009101042778) proposed a kind of method and device that uses computing machine camera association matching technique to measure the object micro-displacement; This patent application is suitable for the metastable situation of optical imagery of lighting condition and object reflecting surface because it for be the light intensity pattern.The patent application of up-to-date submission " take method and the device of contrast as characteristic frame Matched measurement two-dimension displacement ", with the reflectance signature of pattern light and shade contrast as the testee surface, can effectively overcome the variation of ambient lighting to the negative effect that measurement brings, expand the application scenario.But this technical scheme has just been considered the one dimension character of characteristics of image.
Summary of the invention
The invention provides a kind of method and device take two-dimensional contrast as the characteristic frame matching displacement measurement, it utilizes the computing machine camera, can occur in the environment of certain variation at illuminating position, measure 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 and take and two-dimentional edge direction Frame matching displacement measurement program; This program has embodied the method for passing through the frame matching displacement measurement take two-dimensional contrast as feature, comprising:
Step 1, with the form of bitmap (M * N, M, N ∈ positive integer), take the image of a frame testee, as the reference frame; Take the position of first pixel in this frame pel array upper left corner as initial point, be the x direction of principal axis to right, vertical downward direction is the y direction of principal axis; Choose a zone at the middle section of described pel array, size is m
0* n
0, m
0, n
0The ∈ positive integer is referred to as comparison window, and the horizontal direction of the described pel array of its distance and the edge pixel of vertical direction respectively have h and v pixel, namely have: m
0+ 2h=M, n
0+ 2v=N, h, v ∈ positive integer;
Step 2, for the pel array of above-mentioned reference frame, by pixel column, by the edge direction data of pixel column derivation along X-direction and Y direction, and with the binary numeral 001 of 3bit, 010 and 100 wherein positive limit, marginal and the 3rd class limits of expression respectively, so consisted of corresponding described reference frame pel array about X-direction with about two frame edge direction data { reference of Y direction
x(x, y) } and { reference
y(x, y) }, wherein, subscript x or y represent the direction of the coordinate axis on institute edge, these data are preserved in a set of the edge direction data that all pixels (x, y) are located in the change in coordinate axis direction comparison window that symbol " { } " expression indicates along function subscript wherein;
Step 3, for above-mentioned two frame edge direction data, calculate respectively the auto correlation matching factor of the pel array of comparison window in the described reference frame:
In the formula, sign of operation represents binary logic and computing, its operation result or be logical zero or for logical one, the corresponding 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 related coupling operator array, if get 3 * 3 related coupling operator: a=-1,0,1, b=-1,0,1, therefore, each will produce 9 self-correlation auto_correlation along each change in coordinate axis direction
x(a, b) and auto_correlation
y(a, b);
Step 4, according to auto correlation matching factor corresponding to above-mentioned two frame edge direction data, search for respectively 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 large person is the comparison window array in this two class value: m * n;
After step 5, the above-mentioned shooting, through Δ t after a while, take the second framing bit figure, as the sampling frame;
Line by line, determine that by column pixel is along the edge direction data of X-direction and Y direction in this sampling frame, respectively with the binary numeral 001 of 3bit, 010 and 100 expression positive limit, marginal and the 3rd class limits wherein, so two frame edge direction data { comparison of acquisition sampling frame
x(x, y) } and { comparison
y(x, y) }, preserve these data;
Δ
xx=a
1,Δ
xy=b
1;Δ
yx=a
2,Δ
yy=b
2;
In the formula, subscript x, y represent respectively the change in coordinate axis direction on institute edge;
During this was measured, described sampling frame relative to direction and the mobile amplitude that described reference frame moves was:
In the formula, i represents the sequential counting that this measurement is taken, and j represents 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)+c,
Δy
0(i,j)=Δy
0(i-1,j)+Δy(i,j)=Δy
0(i-1,j)+d
In the formula, (Δ x
0(i-1, j), Δ y
0(i-1, j)) represent this measure before the displacement of accumulation;
The velocity of step 8, ohject displacement is:
Δv
x(i,j)=Δx(i,j)/Δt=c/Δt,Δv
y(i,j)=Δy(i,j)/Δt=d/Δ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) | (j-1) be illustrated in last sequential counting value of taking in the situation that the reference frame sequential counting is j-1, namely under the condition that described reference frame does not change, the accumulation of the relative displacement that comparison window wherein occurs exceeded this comparison window amplitude 2/5, at this moment, replace described reference frame with up-to-date sampling frame, 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 described reference frame, but the comparison window generation relative displacement Δ x=-c in the described reference frame, Δ y=-d;
If step 10 has been upgraded reference frame, imitative step 3 is calculated the self-correlation auto_correlation of described new reference frame
x(a, b) and auto_correlation
y(a, b); Imitative step 4 is watched surface texture featur, again determines the scale of its comparison window array: m * n;
If do not upgrade reference frame, the size of the coupling of cross correlation described in the set-up procedure six operator array:
If | c|<5 and | d|<5, m, n ∈ positive integer changes to take 7 * 7:a=-3 ,-2 ,-1,0 ,+1 ,+2 ,+3, b=-3 ,-2,-1,0 ,+1 ,+2 ,+3, if | c|<3 and | d|<3, m, n ∈ positive integer changes to take 5 * 5:a=-2 ,-1,0 ,+1 ,+2, b=-2 ,-1,0 ,+1 ,+2, otherwise, still be taken as 9 * 9 related coupling operator arrays;
After step 11, the above-mentioned shooting, through Δ t after a while, take the 3rd framing bit figure, as new sampling frame again;
Pursue pixel column, derive this sampling frame along the edge direction data of X-direction and Y direction by pixel column, and with the binary numeral 001 of 3bit, 010 and 100 wherein positive limit, marginal and the 3rd class limits of expression respectively, so consisted of corresponding described new sampling frame pel array about X-direction with about two frame edge direction data { comparison of Y direction
x(x, y) } and { comparison
y(x, y) }, preserve these data;
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 X-axis or along Y direction, if the light intensity value of a pixel is than the also little error margin value error of second corresponding light intensity value of pixel of its back, if namely
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; If the light intensity value of a pixel is than second corresponding light intensity value of pixel of its back large error margin value error also, if namely
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 an edge this is axial marginal; The limit that so obtains is positioned at the position of first pixel after this pixel, also namely is positioned on that pixel in the centre position that participates in two pixels relatively; If second corresponding light intensity value of pixel of certain light intensity value of a pixel and its back approaches, its value differs and is no more than an error margin value error, if namely
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 " along this direction of principal axis between these two pixels, or be referred to as the 3rd class limit;
Along some change in coordinate axis direction, all positive limit of corresponding pixel column or pixel column, marginal and the 3rd class limit form this row maybe these row along the edge direction data of this change in coordinate axis direction; Error margin value in the above-listed formula can according to concrete light conditions, be predisposed to a little numerical value, for example: error=10; 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 the related coupling of k * k (k ∈ positive integer) operator array (a, b), can produce k * k 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 set in advance, and also can debug and selects according to the quality on light conditions and measured object surface;
If the self-correlation that satisfies above-mentioned inequality more than k * k * 1/3, needs to enlarge the capable and step row of each step of scope of comparison window: make m=m
0+ step, n=n
0+ step, recomputate the self-correlation of new comparison window, and carry out above-mentioned comparison, until satisfy the no more than k * k of auto correlation matching factor of above-mentioned inequality * 1/3, at this moment, 2h=M-m, 2v=N-n, wherein, step is stepped parameter, initial value is 1, needs the scale of expansion comparison window just to increase by 1 at every turn; 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 unsuitable for the surveying work of this device, and provide the prompting warning;
If satisfy the no more than k * k 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 self-correlation of comparison window, and carry out above-mentioned comparison, the parameter s of going forward one by one tep is each to increase by 1, equal k * k * 1/3 until the number of the self-correlation of above-mentioned inequality is satisfied in selected comparison window zone, think at this moment to have searched best comparison window pel array;
The method that the coupling of cross correlation described in the above-mentioned steps six and 12 is calculated is:
Corresponding along X-direction or along frame edge direction data of Y direction, respectively the pel array in the comparison window in the described reference frame is carried out following computing in described sampling frame scope:
In the formula, reference (x, y) the 3bit binary value of the edge direction data of each location of pixels in the interior comparison window of the described reference frame of expression, comparison (x+a, y+b) the 3bit binary value of the edge direction data of pixel in the described sampling frame of expression, that is the later on binary value of the edge direction data of corresponding location of pixels of possible movement occurs in the comparison window of described reference frame, sign of operation represents binary logic and computing, its operation result or be logical zero or for logical one, the corresponding numerical value of logical operation function is wherein got in sign of operation " [] " expression, or be numerical value 0, or be numerical value 1, the scale of related coupling operator: a and b have determined the number of the cross correlation coefficient cross_correlation (a, b) that produces, also the comparison window of corresponding described reference frame be moved all may.
The invention has the beneficial effects as follows, it extract two-dimentional edge direction data but not only one dimension edge direction data can further effectively overcome ambient lighting and change for the impact of measuring as the contrast metric of picture frame, thereby improve measuring accuracy.
Description of drawings
Fig. 1 is measurement mechanism block scheme of the present invention.
Fig. 2 is the synoptic diagram that the photoelectric sensor chip carries out the pel array that produces 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. the webcam driver program, 14. cameras are taken and two-dimentional edge direction Frame matching displacement measurement program, 15. light fixture.
Among Fig. 2,20. 1 frame pel arrays, 21. comparison window, related matching area 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.
In the webcam driver program (13) of computer system (5) operation the placing, by USB interface (4) and be connected 6) connect camera (1) and arrive computing machine (5).Then, allow camera focal imaging object being measured.
The preferential measurement environment of selecting is indoor, and the surround lighting radiation variation is little, is conducive to measure.The basic demand of State selective measurements environment is to allow illuminating position that certain variation occurs in measuring process, but can not allow this variation to affect significantly the light and shade contrast of object being measured imaging.Select light fixture (15) to help enforcement of the present invention.For example adopt irreflexive Uniform Illumination mode, or its intensity of light fixture can be better than the impact of environment parasitic light.The material of object being measured preferably has more careful surface reflection feature, can select this type of material to make target, avoids or overcomes smooth reflecting surface material.
The operation camera is taken and two-dimentional edge direction Frame matching displacement measurement program (14), implements to measure in real time displacement.This program (14) has comprised take the method for two-dimensional contrast as the characteristic frame matching displacement measurement, and concrete steps see that " summary of the invention " describe, and the below is as follows with regard to its general condensed summary.
Fig. 2 represents that photoelectric sensor chip (3) carries out the corresponding pel array (20) that produces after the opto-electronic conversion: M * N, M, and N ∈ integer, wherein, middle section has been chosen a comparison window (21) zone: m * n, m, n ∈ integer.After object was subjected to displacement, it is interior somewhere that comparison window might move to the sampling frame in the reference frame, and related matching area illustrated embodiment 22 places in the frame of for example taking a sample do not go beyond the limit of position 23 but do not allow the interior comparison window of reference frame to move.
The initial value of the scale in comparison window zone is m in the described reference frame of step 1
0* n
0, m
0, n
0The ∈ positive integer, relevant with the fine degree of the architectural feature of object reflecting surface, be related to (coupling) measuring accuracy, determining amount of calculation, affect the speed of response of measurement mechanism.Consider resolution and the frame per second index of camera, this initial value can be selected arbitrarily, for example, chooses initial value: m
0=80, n
0=80.Then, in step 3, four and ten, utilize self-correlation to analyze the fine degree of the architectural feature of measured object surface, see that under current photoenvironment can the scale of comparison window pel array present abundant details in the reference frame, be beneficial to related matching algorithm, and then find the comparison window pel array of optimum macro.
In the step 1, five and 11, select as far as possible faster frame per second of shooting speed, guarantee that shooting speed is faster than the velocity of displacement of testee.
Pixel edge direction data described in the step 2, five and 11 have reflected two-dimentional light and shade contrast's feature on testee surface, and its direction is corresponding X-direction and Y direction respectively.
Step 3, four and ten is whether the fine degree of utilizing the auto correlation matching factor to analyze the architectural feature of measured object surface adapts with the comparison window scale that adopts.The auto correlation matching factor has reflected that the picture in comparison window and the zone of its contiguous identical scale is like degree.If edge direction data corresponding to the pixel of comparison window and adjacent domain thereof are too similar, be not easy to distinguish, so, comparison window and its adjacent domain corresponding auto correlation matching factor auto_correlation (a, b) can be near the auto correlation matching factor auto_correlation (0 of comparison window self, 0), at this moment need to enlarge the scale of comparison window, otherwise, these two coefficient auto_correlation (a, b) and auto_correlation (0,0) can differ larger.The parameter s imilarity that sets in advance has described the similarity degree of comparison window and the pel array of its contiguous identical scale, can debug and selects according to the quality on light conditions and measured object surface.When the number that satisfies the auto correlation matching factor of following inequality when selected comparison window zone equals k * k * 1/3, think to have searched best comparison window pel array:
auto_correlation(a,b)≥auto_correlation(0,0)×similarity
Otherwise, can automatically enlarge or dwindle the scale m=m of comparison window
0± step, n=n
0± step, 2h=M-m, 2v=N-n is conducive to reduce amount of calculation, and wherein, when the scale of comparison window was reelected in each trial, the parameter s of going forward one by one tep increased by 1.Extreme situation is, the reflectance signature of measured object surface is careful not, and the adjustment of comparison window scale exceeds certain preestablished limit scope in the reference frame scope, provides the prompting warning this moment.
" satisfy the number of the auto correlation matching factor of above-mentioned inequality " and also not necessarily must equal k * k * 1/3, can be according to material, illumination and the measured actual conditions adjustment such as movement velocity.
Can obtain separately best comparison window pel array along X-direction and Y direction, get its large one and be the comparison window pel array.
Basic thought in the step 6, ten and 12 is that the displacement of determining that frame of pixels occurs is taken this in the zone of adopting first the interior relatively frame of fairly large cross correlation operator matrix search and reference frame to be complementary most.Then, according to the displacement size that obtains, adjust the scale of cross correlation operator matrix, in the hope of reducing calculated amount.The scale of cross correlation operator matrix is greater than contingent displacement range.Can obtain separately two displacement components along X-direction and Y direction, get its mean value and be this measurement result.
Relate to the position of the built-in comparison window of mobile reference frame or the method for renewal reference frame in the step 9, be conducive to guarantee that comparison window has considerable overlapping region with the corresponding associated region of sampling frame in the described reference frame, get rid of repeatedly to take and measure afterwards cumulative measurement error, to reflect the measuring accuracy less than a pixel unit.Its principle is referring to " using the computing machine camera to measure 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, this threshold value is to adjust according to the situations such as scale of frame and comparison window.
Claims (1)
1. one kind take the method for two-dimensional contrast as the characteristic frame matching displacement measurement, it utilizes the logical computing machine of a Daepori that a computing machine camera is installed and measures two-dimension displacement, it is characterized in that, the method is taken by described camera and is implemented frame Matched measurement two-dimension displacement according to two-dimentional edge direction data, comprises the following steps:
Step 1, take the image of a frame testee with the form of bitmap M * N, wherein, M, N ∈ positive integer are as the reference frame; Take the position of first pixel in this frame pel array upper left corner as initial point, be X-direction to right, vertical downward direction is Y direction; Choose a zone at the middle section of described pel array, scale is m * n, wherein, and m=m
0, n=n
0, m
0, n
0The ∈ positive integer is referred to as comparison window, and the horizontal direction of the described pel array of its distance and the edge pixel of vertical direction respectively have h and v pixel, namely have: m
0+ 2h=M, n
0+ 2v=N, h, v ∈ positive integer;
Step 2, for the pel array of above-mentioned reference frame, by pixel column, by the edge direction data of pixel column derivation along X-direction and Y direction, and with the binary numeral 001 of 3bit, 010 and 100 wherein positive limit, marginal and the 3rd class limits of expression respectively, so consisted of corresponding described reference frame pel array about X-direction with about two frame edge direction data { reference of Y direction
x(x, y) } and { reference
y(x, y) }, wherein, subscript x or y represent the direction of the coordinate axis on institute edge, all pixel (x in the change in coordinate axis direction comparison window that symbol " { } " expression indicates along function subscript wherein, y) set of the edge direction data reference (x, y) that locate, this expression mode is applicable to the step of back; Preserve these data;
Step 3, for above-mentioned two frame edge direction data, calculate respectively the auto correlation matching factor of the pel array of comparison window in the described reference frame:
In the formula, sign of operation represents binary logic and computing, its operation result or be logical zero or for logical one, the corresponding numerical value of logical operation function is wherein got in sign of operation " [] " expression, or is numerical value 0, or is numerical value 1, the combination of parametric variable a, b has determined the scale of related coupling operator array, gets 3 * 3 related coupling operator arrays: a=-1,0,1, b=-1,0,1, therefore, each will produce 9 auto correlation matching factor auto_correlation along each change in coordinate axis direction
x(a, b) and auto_correlation
y(a, b);
Step 4, according to auto correlation matching factor corresponding to above-mentioned two frame edge direction data, search for respectively 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 large person of array scale in this two class value and be the scale of comparison window array: m * n;
Step 5, through Δ t after a while, take the second framing bit figure, as the sampling frame;
Line by line, determine that by column pixel is along the edge direction data of X-direction and Y direction in this sampling frame, respectively with the binary numeral 001 of 3bit, 010 and 100 expression positive limit, marginal and the 3rd class limits wherein, so two frame edge direction data { comparison of acquisition sampling frame
x(x, y) } and { comparison
y(x, y) }, preserve these data;
Step 6, along X-direction and Y direction, corresponding described reference frame and described sampling frame two frame edge direction data separately, respectively the pel array in the comparison window in the described reference frame is carried out the cross correlation coupling according to 9 * 9 related coupling operator arrays in described sampling frame scope and calculate, namely parametric variable a, b are taken as:
A=-4 ,-3 ,-2 ,-1,0 ,+1 ,+2 ,+3 ,+4, b=-4 ,-3 ,-2 ,-1,0 ,+1 ,+2 ,+3 ,+4, therefore obtain two groups of cross correlation matching factors;
Step 7, for two groups of cross correlation matching factors that obtain, get respectively direction and mobile amplitude that wherein the corresponding parametric variable a of value the maximum, b move relative to described reference frame as described sampling frame:
Δ
xx=a
1,Δ
xy=b
1;Δ
yx=a
2,Δ
yy=b
2;
In the formula, Δ x, Δ y represent respectively the displacement that X-direction and Y direction occur, and subscript x, y represent that respectively the displacement correspondence that occurs the change in coordinate axis direction on edge direction data institute edge, and numeric suffix 1,2 is in order to distinguish two groups of results;
During this was measured, described sampling frame relative to direction and the mobile amplitude that described reference frame moves was:
In the formula, i represents the sequential counting that this measurement is taken, and j represents 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)+c,
Δy
0(i,j)=Δy
0(i-1,j)+Δy(i,j)=Δy
0(i-1,j)+d
In the formula, (Δ x
0(i-1, j), Δ y
0(i-1, j)) represent this measure before the displacement of accumulation;
The velocity of step 8, ohject displacement is:
Δv
x(i,j)=Δx(i,j)/Δt=c/Δt,Δv
y(i,j)=Δy(i,j)/Δt=d/Δ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) | (j-1) be illustrated in last sequential counting value of taking in the situation that the reference frame sequential counting is j-1, namely under the condition that described reference frame does not change, the accumulation of the relative displacement that comparison window wherein occurs exceeded this comparison window amplitude 2/5, at this moment, replace described reference frame with up-to-date sampling frame, 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 described reference frame, but the comparison window generation relative displacement Δ x=-c in the described reference frame, Δ y=-d;
If step 10 has been upgraded reference frame, obtain to should the reference frame pel array about X-direction with about two frame edge direction data { reference of Y direction
x(x, y) } and { reference
y(x, y) }, preserve these data, wherein, subscript x or y represent the direction of the coordinate axis on institute edge, all pixel (x in the change in coordinate axis direction comparison window that symbol " { } " expression indicates along function subscript wherein, y) set of the edge direction data reference (x, y) that locate; Two calculating formulas listing according to step 3 are calculated the auto correlation matching factor auto_correlation corresponding to two frame edge direction data of described new reference frame
x(a, b) and auto_correlation
y(a, b); Search for respectively accordingly 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=n0-step, 2h=M-m
x, 2v=N-n
xAnd 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 large person of array scale in this two class value and be the scale of comparison window array: m * n;
If do not upgrade reference frame, be used for the size of the association coupling operator array of cross correlation coupling calculating described in the set-up procedure six:
If | c|<5 and | d|<5, m, n ∈ positive integer changes to take 7 * 7 related coupling operator arrays, namely parametric variable a, b are taken as: a=-3 ,-2 ,-1,0 ,+1 ,+2 ,+3, b=-3 ,-2 ,-1,0 ,+1 ,+2 ,+3,
If | c|<3 and | d|<3, m, n ∈ positive integer changes to take 5 * 5 related coupling operator arrays, namely parametric variable a, b are taken as: a=-2 ,-1,0 ,+1 ,+2, b=-2 ,-1,0 ,+1 ,+2,
Otherwise, still be taken as 9 * 9 related coupling operator arrays;
Step 11, again through Δ t after a while, take a new framing bit figure as the sampling frame;
Pursue pixel column, derive this new sampling frame along the edge direction data of X-direction and Y direction by pixel column, and with the binary numeral 001 of 3bit, 010 and 100 wherein positive limit, marginal and the 3rd class limits of expression respectively, so consisted of corresponding described new sampling frame pel array about X-direction with about two frame edge direction data { comparison of Y direction
x(x, y) } and { comparison
y(x, y) }, preserve these data;
Step 12, according to the association coupling operator array that the cross correlation coupling is calculated that is used for of determining in the step 10, the reference frame of determining for step 9 and the separately two frame edge direction data of the sampling frame of step 11 acquisition, along X-direction and Y direction, the pel array in the comparison window in the described reference frame is carried out the cross correlation coupling calculate in described sampling frame scope respectively;
Step 13, jump to step 7, continue to measure;
The definition of the described edge direction data of above-mentioned steps two, step 5, step 10, step 11 and step 12 is: in the pel array, along X-axis or along Y direction, if the light intensity value of a pixel is than the also little error margin value error of second corresponding light intensity value of pixel of its back, if namely
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; If the light intensity value of a pixel is than second corresponding light intensity value of pixel of its back large error margin value error also, if namely
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 an edge this is axial marginal; The limit that so obtains is positioned at the position of first pixel after this pixel, also namely is positioned on that pixel in the centre position that participates in two pixels relatively; If second corresponding light intensity value of pixel of certain light intensity value of a pixel and its back approaches, its value differs and is no more than an error margin value error, if namely
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 " along this direction of principal axis between these two pixels, or be referred to as the 3rd class limit;
Along some change in coordinate axis direction, all positive limit of corresponding pixel column or pixel column, marginal and the 3rd class limit form this row maybe these row along the edge direction data of this change in coordinate axis direction; According to concrete light conditions, the error margin value error that presets in the above-listed formula is a little numerical value; There are not the edge direction data in four limits in the pel array and the location of pixels on the angle;
Above-mentioned steps four comprises with the searching method of best comparison window pel array described in the step 10:
For the related coupling of k * k operator array, wherein, k ∈ positive integer can produce k * k auto correlation matching factor along certain change in coordinate axis direction, compares 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, is expressed as a percentage, and sets in advance, and debugs and selects according to the quality on light conditions and measured object surface;
If the auto correlation matching factor that satisfies above-mentioned inequality more than k * k * 1/3, needs to enlarge the capable and step row of each step of scope of comparison window: make m=m
0+ step, n=n
0+ step, recomputate the auto correlation matching factor of new comparison window, and carry out above-mentioned comparison, until satisfy the no more than k * k of auto correlation matching factor of above-mentioned inequality * 1/3, at this moment, 2h=M-m, 2v=N-n, wherein, step is stepped parameter, initial value is 1, needs the scale of expansion comparison window just to increase by 1 at every turn; 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 unsuitable for the surveying work of this device, and provide the prompting warning;
If satisfy the no more than k * k 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, 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 matching factor of comparison window, and carry out above-mentioned comparison, wherein, the initial value of stepped parameter step is 1, the scale of at every turn dwindling comparison window just increases by 1, equals or is approximately equal to k * k * 1/3 until the number of the auto correlation matching factor of above-mentioned inequality is satisfied in selected comparison window zone, thinks at this moment to have searched best comparison window pel array;
The method that the coupling of cross correlation described in above-mentioned steps six and the step 12 is calculated is:
Corresponding along X-direction or along frame edge direction data of Y direction, respectively the pel array in the comparison window in the described reference frame is carried out following computing in described sampling frame scope:
In the formula, reference (x, y) each location of pixels (x in the interior comparison window of the described reference frame of expression, y) the edge direction data of locating, comparison (x+a, y+b) location of pixels (x in the described sampling frame of expression, y) the edge direction data of locating, these data all represent with the 3bit binary value, sign of operation represents binary logic and computing, its operation result or be logical zero or for logical one, the corresponding 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 related coupling operator array and the number of the cross correlation matching factor cross_correlation (a, b) that produces.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009101909256A CN102022982B (en) | 2009-09-22 | 2009-09-22 | Method and device for matching measured displacement with two-dimensional contrast as characteristic frame |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009101909256A CN102022982B (en) | 2009-09-22 | 2009-09-22 | Method and device for matching measured displacement with two-dimensional contrast as characteristic frame |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102022982A CN102022982A (en) | 2011-04-20 |
CN102022982B true CN102022982B (en) | 2013-02-27 |
Family
ID=43864566
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009101909256A Expired - Fee Related CN102022982B (en) | 2009-09-22 | 2009-09-22 | Method and device for matching measured displacement with two-dimensional contrast as characteristic frame |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102022982B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109745073B (en) * | 2019-01-10 | 2021-08-06 | 武汉中旗生物医疗电子有限公司 | Two-dimensional matching method and equipment for elastography displacement |
CN111829439B (en) * | 2020-07-21 | 2021-06-25 | 中山大学 | High-precision translation measuring method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2005950A (en) * | 1977-10-07 | 1979-04-25 | Secretary Industry Brit | Position detecting apparatus |
FR2835603A1 (en) * | 2002-02-01 | 2003-08-08 | Holo 3 | Optical measurement of displacement and or deformation of an object, e.g. for civil engineering and industrial use, whereby a simple camera is used in conjunction with a calibrated target fixed to the object to be monitored |
CN2634428Y (en) * | 2003-07-24 | 2004-08-18 | 南京理工大学 | Displacement automatic reading device based on image |
CN1776358A (en) * | 2005-11-23 | 2006-05-24 | 宁铎 | Newmethod for contactless measuring displacement and deformation of object in three-dimensional space |
CN100458359C (en) * | 2006-03-02 | 2009-02-04 | 浣石 | Small-displacement measuring system in long-distance plane |
US7519502B1 (en) * | 2003-09-05 | 2009-04-14 | The United States Of America As Represented By The Secretary Of The Navy | Surface profile measurement processing method |
-
2009
- 2009-09-22 CN CN2009101909256A patent/CN102022982B/en not_active Expired - Fee Related
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2005950A (en) * | 1977-10-07 | 1979-04-25 | Secretary Industry Brit | Position detecting apparatus |
FR2835603A1 (en) * | 2002-02-01 | 2003-08-08 | Holo 3 | Optical measurement of displacement and or deformation of an object, e.g. for civil engineering and industrial use, whereby a simple camera is used in conjunction with a calibrated target fixed to the object to be monitored |
CN2634428Y (en) * | 2003-07-24 | 2004-08-18 | 南京理工大学 | Displacement automatic reading device based on image |
US7519502B1 (en) * | 2003-09-05 | 2009-04-14 | The United States Of America As Represented By The Secretary Of The Navy | Surface profile measurement processing method |
CN1776358A (en) * | 2005-11-23 | 2006-05-24 | 宁铎 | Newmethod for contactless measuring displacement and deformation of object in three-dimensional space |
CN100458359C (en) * | 2006-03-02 | 2009-02-04 | 浣石 | Small-displacement measuring system in long-distance plane |
Non-Patent Citations (5)
Title |
---|
JP特开2002-340529A 2002.11.27 |
JP特表2009-525464A 2009.07.09 |
任航等.基于灰度投影法运动估计的成像CCD平移补偿法.《应用光学》.2009,第30卷(第3期),全文. * |
杨福俊等.ESPI技术测量静态和准动态面内位移.《光电子.激光》.2003,第14卷(第10期),全文. * |
魏升等.基于小物体的LCD数字相移条纹投影轮廓测量.《南昌大学学报.工科版》.2007,第29卷(第2期),全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN102022982A (en) | 2011-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109883533B (en) | Low-frequency vibration measurement method based on machine vision | |
CN109559348B (en) | Bridge non-contact deformation measurement method based on feature point tracking | |
US10893197B2 (en) | Passive and active stereo vision 3D sensors with variable focal length lenses | |
CN105046271A (en) | MELF (Metal Electrode Leadless Face) component positioning and detecting method based on match template | |
CN103471910A (en) | Intelligent breaking elongation test method of metal material based on random point tracking | |
US20200053291A1 (en) | Structured light 3d sensors with variable focal length lenses and illuminators | |
CN105957107A (en) | Pedestrian detecting and tracking method and device | |
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 | |
CN113095323A (en) | SIFT-improvement-based digital image correlation method real-time detection method | |
CN107945166A (en) | The measuring method of object under test three-dimensional vibrating track based on binocular vision | |
CN102052901B (en) | Displacement match-measuring method using two-dimensional trichromatic contrast ratio as characteristic frame | |
CN102095374B (en) | Method and device for measuring displacement along optical axis direction by using peaks and valleys of three primary colors as characteristics | |
TWI240214B (en) | Optimized correlation matching method and system for determining track behavior | |
CN102022983B (en) | Method and device for measuring two-dimensional displacement by matching contrast serving as characteristic frame | |
CN102102981B (en) | Method and device for frame matching displacement measurement by using two-dimensional single color contrast ratio as characteristics | |
CN102052899B (en) | Take trichromatic contrast ratio as method and the device of characteristic frame Matched measurement two-dimension displacement | |
CN112485262B (en) | Method and device for detecting apparent crack width and expansion evolution of concrete | |
CN108733913A (en) | A kind of ophthalmology OCT equipment lateral resolution detection methods based on DWPSO algorithms | |
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 | |
CN102116608B (en) | Method and device for measuring axial displacement by using one-dimensional peaks and valleys as characteristic | |
CN102102979B (en) | Single primary color peak-valley motion detecting method and device for measuring subpixel displacement | |
CN102102980B (en) | Method and device for measuring axial displacement by using sing primary color contrast as characteristic | |
CN102116607A (en) | Method and device for measuring axial displacement characterized by one-dimensional (1D) contrast ratio |
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: 20130227 Termination date: 20130922 |