CN102022981B - Peak-valley motion detection method and device for measuring sub-pixel displacement - Google Patents

Peak-valley motion detection method and device for measuring sub-pixel displacement Download PDF

Info

Publication number
CN102022981B
CN102022981B CN 200910190924 CN200910190924A CN102022981B CN 102022981 B CN102022981 B CN 102022981B CN 200910190924 CN200910190924 CN 200910190924 CN 200910190924 A CN200910190924 A CN 200910190924A CN 102022981 B CN102022981 B CN 102022981B
Authority
CN
China
Prior art keywords
peak
paddy
primary colours
limit
error
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
CN 200910190924
Other languages
Chinese (zh)
Other versions
CN102022981A (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 CN 200910190924 priority Critical patent/CN102022981B/en
Publication of CN102022981A publication Critical patent/CN102022981A/en
Application granted granted Critical
Publication of CN102022981B publication Critical patent/CN102022981B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to a peak-valley motion detection method and a peak-valley motion detection device for measuring sub-pixel displacement. The peak-valley motion detection device for measuring the sub-pixel displacement consists of a common computer and a camera thereof. The peak-valley motion detection method for measuring the sub-pixel displacement comprises the following steps of: shooting one frame and selecting an observation line and an observation row with the most reflection characteristics of a measured object according to side direction data along a coordinate direction; then shooting one frame and determining the respective side direction data, the peak and the valley of three primary colors of the two frames; if the number of the peak or the valley of the mutual displacement relationship between the observation line and the observation row and certain preset percentage exceeding the number of the peak and the valley of each axial primary color are not determined through comparison, determining 'mistrack' and shooting one frame again; and if the number of the peak or the valley of the mutual displacement relationship between the observation line and the observation row and certain preset percentage exceeding the number of the peak and the valley of the axial primary color are determined through comparison, calculating the sub-pixel displacement of each primary color in each axial direction respectively according to the moving directions and the number of the peak and the valley of each primary color in the successively continuous two frames and taking the average value as the total displacement. The influence of ambient illumination change is effectively overcome, and the device and the method are suitable for the occasion where the speeds of the displacement and the illumination change are far lower than the speed of the shooting frames.

Description

Measure peak valley motion detection method and the device of Displacement
Technical field
The invention belongs to the digital picture field of measuring technique, particularly relate to method and the device thereof of the two-dimentional micro-displacement that adopts computing machine camera noncontacting measurement object.
Background technology
The computing machine camera had promptly obtained to popularize in recent years, generally was used for the Internet video chat or monitored shooting work, and its core is CCD and CMOS photoelectronic imaging chip, i.e. photosensor arrays.And also be the photodetection pel array in the core of its optical orientation device of inventing previously, be used for surveying the two-dimensional movement on its surface, relative place.Therefore, investigate the application that the optical orientation device is of value to open camera.
U.S.Pat.No.5,288,993 have disclosed a cursor orienting device that utilizes photodetector array, and an illuminated target ball is arranged in its structure, and this target ball must have the speckle of stochastic distribution.U.S.Pat.No.5,703,356 have further disclosed the optical orientation device of a mouse form, and it does not need the target ball, and it utilizes only directly comes from the reflection of surface that orienting device moves.Above-mentioned United States Patent (USP) extracts and the relevant information of moving based on so-called " limit motion detection technology ", described limit is defined as in the photo detector array spatial-intensity poor between two pixels, the relative motion of each of these limits is tracked and measure, and takes this to determine to represent total displacement of relative motion between the illuminated part on photo detector array and surface, place.
According to U.S.Pat.No.5,288,993, the pixel of arranging along first axle of photosensor arrays and second axle respectively between determine " limit ", photosensor arrays can be quadrature can not be quadrature also.Limit Ex and E in this patent yBe defined as the centre that is positioned at two pixels the most contiguous.According to U.S.Pat.No.5,288,993 and U.S.Pat.No.5,703,356, on the one hand, it is poor to calculate along the normalization between the number of the number of the limit Ex that the positive dirction of first axle is moved and the limit Ex that moves along the opposite direction of first axle, on the other hand, calculate along the limit E that the positive dirction of second axle is moved yNumber and the limit E that moves along the opposite direction of second axle yNumber between normalization poor, relatively the relative motion on limit can be determined in these limits in the photosensor arrays in the position of in succession two time points.
Typical optical orientation device comprises a light source, infrared LEDs for example, this light source is according to the definite order part of illumined surface off and on, the picture element signal of photoelectronic detecting array is sampled according to determined order, the image that is used for two frame limits in succession relatively is provided, thereby has determined array apparent surface's motion.
According to a scheme of above-mentioned two United States Patent (USP)s, adopt differential technique to be conducive to determine the condition on a limit between two pixels.Its definition about the limit is: if greater than certain value of having determined, there is a limit between these two pixels in the ratio of the intensity of two photosensitive units.Give the definition expression of level or vertical direction about the edge in the document, and point out, above-mentioned condition E xAnd E yAnd do not rely on direction or the meaning on limit, just show whether there is a limit between two pixels.
The definition on above-mentioned " limit " and motion detection algorithm have been obtained success in the optical tracking ball.The optical tracking ball is the light intensity pattern of surveying an illuminated ball that is subjected to that the user operates.The light intensity pattern that above-mentioned definition and algorithm need to be detected demonstrates meticulous clearly light-intensity difference.Therefore, the surface-coated randomness pattern that has covered a kind of color of ball is to demonstrate the contrast that is different from background.In addition, these marks are the form of spot mostly, need a predetermined size.U.S.Pat.No.5, the spot size in 288,993 is at 0.5mm 2-0.7mm 2, density is about 1 spot/mm 2The size of these marks relatively is independent of the diameter of ball, still, depends primarily on resolution and the size of photodetector array.U.S.Pat.No.5,703,356 propose, and an independent spot minimally should cover the distance (pixel pitch) of center to center between two neighborhood pixels at the picture on the sensor.The size of the typical spot of in fact, preferentially selecting should be so that about 5 pixels of the surface coverage of this picture.With this understanding, it is constant fully that the number on limit keeps, and less than the number of pixel, moves thereby can be determined and be used for detection fully.
The scheme of above-mentioned detection campaign is applied to the optical orientation device, if a predetermined pattern does not appear in illuminated surface, a serious problem will occur; For example, " without ball " mouse directly uses from a surface at random, and for example the light of coming is reflected on surface paper or desk.U.S.Pat.No.5,703,356 described one without any need for ball optical mouse, still, this scheme needs illuminated surface demonstrate a suitable pattern, this pattern has the dark and bright zone of abundant number, these area size are abundant.
Under any situation, do not have characteristic surface for one, when using above-mentioned technology, in fact the limit of above-mentioned definition can both be detected between each pixel.Therefore, if can not clearly detect and follow the tracks of pattern concrete and limit fine definition, just can not derive any measurement about the relative motion between optical detection device and the illuminated surface.Therefore, above-mentioned motion detection technology can not obtain actual application.
In fact, U.S.Pat.No.5,578,813 and U.S.Pat.No.5,644,139 had disclosed some about the scheme of " illuminated surface produces pure light intensity pattern at random ".These two inventions have proposed the principle of motion detection according to the association of the continuous picture frame of photodetector array output.Yet the light intensity between their comparison neighborhood pixels does not provide any information of the intensity difference (being the limit) about space between the neighborhood pixels, and some restrictions have been implied in the association of the continuous picture frame that proposes in the invention.Especially, in order to derive enough accurate measurement of relative motion, in fact need to be with an angle illumination reference surface that the apparent surface is very low, this angle typically is in surperficial 16 °, U.S.Pat.No.5,288,720 have given explanation more accurately to this.This causes retraining the structure of optical orientation device.In addition, when analyzing the gray scale picture frame, above-mentioned picture frame corresponding technology has showed some restriction, and along with the increase of the figure place length of the intensity of picture, the complicacy exponentially function of association process increases.In the reality, the motion detection that above-mentioned corresponding technology is applied to optical devices is confined to analyze binary Hei-Bai picture.
With reference to above-mentioned United States Patent (USP), submit recently patent of invention " use computing machine camera is measured method and the device of small the two-dimension displacement " (application number: 200910104277.8 of examination to, the applying date: 2009.7.7) analyzed domestic patent document about " shooting " " measurement ", proposed a kind of take the computing machine camera as photoelectric conversion sensor, by the related matching ratio of frame-frame, measure small two-dimension displacement vector and velocity method, but, it remains for the light intensity pattern mates, thereby also needs illumination even and stable.
" Method and sensing device for motion detection in an optical pointing device; such as anoptical mouse " (US 7,122,781 B2, Oct.17,2006, Rotzoll et al.) provides two solutions that are more suitable for the optical orientation device, one of its method is: the pretreatment image frame is to extract the binary data of describing the light intensity difference (being the limit) between the neighborhood pixels, directly follow the tracks of positive limit and marginal direction of motion, calculate the displacement measurement of relative motion, i.e. " Local Edge DirectionMotion Detection Algorithm (local edge direction motion detection algorithm) ".Two of its method is: further extract the limit reflection condition from the edge direction data of extracting, it describes an axial positive limit and marginal continuity along photodetector array, then, the position of two frame limit reflection condition relatively successively, calculate the displacement measurement of relative motion, i.e. " Peak/Null MotionDetection Algorithm (peak/paddy motion detection algorithm) ".This characteristic feature of an invention is: 1) illuminated surface does not apply feature, produces pure light intensity pattern at random; Be easy to extract can be tracked characteristic characteristics and pattern, and be directly used in motion detection.2) shown huge susceptibility to the slight variation of intensity between the pixel, allow the light angle of an applicable wide region, rather than low light angle of needs, strengthening U.S.Pat.No.5,5788,813, U.S.Pat.No.5,644,139 and U.S.Pat.No.5, the contrast of picture on surface in 686, the 720 employed corresponding technologies.3) can analyze gray level image, needed processing shows to such an extent that vigor and simple is arranged especially, and can not increase the complexity of processing.
One of algorithm that this patent so-called " Pcak/Null Motion Detection Algorithm (peak/paddy motion detection algorithm) " is calculated total displacement measurement is as follows:
X PEAK - DISPLACEMENT = N PEAK - RIGHT - N PEAK - LEFT N XPEAK
X NULL - DISPLACEMENT = N NULL - RIGHT - N NULL - LEFT N XNULL
Y PEAK - DISPLACEMENT = N PEAK - UP - N PEAK - DOWN N YPEAK
Y NULL - DISPLACEMENT = N NULL - UP - N NULL - DOWN N YNULL
X DISPLACEMENT = X PEAK - DISPLACEMENT + X NULL - DISPLACEMENT 2 × L PIXEL - PIXEL ;
Y DISPLACEMENT = Y PEAK - DISPLACEMENT + Y NULL - DISPLACEMENT 2 × L PIXEL - PLXEL
Two of the peak of the displacement measurement that this patent calculating is total/paddy motion detection algorithm is:
X DISPLACEMENT = ( N PEAK - RIGHT + N NULL - RIGHT ) - ( N PEAK - LEFT + N NULL - LEFT ) : ( N XPEAK + N XNULL ) × L PIXEL - PIXEL
Y DISPLACEMENT = ( N PEAK - UP + N NULL - UP ) - ( N PEAK - DOWN + N NULL - DOWN ) : ( N YPEAK + N YNULL ) × L PIXEL - PIXEL
In the formula, X, Y and N represent respectively two coordinate axis and number (Number), every implication shown in literal or symbol, for example, N XPEAKAnd N PEAK-RIGHTThe number at the peak that represents respectively the number at X-direction peak and moved right, L PIXEL-PIXELThe expression pel spacing, its unit can be μ m, mm or inch etc.
Above-mentioned two kinds of peaks/paddy motion detection algorithm is not equal to, and still, total number of both peaks and paddy is identical, thereby total displacement measurement all is a pel spacing L PIXEL-PIXELMark, both result of calculation approaches, and all belongs to the sub-pixel displacement.And the method for the second displacement calculating only need to be carried out one time division for each coordinate axis.
Above-mentioned peak-valley motion detecting algorithm is to extract the basis that is characterized as of picture frame, the random variation that has overcome the light intensity pattern is mated the difficulty of bringing to frame-frame, thereby it is superior to aforementioned all patented technologies, has reduced widely the requirement to the optical reflection quality on the surface of its motion.
In addition, above-mentioned peak-valley motion detecting algorithm also has other advantage.At first, the limit reflection number " seen " of detector depends on the focus state of sensor.The second, reflection quilt hypothesis in limit is mobile at pel array, and the mobile range of these limit reflections can not exceed the pel spacing of a unit during continuous double exposure.For a given motion and maximum movement velocity thereof, this condition is content with very little.If the movement of limit reflection exceeds the pel spacing of a unit, above-mentioned motion detection scheme can not determine that this limit reflects wherefrom.If during continuous double exposure, detector moves too fast relative to illuminated surface, this type of situation will occur, and it has represented the situation of a kind of " losing tracking (loss-off-track) ".By checking that those numbers of not knowing to come limit reflection condition wherefrom can detect the situation of this " losing tracking ", at this moment, there is not similar limit reflection condition near the pel spacing scope of the reflection condition of preceding state (frame) current position or current location, these limit reflection condition are defined as " ghost limit reflection condition (ghost edge inflection conditions) ", they can occur potentially along the direction of two coordinate axis, they can be with the respectively in addition detection and tracking of two totalizers along the number of each change in coordinate axis direction, and compare with predetermined certain threshold value, take this to determine the situation of " losing tracking ", and report to outside operator as a caution signal." ghost limit reflection condition " do not counted in limit reflection on the photovoltaic array limit; When they seem not know to come wherefrom, might be from the outside of photovoltaic array.
Above-mentioned detection judges that the method for " losing tracking " is realistic, can realize by algorithm.Certainly, can also find other detection, the method that judgement " loses tracking ".But,, can find that this patent above-mentioned " peak/paddy motion detection algorithm ", and the basis of " local edge direction motion detection algorithm " shortage calculating are beyonded one's depth through carefully analyzing.
In a word, about surveying the United States Patent (USP) technology of relative motion in the optical orientation device, encouraged and used the computing machine camera to measure the thought of the micro-displacement that occurs on the surface of situation at random.Distance between the surface at the relative place of photosensor arrays in the optical orientation device minimum (millimeter magnitude), it adopts monochromatic LED and so on lighting source, its luminous intensity is subjected to electronic circuit control, the illumination of enforcement batch (-type), therefore, it is considerably little to be shone surface area, and illumination is even, its folded light beam can not be subject to the impact of surround lighting radiation, reflected preferably should the surface optical reflectance property.And the appliance computer camera carries out displacement measurement, and photosensor arrays is far away apart from testee, and the optical reflectance property on measured object surface can play larger impact.For example, because visible light frequency is shorter, the reflected light that is carried out the object of opto-electronic conversion by photoelectric sensor can be a mean value of several times reflection; Along with the difference of lighting angle, its diffuse reflection meeting of surface that quality is coarse is very strong, and changing also can be larger; The reflected light that metal and level crossing and so on strong reflection face produces more can change consumingly along with the variation of incident angle of light, the reflection of other object also will be reflected out even, and these all can blur, obscure the texture characteristic of reflecting surface itself; The polarized light that can occur enriching after the sunlight of incident is reflected by the object; The impact of the radiation of other light source or float dust or smog etc. in the measurement environment also can cause the picture frame on testee surface that light intensity variation whole or regional area occurs, and perhaps shows as the light intensity data appearance fluctuation at random of gray level image.These micro-displacements of measuring random surface for using " peak/paddy motion detection Displacement algorithm " have proposed new problem.
Summary of the invention
Function for the photosensor arrays of giving full play to the computing machine camera, the invention provides a kind of peak valley motion detection method and device of measurement Displacement of can Adaptive change relatively little lighting environment, it is take the computing machine camera as photoelectric conversion sensor, immediately take measured object, process through peak/paddy Displacement probe algorithm again, obtain this object with the perpendicular plane of the optical axis of camera on small two-dimension displacement vector and velocity.
The technical solution adopted for the present invention to solve the technical problems is: the object of measurement is positioned in the effective focal imaging scope in optical lens front of computing machine camera, the lighting environment of object being measured is relatively even, stable, described camera is connected to the logical computing machine of a Daepori by USB interface, this allocation of computer USB interface, internal memory, CPU, hard disk, display card and display, keyboard and mouse, operating system, webcam driver program and camera are taken and peak/paddy Displacement locator(-ter), and this program comprises the steps:
Step 1, take a frame (M capable * N row) testee, do not consider two row and two row on the limit of this picture frame, obtain reference frame [(M-2) going * (N-2) be listed as], for the picture frame of this reference frame and thereafter all shootings is determined identical coordinate axis, wherein, M, N ∈ positive integer;
Step 2, for the pel array of above-mentioned reference frame, according to the data of its redness, green and blue component, derive line by line, by column respectively along the redness of X-axis and Y direction, green and edge direction data blueness;
Step 3, calculate red, green and the positive limit of blueness and marginal number sum respectively line by line, by column, the row of getting positive limit wherein and the marginal maximum persons of number sum place and row are respectively as observation row and observation row;
Step 4, according to the edge direction data of selected observation row with three kinds of primary colours of the pixel of observation row, derive respectively along the limit reflection condition of three kinds of primary colours of X-axis and Y direction, and use respectively the number of their corresponding peaks of accumulator count, paddy: N RX axle peak(j), N RX axle paddy(j), N RY axle peak(j) and N RY axle paddy(j), N GX axle peak(j), N GY axle paddy(j), N GY axle peak(j) and N GY axle paddy(j), N BX axle peak(j), N BX axle paddy(j), N BY axle peak(j) and N BY axle paddy(j), wherein, j represents to take the sequential counting value of the frame of acquisition, j ∈ positive integer, and N (umber) represents number, R, G, B represent respectively the red, green and blue look;
Step 5, taken after the described reference frame, through certain quiescent interval dt, (M * N), two row and two row that remove the frame of pixels edge obtain comparison frame [(M-2) * (N-2)] to take the picture of the second frame testee; Selected observation row or observation row in the step 3 are derived respectively along edge direction data and the limit reflection condition of three kinds of primary colours of X-axis and Y direction, and use respectively accumulator count along the peak of X-axis and Y direction, the number of paddy: N RX axle peak(j+1), N RX axle paddy(j+1), N RY axle peak(j+1) and N RY axle paddy(j+1), N GX axle peak(j+1), N GX axle paddy(j+1), N GY axle peak(j+1) and N GY axle paddy(j+1), N BX axle peak(j+1), N BX axle paddy(j+1), N BY axle peak(j+1) and N BY axle paddy(j+1);
The position of the limit reflection condition of three kinds of primary colours of selected observation row and observation row in step 6, the described reference frame of contrast and the described relatively frame, check that wherein those do not know to come " ghost limit reflection condition " wherefrom, that is: these peaks or the paddy found at selected observation row or the observation row of described reference frame, the relevant position of the selected observation row of described relatively frame or observation row and near a pel spacing scope in lack, vice versa, at this moment, add up respectively and follow the tracks of their number: N with six totalizers RX ghost limit(j+1), N RY ghost limit(j+1), N GX ghost limit(j+1), N GY ghost limit(j+1), N BX ghost limit(j+1), N BY ghost limit(j+1);
If have " the ghost limit reflection condition " of two or more primary colours to satisfy in three kinds of primary colours:
Figure G2009101909241D00061
Or
Think that then measurement " loses tracking ", and send a caution signal, in the formula, error margin value error1 represents in the comparison frame along selected observation row or observation row, the number that the ghost limit reflection condition of one of three kinds of primary colours (Red, Green, Blue) occurs accounts for the number percent of whole limits reflection condition number of these primary colours, can preset according to optical property and the measurement environment of body surface, for example be predisposed to: error1=5%; Limit reflection condition on the limit of described relatively frame is not considered " ghost limit reflection condition ", and they might be from the outside of photoelectricity pel array;
If step 7 is measured " losing tracking ", get back to step 1, restart surveying work;
If measuring, step 8 do not have " losing tracking ", then continue this surveying work: along selected observation row and selected observation row, according to the three primary colours component data of camera, use peak/paddy Displacement probe algorithm, calculate respectively the Displacement of three primary colours component:
Figure G2009101909241D00071
Figure G2009101909241D00072
Figure G2009101909241D00073
Figure G2009101909241D00074
Figure G2009101909241D00075
Figure G2009101909241D00076
During this was measured, total Displacement calculating formula was:
In step 9, this measurement, the velocity calculating formula of object is:
Figure G2009101909241D00079
Figure G2009101909241D000710
Step 10, with the comparison frame in the step 5 as new reference frame, apart from taking the certain quiescent interval dt of this frame, again take a frame as new comparison frame, namely jump to step 5, continue to measure.
Wherein, described camera is taken and the definition of the described redness of step 2 of peak/paddy motion detection Displacement program, green or blue edge direction data is:
Component data according to one of red in the pel array, green or these three kinds of primary colours of blueness, along X-axis or along Y direction, if certain three primary colours component value of a pixel is than the also little error margin value error of the corresponding three primary colours component value of second pixel of its back, if namely
I (X, Y) Red<I Red(X+2, Y)-error or I (X, Y) Red<I (X, Y+2) Red-error
I (X, Y) Green<I Green(X+2, Y)-error or I (X, Y) Green<I (X, Y+2) Green-error
I (X, Y) Blue<I Blue(X+2, Y)-error or I (X, Y) Blue<I (X, Y+2) Blue-error
Then define and have a positive limit redness, green or blue between these two pixels; If certain three primary colours component value of a pixel is than the corresponding three primary colours component value of second pixel of its a back large error margin value error also, if namely
I (X, Y) Red>I Red(X+2, Y)+error or I (X, Y) Red>I (X, Y+2) Red+ error
I (X, Y) Green>I Green(X+2, Y)+error or I (X, Y) Green>I (X, Y+2) Green+ error
I (X, Y) Blue>I Blue(X+2, Y)+error or I (X, Y) Blue>I (X, Y+2) Blue+ error
Then define and have the marginal of a redness, green or blueness between these two pixels; 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 the corresponding three primary colours component value of second pixel of certain three primary colours component value of a pixel and its back approaches, its RGB component value differs and is no more than an error margin value error, if namely
I (X+2, Y) Red-error<I (X, Y) Red<I (X+2, Y) Red+ error or I (X, Y+2) Red-error<I (X, Y) Red<I (X, Y+2) Red+ error;
I (X+2, Y) Green-error<I (X, Y) Green<I (X+2, Y) Green+ error or I (X, Y+2) Green-error<I (X, Y) Green<I (X, Y+2) Green+ error;
I (X+2, Y) Blue-error<I (X, Y) Blue<I (X+2, Y) Blue+ error or I (X, Y+2) Blue-error<I (X, Y) Blue<I (X, Y+2) Blue+ error;
Then think not have this color wavelength corresponding " limit " between these two pixels, or be referred to as the limit of the 3rd this color of class; Along some change in coordinate axis direction, the positive limit of all redness and red limit marginal and the 3rd class redness form the edge direction data of this direction redness, the positive limit of all greens and green limit marginal and the 3rd class green form the edge direction data of this direction green, and the positive limit of all bluenesss and blue limit marginal and the 3rd class blueness form the edge direction data of this direction blueness; Error margin value in the following 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.
Described camera take and the described step 4 of peak/paddy motion detection Displacement program and step 5 described in along the limit reflection condition of three kinds of primary colours of X-axis and Y direction, it is defined as:
Redness, green or blue edge direction data according to selected observation row and the pixel of observation row, along X-axis or along Y direction, if continuous two or more than the positive limit of certain primary colours of two, or continuous two or more than and then these primary colours marginal after the 3rd class limit of these primary colours of two, be referred to as the first kind limit reflection condition of these primary colours, namely think the peak that has these primary colours in this position; If continuous two or marginal more than certain primary colours of two, or continuous two or more than the and then positive limit of these primary colours after the 3rd class limit of these primary colours of two, be referred to as the Equations of The Second Kind limit reflection condition of these primary colours, namely think the paddy that has these primary colours in this position.
Peak described in the described step 8 of described camera shooting and peak/paddy motion detection Displacement program/paddy Displacement probe algorithm comprises:
For certain three primary colours wavelength, more described reference frame compares observation row selected in the frame and observes the corresponding peak of row, the position of paddy with described, take this to judge described observation row and observe peak corresponding in the row, the moving direction of paddy, and use respectively accumulator count to follow the tracks of described peak, paddy along the situation of movement of described coordinate axis, particularly
In described observation row pixel, if the position of the peak of some three primary colours in frame relatively relatively its displacement to the right of the position in reference frame a pel spacing unit, then follow the tracks of the totalizer N of the number of this primary colours peak displacement to the right The peak moves right+ 1, if the position of some three primary colours peak in frame relatively relatively its position in reference frame to left dislocation a pel spacing unit, then follow the tracks of this primary colours peak to the totalizer N of the number of left dislocation The peak is to moving to left+ 1; If the position of the paddy of some three primary colours in frame relatively relatively its displacement to the right of the position in reference frame a pel spacing unit, then follow the tracks of the totalizer N of number of the paddy displacement to the right of these primary colours Paddy moves right+ 1, if the position of the paddy of some three primary colours in frame relatively relatively its position in reference frame to left dislocation a pel spacing unit, then follow the tracks of the paddy of these primary colours to the totalizer N of the number of left dislocation Paddy is to moving to left+ 1;
In described observation row pixel, if the position of the peak of some three primary colours in frame relatively relatively its position in reference frame to top offset a pel spacing unit, then follow the tracks of the peak of these primary colours to the totalizer N of the number of top offset The peak upwards moves+ 1, if the position of the peak of some three primary colours in frame relatively relatively its position in reference frame to bottom offset a pel spacing unit, then follow the tracks of the peak of these primary colours to the totalizer N of the number of bottom offset The peak is to moving down+ 1; If the position of the paddy of some three primary colours in frame relatively relatively its position in reference frame to top offset a pel spacing unit, then follow the tracks of the paddy of these primary colours to the totalizer N of the number of top offset Paddy upwards moves+ 1, if the position of the paddy of some three primary colours in frame relatively relatively its position in reference frame to bottom offset a pel spacing unit, then follow the tracks of the paddy of these primary colours to the totalizer N of the number of bottom offset Paddy is to moving down+ 1;
If N The peak moves right(j+1)>N The peak is to moving to left(j+1), then count Δ X Peak shift(j+1)=+ 0.5,
If N The peak moves right(j+1)<N The peak is to moving to left(j+1), then count Δ X Peak shift(j+1)=-0.5;
If N Paddy moves right(j+1)>N Paddy is to moving to left(j+1), then count Δ X The paddy displacement(j+1)=+ 0.5,
If N Paddy moves right(j+1)<N Paddy is to moving to left(j+1), then count Δ X The paddy displacement(j+1)=-0.5;
Figure G2009101909241D00101
Similarly,
If N The peak upwards moves(j+1)>N The peak is to moving down(j+1), then count Δ Y Peak shift(j+1)=+ 0.5,
If N The peak upwards moves(j+1)<N The peak is to moving down(j+1), then count Δ Y Peak shift(j+1)=-0.5,
If N Paddy upwards moves(j+1)>N Paddy is to moving down(j+1), then count Δ Y The paddy displacement(j+1)=+ 0.5,
If N Paddy upwards moves(j+1)<N Paddy is to moving down(j+1), then count Δ Y The paddy displacement(j+1)=-0.5,
Figure G2009101909241D00102
In the above-mentioned formula, L Pixel-pixelThe expression pel spacing, its unit can be μ m, mm or inch etc., the implication of other symbol such as character institute mark, for example, N is number (Number), and above-mentioned calculating formula all ought be applied to respectively certain concrete three primary colours component data of camera pel array.
Advantage of the present invention is, the photosensor arrays of the method in the common computing machine camera is as displacement transducer, RGB data according to the picture frame pixel, calculate respectively the directional information on limit of the difference of the light intensity between the description neighborhood pixels of three kinds of primary colours, it is with " peak " and " paddy ", the physics light and shade contrast distribution characteristics of three kinds of primary colours in the reflected light pattern on testee surface namely, as the foundation of measuring Displacement, because the wavelength of three kinds of primary colours is measured respectively calculating simultaneously, be aided with again average algorithm, overcome the impact that other wavelength is changed by ambient lighting, having reduced the error measured in suitable degree, calculated results corresponding displacement measurement errors is≤± 0.25L Pixel-pixel~± 0.5L Pixel-pixelSimultaneously, this invention is only got reflecting surface picture frame contrast and is changed the delegation of maximum and the representative that a row conduct is measured, and has both utilized photosensor arrays, has simplified again amount of calculation, has guaranteed that two-dimension displacement is measured and measurement sensitivity.The present invention has utilized the opto-electronic conversion fast response characteristic of optoelectronic sensor, is suitable for speed of moving body and illumination variation speed all far below the situation of the photographed frame speed of camera.
Description of drawings
Further specify the present invention below in conjunction with accompanying drawing.
Fig. 1 is measurement mechanism block scheme of the present invention.
Fig. 2 represents 3 * 3 pel arrays and the edge direction data that derive according to definition thereof.Among the figure, pixel of a box indicating, the number of the point in the square frame more multilist shows that the brightness of this pixel is darker, determined positive limit and marginally show that with the thick line segment table wherein the positive and negative direction on four of the periphery of this pel array limits also represents with arrow respectively.
Fig. 3 represents that photodetector array is along edge direction data (positive limit and marginal) and the limit reflection condition (Feng Hegu) of certain image photosignal that axially obtains and a sequence deriving accordingly.
Fig. 4 follows the tracks of the limit reflection condition along certain axle to carry out the synoptic diagram that Displacement is measured.
Fig. 5 is the diagram of peak/paddy Displacement probe algorithm.Wherein, arrow upwards represents positive limit, and arrow represents marginal downwards, uniform mean line on the equal denotation coordination planimetric map of dotted line and fine line, each pixel coverage that the interval expression of the five equilibrium of horizontal ordinate separates.
Among Fig. 1,1. computing machine camera, 2. optical lens, 3. photoelectronic imaging chip, the 4. USB interface of camera, 5. computer system, 6. the USB interface of computing machine, 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 peak/paddy motion detection Displacement program, 15. light fixture.
Among Fig. 3, delegation's image light--the electric signal that 21. photosensor arrays detect; 22. delegation's light that photosensor arrays detects--electric signal 21 is through the later Digital output signal of integrator peak value processing of circuit; 23. the edge direction data corresponding with delegation's output signal 22 of photosensor arrays, arrow upwards represents positive limit, and arrow represents marginal downwards; 24. the limit reflection condition corresponding with delegation edge direction data 23 comprises two peaks and a paddy.
Among Fig. 4, delegation's edge direction data in the reference frame of once taking before 31.; 32. the limit reflection condition corresponding with delegation's edge direction data in the front reference frame of once taking 31 comprises two peaks and a paddy; 41. after delegation's edge direction data in the comparison frame once taken; 42. with after limit reflection condition corresponding to delegation's edge direction data 41 in the comparison frame once taken, comprise two peaks and a paddy; Arrow upwards represents positive limit, and arrow represents marginal downwards.
Above-mentioned Fig. 2, Fig. 3 and Fig. 4 all use for reference self-reference data (US 7,122,781 B2, Oct.17,2006, Rotzoll et al.).
--electric signal 510, delegation's image light--electric signal 511 and delegation's image light--512 3 kinds of situations of electric signal that among Fig. 5, delegation's image light--the electric signal that 51. photosensor arrays detect comprises delegation's image light; 52. delegation's image light--electric signal 510 is through integrator peak value processing of circuit later Digital output signal and the corresponding just diagram of limit, marginal He Feng, paddy thereof; 53.~57. delegation's image light--Displacement occurs to the right in electric signal 510 gradually, through integrator peak value processing of circuit later Digital output signal and the corresponding just diagram of limit, marginal He Feng, paddy thereof.
Embodiment
Fig. 1 is the block scheme of measurement mechanism of the present invention.Described camera (1) is by optical lens (2), the USB interface (4) of photoelectronic imaging chip (3) and camera forms, USB cable by its configuration is connected to the USB interface (6) of the logical computer system (5) of a Daepori, and this computer system (5) also disposes CPU (7), internal memory (8), display card and display (9), hard disk (10), keyboard and mouse (11), operating system (12), webcam driver program (13) and camera are taken and peak/paddy motion detection Displacement program (14).
At first, in the webcam driver program (13) of computing machine (5) operation with camera (1) the placing, install camera (1) to computing machine (5).Regulate the focal length of the optical lens (2) of camera (1), so that the testee imaging clearly.
Then, the State selective measurements environment, or regulate relevant light fixture (15), accomplish that as far as possible large variation evenly and not occurs in illumination above the testee.For example, can under indoor environment, measure, also can select lighting source to be better than the occasion of ambient lighting, can also invest lighting source an annular walls curtain of object front, allow again diffuse reflection is returned on the wall curtain light according to testee, can also apply the three primary colours polaroid.
Then, the operation camera is taken and peak/paddy motion detection Displacement program (14), uses peak/paddy Displacement probe algorithm to implement to measure in real time.To this, be described as follows item by item.
(1) the edge direction data of definition photoelectricity pel array
Carrying out beam intensity ratio location of pixels relation has: 1) two adjoin between the pixel 2) adjoin (U.S.patent application Ser.No.10/001,963, Dec.5,2001 between the sub-array of pixels; U.S.patent application Ser.No.10/001,959, Dec.5,2001), 3) non-adjoining between the neighborhood pixels (participate in also having the 3rd pixel between two pixels relatively), 4) the non-of other position adjoin between the neighborhood pixels.
When the light intensity of two participations pixel relatively equates, can adopt what is called " hysteresis function " (U.S.patentapplication Ser.No.10/001,963) uncertainty of release edge direction data, perhaps, be defined as simply positive limit or marginal (US 7,122,781 B2).There are not the edge direction data in location of pixels on four limits in the pel array and four angles.
US Patent No. 7,122,781 B2 adopt more non-method of adjoining the light intensity between the neighborhood pixels to determine the edge direction data, the limit that so obtains is positioned on that pixel of the centre that participates in two pixels relatively, and think that effect has two: 1) be equivalent to the plot of light intensity of pixel has been implemented space media filtration device, reduced noise; 2) the more non-neighborhood pixels that adjoins is equivalent to three of comparisons and adjoins pixel: P i-P I+2=(P i+ P I+1)-(P I+1+ P I+2), and do not need to arrange summing circuit.An example as shown in Figure 2, the edge direction data that the figure shows 3 * 3 pel arrays and derive according to above-mentioned definition.For a given photodetector array, there are the edge direction data of predetermined number.
The present invention has adopted above-mentioned more non-definition of adjoining the limit of neighborhood pixels light intensity magnitude, think that the reflectance signature on testee surface is exactly so-called surface physics light and shade contrast, obvious variation can not occur in the optical reflection attribute that belongs to this body surface material on the sizable degree of illumination variation.
Consider that the computing machine camera is quite far away apart from object being measured, the light intensity pattern of the testee surface reflection that photosensor arrays detects can be subject to the impact of surrounding environment optical radiation, bring certain fluctuation at random of pixel light intensity value, thereby the present invention has added an error margin value error in the definition about the limit, and think in the time of both strong and weak much the same, I (X for example, Y+2)-error<I (X, Y)<I (X, Y+2)+error, then define between these two pixels and do not have a limit, in other words, have the 3rd a class limit, this is for the aftermentioned peak, the analysis of paddy does not exert an influence, but has further reflected by the reflectance signature of side body surface.The gray-scale value degree of depth of camera is generally 8bit, 256 grade points.Therefore, the error margin value in the formula can according to the disturbed situation of concrete illumination, be predisposed to a little numerical value, for example: error=10.
In order further effectively to eliminate the impact of surround lighting, the present invention utilizes the opto-electronic conversion data component of three kinds of primary colours (wavelength) of camera itself, but not its comprehensive light intensity value by relatively, is derived three kinds of primary colours of red, green and blue edge direction data separately." summary of the invention " seen in the definition of concrete edge direction data.
The present invention at first surveys the optical reflection feature on testee surface, chooses along the positive limit of change in coordinate axis direction three primary colours and marginal number and maximum persons' delegation and the object of a row conduct observation.
(2) definition limit reflection condition
Edge direction data according to selected a row or column pixel, along X-axis and Y direction, derive respectively the limit reflection condition: continuous two or more positive limit or the back on the 3rd class limit and then one marginal, be referred to as first kind limit reflection condition, namely think the peak that has a light intensity in this position; The back on continuous two or more marginal or the 3rd class limit is a positive limit and then, is referred to as Equations of The Second Kind limit reflection condition, namely thinks the paddy that has a light intensity in this position; In addition, be referred to as the 3rd class limit reflection condition.Therefore, obtain respectively the limit reflection condition of three kinds of primary colours of red, green and blue (wavelength).
(3) follow the tracks of the motion of peak, paddy in the stable situation of illumination
So-called illumination is stable, and the physics light and shade contrast who means the testee surface can not change along with the variation of the power of illumination or angle.
Fig. 3 represents photodetector array along certain coordinate axis to the image photosignal that obtains and the edge direction data of a sequence that derives accordingly (positive limit and marginal) and limit reflection condition (Feng Hegu).
Fig. 4 follows the tracks of the limit reflection condition along certain axle to carry out the synoptic diagram that Displacement is measured.Can be seen by figure, taking for the first time the paddy that obtains is positioned between the 4th (bearing) limit and the 5th (just) limit, and be positioned between the 5th (bearing) limit and the 6th (just) limit taking for the second time the paddy that obtains, during twice sequential shoot, this paddy has moved right a unit picture element spacing, document claims that this situation is typical sub-pix motion (sub-pixel motion:displacement of less than the pixelpitch between two successive flashes), and the meaning is that its displacement is less than the pel spacing of a unit.That is to say that taking reference frame to taking in the time interval dt that compares frame, the displacement that its imaging pixel array of measured moving object occurs should be less than a pel spacing unit.This can according to the speed of the maximum of measured object of which movement, realize by regulating shooting time interval dt.
Its type no matter only follow the tracks of the limit reflection condition, the loss of meeting generation information and measuring accuracy in tracing process.
Therefore, corresponding each coordinate axis respectively arranges 2 * 2 totalizers, follow the tracks of respectively peak, paddy separately to number positive or that move to negative change in coordinate axis direction along the direction of coordinate axis, method is: selected pixel column and the corresponding peak of row, the position of paddy in comparing reference frame and comparing frame, take this to judge peak corresponding in selected pixel column and the row, the moving direction of paddy.Along each coordinate axis 2 totalizers are set respectively again, count each coordinate axis superiors, paddy total number separately.Specify and see " summary of the invention ".
The synthetic principle of vector is observed in displacement.As picture element matrix, can also survey moving of limit reflection condition along the diagonal of X-axis, Y-axis.Therefore, the limit reflection condition of a correspondence can be derived from: 1) coaxial upper about two close positions, 2) one of four close positions on the diagonal line.
(4) peak/paddy Displacement probe algorithm
Among Fig. 3, photosensor arrays is surveyed the surface reflection character that the light intensity pattern 21 that obtains belongs to object being measured along certain change in coordinate axis direction, and in the situation of illumination invariant, this light intensity pattern can not change.Testee surface relatively camera is subjected to displacement, and this light intensity pattern can be correspondingly mobile to the left or to the right.The displacement of next direction has only occured in this testee in the time interval of supposing to take, and the displacement of generation just situation shown in Figure 4 can occur less than 1 pel spacing, and peak, paddy are only moved towards a direction.
Fig. 5 investigated further that photosensor arrays detects delegation's image light--the situation of displacement to the right progressively occurs in electric signal 510.This row image light--electric signal 510 has represented initial situation through integrator peak value processing of circuit later Digital output signal and the corresponding just diagram 52 of limit, marginal He Feng, paddy thereof, this row image light--Displacement occurs to the right in electric signal 510 gradually, and Digital output signal and the corresponding just diagram 53~57 of limit, marginal He Feng, paddy thereof later through integrator peak value processing of circuit have represented respectively the Displacement situation that occurs subsequently.As seen from the figure, in the displacement that the half-pixel size occurs, the marginal of the right neighbour at its peak (label 54-D--E place among Fig. 5) become the 3rd class limit (label 54--E place among Fig. 5), but the position at this peak does not change; In the time of the displacement that occured greater than the half-pixel size, the right neighbour's at this peak the marginal change procedure that has passed through the 3rd class limit (label 54--E place among Fig. 5) is varied to positive limit (label 55--E place among Fig. 5), the position at this peak pixel unit that also moved right.Investigate asymmetrical delegation image light--electric signal 511 or 512, when its gradually when displacement to the right, identical conclusion is also arranged.The Displacement that occur this moment can be counted 0.5pixcel, measuring error ± 0.25pixcel~± 0.5pixcel between.
Because testee belongs to rigid solid, in the time of photoelectricity pel array and measured surface generation relative displacement, all peaks and all paddy all should be moved towards same direction.In fact, although the displacement that testee occurs in taking intermittent phase dt less than 1 pel spacing,, repeatedly displacement may be have not only occured towards a left side but also towards right in it, therefore, peak, paddy have the movement towards a left side, and the movement towards the right side is arranged again.But, integrate, the result should or all peak and all paddy all move towards same direction.If peak (or paddy) has left and accumulative total number to the right simultaneously, both should differ greatly, the reflection that number is few the impact of illumination variation on the reflection contrast metric of measured surface.Therefore,
If N The peak moves right(j+1)>N The peak is to moving to left(j+1), then count Δ X Peak shift(j+1)=+ 0.5,
If N The peak moves right(j+1)<N The peak is to moving to left(j+1), then count Δ X Peak shift(j+1)=-0.5;
If N Paddy moves right(j+1)>N Paddy is to moving to left(j+1), then count Δ X The paddy displacement(j+1)=+ 0.5,
If N Paddy moves right(j+1)<N Paddy is to moving to left(j+1), then count Δ X The paddy displacement(j+1)=-0.5;
Figure G2009101909241D00151
Also have similar conclusion for Y direction.
(5) follow the tracks of the motion of peak, paddy in the situation that illumination changes
Among Fig. 3, if illumination changes, photosensor arrays is surveyed the surface reflection character that the light intensity pattern 21 that obtains no longer just belongs to object being measured along certain change in coordinate axis direction, also will reflect the impact effect that the surround lighting radiation changes.
A kind of situation is, although variation has occured in the light intensity pattern that this photosensor arrays detects, but, the reflecting attribute on testee surface still in the highest flight, successively twice shooting of sensor " sees " that the edge direction data of this change in coordinate axis direction that arrives and the number of limit reflection condition do not occur significantly to change.
Another kind of situation is, testee illumination on the whole changes, or its local surfaces is changed strongly by surround lighting suddenly, cause photosensor arrays detects among Fig. 3 light intensity pattern 21 that the variation that merits attention has occured, obvious variation can occur in these axial edge direction data that successively twice shooting of sensor " seen " and the number of limit reflection condition.At this moment, restart to measure, comprise and again choose observation row and observation row.Because the speed that camera is taken is far faster than the velocity of displacement of testee, also far faster than the irradiation pace of change of surround lighting, add the above peak/paddy Displacement probe algorithm only for the delegation in the photosensor arrays and a row pixel, computing velocity is relatively fast, as long as the optical reflection attribute on testee surface is still becoming in the picture frame in the highest flight, still can calculate instant shift value with above-mentioned peak/paddy Displacement probe algorithm expression, how many errors this measure can not bring for measurement result.
Above-mentioned two kinds of situations of change can be united and be checked, perhaps survey the number of limit reflection condition, perhaps survey the number of document described " ghost limit reflection condition ".The percentage that adopts its relatively should be axially all peak, paddy number adopt " preset threshold value " of document described " ghost limit reflection condition " to check, not as recently must make things convenient for and flexible.
The optical reflection attribute that needs the testee surface is becoming in the picture frame in the highest flight, means that peak/paddy Displacement probe algorithm can identify the feature of testee, and this is key point of the present invention; This factor such as optical property (quality of material, lines etc.), lighting source and measurement environment (jamming light source, dust, smog) with the testee surface is relevant.If select the material of the easier discrimination of optical reflection attribute of surface texturisation to make target, the illumination of perhaps controlling testee exempts from the undue interference of environment, can obtain preferably measurement effect.
The output of camera comprises the component value of three kinds of primary colours, therefore, measures respectively the limit reflection condition of these three kinds of primary colours, and in addition average, and the environment parasitic light that can overcome other wavelength changes the impact on measuring.
In fact, notice, than the optical mouse of infrared diode illumination, adopt the optical mouse of laser diode illumination can adapt to smooth ceramic tile surface.If can use the light source that certain is not subject to the wavelength of environment source of stray light impact, cooperate the photoelectric imaging sensor array (camera) of selecting responsive this wavelength, the present invention can bring into play the ability of complicated photoenvironment of adaptation fully, obtains the excellent results of noncontacting measurement object micro-displacement.

