CN102243537B - Method and device for detecting displacement of motion image as well as optical mouse - Google Patents

Method and device for detecting displacement of motion image as well as optical mouse Download PDF

Info

Publication number
CN102243537B
CN102243537B CN201010176100.1A CN201010176100A CN102243537B CN 102243537 B CN102243537 B CN 102243537B CN 201010176100 A CN201010176100 A CN 201010176100A CN 102243537 B CN102243537 B CN 102243537B
Authority
CN
China
Prior art keywords
image
data
difference
frame
derivative
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.)
Active
Application number
CN201010176100.1A
Other languages
Chinese (zh)
Other versions
CN102243537A (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.)
SHENZHEN YSPRING TECHNOLOGY CO., LTD.
Original Assignee
SHENZHEN HUICHUN TECHNOLOGY CO LTD
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 SHENZHEN HUICHUN TECHNOLOGY CO LTD filed Critical SHENZHEN HUICHUN TECHNOLOGY CO LTD
Priority to CN201010176100.1A priority Critical patent/CN102243537B/en
Publication of CN102243537A publication Critical patent/CN102243537A/en
Application granted granted Critical
Publication of CN102243537B publication Critical patent/CN102243537B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a method and a device for detecting the displacement of a motion image, and the method and device provided by the invention are used for analyzing an image sequence with a temporal relation so as to determine the motion trail of a photoinduced component relative to an object in the process of acquiring the image sequence, and can be used for an optical mouse. The method comprises the following steps: receiving the image sequence by an image signal processing unit according to a time sequence; and based on the image sequence, sequentially carrying out data processing on each current image, carrying out two-dimensional optical-flow computed processing on the images according to each pixel on a difference image corresponding to the current image, and calculating and outputting a displacement vector corresponding to the current image by using a global matrix operational method. Through using an optical mouse disclosed by the invention, the accuracy of navigation positioning and the stability of detection are effectively improved.

Description

Moving image displacement detecting method and device, optical mouse
Technical field
The electric Digital data processing technology that to the present invention relates to take moving image be analytic target, relates in particular to data processing method and device that the moving displacement for optical mouse field detects.
Background technology
As the main flow of current mouse circle, the light emitting diode localization method that optical mouse adopts has also become current main flow localization method.
Fig. 1 illustrated the inner structure of optical mouse to comprise light emitting diode 1, from the light of this light emitting diode 1, guided and irradiate toward the surface tactile with optical mouse bottom connection by one group of optical mirror 2; A light part of being returned by this surface reflection is through one group of optical lens 2 ' being transferred to photoinduction device 3 (such as but not limited to micro-imager of exportable data image signal) carries out imaging.Like this, when optical mouse moves, its motion track just can be disclosed by one group of image that " continuous shooting " recorded at a high speed.Utilize the included image dissector of optical mouse 4 (can be the special chip based on digital signal processor DSP) to carry out this group image of analyzing and processing, can draw described motion track.In actual applications, described photoinduction device 3 and image dissector 4 are often integrated in a chips.
Fig. 2 has illustrated the electric principle of work of optical mouse, and in dotted line frame, signal is the electric structure of optical mouse, and the interface and with a connection button connects the interface of host computer.This electricity structure comprises imageing sensor (sensor), is used for gathering and light image signal being converted to electrical picture signal; This electrical picture signal is sent to analog to digital converter to convert data image signal to, then is sent to image signal processing unit and calculates generation mouse vector shift; Micro-control unit fetches by being electrically connected controls each circuit module that comprises imageing sensor, analog to digital converter or image signal processing unit, and receives the status signal from each circuit module; From the displacement vector data of image signal processing unit and key information from mousebutton, by packing together with this micro-control unit, send to host computer.Described micro-imager has at least comprised imageing sensor and analog to digital converter.Image signal processing unit can adopt a special-purpose chips, or is integrated in together with micro-control unit in a chips.
Fig. 3 has illustrated described mouse vector shift.Suppose that a, b are for corresponding successively two two field pictures of time, the same unique point in triangle representative image, image signal processing unit is by extracting described unique point and analyzing moving direction and the displacement that its change in location judges mouse.Figure c has illustrated that characteristic point position changes the Δ X calculating, and Δ Y uniquely corresponding to mouse vector shift, thereby completes cursor location.Existing localization method adopts the interpolation algorithm based on relevant matches to obtain the motion vector of mouse mostly, as shown in Figure 4, can be by finding in next frame (as figure b) with present frame (as figure a) obtains current displacement vector (as figure c) in the position of unique point optimum matching, wherein scheme d and illustrated the template of a 3*3 pixel, can take this template as unit, in image-region, to find optimum matching.The method has advantages of stable performance, but due to the limitation of interpolation algorithm, cannot effectively obtain the precision of sub-pix size.
In order to obtain higher kinematic accuracy, prior art is further used for mouse picking by the method for zoning light stream, to obtain up to precision more than 1/4 pixel.The method is first set up overdetermination binary optical flow equation to the pixel on image, solves the motion vector that obtains single pixel by this equation, and by least square method, simulates the motion vector average of a plurality of pixels, the i.e. motion vector of mouse.In order to simplify the description to the method, it is that example is illustrated that Fig. 5 is simplified to one-dimensional signal the picture signal from photoinduction device.If curve A is t signal constantly, curve B is t+ Δ t signal constantly; Suppose that the signal amplitude value of x position is f (x, t) at t constantly; At t+ Δ t constantly, the signal amplitude value of x+ Δ x position is f (x+ Δ x, t+ Δ t).If signal has moved Δ t distance within the Δ t time, in the situation that not considering other interference, can know so:
f(x+Δx,t+Δt)=f(x,t) (1)
The above formula left side is obtained as Taylor expansion:
f ( x + Δx , t + Δt ) = f ( x , t ) + Δx ∂ f ∂ x + Δt ∂ f ∂ t + o ( Δx , Δt )
Simultaneous (1) formula, and ignore o (Δ x, Δ t):
Δx ∂ f ∂ x + Δt ∂ f ∂ t = 0 - - - ( 2 )
That is:
I xu x+I t=0 (3)
In formula,
Figure GSB0000116359810000023
for the slope of signal in x position,
Figure GSB0000116359810000024
for signal in x position rate over time. for the movement velocity of signal in x direction.Formula (3) is the optical flow equation of motion in one dimension signal.
In like manner, the optical flow equation of 2D signal is:
I xu x+I yu y+I t=0 (4)
Now an equation is not enough to solve two unknown number u x, u y.Therefore to find a plurality of about u x, u yequation solve:
Figure GSB0000116359810000031
So
( u x , u y ) T = ( I → T I → ) - 1 I → T I t = Σ i = 1 n I xi 2 Σ i = 1 n I xi I yi Σ i = 1 n I xi I yi Σ i = 1 n I yi 2 - 1 - Σ i = 1 n I xi I ti - Σ i = 1 n I yi I ti = a b b c - 1 e f - - - ( 6 )
With formula 6, for instructing foundation, in described image signal processing unit, the signal processing circuit of existing optical flow method displacement calculating has treatment scheme as shown in Figure 6.Data image signal is sent to after this signal processing circuit, first through one except making an uproar, differentiate processing module generates space derivative I x, I y(two components of pixel gradient value) and time-derivative I t, and further calculate thus the long-pending of acquisition derivative
Figure GSB0000116359810000033
characteristic area searches module and follow-up parameter calculating module is chosen image Shang specific region according to described data image signal, the m*m=n in a Yi Gai region pixel is that template is searched characteristic area, and based on this characteristic area utilization from except making an uproar, the corresponding data of differentiate processing module carrys out parameter a, b, c, e and the f in accounting equation 6,
Figure GSB0000116359810000034
with the cumulative sum of each parameter; Displacement vector computing module calculates and output displacement vector (u according to these parameters again x, u y).In above-mentioned processing, generally choose Grad compare great region as characteristic area.
The shortcoming of above-mentioned prior art is: while calculating described displacement vector easily by background disturb affect, thereby affect the positioning precision of mouse.Impact due to aspects such as optical lens (such as inhomogeneous with impurity or reflectivity) and the encapsulation of optical sensor later stage, image from photoinduction device 3 in structure shown in Fig. 1 will be with inevitable background noise, and mouse circuit itself also exists fixing noise in addition.As shown in Figure 7, Fig. 7 a is two frame image signals before and after undesired signal represents respectively with two curves 1 and 2 can ignore time; 7b represents that background disturbs and can not ignore, and with respect to background, disturbs the fainter situation of (representing with crooked thick line 3) useful signal, now adopts optical flow method to carry out calculation of parameter and will bring very computation error.
Summary of the invention
The technical problem to be solved in the present invention is for above-mentioned the deficiencies in the prior art part, and proposes a kind of method for moving image displacement detecting and device, effectively reduces motion and gathers the impact that the background in image disturbs.
For solving the problems of the technologies described above, basic conception of the present invention is: consider that background noise has the feature slowly that changes, for the front and back two field picture obtaining for high speed continuous shooting, can suppose that its background noise is approximate consistent, if therefore replace picture signal to carry out two-dimentional optical flow computation processing by inter-frame difference picture signal, and adopt overall matrix operation method in calculating process, will greatly get rid of the impact of background noise interference undoubtedly, and simplified operation process.
As the technical scheme that realizes the present invention's design, be, a kind of moving image displacement detecting method is provided, the image sequence for analyzing with time relationship gathers this image sequence time sensing device with respect to the movement locus of object to determine, comprises step:
A. image signal processing unit receives described image sequence in chronological order;
Especially, described image sequence comprises three frames or images more than three frames; Also comprise step
B. based on described image sequence, successively each present image is carried out to data processing, according to each pixel on the difference image corresponding with this present image, calculate, by following formula calculating the output displacement vector (u corresponding with present image x, u y)
( u x , u y ) T = Σ i = 1 n D xi 2 Σ i = 1 n D xi D yi Σ i = 1 n D xi D yi Σ i = 1 n D yi 2 - 1 - Σ i = 1 n D xi D ti - Σ i = 1 n D yi D ti ; D wherein x, D yfor the space derivative of differential pixel, representing two components of differential pixel Grad; D ttime-derivative for difference image; N is the pixel count in this difference image.
Specifically, in such scheme, described step B is specially and comprises step:
1. according to described image sequence, produce difference image sequence, after a rear frame image data of current frame image data in this image sequence deducts current frame image data as the difference image data of present frame, resetting this rear frame image data is current frame image data ... the rest may be inferred until obtain two frames or difference images more than two frames forms described difference image sequence;
2. utilize frame difference image after current difference image and one to calculate the described space derivative D of each pixel in current difference image x, D ywith time-derivative D t;
3. by multiplying each other between two computing to obtain each middle coefficient in described formula
Figure GSB0000116359810000051
4. within the scope of current difference image, calculate the cumulative sum of each middle coefficient in described formula; And and then calculate described displacement vector (u x, u y).
As the technical scheme that realizes the present invention design still, provide a kind of moving image displacement detector, for optical mouse; Comprise data-interface and a data output that is used for receiving data image signal; Especially, also comprise difference processing module and differentiate processing module that series winding connects, from the data image signal of described data-interface, after difference processing module Yi Zhengwei unit carries out the calculus of differences of interframe data and the derivative operation of differentiate processing module, export the space derivative D of each pixel of the difference image corresponding with current frame image x, D ywith time-derivative D tbe sent to global operations module, calculate respectively each middle coefficient of all pixels in this difference image preset range
Figure GSB0000116359810000052
cumulative sum; This global operations module is exported these cumulative sums and is sent to displacement vector computing unit, to press formula ( u x , u y ) T = Σ i = 1 n D xi 2 Σ i = 1 n D xi D yi Σ i = 1 n D xi D yi Σ i = 1 n D yi 2 - 1 - Σ i = 1 n D xi D ti - Σ i = 1 n D yi D ti Carry out displacement calculating vector (u x, u y), wherein n is the quantity of the pixel in described difference image preset range; This displacement vector computing unit output displacement vector (u x, u y) toward described data output.
As the technical scheme that realizes the present invention design still, a kind of optical mouse is provided, comprise the light emitting diode that irradiates light is provided, be used for responding to the irradiation light being reflected by object plane the imageing sensor that light signal is converted to analog picture signal, described analog picture signal is converted to the analog to digital converter of data image signal, and an image signal processing unit that receives described data image signal; Also comprise that one is used for being electrically connected to the micro-control unit of host computer and mousebutton; The data output of described image signal processing unit connects described micro-control unit; Especially, this image signal processing unit is described a kind of moving image displacement detector.
Adopt the optical mouse of above-mentioned each technical scheme, the impact that disturbed by background reduces greatly, thereby when effectively having improved the degree of accuracy of mouse navigation location, has increased the stability detecting; Be conducive to improve finished product rate.
Accompanying drawing explanation
Fig. 1 is light principle and the inner structure schematic diagram of existing mouse performance;
Fig. 2 is electric principle and the electrical block diagram of existing mouse performance;
Fig. 3 has illustrated the Computing Principle of existing mouse vector shift;
Fig. 4 is the algorithm schematic diagram in the existing relevant matches location feature region based on Fig. 3;
Fig. 5 be take the generation schematic diagram of one-dimensional signal as the optical flow equation of example based on Fig. 3;
Fig. 6 has illustrated the signal processing flow block diagram in conventional images signal processing unit;
Fig. 7 has illustrated that background disturbs the impact that signal is processed, wherein 7a has illustrated background to disturb the captured picture signal of optical sensor while ignoring, described picture signal when 7b has illustrated to exist background to disturb, 7c has illustrated the inventive method to eliminate the rear difference image signal of background interference;
Fig. 8 has illustrated the inventive method flow process;
Fig. 9 is for adopting the image signal processing unit internal signal treatment circuit block diagram of the present invention of Fig. 8 method;
Figure 10 has illustrated the image acquisition in Fig. 8 to input and difference derivation process;
Figure 11 is the example procedure figure that in Figure 10, image difference and differentiate are processed;
Figure 12 is used for selecting image pixel with the template instances figure of differentiate in Figure 10 or Figure 11;
Figure 13 is one of embodiment realizing Fig. 8 method;
Figure 14 be realize Fig. 8 method embodiment two.
Embodiment
Below, the most preferred embodiment shown in by reference to the accompanying drawings is further set forth the present invention.
Moving image displacement detecting method of the present invention, the image sequence for analyzing with time relationship gathers this image sequence process photoinduction device with respect to the movement locus of object to determine.The approach that obtains described image sequence includes but not limited to: image taking sensor is example, by the analog electrical signal of the taken reflection input light intensity change information of this imageing sensor in relative motion, through analog to digital converter, generating digital signal is sent into DSP (digital signal processor).In this DSP, described digital signal is first converted into the view data of a frame frame, i.e. described image sequence.The inventive method comprises step:
A. image signal processing unit receives described image sequence in chronological order; Described image sequence comprises three frames or images more than three frames;
B. based on described image sequence, successively each present image is carried out to data processing, according to each pixel on the difference image corresponding with this present image, calculate.For example three two field pictures of continuous adjacent or external phase are carried out to interframe difference between two every the data of three two field pictures of k (k is natural number) frame, the gray-scale value of three two field pictures subtracts each other to obtain differentiated two frame image datas in order between two, based on this two frame differences view data, by optical flow method, set up model again and carry out displacement calculating vector, can eliminate so existing background noise in original image signal and disturb.
Because optical flow method must be take two two field pictures as basis, only have the three frame original images of employing just can obtain a displacement vector; For the image sequence that comprises k ' (k ' > 3) the above effective image of frame, we set each frame effective image is successively present image, can obtain at most k '-2 displacement vector, so the inventive method can also comprise step:
C. according to each displacement vector in step B and the time interval between correspondence image thereof, simulate described movement locus.
In foregoing description, described interframe between two difference refers to each pixel of image and all carries out corresponding interframe data difference (when described view data is transmitted in the mode of video stream signal, refer to the data difference between the video stream signal of adjacent or the corresponding time difference of k frame of being separated by, wherein k is natural number; Easy for narrating, this place no longer does difference to video stream signal mode and describes): i.e. D (x, y, t)=P (x, y, t)-P (x, y, t-k), P (x wherein, y, t) represent constantly x in frame image data of t, the gray-scale value of the pixel of y position, D (x, y, t) represent constantly x in frame difference view data of t, the gray-scale value of the pixel of y position.Wherein k value depends on the movement velocity of relative motion in the frame frequency of imaging and imaging process.Frame frequency is large and in situation that movement velocity is slow, k can suitably get greatly; Otherwise frame frequency is little and in situation that movement velocity is fast, k is the smaller the better.
In above-mentioned steps B, use the detailed process of optical flow method as follows:
Still take one-dimensional signal as example.If t picture signal is constantly as shown in curve 1 in Fig. 7 (a), t+ Δ t time chart image signal is as shown in curve 2; As shown in Fig. 7 (b), affected by background noise, the signal that imageing sensor obtains is along the track fluctuation of curve 3.If only consider background noise to disturb, do not consider other noise, the actual picture signal detecting generally can be expressed as:
P(x,t)=I(x,t)A(x)+B(x) (7)
Wherein, I (x, t) represents actual signal, and A (x) represents the multiplier interference coefficient of background, and B (x) represents the additivity interference coefficient of background, establishes both not t variations in time of A (x) and B (x).
By the I in formula (3) xchange P into xand both sides are to time t differentiate, and be located at signal at the uniform velocity (being reflected in two dimensional image signal is that mouse at the uniform velocity moves) under mobile condition, the u in formula (3) xtemporal evolution or approximate constant not, can obtain difference optical flow equation:
P xtu x+P tt=0 (8)
(8) formula is made to normalized, and I xt=P (x, t) xt, I tt=P (x, t) tt, simultaneous formula (7):
{[I i+1(x)-I i(x)] xA(x)+[I i+1(x)-I i(x)]A(x) x}u x+[I i+1(x)-I i(x)] tA(x)=0
Conventionally, background noise is very little at the rate of change in space, [I i+1(x)-I i(x)] xa (x) [I i+1(x)-I i(x)] A (x) xtherefore above formula can abbreviation be:
[I i+1(x)-I i(x)] xu x+[I i+1(x)-I i(x)] t=0
Make again D i(x)=I i+1(x)-I i(x), substitution above formula obtains:
D xu x+D t=0 (9)
Formula (9) for after normalization with differential signal D i(x) be the difference optical flow equation of signal source.This formula shows, D is exactly the difference signal of two frames before and after signal I.As shown in Fig. 7 (c), through differentiated signal, substantially eliminated background interference.
For two dimensional difference optical flow equation:
D xu x+D yu y+D t=0 (10)
Because ask for two variable u x, u ytherefore, a plurality of pixels are set up to overdetermination difference optical flow equation group:
Figure GSB0000116359810000081
Here suppose the displacement vector (u of each pixel x, u y) approximately equal (all equaling mouse moving displacement vector), after arrangement, obtain difference optical flow equation as follows:
( u x , u y ) T = ( D → T D → ) - 1 D → T D t = Σ i = 1 n D xi 2 Σ i = 1 n D xi D yi Σ i = 1 n D xi D yi Σ i = 1 n D yi 2 - 1 - Σ i = 1 n D xi D ti - Σ i = 1 n D yi D ti = A B B C - 1 E F - - - ( 12 )
In this equation, use D x, D y, D treplaced the I in traditional optical flow equation x, I y, I t,, when to image differentiate (asking slope), with difference image, replace original image.Therefore, can be by the displacement vector (u that calculate formula (12) and output is corresponding with present image in step B of the present invention x, u y), D wherein x, D yfor the space derivative of differential pixel, representing two components of differential pixel Grad; D tfor time-derivative; N is the pixel count in this image.
Fig. 8 has illustrated to use the detailed process of the inventive method:
Obtained before this image sequence: specifically can be as shown in figure 10, imageing sensor gathers the light intensity signal that has reflected true picture and then the analog voltage signal that converts one dimension in line scanning mode, and this analog voltage signal is sent into DSP after analog to digital converter converts data image signal to; Suppose that single-frame images pixel is m * m, for example getting natural number m is 16, separated by (T=) every 256 clock period at the quilt of data image signal described in DSP, converts the view data of a frame frame to.Original image F2 as shown, F3, in F4......, every two field picture has comprised 256 pixels, and each pixel has a gray-scale value.We can use P k, i, j(i=1,2......m, j=1,2......m) represents that k two field picture is at the corresponding gray-scale value of pixel (its physical meaning is sample signal strength corresponding to this pixel, lower same) of coordinate (i, j) position.
As shown in Figure 8, then carry out difference processing, according to described image sequence, produce difference image sequence, after frame image data after the frame in this image sequence deducts current frame image data as the difference image data of present frame, resetting this rear frame image data is current frame image data ... the rest may be inferred until obtain two frames or difference images more than two frames forms described difference image sequence.Described rear two field picture or be the next frame image of present image in described image sequence, or be lower some (>=2) two field picture of present image in described image sequence.That is to say, establish with F kthe image that represents k frame, the difference image that this two field picture is corresponding is F k+i-F kresult, the next frame difference image of this frame difference image is F k+i+m-F k+iresult, wherein k, i, m are natural number.As described i=m=1, represent two frame difference images be successively in image sequence successively adjacent three two field pictures carry out interframe between two difference obtain; When i=m ≠ 1, represent that successively two frame difference images are in image sequence, to be separated by successively to wait three two field pictures of frame pitch to carry out interframe difference acquisition between two; As i ≠ m, represent that successively two frame difference images are successively not wait frame pitch three two field pictures adjacent or that be separated by carry out interframe difference acquisition between two in image sequence.
Figure 10 take three two field pictures adopt consecutive frames carry out interframe between two difference be example, i.e. original image F3-original image F2=difference image DF5, original image F4-original image F3=difference image DF6.Figure 11 has illustrated a difference embodiment in Figure 10: establish P k-1, i, j, P k, i, j, P k+1, i, j(i=1,2......16; J=1,2......16) represent respectively k-1, k, k+1 two field picture is at the gray-scale value of the pixel of (i, j) position, and difference image k frame data are D at the gray-scale value of the pixel of (i, j) position k, i, j=P k, i, j-P k-1, i, j; Difference image k+1 frame data are D at the gray-scale value of the pixel of i, j position k+1, i, j=P k+1, i, j-P k, i, j.The rest may be inferred can try to achieve the gray-scale value D of other each pixel in this embodiment k, i+1, j, D k, i-1, j, D k+1, i+1, j, D k+1, i-1, j, D k, i+1, j, D k+1, i+1, j, D k, i-1, j, D k+1, i-1, j, D k+1, i, j, D k+1, i, j.With three two field pictures, two frame difference image D have been produced like this k, i, j, D k+1, i, j.In practical application, can also in the image sequence more than three frames, set image call condition, the image adjacent or that be separated by successively that meets predetermined condition is chosen to be to three two field pictures of wanting to carry out calculus of differences, and the rest may be inferred until accessed time of this image sequence.Therefore, in described image sequence, may have some images is excluded outside described effective image because failing to meet this predetermined condition.
Then in Fig. 8, difference image sequence is carried out to differentiate processing, utilize frame difference image after current difference image and one to calculate the described space derivative D of each pixel in current difference image x, D ywith time-derivative D t.Figure 10 is with difference image DF5, and DF6 is example.On this basis, by multiplying each other between two, can computing obtain each middle coefficient in formula (12)
Figure GSB0000116359810000101
to carry out the global operations in Fig. 8, within the scope of current difference image, calculate the cumulative sum of each middle coefficient in described formula A = Σ i = 1 n D xi 2 , B = Σ i = 1 n D xi D yi , C = Σ i = 1 n D yi 2 , E = - Σ i = 1 n D xi D ti , F = - Σ i = 1 n D yi D ti . Described multiplying each other between two can be realized with multiplier, for example
Figure GSB0000116359810000103
all the other no longer repeat at this.
Above, can only to the central area of each two field picture, process, correspondingly, the pixel count in described n Wei Gai central area, the pixel of establishing a two field picture is M*M, and wherein M is natural number, and n is less than M*M.As M=16 in above-described embodiment, while calculating cumulative sum herein, n can be, but not limited to be taken as 10 * 10=100.Usually, processing region is the maximal correlation region of differentiating of image-region to the maximum, the embodiment to same M=16 for example, and the pixel count n that this maximal correlation region comprises is 14 * 14.
Finally as Fig. 8 calculates and output displacement vector (u based on formula (12) x, u y).
Specific implementation process about differentiate in foregoing description can adopt prior art, and just the object of differentiate changes as difference image data.With an embodiment, illustrate below: because the D that will obtain x, D y, D tbe respectively D k, i, jat x, the partial derivative in y direction, the calculating normalizing in pixel is the poor of neighbor gray-scale value; The derivative of time t normalizes to calculating in pixel, and to be same pixel at the gray-scale value of adjacent two frames poor, is specifically calculated as follows:
D x=[D k,i,j+1+D k+1,j,j+1]-[D k,i,j-1+D k+1,i,j-1]
D y=[D k,i+1,j+D k+1,i+1,j]-[D k,i-1,j+D k+1,i-1,j]
D t=4×[D k+1,i,j-D k,i,j]
Wherein coefficient can represent by the template shown in Figure 12: wherein 1 represents that coefficient is that 1 ,-1 expression coefficient is that-1, two squares represent adjacent two frames.According to this template with D k, i, jthe mobile data of corresponding each pixel on two two field pictures of selecting are in the hope of this D k, i, jcorresponding space derivative.
Calculate D x, D y, D tthe step (as Figure 13) that differentiate is processed after adopting above-mentioned first difference processing, can also adopt the second way, comprise step:
1. after utilizing present image and one according to described image sequence, two field picture calculates the space derivative I that obtains each pixel in present image x, I ywith time-derivative I t;
2. the space derivative I of each pixel in a rear two field picture x, I ywith time-derivative I tdeduct space derivative and the time-derivative of respective pixel in current frame image, produce the described space derivative D of each pixel of the difference image corresponding with present image x, D ywith time-derivative D t.
Be difference processing after first differentiate is processed, specifically take as shown in figure 14 get three two field pictures as example: first on original image, do derived function and obtain two couples of derivative value I x1, I y1, I t1and I x2, I y2, I t2, then these two pairs of derivative value are done to difference obtain D x, D y, D t.
Existing optic flow technique has to find and the larger characteristic area of definite gradient in image, mainly consider to detect in video area to have a plurality of moving object, and the large young pathbreaker of characteristic area is limited to the size of estimated moving target.The inventive method is during based on mouse movement, on the image photographing because of imageing sensor, the displacement vector of each pixel is basically identical, be that moving target only has one, and signal noise ratio (snr) of image is not high, if adopt characteristic area compared with little easily because noise is mistaken for optimal computed region, and then provide full of prunes result.Therefore the inventive method adopts global operations, abandon carrying out the searching process of characteristic area and be the overall situation by computing zone broadening.The general whole image-region to 16 * 16 pixels, the maximum selectable zoning of the inventive method is 14 * 14.Because guaranteeing that great majority point on image is carried out to optical flow computation, with being less than 14×14 region (such as but not limited to picture centre region 10 * 10 pixels), to come calculating parameter A, B, C, E and F be also feasible.Through matlab emulation experiment checking, the inventive method had both been conducive to improve algorithm stability, was also conducive to improve the accuracy of mouse picking, had especially simplified the step of finding characteristic area the circuit that makes to realize this method is simpler.
According to the inventive method, the present invention also proposes a kind of moving image displacement detector of implementing the inventive method, for optical mouse; Comprise data-interface and a data output that is used for receiving data image signal; Especially, as shown in Figure 9, this device comprises difference processing module and the differentiate processing module that series winding connects, data image signal from described data-interface carries out the calculus of differences of interframe data through difference processing module Yi Zhengwei unit, and after the derivative operation of differentiate processing module, export the space derivative D of each pixel of the difference image corresponding with current frame image x, D ywith time-derivative D tbe sent to global operations module, calculate respectively each middle coefficient of all pixels in this image preset range
Figure GSB0000116359810000111
cumulative sum; This global operations module is exported these cumulative sums toward displacement vector computing unit, to press formula
( u x , u y ) T = ( D → T D → ) - 1 D → T D t = Σ i = 1 n D xi 2 Σ i = 1 n D xi D yi Σ i = 1 n D xi D yi Σ i = 1 n D yi 2 - 1 - Σ i = 1 n D xi D ti - Σ i = 1 n D yi D ti Carry out displacement calculating vector (u x, u y), wherein n is the quantity of the pixel in described image preset range; This displacement vector computing unit output displacement vector (u x, u y) toward described data output.Described formula further launches, and reality is
u x = Σ i = 1 n D xi D yi * Σ i = 1 n D yi D ti - Σ i = 1 n D yi 2 * Σ i = 1 n D xi D ti Σ i = 1 n D xi 2 * Σ i = 1 n D yi 2 - Σ i = 1 n ( D xi D yi ) 2 u y = Σ i = 1 n D xi D yi * Σ i = 1 n D xi D ti - Σ i = 1 n D xi 2 * Σ i = 1 n D yi D ti Σ i = 1 n D xi 2 * Σ i = 1 n D yi 2 - Σ i = 1 n ( D xi D yi ) 2 .
The best use field of considering apparatus of the present invention comprises optical mouse, and apparatus of the present invention can be encapsulated as a chips, in this chip, can also be integrated into existing micro-control unit, and this micro-control unit has for receiving the keystroke interface of push button signalling; This micro-control unit receives from the data of described keystroke interface with from the displacement vector data of described displacement vector computing unit, and by these data packing outputs toward described data output.Described data output can be used to be electrically connected to host computer.
When described data image signal is while providing so that the video data by serial ports is streamed, apparatus of the present invention also must comprise at least two frame delay devices of series winding mutually, connect described data-interface, and described data image signal Yi Zhengwei unit is carried out to separation; Order is away from the second frame delay device output current frame image data of described data-interface, the first frame delay device output is the data of a rear two field picture of this present frame, what described data-interface was exported simultaneously is the data of a rear two field picture of this rear two field picture, and this three frame image data is exported toward the series winding branch road of difference processing module and differentiate processing module simultaneously.
Specifically connect with reference to Figure 13 and Figure 14.Figure 13 has illustrated one of embodiment: described difference processing module is connected between described data-interface and differentiate processing module, described the second frame delay device and the first frame delay device provide respectively a road output to be sent to described difference processing module to carry out inter-frame difference, thereby this difference processing module produces two frame difference view data simultaneously, be sent to described differentiate processing module.Specifically, difference processing module deducts the view data from data-interface the view data that obtains difference image D1 from the view data of the first frame delay device, the view data from the first frame delay device is deducted to the view data that obtains difference image D2 from the view data of the second frame delay device; Differentiate processing module is asked respectively space derivative (Dx1, Dy1) and (Dx2, Dy2) to difference image D1, the D2 from difference processing module, to Dx1, Dx2 summation obtains Dx, to Dy1, Dy2 summation obtains Dy, and difference image D1, D2 are done to the poor time-derivative Dt that obtains.
Figure 14 has illustrated two of embodiment: described differentiate processing module is connected between described data-interface and difference processing module, described the second frame delay device and the first frame delay device provide respectively a road output to be sent to described differentiate processing module, thereby this differentiate processing module produces two frame space derivative I simultaneously x, I ywith time-derivative I tbe sent to described difference processing module and carry out inter-frame difference to obtain differentiated space derivative D x, D ywith time-derivative D t.Specifically, differentiate processing module is to the view data from data-interface, from the view data of the first frame delay device, subtract each other between two and ask two time-derivative It1 from the view data of the second frame delay device, It2, and to the view data from data-interface, from the view data of the first frame delay device, ask respectively space derivative (Ix1 from the view data of the second frame delay device, Iy1), (Ix2, Iy2), (Ix3, Iy3); Difference processing module is to the time-derivative It1 from differentiate processing module, and It2 subtracts each other and obtains Dt, to space derivative (Ix1, Iy1), (Ix2, Iy2), (Ix3, Iy3) subtracts each other between two and obtains (Dx1, Dy1), (Dx2, Dy2), then to Dx1, Dx2 summation obtains Dx, to Dy1, Dy2 summation obtains Dy.
Two frame delay devices in Figure 13 and Figure 14 can also be equal to frame buffer storer alternative.
The differentiate processing module of apparatus of the present invention and difference processing module, global operations module, displacement vector computing module all can be take a large amount of totalizers or multiplier and as basis, realized various calculation process, how to use and to connect these totalizers or multiplier, under the calculation process of its restriction, being prior art.Therefore frame delay device, difference processing module, differentiate processing module, global operations module or the displacement vector computing module of apparatus of the present invention all can be based on prior aries, with FPGA (Field Programmable Gate-Array field programmable gate array) or ASIC (Application Specific Integrate Circuit special IC) or DSP (Digital Signal Processor digital signal processor), according to its included Processing Algorithm, realize, and use as required on-chip memory or plug-in storer.Because these are prior art, also non-emphasis of the present invention, therefore do not repeat at this.While in every case forming apparatus of the present invention by the functional module of these prior aries, will fall into protection scope of the present invention undoubtedly.
Existing optical mouse, comprise the light emitting diode that irradiates light is provided, be used for responding to the irradiation light being reflected by object plane the imageing sensor that light signal is converted to analog picture signal, described analog picture signal is converted to the analog to digital converter of data image signal, and an image signal processing unit that receives described data image signal; Also comprise that one is used for being electrically connected to the micro-control unit of host computer and mousebutton, this micro-control unit fetches by being electrically connected controls described imageing sensor, analog to digital converter or image signal processing unit, and receives the status signal from described imageing sensor, analog to digital converter or image signal processing unit; The data output of described image signal processing unit connects described micro-control unit.If described image signal processing unit adopts moving image displacement detector of the present invention, this type of optical mouse is also within protection scope of the present invention undoubtedly.This type of optical mouse has improved the degree of accuracy of mouse navigation greatly, has improved finished product rate.Integrated level based on existing chip technology and encapsulation technology is more and more higher, and described imageing sensor and described analog to digital converter can be micro-imagers of one, and described image signal processing unit and described micro-control unit can be integrated in a chips.