Claims (4)

1. peak valley motion detection method of measuring Displacement, it measures displacement by the logical computing machine of a Daepori, a computing machine camera, described camera is connected to described computing machine by USB interface, this allocation of computer has internal memory, CPU, hard disk, display card and display, keyboard and mouse, operating system and webcam driver program, it is characterized in that, the method is taken by camera and is adopted peak/paddy Displacement probe algorithm to measure Displacement, comprises following measuring process:
Step 1, take frame testee a: M capable * the N row, do not consider two row and two row on the limit of this picture frame, obtain reference frame: (M-2) row of row * (N-2), for the picture frame of this reference frame and thereafter all shootings is determined identical coordinate axis, wherein, M, N ∈ positive integer;
Step 2, for the pel array of above-mentioned reference frame, according to the data of its redness, green and blue component, derive line by line, by column respectively along the redness of X-axis and Y direction, green and edge direction data blueness;
Step 3, calculate red, green and the positive limit of blueness and marginal number sum respectively line by line, by column, the row of getting positive limit wherein and the marginal maximum persons of number sum place and row are respectively as observation row and observation row;
Step 4, according to the edge direction data of selected observation row with three kinds of primary colours of the pixel of observation row, derive respectively along the limit reflection condition of three kinds of primary colours of X-axis and Y direction, and use respectively the number of their corresponding peaks of accumulator count, paddy: N RX axle peak(j), N RX axle paddy(j), N RY axle peak(j) and N RY axle paddy(j), N GX axle peak(j), N GX axle paddy(j), N GY axle peak(j) and N GY axle paddy(j), N BX axle peak(j), N BX axle paddy(j), N BY axle peak(j) and N BY axle paddy(j), wherein, j represents to take the sequential counting value of the frame of acquisition, j ∈ positive integer, and N represents number, R, G, B represent respectively the red, green and blue look;
Step 5, taken after the described reference frame, through certain quiescent interval dt, take the picture of the second frame testee: M capable * the N row, two row and two row that remove the frame of pixels edge obtain the comparison frame: (M-2) row of row * (N-2); Selected observation row or observation row in the step 3 are derived respectively along edge direction data and the limit reflection condition of three kinds of primary colours of X-axis and Y direction, and use respectively accumulator count along the peak of X-axis and Y direction, the number of paddy: N RX axle peak(j+1), N RX axle paddy(j+1), N RY axle peak(j+1) and N RY axle paddy(j+1), N GX axle peak(j+1), N GX axle paddy(j+1), N GY axle peak(j+1) and N GY axle paddy(j+1), N BX axle peak(j+1), N BX axle paddy(j+1), N BY axle peak(j+1) and N BY axle paddy(j+1);
The position of the limit reflection condition of three kinds of primary colours of selected observation row and observation row in step 6, the described reference frame of contrast and the described relatively frame, check that wherein those do not know to come " ghost limit reflection condition " wherefrom---these peaks or the paddy found at selected observation row or the observation row of described relatively frame, the relevant position of the selected observation row of described reference frame or observation row and near a pel spacing scope in lack, add up respectively and follow the tracks of their number: N with six totalizers RX ghost limit(j+1), N RY ghost limit(j+1), N GX ghost limit(j+1), N GY ghost limit(j+1), N BX ghost limit(j+1), N BY ghost limit(j+1);
If have " the ghost limit reflection condition " of two or more primary colours to satisfy in three kinds of primary colours:
Figure FSB00000934281600021
Or
Figure FSB00000934281600022
Think that then measurement " loses tracking ", and send a caution signal, in the formula, error margin value error1 represents in the comparison frame along selected observation row or observation row, the number that the ghost limit reflection condition of one of three kinds of primary colours of red, green and blue occurs accounts for the number percent of whole limits reflection condition number of these primary colours, presets according to optical property and the measurement environment of body surface; Limit reflection condition on the limit of described relatively frame is not considered " ghost limit reflection condition ", and they might be from the outside of photoelectricity pel array;
If step 7 is measured " losing tracking ", get back to step 1, restart surveying work;
If measuring, step 8 do not have " losing tracking ", then continue this surveying work: along selected observation row and selected observation row, according to the three primary colours component data of camera, use peak/paddy Displacement probe algorithm, calculate respectively the Displacement of three primary colours component:
Figure FSB00000934281600023
Figure FSB00000934281600024
Figure FSB00000934281600025
Figure FSB00000934281600026
Figure FSB00000934281600027
Figure FSB00000934281600028
During this was measured, total Displacement calculating formula was:
Figure FSB00000934281600029
In step 9, this measurement, the velocity calculating formula of object is:
Figure FSB00000934281600032
Step 10, with the comparison frame in the step 5 as new reference frame, apart from taking the certain quiescent interval dt of this frame, again take a frame as new comparison frame, namely jump to step 5, continue to measure.
2. the peak valley motion detection method of measurement Displacement according to claim 1 is characterized in that, the definition of described measuring process two described redness, green or blue edge direction data is:
Component data according to one of red in the pel array, green or these three kinds of primary colours of blueness, along X-axis or along Y direction, if certain three primary colours component value of a pixel is than the also little error margin value error of the corresponding three primary colours component value of second pixel of its back, if namely
I (X, Y) Red<I Red(X+2, Y)-error or I (X, Y) Red<I (X, Y+2) Red-error
I (X, Y) Green<I Green(X+2, Y)-error or I (X, Y) Green<I (X, Y+2) Green-error
I (X, Y) Blue<I Blue(X+2, Y)-error or I (X, Y) Blue<I (X, Y+2) Blue-error
Then define and have a positive limit redness, green or blue between these two pixels; If certain three primary colours component value of a pixel is than the corresponding three primary colours component value of second pixel of its a back large error margin value error also, if i.e. I (X, Y) Red>I Red(X+2, Y)+error or I (X, Y) Red>I (X, Y+2) Red+ error
I (X, Y) Green>I Green(X+2, Y)+error or I (X, Y) Green>I (X, Y+2) Green+ error
I (X, Y) Blue>I Blue(X+2, Y)+error or I (X, Y) Blue>I (X, Y+2) Blue+ error
Then define and have the marginal of a redness, green or blueness between these two pixels; 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 the corresponding three primary colours component value of second pixel of certain three primary colours component value of a pixel and its back approaches, its RGB component value differs and is no more than an error margin value error, if namely
I (X+2, Y) Red-error<I (X, Y) Red<I (X+2, Y) Red+ error
Or I (X, Y+2) Red-error<I (X, Y) Red<I (X, Y+2) Red+ error;
I (X+2, Y) Green-error<I (X, Y) Green<I (X+2, Y) Green+ error
Or
I (X, Y+2) Green-error<I (X, Y) Green<I (X, Y+2) Green+ error;
I (X+2, Y) Blue-error<I (X, Y) Blue<I (X+2, Y) Blue+ error
Or I (X, Y+2) Blue-error<I (X, Y) Blue<I (X, Y+2) Blue+ error;
Then think not have this color wavelength corresponding " limit " between these two pixels, or be referred to as the limit of the 3rd this color of class; Along some change in coordinate axis direction, the positive limit of all redness and red limit marginal and the 3rd class redness form the edge direction data of this direction redness, the positive limit of all greens and green limit marginal and the 3rd class green form the edge direction data of this direction green, and the positive limit of all bluenesss and blue limit marginal and the 3rd class blueness form the edge direction data of this direction blueness; According to concrete light conditions, the error margin value error that presets in the following 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.
3. the peak valley motion detection method of measurement Displacement according to claim 1 is characterized in that, along the limit reflection condition of three kinds of primary colours of X-axis and Y direction, it is defined as described in described measuring process four and the step 5:
Redness, green or blue edge direction data according to selected observation row and the pixel of observation row, along X-axis or along Y direction, if continuous two or more than the positive limit of certain primary colours of two, or continuous two or more than and then these primary colours marginal after the 3rd class limit of these primary colours of two, be referred to as the first kind limit reflection condition of these primary colours, namely think the peak that has these primary colours in this position; If continuous two or marginal more than certain primary colours of two, or continuous two or more than the and then positive limit of these primary colours after the 3rd class limit of these primary colours of two, be referred to as the Equations of The Second Kind limit reflection condition of these primary colours, namely think the paddy that has these primary colours in this position;
4. the peak valley motion detection method of measurement Displacement according to claim 1 is characterized in that, the peak described in the described measuring process eight/paddy Displacement probe algorithm comprises:
For certain three primary colours, more described reference frame compares observation row selected in the frame and observes the corresponding peak of row, the position of paddy with described, judge accordingly described observation row and observe peak corresponding in the row, the moving direction of paddy, and use respectively accumulator count to follow the tracks of described peak, paddy along the situation of movement of described coordinate axis, particularly
In described observation row pixel, if the position of the peak of some three primary colours in frame relatively relatively its displacement to the right of the position in reference frame a pel spacing unit, then follow the tracks of the totalizer N of the number of this primary colours peak displacement to the right The peak moves right+ 1, if the position of some three primary colours peak in frame relatively relatively its position in reference frame to left dislocation a pel spacing unit, then follow the tracks of this primary colours peak to the totalizer N of the number of left dislocation The peak is to moving to left+ 1; If the position of the paddy of some three primary colours in frame relatively relatively its displacement to the right of the position in reference frame a pel spacing unit, then follow the tracks of the totalizer N of number of the paddy displacement to the right of these primary colours Paddy moves right+ 1, if the position of the paddy of some three primary colours in frame relatively relatively its position in reference frame to left dislocation a pel spacing unit, then follow the tracks of the paddy of these primary colours to the totalizer N of the number of left dislocation Paddy is to moving to left+ 1;
In described observation row pixel, if the position of the peak of some three primary colours in frame relatively relatively its position in reference frame to top offset a pel spacing unit, then follow the tracks of the peak of these primary colours to the totalizer N of the number of top offset The peak upwards moves+ 1, if the position of the peak of some three primary colours in frame relatively relatively its position in reference frame to bottom offset a pel spacing unit, then follow the tracks of the peak of these primary colours to the totalizer N of the number of bottom offset The peak is to moving down+ 1; If the position of the paddy of some three primary colours in frame relatively relatively its position in reference frame to top offset a pel spacing unit, then follow the tracks of the paddy of these primary colours to the totalizer N of the number of top offset Paddy upwards moves+ 1, if the position of the paddy of some three primary colours in frame relatively relatively its position in reference frame to bottom offset a pel spacing unit, then follow the tracks of the paddy of these primary colours to the totalizer N of the number of bottom offset Paddy is to moving down+ 1;
If N The peak moves right(j+1)>N The peak is to moving to left(j+1), then count Δ X Peak shift(j+1)=+ 0.5,
If N The peak moves right(j+1)<N The peak is to moving to left(j+1), then count Δ X Peak shift(j+1)=-0.5;
If N Paddy moves right(j+1)>N Paddy is to moving to left(j+1), then count Δ X The paddy displacement(j+1)=+ 0.5,
If N Paddy moves right(j+1)<N Paddy is to moving to left(j+1), then count Δ X The paddy displacement(j+1)=-0.5;
Figure FSB00000934281600051
Similarly,
If N The peak upwards moves(j+1)>N The peak is to moving down(j+1), then count Δ Y Peak shift(j+1)=+ 0.5,
If N The peak upwards moves(j+1)<N The peak is to moving down(j+1), then count Δ Y Peak shift(j+1)=-0.5,
If N Paddy upwards moves(j+1)>N Paddy is to moving down(j+1), then count Δ Y The paddy displacement(j+1)=+ 0.5,
If N Paddy upwards moves(j+1)<N Paddy is to moving down(j+1), then count Δ Y The paddy displacement(j+1)=-0.5,
Figure FSB00000934281600052
In the above-mentioned formula, L Pixel-pixelThe expression pel spacing, its unit is one of μ m, mm or inch, N is number, the implication of other symbol such as character institute mark, above-mentioned calculating formula all ought be applied to respectively certain concrete three primary colours component data of camera pel array.
CN 200910190924 2009-09-22 2009-09-22 Peak-valley motion detection method and device for measuring sub-pixel displacement Expired - Fee Related CN102022981B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910190924 CN102022981B (en) 2009-09-22 2009-09-22 Peak-valley motion detection method and device for measuring sub-pixel displacement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910190924 CN102022981B (en) 2009-09-22 2009-09-22 Peak-valley motion detection method and device for measuring sub-pixel displacement