Claims (13)

1. a moving image displacement detecting method, the image sequence for analyzing with time relationship gathers this image sequence time sensing device with respect to the movement locus of object to determine, comprises step:
A. image signal processing unit receives described image sequence in chronological order;
It is characterized in that: described image sequence comprises three frames or images more than three frames; Also comprise step
B. based on described image sequence, successively each present image is carried out to data processing, according to each pixel on the difference image corresponding with this present image, calculate, by following formula calculating the output displacement vector (u corresponding with present image x, u y)
( u x , u y ) T = Σ i = 1 n D xi 2 Σ i = 1 n D xi D yi Σ i = 1 n D xi D yi Σ i = 1 n D yi 2 - 1 - Σ i = 1 n D xi D ti - Σ i = 1 n D yi D ti ; D wherein x, D yfor the space derivative of differential pixel, representing two components of differential pixel Grad; D ttime-derivative for difference image; N is the pixel count in this difference image.
2. moving image displacement detecting method according to claim 1, is characterized in that, also comprises step:
C. according to each displacement vector in step B and the time interval between correspondence image thereof, simulate described movement locus.
3. moving image displacement detecting method according to claim 1, is characterized in that, described step B is specially and comprises step:
1. according to described image sequence, produce difference image sequence, after a rear frame image data of current frame image data in this image sequence deducts current frame image data as the difference image data of present frame, resetting this rear frame image data is current frame image data ... the rest may be inferred until obtain two frames or difference images more than two frames forms described difference image sequence;
2. utilize frame difference image after current difference image and one to calculate the described space derivative D of each pixel in current difference image x, D ywith time-derivative D t;
3. by multiplying each other between two computing to obtain each middle coefficient in described formula
Figure FSB00001105298000012
d xd y, D xd t, D yd t;
4. within the scope of current difference image, calculate the cumulative sum of each middle coefficient in described formula; And and then calculate described displacement vector (u x, u y).
4. moving image displacement detecting method according to claim 1, is characterized in that, described step B is specially and comprises step:
1. after utilizing present image and one according to described image sequence, two field picture calculates the space derivative I that obtains each pixel in present image x, I ywith time-derivative I t;
2. the space derivative I of each pixel in a rear two field picture x, I ywith time-derivative I tdeduct space derivative and the time-derivative of respective pixel in current frame image, produce the described space derivative D of each pixel of the difference image corresponding with present image x, D ywith time-derivative D t;
3. by multiplying each other between two computing to obtain each middle coefficient in described formula d xd y, D xd t, D yd t;
4. within the scope of current difference image, calculate the cumulative sum of each middle coefficient in described formula; And and then calculate described displacement vector (u x, u y).
5. according to the moving image displacement detecting method described in claim 3 or 4, it is characterized in that:
Described rear two field picture or be the next frame image of present image in described image sequence, or be a two field picture of some frames after present image in described image sequence.
6. moving image displacement detecting method according to claim 1, is characterized in that:
When step B carries out data processing to each present image, processing region is the maximal correlation region of differentiating of image-region to the maximum.
7. a moving image displacement detector, for optical mouse; Comprise data-interface and a data output that is used for receiving data image signal; It is characterized in that:
Also comprise difference processing module and differentiate processing module that series winding connects, from the data image signal of described data-interface, after difference processing module Yi Zhengwei unit carries out the calculus of differences of interframe data and the derivative operation of differentiate processing module, export the space derivative D of each pixel of the difference image corresponding with current frame image x, D ywith time-derivative D tbe sent to global operations module, calculate respectively each middle coefficient of all pixels in this difference image preset range
Figure FSB00001105298000022
d xd y, D xd t, D yd tcumulative sum; This global operations module is exported these cumulative sums toward displacement vector computing unit,
To press formula ( u x , u y ) T = Σ i = 1 n D xi 2 Σ i = 1 n D xi D yi Σ i = 1 n D xi D yi Σ i = 1 n D yi 2 - 1 - Σ i = 1 n D xi D ti - Σ i = 1 n D yi D ti Carry out displacement calculating vector (u x, u y), wherein n is the quantity of the pixel in described difference image preset range; This displacement vector computing unit output displacement vector (u x, u y) toward described data output.
8. moving image displacement detector according to claim 7, is characterized in that:
Also comprise two frame delay device or the frame buffer storeies of series winding mutually, connect described data-interface, described data image signal Yi Zhengwei unit is carried out to separation; Order is away from the second frame delay device or the second frame buffer storer output current frame image data of described data-interface, the output of the first frame delay device or the first frame buffer storer is the data of two field picture after a frame of this present frame, described data-interface is exported simultaneously is the data of two field picture after a frame of this rear two field picture, and this three frame image data is exported toward the series winding branch road of difference processing module and differentiate processing module simultaneously.
9. moving image displacement detector according to claim 8, is characterized in that:
Described difference processing module is connected between described data-interface and differentiate processing module, described second frame delay device/frame buffer storer and the first frame delay device/frame buffer storer provide respectively a road output to be sent to described difference processing module to carry out inter-frame difference, thereby this difference processing module produces two frame difference view data simultaneously, be sent to described differentiate processing module.
10. moving image displacement detector according to claim 8, is characterized in that:
Described differentiate processing module is connected between described data-interface and difference processing module, described second frame delay device/frame buffer storer and the first frame delay device/frame buffer storer provide respectively a road output to be sent to described differentiate processing module, thereby this differentiate processing module produces two frame space derivative I simultaneously x, I ywith time-derivative I tbe sent to described difference processing module and carry out inter-frame difference to obtain differentiated space derivative D x, D ywith time-derivative D t.
11. moving image displacement detectors according to claim 7, is characterized in that:
Also comprise a micro-control unit, this micro-control unit has for receiving the keystroke interface of push button signalling; This micro-control unit receives from the data of described keystroke interface with from the displacement vector data of described displacement vector computing unit, and by these data packing outputs toward described data output.
12. 1 kinds of optical mouses, comprise the light emitting diode that irradiates light is provided, be used for responding to the irradiation light being reflected by object plane the imageing sensor that light signal is converted to analog picture signal, described analog picture signal is converted to the analog to digital converter of data image signal, and an image signal processing unit that receives described data image signal; Also comprise that one is used for being electrically connected to the micro-control unit of host computer and mousebutton; The data output of described image signal processing unit connects described micro-control unit; It is characterized in that:
This image signal processing unit is the moving image displacement detector described in any one in claim 7~10.
13. optical mouses according to claim 12, is characterized in that:
Micro-imager that described imageing sensor and described analog to digital converter are integrated, or described image signal processing unit and described micro-control unit are integrated in a chips.
CN201010176100.1A 2010-05-14 2010-05-14 Method and device for detecting displacement of motion image as well as optical mouse Active CN102243537B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010176100.1A CN102243537B (en) 2010-05-14 2010-05-14 Method and device for detecting displacement of motion image as well as optical mouse

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010176100.1A CN102243537B (en) 2010-05-14 2010-05-14 Method and device for detecting displacement of motion image as well as optical mouse

Publications (2)

Publication Number Publication Date
CN102243537A CN102243537A (en) 2011-11-16
CN102243537B true CN102243537B (en) 2014-01-15

Family

ID=44961624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010176100.1A Active CN102243537B (en) 2010-05-14 2010-05-14 Method and device for detecting displacement of motion image as well as optical mouse

Country Status (1)

Country Link
CN (1) CN102243537B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104340710A (en) * 2013-07-26 2015-02-11 山东新北洋信息技术股份有限公司 Slice medium moving state detection method and device and medium treatment device
JP7021236B2 (en) * 2017-02-09 2022-02-16 グーグル エルエルシー Agent navigation using visual input
US11480664B2 (en) * 2019-06-05 2022-10-25 Pixart Imaging Inc. Optical detection device of detecting a distance relative to a target object
CN110530499A (en) * 2019-08-27 2019-12-03 中国科学院声学研究所 A method of acoustic propagation direction in measurement dynamic photoelasticity image
CN110956647B (en) * 2019-11-02 2021-06-22 上海交通大学 System and method for dynamically tracking object behaviors in video based on behavior dynamic line model
CN111724359B (en) * 2020-06-12 2023-06-02 深圳技术大学 Method, device and storage medium for determining motion trail of lung lobes
CN112184759A (en) * 2020-09-18 2021-01-05 深圳市国鑫恒运信息安全有限公司 Moving target detection and tracking method and system based on video

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1604126A (en) * 2003-10-02 2005-04-06 三星电机株式会社 Optical navigation sensor device and image processing method using 2-dimensional sequential image process
CN1981322A (en) * 2004-05-21 2007-06-13 硅光机器公司 Cross-reference to related applications

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100545062B1 (en) * 2002-11-22 2006-01-24 삼성전기주식회사 Image Data Processing Method of Optical Mouse
KR100623080B1 (en) * 2002-12-10 2006-09-11 주식회사 애트랩 Optical mouse having improved accuracy and the method for controlling it

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1604126A (en) * 2003-10-02 2005-04-06 三星电机株式会社 Optical navigation sensor device and image processing method using 2-dimensional sequential image process
CN1981322A (en) * 2004-05-21 2007-06-13 硅光机器公司 Cross-reference to related applications