Publications (2)

Publication Number Publication Date
CN102022981A CN102022981A (en) 2011-04-20
CN102022981B true CN102022981B (en) 2013-04-03

Family

ID=43864565

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910190924 Expired - Fee Related CN102022981B (en) 2009-09-22 2009-09-22 Peak-valley motion detection method and device for measuring sub-pixel displacement

Country Status (1)

Country Link
CN (1) CN102022981B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102052900B (en) * 2009-11-02 2013-09-25 重庆工商大学 Peak valley motion detection method and device for quickly measuring sub-pixel displacement

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1135062A (en) * 1995-03-02 1996-11-06 惠普公司 Freehand image scanning device and method
US6249591B1 (en) * 1997-08-25 2001-06-19 Hewlett-Packard Company Method and apparatus for control of robotic grip or for activating contrast-based navigation
CN1350633A (en) * 1999-05-14 2002-05-22 北京三维世界科技有限公司 3D-imaging system
CN1363827A (en) * 2000-12-08 2002-08-14 格莱特格-曼克贝斯公开股份有限公司 Individual element photoelectric measuring device for plane object

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1135062A (en) * 1995-03-02 1996-11-06 惠普公司 Freehand image scanning device and method
US6249591B1 (en) * 1997-08-25 2001-06-19 Hewlett-Packard Company Method and apparatus for control of robotic grip or for activating contrast-based navigation
CN1350633A (en) * 1999-05-14 2002-05-22 北京三维世界科技有限公司 3D-imaging system
CN1363827A (en) * 2000-12-08 2002-08-14 格莱特格-曼克贝斯公开股份有限公司 Individual element photoelectric measuring device for plane object