Also Published As

Publication number Publication date
CN102243537A (en) 2011-11-16

Similar Documents

Publication Publication Date Title
CN102243537B (en) Method and device for detecting displacement of motion image as well as optical mouse
US20200400428A1 (en) Systems and Methods of Locating a Control Object Appendage in Three Dimensional (3D) Space
TWI706152B (en) Optoelectronic modules for distance measurements and/or multi-dimensional imaging, and methods of obtaining distance and/or three-dimensional data
US8619122B2 (en) Depth camera compatibility
US9602807B2 (en) Single frequency time of flight de-aliasing
US8687044B2 (en) Depth camera compatibility
US20140241612A1 (en) Real time stereo matching
EP3135033B1 (en) Structured stereo
CN101859439A (en) Movement tracking device for man-machine interaction and tracking method thereof
WO1994011845A1 (en) Device and method for determining movement of a surface
KR20150043312A (en) Gesture-based user interface
Sluÿters et al. Hand gesture recognition for an off-the-shelf radar by electromagnetic modeling and inversion
CN105303572B (en) Based on the main depth information acquisition method passively combined
CN104680534B (en) Object depth information acquisition methods based on single frames composite shuttering
CN103438834A (en) Hierarchy-type rapid three-dimensional measuring device and method based on structured light projection
CN106651941A (en) Depth information acquisition method and depth measuring system
Janke et al. Part2Track: A MATLAB package for double frame and time resolved particle tracking velocimetry
CN105183163A (en) Screen or projection non-contact type interaction device based on motion capture
CN103940370A (en) Target object three-dimensional information acquisition method based on periodical co-prime hybrid coding
CN103176606A (en) Plane interaction system and method based on binocular vision recognition
TW201006527A (en) Measuring object contour method and measuring object contour apparatus
Biasi et al. Garment-based motion capture (GaMoCap): high-density capture of human shape in motion
CN113421286B (en) Motion capturing system and method
Qin et al. Gesture recognition from depth images using motion and shape features
Duan et al. Depth camera in human-computer interaction: An overview

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
C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: 518052, 33A, 1 modern Chinese business road, Nanshan District, Guangdong, Shenzhen

Patentee after: SHENZHEN YSPRING TECHNOLOGY CO., LTD.

Address before: 518052, 33A, 1 modern Chinese business road, Nanshan District, Guangdong, Shenzhen

Patentee before: Shenzhen Huichun Technology Co.,Ltd.