Also Published As

Publication number Publication date
CN102022981A (en) 2011-04-20

Similar Documents

Publication Publication Date Title
US10477118B2 (en) System and methods for depth imaging using conventional CCD image sensors
US7557935B2 (en) Optical coordinate input device comprising few elements
CN107238727B (en) Photoelectric type rotation speed sensor based on dynamic vision sensor chip and detection method
CN109631787A (en) The spot center detection method and deflection of bridge span image-type detection device of transmission-type target image
CN101452199B (en) Modulation transfer function value measurement method
CN107424186A (en) depth information measuring method and device
CN104854427A (en) Device for optically scanning and measuring environment
WO2021228235A1 (en) Photoelectric detection and collection system and centroid detection method based on single pixel detector
US9354045B1 (en) Image based angle sensor
CN112924028B (en) Light field polarization imaging detection system for sea surface oil spill
CN109341668A (en) Polyphaser measurement method based on refraction projection model and beam ray tracing method
CN101629803A (en) Automatic counting system and counting method of interference ring
CN108169757A (en) Center pixel high-precision identification light measurement system and method
CN109632092A (en) A kind of luminance test system and method based on spatial light field
CN103152626A (en) Far infrared three-dimensional hand signal detecting device of intelligent television set
CN112595236A (en) Measuring device for underwater laser three-dimensional scanning and real-time distance measurement
CN202915911U (en) Shooting device for distance measurement
CN102095375B (en) Method for measuring displacement along optical axis direction by using contrasts of three primary colors as characteristics
CN111583191B (en) Light field EPI Fourier transform-based refraction characteristic detection method
CN102022981B (en) Peak-valley motion detection method and device for measuring sub-pixel displacement
CN208187381U (en) Laser leveler automatic checkout system
CN110471050A (en) The method of structure light imaging system and scanning scene
Harlakin et al. LCD-Based Angle-of-Arrival Estimation of Multiple Light Sources: Paving the Road to Multiuser VLC
CN102052900B (en) Peak valley motion detection method and device for quickly measuring sub-pixel displacement
CN102102979B (en) Single primary color peak-valley motion detecting method and device for measuring subpixel displacement

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: 20130403

Termination date: 20130922