Gesture identification method and device
Technical field
The present invention relates to human-computer interaction technique field, particularly relate to a kind of gesture identification method and device.
Background technology
Operation to file, is confined to mouse and keyboard at present, this mode of operation the most extremely inconvenience, example
As in demonstration occasion, speaker is likely to require the multiple files of operation, it may be necessary to minimizes present procedure, needs to open next
Individual file and this document is carried out maximum operation come emphasis show.Although the operation of current mouse and keyboard has been passed through wireless
Technology and ergonomics technology become more and more convenient, but require that operator is also to rely on mouse and keyboard when operation,
And can not the most cosily carry out man-machine interaction.
Currently, somatosensory operation identification technology, as interactive mode brand-new between the mankind and computer, is widely used in intelligence
The various fields such as energy robot, computer, game machine, mobile phone, display, automatic control system.And along with multimedia technology
Universal with development, people are carrying out unremitting exploration to this brand-new human-computer interaction technology, make to use gesture, limb action etc.
Intuitive way finishing man-machine interaction a, it has also become hot technology.
But current somatosensory operation identification technology, it is impossible to more fast efficiently identify the gesture of operator, to carry out people
Machine interactive operation.
Summary of the invention
In view of the above problems, it is an object of the invention to propose a kind of gesture identification method and device, by identification is right
The movement locus of elephant is mapped in a plane, captures the gesture of manipulator rapidly and accurately.
For reaching this purpose, the present invention by the following technical solutions:
A kind of gesture identification method, including:
S1, obtain the three-dimensional data of preset duration identifying object;
S2, three-dimensional data to described preset duration are fitted, and obtain fit operation plane, described fit operation plane
For identifying the almost plane of object movement locus place plane in preset duration;
S3, extraction include the projection in described fit operation plane of the three-dimensional data identifying object of each sampling instant
The projected footprint of point, obtains according to described projected footprint and turns round a little and the described parameter turned round a little;When certain subpoint corresponding
The extended line of one line segment meets predetermined condition to the deflection angle of the second line segment corresponding to this subpoint, defines this subpoint for turning
Curved, wherein, the first line segment that described subpoint is corresponding is connected shape by subpoint with the former point of adjacent time in projected footprint
The line segment become, the second line segment that described subpoint is corresponding is connected formation by subpoint with the latter point of adjacent time in projected footprint
Line segment;
S4, when the described parameter turned round a little meets instruction decision condition set in advance, then perform this finger set in advance
Make the instruction that decision condition is corresponding.
Preferably, the parameter turned round a little described in described step S3 includes turn round deflection angle a little, displacement a little of turning round
Ratio, speed proportional a little of turning round and the adjacent velocity rate turned round a little;
Wherein, the deflection angle a little that turns round described in is the first corresponding ray deflection angle to the second ray of currently turning round
Degree;
Currently turn round a little exist temporally adjacent previous turn round some time, in projected footprint, this temporally adjacent previous turns
Curved point carries out fitting a straight line to the subpoint occurred in chronological order between currently turning round a little, when taking in the fitting a straight line of acquisition this
Between an adjacent previous ray pointing to a direction of currently turning round that turns round be the first ray;Otherwise, to projected footprint projects rail
Mark starting point carries out fitting a straight line to the subpoint occurred in chronological order between currently turning round a little, take in the fitting a straight line of acquisition by
It is the first ray that projected footprint starting point points to the ray in a direction of currently turning round;
Currently turn round a little exist temporally adjacent rear one turn round some time, when pointing to this to projected footprint currently turns round
Between adjacent rear one turn round a little between the subpoint that occurs in chronological order carry out fitting a straight line, take in the fitting a straight line of acquisition when
Before turn round that to point to this rear one temporally adjacent ray turning round a direction be the second ray;Otherwise, to current in projected footprint
Turn round and a little carry out fitting a straight line to the subpoint occurred in chronological order between projected footprint terminal, take in the fitting a straight line of acquisition
By currently turning round, a ray pointing to projected footprint terminal direction is the second ray;
The described displacement ratio turned round a little is currently turn round the first corresponding crucial line segment and a second crucial line segment
Middle length higher value and the ratio of smaller value;
Currently turn round a little exist temporally adjacent previous turn round some time, the described first crucial line segment is described first ray
Previous turn round a little to the line segment currently turning round a little from temporally adjacent;Otherwise, the described first crucial line segment is described first
Ray from projected footprint starting point to the line segment currently turning round a little;
Currently turn round a little exist temporally adjacent rear one turn round some time, the described second crucial line segment is described second ray
From currently turn round a little to this temporally adjacent rear one turn round a little line segment;Otherwise, described second crucial line segment is described the
Two rays are from currently turning round a little to the line segment projected footprint terminal;
The described speed proportional turned round a little is currently turn round the first corresponding crucial line segment and the speed of the second crucial line segment
Degree ratio;Currently turn round a little exist temporally adjacent previous turn round some time, the speed of the described first crucial line segment is according to first
The length of crucial line segment and projected footprint previous turn round a little to the Time Calculation a little experienced of currently turning round from temporally adjacent;No
Then, according to the length of the first crucial line segment and projected footprint from starting point to the Time Calculation a little experienced of currently turning round;
Currently turn round a little exist temporally adjacent rear one turn round some time, the speed of the described second crucial line segment is according to second
The length of crucial line segment and projected footprint from currently turn round a little to projected footprint temporally adjacent rear one turn round a little experienced time
Between calculate;Otherwise, length and projected footprint according to the second crucial line segment are a little experienced to projected footprint terminal from currently turning round
Time Calculation;
The described adjacent velocity rate that turns round a little be the temporally adjacent speed at the first crucial line segment front turned round a little with
Temporally adjacent after turn round the ratio of speed of the crucial line segment of second a little.
Preferably, the parameter turned round a little described in described step S3 includes turn round deflection angle a little, displacement a little of turning round
Ratio;Described in described step S4, instruction decision condition set in advance includes: turn round a little if described projected footprint occurs one
Deflection angle between 30 degree to 170 degree, and this displacement ratio that turns round is between 1.5 to 2.5, then assert that this gesture is for sky
Middle picture " √ ", then Predicated execution first instructs.
Preferably, the parameter turned round a little described in described step S3 also includes the speed proportional turned round a little;
Described in described step S4, instruction decision condition set in advance also includes, described in speed proportional a little of turning round exist
Between 0.7 to 1.5.
Preferably, speed proportional a little of turning round described in is 1.3.
Preferably, the parameter turned round a little described in described step S3 includes turn round deflection angle a little, displacement a little of turning round
Ratio;Described in described step S4, instruction decision condition set in advance includes: turn round a little if described projected footprint occurs one
Deflection angle between-180 degree to-170 degree or between 170 degree to 180 degree, and described in the displacement ratio that turns round a little 1.5
Between 2, then assert that gesture, for wave in the air, performs the second instruction.
Preferably, the parameter turned round a little described in described step S3 includes the deflection angle turned round a little;In described step S4
Described instruction decision condition set in advance includes: if described projected footprint include two deflection angles 100 degree to 174 degree it
Between turn round a little, and temporally adjacent front turn round a little first crucial line segment with temporally adjacent after turn round second a little
Crucial line segment has an intersection point, then assert that this gesture for drawing "×" in the air, then performs the 3rd instruction.
Preferably, the parameter turned round a little described in described step S3 also includes the adjacent velocity rate turned round a little:
Described in described step S4, instruction decision condition set in advance also includes, the described adjacent velocity rate turned round a little
Between 0.7 to 1.5.
Preferably, the described adjacent velocity rate turned round a little is 1.3.
The invention also discloses a kind of gesture identifying device, it is characterised in that including:
Three-dimensional data acquisition module, for obtaining the three-dimensional data of the preset duration identifying object;
Operation planar acquisition module, for being fitted the three-dimensional data of described preset duration, obtains fit operation and puts down
Face, described fit operation plane is to identify the almost plane of object movement locus place plane in preset duration;
Characteristic extracting module, grasps in described matching for extracting the three-dimensional data identifying object including each sampling instant
Make the projected footprint of subpoint in plane, obtain according to described projected footprint turn round a little with the described parameter turned round a little;When certain
The extended line of the first line segment that subpoint is corresponding meets predetermined condition to the deflection angle of the second line segment corresponding to this subpoint, fixed
This subpoint of justice is for turning round a little, and wherein, the first line segment that described subpoint is corresponding is subpoint and adjacent time in projected footprint
The line segment that even formed of former point, the second line segment that described subpoint is corresponding is subpoint and adjacent time in projected footprint
The line segment that latter point is even formed;
Characteristic matching with perform module, for when described in parameter a little of turning round meet instruction decision condition set in advance
Time, perform the instruction that this instruction decision condition set in advance is corresponding.
Preferably, parameter a little of turning round described in include turning round deflection angle, the displacement ratio a little that turns round a little, turn round a little
Combination one or more in speed proportional and the adjacent velocity rate turned round a little;
Wherein, the deflection angle a little that turns round described in be currently turn round a first corresponding ray to the second ray deflection
Angle;
Currently turn round a little exist temporally adjacent previous turn round some time, in projected footprint, this temporally adjacent previous turns
Curved point carries out fitting a straight line to the subpoint occurred in chronological order between currently turning round a little, when taking in the fitting a straight line of acquisition this
Between an adjacent previous ray pointing to a direction of currently turning round that turns round be the first ray;Otherwise, to projected footprint projects rail
Mark starting point carries out fitting a straight line to the subpoint occurred in chronological order between currently turning round a little, take in the fitting a straight line of acquisition by
It is the first ray that projected footprint starting point points to the ray in a direction of currently turning round;
Currently turn round a little exist temporally adjacent rear one turn round some time, when pointing to this to projected footprint currently turns round
Between adjacent rear one turn round a little between the subpoint that occurs in chronological order carry out fitting a straight line, take in the fitting a straight line of acquisition when
Before turn round that to point to this rear one temporally adjacent ray turning round a direction be the second ray;Otherwise, to current in projected footprint
Turn round and a little carry out fitting a straight line to the subpoint occurred in chronological order between projected footprint terminal, take in the fitting a straight line of acquisition
By currently turning round, a ray pointing to projected footprint terminal direction is the second ray;
The described displacement ratio turned round a little is currently turn round the first corresponding crucial line segment and a second crucial line segment
Middle length higher value and the ratio of smaller value;
Currently turn round a little exist temporally adjacent previous turn round some time, the described first crucial line segment is described first ray
Previous turn round a little to the line segment currently turning round a little from temporally adjacent;Otherwise, the described first crucial line segment is described first
Ray from projected footprint starting point to the line segment currently turning round a little;
Currently turn round a little exist temporally adjacent rear one turn round some time, the described second crucial line segment is described second ray
From currently turn round a little to this temporally adjacent rear one turn round a little line segment;Otherwise, described second crucial line segment is described the
Two rays are from currently turning round a little to the line segment projected footprint terminal;The described speed proportional turned round a little is a little right for currently turning round
The crucial line segment of first answered and the speed proportional of the second crucial line segment;
Currently turn round a little exist temporally adjacent previous turn round some time, the speed of the described first crucial line segment is according to first
The length of crucial line segment and projected footprint previous turn round a little to the Time Calculation a little experienced of currently turning round from temporally adjacent;No
Then, according to the length of the first crucial line segment and projected footprint from starting point to the Time Calculation a little experienced of currently turning round;
Currently turn round a little exist temporally adjacent rear one turn round some time, the speed of the described second crucial line segment is according to second
The length of crucial line segment and projected footprint from currently turn round a little to projected footprint temporally adjacent rear one turn round a little experienced time
Between calculate;Otherwise, length and projected footprint according to the second crucial line segment are a little experienced to projected footprint terminal from currently turning round
Time Calculation;
The described adjacent velocity rate that turns round a little be the temporally adjacent speed at the first crucial line segment front turned round a little with
Temporally adjacent after turn round the ratio of speed of the crucial line segment of second a little.
Preferably, parameter a little of turning round described in include turning round deflection angle a little, turn round displacement ratio a little;
With performing module, characteristic matching includes that the first instruction assert that unit, described first instruction assert that unit is for described
There is a deflection angle turned round a little between 30 degree to 170 degree in projected footprint, and this displacement ratio that turns round arrives 1.5
Time between 2.5, assert and identify that object is drawn " √ " in the air, perform the first instruction.
Preferably, parameter a little of turning round described in also includes the speed proportional turned round a little;
Described first instruction assert unit identification identification object draw in the air the condition of " √ " also include described in turn round speed a little
Degree ratio is between 0.7 to 1.5.
Preferably, speed proportional a little of turning round described in is 1.3.
Preferably, parameter a little of turning round include turning round deflection angle a little, turn round displacement ratio a little;
With performing module, characteristic matching includes that the second instruction assert that unit, described second instruction assert that unit is for described
Projected footprint occurs that a deflection angle turned round a little is spent between-170 degree or between 170 degree to 180 degree and described-180
Turn round displacement ratio a little between 1.5 to 2 time, assert gesture for wave in the air, perform second instruct.
Preferably, parameter a little of turning round described in includes the deflection angle turned round a little;
With performing module, characteristic matching includes that the 3rd instruction assert that unit, described 3rd instruction assert that unit is for described
Projected footprint includes two deflection angles turning round a little between 100 degree to 174 degree, and temporally adjacent turning in front appearance
The crucial line segment of the first of curved point has an intersection point with the temporally adjacent crucial line segment of second a little of turning round in rear appearance, and assert should
Gesture, for drawing "×" in the air, performs the 3rd instruction.
Preferably, parameter a little of turning round described in also includes the adjacent velocity rate turned round a little;
Described first instruction assert that unit identification identification object is drawn the condition of "×" in the air and also included described adjacent turn round a little
Velocity rate between 0.7 to 1.5.
Preferably, the described adjacent velocity rate turned round a little is 1.3.
The present invention is by by identifying that object three-dimensional data in scheduled duration is mapped in a fit operation plane, obtaining
Take its plane projection track identifying object motion, by utilizing a parameter of turning round a little in plane projection track and turn round to obtain
Identify, owing to the data processed are changed into 2-D data by three-dimensional data, and track place space plane need not be adapted to
Direction arranges multiple characteristic matching storehouse and mates, and the present invention greatly reduces the operand of action recognition, and meanwhile, the present invention ties
Close the feature of gesture somatosensory operation, utilize and turn round a little and relevant parameter is used as the characteristic parameter of gesture identification, it is possible to preferably
Embody gesture feature, improve the accuracy of gesture identification.
Accompanying drawing explanation
Fig. 1 is the flow chart of the gesture identification method described in the embodiment of the present invention one;
Fig. 2 is by a judgement schematic diagram that turns round;
Fig. 3 is the schematic diagram that the deflection angle turned round a little calculates;
Fig. 4 is the schematic diagram calculating deflection angle according to straight slope;
Fig. 5 is that the aerial gesture drawing " √ " judges schematic diagram;
Fig. 6 is that the gesture of oscillating air judges schematic diagram;
Fig. 7 is that the gesture drawing "×" in the air judges schematic diagram;
Fig. 8 is the structural representation of the gesture identifying device of the embodiment of the present invention two.
Detailed description of the invention
Embodiment one
Fig. 1 is the flow chart of the gesture identification method described in the present embodiment, as it is shown in figure 1, described method includes:
S101, the three-dimensional data of acquisition identification object preset duration.
In a preferred implementation of the present embodiment, described identification object can be a single point, such as finger tip or
Person is the central point representing whole hand, and this central point refers to according to point coordinates all of in hand three-dimensional data calculated
Representing the some cloud centre of form or the point of barycenter of hand three-dimensional data, it can be by adding point coordinates all of in hand three-dimensional data
Weight average or arithmetic average are calculated.
In a preferred implementation of the present embodiment, the three-dimensional data acquisition methods of described preset duration can be: adopts
With existing three-dimensional space data acquisition methods, obtained by evaluator.It is for instance possible to use binocular calculates parallax, thus count
Calculate three-dimensional information.Again it is for instance possible to use TOF (Time of Flight, light flight time) method, by calculating the reflection of light
Time Calculation depth map, obtains the three-dimensional data identifying object.Again it is for instance possible to use the method for structured light of monocular, by meter
Calculate coupling degree of depth pattern and calculate depth value, thus obtain the three-dimensional data identifying object.
Herein, evaluator can be any instrument that can identify three-dimensional data at three dimensions in prior art, it is possible to
To be 3D(Three Dimensional, three-dimensional) sensor or stereo camera etc..
And the setting of preset duration is usually set to the duration that be enough to fully identify fit operation plane, can be according to identification
Depending on the performance of device, such as, when evaluator powerful, when speed is fast, preset duration can be set to shorter.
S102, to identify object three-dimensional data of each sampling instant in preset duration be fitted, obtain fit operation
Plane, described fit operation plane is to identify the almost plane of object movement locus place plane in preset duration.
In a detailed description of the invention of the present embodiment, described fit operation plane is that a single point is in preset duration
The almost plane of movement locus place plane.
The general expression of plane equation is:
P(x, y, z)=Ax+By+Cz+D=0
Both sides can obtain with divided by D:
P(x,y,z)=ax+by+cz+1=0
If in preset duration, such as 3 seconds, the three-dimensional data of a single point recorded is:
(xi,yi,zi)(i=0,1,2,......,n)
In the present embodiment, according to this three-dimensional data, it is possible to use method of least square formula is fitted:
If:
Q [a b c] can be obtainedT=K
Solve floor coefficient for [a b c]TQ-1K.
According to the knowledge of space geometry, the rotation relationship of the most former coordinate system of plane normal can be obtained from plane equation
R。
It should be noted that those skilled in the art can also use other existing planar fit method to come to identification
Object three-dimensional data of each sampling instant in preset duration is fitted, as long as being obtained in that fit operation plane.
S103, extraction include the throwing in described fit operation plane of the three-dimensional data identifying object of each sampling instant
The projected footprint of shadow point, obtains according to described projected footprint and turns round a little and the described parameter turned round a little.
In projected footprint, when the extended line of the first line segment corresponding to certain subpoint is to the second line segment corresponding to this subpoint
Deflection angle meet predetermined condition, define this subpoint for turning round a little, wherein, the first line segment corresponding to described subpoint is for throwing
The line segment that shadow point is even formed with the former point of adjacent time in projected footprint, the second line segment that described subpoint is corresponding is projection
The line segment that point is even formed with the latter point of adjacent time in projected footprint.
Specifically, as in figure 2 it is shown, some A, B, C are three subpoints temporally adjacent in projected footprint, three subpoints exist
Order in track is that A to C occurs in succession.If the subpoint analyzed is some B, then some A is adjacent time in its projected footprint
Former point, and putting C is the latter point of adjacent time in its projected footprint.Line segment AB is first line segment of subpoint B, and line segment BC is
Second line segment of subpoint B, the extended line that extended line BD is the first line segment of line segment AB.
The deflection angle of subpoint is then the deflection angle from the extended line of the first line segment to the second line segment, in the present invention, institute
Have deflection angle with rotate to be counterclockwise on the occasion of.Otherwise it is then negative value.In the example in figure 2, the deflection angle of Angles Projections point B is ∠
DBC, this angle is negative value.
For the judgement turned round in track a little, it is that each subpoint all can go to judge whether this point turns round a little.Such as Fig. 2 institute
Show, judge B point whether for turn round a some some time, need to try to achieve the first line segment AB and the slope of the second line segment BC the most respectively, according to
Two straight slopes and the relation of angle, try to achieve deflection angle ∠ DBC.After the deflection angle obtaining subpoint, according to deflection angle whether
Meet predetermined condition and i.e. can determine that whether corresponding Current projection point is to turn round a little.A preferred embodiment at the present embodiment
In, the deflection angle of subpoint is if exceeding-5~5 degree of scopes, then it is assumed that be to turn round a little.Certainly, those skilled in the art are permissible
Understand, as required described predetermined condition can be set as other scope.Additionally, define subpoint deflection angle relatively great talent
For be turn round a little in the case of, only can need to analyze this subpoint first line segment and the second line segment slope is the most close, so that it may quickly
Whether distinguish is flex point.
The parameter a little of turning round extracted in this step can be turn round deflection angle, the displacement ratio a little that turns round a little, turn
The speed proportional of curved point and the adjacent velocity rate turned round a little.
Wherein, the deflection angle a little that turns round is the first corresponding ray deflection angle to the second ray that currently turns round.
Currently turn round a little exist temporally adjacent previous turn round some time, in projected footprint, this temporally adjacent previous turns round a little to working as
Before turn round a little between the subpoint that occurs in chronological order carry out fitting a straight line, take in the fitting a straight line of acquisition this temporally adjacent
A previous ray pointing to a direction of currently turning round that turns round is the first ray;Otherwise, projected footprint starting point in projected footprint is arrived
The subpoint occurred in chronological order between currently turning round a little carries out fitting a straight line, takes in the fitting a straight line of acquisition by projected footprint
It is the first ray that starting point points to the ray in a direction of currently turning round.
Currently turn round a little exist temporally adjacent rear one turn round some time, when pointing to this to projected footprint currently turns round
Between adjacent rear one turn round a little between the subpoint that occurs in chronological order carry out fitting a straight line, take in the fitting a straight line of acquisition when
Before turn round that to point to this rear one temporally adjacent ray turning round a direction be the second ray;Otherwise, to current in projected footprint
Turn round and a little carry out fitting a straight line to the subpoint occurred in chronological order between projected footprint terminal, take in the fitting a straight line of acquisition
By currently turning round, a ray pointing to projected footprint terminal direction is the second ray.
For example, with reference to shown in Fig. 3, needing to calculate turning round of deflection angle in projected footprint is some F, if at projection rail
In mark there is a temporally adjacent previous E that turns round in it, then to from projected footprint in chronological order from turn round an E to turn round a F it
Between the subpoint that occurs carry out fitting a straight line, it is thus achieved that fitting a straight line, then, take to be pointed to penetrating of a F direction of turning round by some E of turning round
Line is as first ray of a F that turns round.During a F is projected footprint if turned round first turn round do not exist temporally adjacent
Previous turn round a little, at this moment, its preceding key point is taken as starting point E of projected footprint ' (shown in bracket), from projection rail
To in chronological order from starting point E in mark ' to turning round, the subpoint occurred a F carries out fitting a straight line, it is thus achieved that fitting a straight line, so
After, take using by starting point E ' point to the F ray as direction the first ray as a F that turns round that turns round.
Simultaneously for a F that currently turns round, if in projected footprint, there is temporally adjacent rear one and turn round a G, then in it
To carrying out fitting a straight line from a F that turns round to all subpoints occurred a G that turn round in chronological order, it is thus achieved that fitting a straight line,
Then, take to be pointed to, by a F that turns round, the G ray as direction the second ray as a F that turns round that turns round.If at projected footprint
In, last that a F is projected footprint of turning round is turned round and a little and be there is not temporally adjacent rear one and turn round a little, at this moment, takes projection
The terminal G ' (shown in bracket) of track is key point, in chronological order from turning round a F to projected footprint terminal G '
The all subpoints occurred carry out fitting a straight line, it is thus achieved that fitting a straight line, then, take to be pointed to terminal G ' as direction by a F that turns round
Ray as second ray of a F that turns round.
After the first ray a little and the second ray are turned round in acquisition, try to achieve the slope of two rays respectively, i.e. can be according to two
Straight slope and the relation of angle, calculate the deflection angle of the first ray to the second ray as the deflection angle turned round a little.
Specifically, according to the relation of two straight slopes Yu angle, described in turn round deflection angle circular a little can
Calculate in the following way:
As shown in Figure 4, in plane right-angle coordinate xOy, straight line l1Inclination angle be α1, straight line l2Inclination angle be α2, it is assumed that
θ (θ ≠ 90 °) is straight line l1, l2Formed one jiao, according to the tangent formula of two angular differences:
Straight line l1With straight line l2Between angle α circular be:
Assume that θ (θ ≠ 90 °) is straight line l1, l2Formed one jiao, it is clear that α2=α1+ θ, then θ=α2-α1, formula obtain:
Again because two crossing and mutual off plumb included angle of straight line α scopes are (0 °, 90 °) in plane, so tan α > 0.
Thus:
That is, straight line l in plane1With
Straight line l2Angle
Then, try to achieve the supplementary angle of this angle, the deflection angle of turning round defined in the present embodiment can be tried to achieve.
Another parameter a little of turning round displacement ratio a little that turns round is the crucial line segment and second of corresponding first that currently turns round
Length higher value and the ratio of smaller value in crucial both line segments.Temporally adjacent previous turn round a little is a little there is currently turning round
Time, described first crucial line segment is described first ray previous to turn round a little to the line currently turning round a little from temporally adjacent
Section;Otherwise, described first crucial line segment is described first ray from projected footprint starting point to the line segment currently turning round a little;?
Currently turning round and a little there is temporally adjacent rear one when turning round, the described second crucial line segment is that described second ray is from currently turning round
Point to this temporally adjacent rear one turn round a little between line segment;Otherwise, the described second crucial line segment is that described second ray is from working as
Before turn round a little to the line segment between projected footprint terminal.
Still, as a example by Fig. 3, the first crucial line segment of a F that turns round is line segment EF or E ' F, the second crucial line segment be FG or
FG’。
Another parameter a little of turning round speed proportional a little of turning round is the crucial line segment and second of corresponding first that currently turns round
The speed proportional of crucial line segment.The described speed proportional turned round a little is currently turn round a first corresponding crucial line segment and second pass
The speed proportional of key line segment.
Currently turn round a little exist temporally adjacent previous turn round some time, the speed of the described first crucial line segment is according to first
The length of crucial line segment and projected footprint previous turn round a little to the Time Calculation a little experienced of currently turning round from temporally adjacent;No
Then, according to the length of the first crucial line segment and projected footprint from starting point to the Time Calculation a little experienced of currently turning round;
Currently turn round a little exist temporally adjacent rear one turn round some time, the speed of the described second crucial line segment is according to second
The length of crucial line segment and projected footprint from currently turn round a little to projected footprint temporally adjacent rear one turn round a little experienced time
Between calculate;Otherwise, length and projected footprint according to the second crucial line segment are a little experienced to projected footprint terminal from currently turning round
Time Calculation.
Still, as a example by Fig. 3, the speed of the crucial line segment EF of the first of a F that turns round can be according to line segment EF length divided by projection
From subpoint E to subpoint F, track occurs that the Time Calculation experienced obtains.The speed of the second crucial line segment FG can be according to line
From subpoint F to subpoint G, the length of section FG occurs that the Time Calculation experienced obtains divided by projected footprint.
The adjacent velocity rate turned round a little of another parameter a little of turning round is fixed for there is multiple situation about turning round a little in projection
Justice, its be defined as the temporally adjacent speed at a little the first crucial line segment that front turns round with temporally adjacent after turn round a little
The ratio of the speed of the second crucial line segment.
In a preferred implementation of the present embodiment, if needing the default gesture identified for identifying object aloft
Draw " √ ", then the required parameter of turning round extracted is the deflection angle turned round a little and the displacement ratio a little that turns round.Preferably, also
The speed proportional turned round a little can be included.
In another preferred implementation of the present embodiment, if needing the default gesture identified for identifying that object is at sky
Middle swing, then the required parameter of turning round extracted be turn round deflection angle a little, turn round displacement ratio a little.
In this another preferred implementation implemented, if needing the default gesture identified for identifying that object is drawn in the air
"×", then the required parameter of turning round extracted is the deflection angle turned round a little.Preferably, it is also possible to include adjacent turning round a little
Velocity rate.
S104, when the described parameter turned round a little meets instruction decision condition set in advance, then perform this set in advance
The instruction that instruction decision condition is corresponding.
In a preferred implementation of the present embodiment, if needing the default gesture identified for identifying that object is drawn in the air
" √ ", instruction decision condition set in advance includes: if described projected footprint a deflection angle turned round a little occurs at 30 degree
Between 170 degree, and this displacement ratio that turns round is between 1.5 to 2.5, then assert that this gesture draws " √ " for aerial, performs the
One instruction.
In the present embodiment, it is also possible to preferably extract the speed proportional turned round a little;At this moment, in addition it is also necessary to turn described in judgement
Whether the speed proportional of curved point is between 0.7 to 1.5, if meet above-mentioned condition simultaneously, then assert that the gesture identifying object is
Aerial picture " √ ", performs corresponding first instruction.Preferably, described first instruction can determine that instruction or select "Yes"
Instruction.
It is highly preferred that turn round, the decision condition of speed proportional a little can be set as 1.3.
As it is shown in figure 5, extract the deflection angle C of an A2 that turns round between 30 degree to 170 degree, at the first of the C that turns round
Crucial line segment A1A2 is with the second key line segment A2A3, and A2A3 is longer than A1A2, it is judged that whether the ratio of A2A3/A1A2 exists
Within the scope of 1.5~2.5.The most then can determine that the gesture identifying object is aloft to draw " √ ".
For eliminating maloperation, decision condition can be added further:
Require to judge the speed of the first crucial line segment A1A2, be one with the ratio of the speed of the second crucial line segment A2A3 and compare
Close value.If the ratio of this speed is between 0.7 to 1.5, preferably 1.3, can determine whether the first crucial line segment and the second key lines
The speed of section is close, thus judges that the gesture identifying object is aloft to draw " √ ".
In another preferred implementation of the present embodiment, if needing the default gesture identified aerial for identifying object
Swing, then the required parameter of turning round extracted be turn round deflection angle a little, turn round displacement ratio a little.
At this moment, described in step S104, instruction decision condition set in advance includes: if described projected footprint occurs one
The deflection angle turned round a little is between-180 degree to-170 degree or between 170 degree to 180 degree, and described in turn round displacement ratio a little
Between 1.5 to 2, then assert that gesture, for wave in the air, performs the second instruction.Instruction is preferably cancelled in described second instruction.
Specifically, as a example by Fig. 6, projected footprint turns round and is a little arranged as P, Q, R in order, wherein, the deflection of a Q that turns round
Angle is less than 180 degree more than 170 degree.
If turning round, length PQ of the first of a Q the crucial line segment is L;Length QR of the second crucial line segment of a Q of turning round is U.
Assuming that L-value is more than U value, if the ratio between L and U is in the range of 1.5~2.0.Thus can determine that track is to identify that object is at sky
Middle swing is once, naturally it is also possible to regulation has n to meet a part that turns round above when occurring, such as can rock 2 times, 3 times or
Person 4 times, it is judged that identify that object implements prearranged gesture.
In this another preferred implementation implemented, if needing the default gesture identified for identifying object aloft
Draw "×", then the required parameter of turning round extracted is the deflection angle turned round a little.Preferably, it is also possible to include adjacent turning round a little
Velocity rate.
Described in described step S104, instruction decision condition set in advance includes: if described projected footprint includes two partially
Gyration turning round a little between 100 degree to 174 degree, and temporally adjacent in the first crucial line segment and the time front turned round a little
Adjacent after the crucial line segment of second a little that turns round have an intersection point, then assert that this gesture for drawing "×" in the air, then performs the 3rd
Instruction.Described 3rd instruction is preferably ignored instruction or selects "No" to instruct.
In the present embodiment, it is also possible to preferably extract the adjacent velocity rate turned round a little;At this moment, in addition it is also necessary to judge institute
State the adjacent velocity rate turned round a little whether between 0.7 to 1.5, if meet above-mentioned condition simultaneously, then assert and identify object
Gesture for draw "×" in the air, perform corresponding 3rd instruction.
It is highly preferred that turn round, the decision condition of speed proportional a little can be set as 1.3.
As a example by Fig. 7, it is assumed that A1 point is that the previous of A2 point turns round a little, A4 point is that the later of A3 point is turned round a little.At this
In section track, in the range of 100~174 degree of angle A, angle B is in the range of 100~174 degree.The friendship of we cut-off line K Yu L
That two lines section of point compares.
Straight line K(A1A2) there is intersection point with L (A3A4).Thus can determine that the gesture identifying object is aloft to draw "×".Enter
One step ground, it may include following auxiliary judgement condition:
Require straight line K(A1A2) and the similar rate of L (A3A4), measure with the adjacent velocity rate turned round a little,
The most adjacent velocity rate A1A2/A3A4 turned round a little between 0.7 to 1.5, preferably 1.3, then regard as similar rate, it is determined that
Identify that the gesture of object is for drawing "×" in the air.
The present embodiment by by identify object three-dimensional data in scheduled duration be mapped in a fit operation plane,
Obtain its plane projection track identifying object motion, by utilizing a parameter of turning round a little in plane projection track and turn round to obtain
Take identification, owing to the data processed are changed into 2-D data by three-dimensional data, and track place space plane need not be adapted to
Direction multiple characteristic matching storehouse be set mate, the present invention greatly reduces the operand of action recognition, meanwhile, the present invention
In conjunction with the feature of gesture somatosensory operation, utilize and turn round a little and relevant parameter is used as the characteristic parameter of gesture identification, it is possible to be more preferable
Ground embodies gesture feature, improves the accuracy of gesture identification.
Embodiment two
According to the same design of the present invention, present invention also offers a kind of gesture identifying device, Fig. 8 is described in the present embodiment
The structural representation of gesture identifying device, as shown in Figure 8, the gesture identifying device described in the present embodiment includes:
Three-dimensional data acquisition module 801, for obtaining the three-dimensional data of the preset duration identifying object.
In a preferred implementation of the present embodiment, described identification object can be a single point, such as finger tip or
Person is the central point representing whole hand, and this central point refers to according to point coordinates all of in hand three-dimensional data calculated
Representing the some cloud centre of form or the point of barycenter of hand three-dimensional data, it can be by adding point coordinates all of in hand three-dimensional data
Weight average or arithmetic average are calculated.
In a preferred implementation of the present embodiment, the three-dimensional data acquisition methods of described preset duration can be: adopts
With existing three-dimensional space data acquisition methods, obtained by evaluator.It is for instance possible to use binocular calculates parallax, thus count
Calculate three-dimensional information.Again it is for instance possible to use TOF method, calculate depth map by calculating the reflex time of light, it is thus achieved that identify object
Three-dimensional data.Again it is for instance possible to use the method for structured light of monocular, calculate depth value by calculating coupling degree of depth pattern,
Thus obtain the three-dimensional data identifying object.
Herein, evaluator can be any instrument that can identify three-dimensional data at three dimensions in prior art, it is possible to
To be 3D sensor or stereo camera etc..
Operation planar acquisition module 802, for being fitted the three-dimensional data of described preset duration, obtains fit operation
Plane, described fit operation plane is to identify the almost plane of object movement locus place plane in preset duration.
In a detailed description of the invention of the present embodiment, described fit operation plane is that a single point is in preset duration
The almost plane of movement locus place plane.
The general expression of plane equation is:
P(x,y,z)Ax+By+Cz+D=0
Both sides can obtain with divided by D:
P(x,y,z)=ax+by+cz+1=0
If in preset duration, such as 3 seconds, the three-dimensional data of a single point recorded is:
(xi,yi,zi)(i=0,1,2,......,n)
In the present embodiment, according to this three-dimensional data, it is possible to use method of least square formula is fitted:
If:
Q [a b c] can be obtainedT=K
Solve floor coefficient for [a b c]T=Q-1K。
According to the knowledge of space geometry, the rotation relationship of the most former coordinate system of plane normal can be obtained from plane equation
R。
It should be noted that those skilled in the art can also use other existing planar fit method to come to identification
Object three-dimensional data of each sampling instant in preset duration is fitted, as long as being obtained in that fit operation plane.
Characteristic extracting module 803, for extracting the three-dimensional data identifying object including each sampling instant in described plan
The projected footprint of the subpoint in closing operation plane, obtains according to described projected footprint and turns round a little and the described parameter turned round a little.
In projected footprint, when the extended line of the first line segment corresponding to certain subpoint is to the second line segment corresponding to this subpoint
Deflection angle meet predetermined condition, define this subpoint for turning round a little, wherein, the first line segment corresponding to described subpoint is for throwing
The line segment that shadow point is even formed with the former point of adjacent time in projected footprint, the second line segment that described subpoint is corresponding is projection
The line segment that point is even formed with the latter point of adjacent time in projected footprint.
Specifically, as in figure 2 it is shown, some A, B, C are three subpoints temporally adjacent in projected footprint, three subpoints exist
Order in track is that A to C occurs in succession.If the subpoint analyzed is some B, then some A is adjacent time in its projected footprint
Former point, and putting C is the latter point of adjacent time in its projected footprint.Line segment AB is first line segment of subpoint B, and line segment BC is
Second line segment of subpoint B, the extended line that extended line BD is the first line segment of line segment AB.
The deflection angle of subpoint is then the deflection angle from the extended line of the first line segment to the second line segment, in the present invention, institute
Have deflection angle with rotate to be counterclockwise on the occasion of.Otherwise it is then negative value.In the example in figure 2, the deflection angle of Angles Projections point B is ∠
DBC, this angle is negative value.
For the judgement turned round in track a little, it is that each subpoint all can go to judge whether this point turns round a little.Such as Fig. 2 institute
Show, judge B point whether for turn round a some some time, need to try to achieve the first line segment AB and the slope of the second line segment BC the most respectively, according to
Two straight slopes and the relation of angle, try to achieve deflection angle ∠ DBC.After the deflection angle obtaining subpoint, according to deflection angle whether
Meet predetermined condition and i.e. can determine that whether corresponding Current projection point is to turn round a little.A preferred embodiment at the present embodiment
In, the deflection angle of subpoint is if exceeding-5~5 degree of scopes, then it is assumed that be to turn round a little.Certainly, those skilled in the art are permissible
Understand, as required described predetermined condition can be set as other scope.Additionally, define subpoint deflection angle relatively great talent
For be turn round a little in the case of, only can need to analyze this subpoint first line segment and the second line segment slope is the most close, so that it may quickly
Whether distinguish is flex point.
The parameter a little of turning round extracted in this step can be turn round deflection angle, the displacement ratio a little that turns round a little, turn
The speed proportional of curved point and the adjacent velocity rate turned round a little.
Wherein, the deflection angle a little that turns round is the first corresponding ray deflection angle to the second ray that currently turns round.
Currently turn round a little exist temporally adjacent previous turn round some time, in projected footprint, this temporally adjacent previous turns round a little to working as
Before turn round a little between the subpoint that occurs in chronological order carry out fitting a straight line, take in the fitting a straight line of acquisition this temporally adjacent
A previous ray pointing to a direction of currently turning round that turns round is the first ray;Otherwise, projected footprint starting point in projected footprint is arrived
The subpoint occurred in chronological order between currently turning round a little carries out fitting a straight line, takes in the fitting a straight line of acquisition by projected footprint
It is the first ray that starting point points to the ray in a direction of currently turning round.
Currently turn round a little exist temporally adjacent rear one turn round some time, when pointing to this to projected footprint currently turns round
Between adjacent rear one turn round a little between the subpoint that occurs in chronological order carry out fitting a straight line, take in the fitting a straight line of acquisition when
Before turn round that to point to this rear one temporally adjacent ray turning round a direction be the second ray;Otherwise, to current in projected footprint
Turn round and a little carry out fitting a straight line to the subpoint occurred in chronological order between projected footprint terminal, take in the fitting a straight line of acquisition
By currently turning round, a ray pointing to projected footprint terminal direction is the second ray.
For example, with reference to shown in Fig. 3, needing to calculate turning round of deflection angle in projected footprint is some F, if at projection rail
In mark there is a temporally adjacent previous E that turns round in it, then to from projected footprint in chronological order from turn round an E to turn round a F it
Between the subpoint that occurs carry out fitting a straight line, it is thus achieved that fitting a straight line, then, take to be pointed to penetrating of a F direction of turning round by some E of turning round
Line is as first ray of a F that turns round.During a F is projected footprint if turned round first turn round do not exist temporally adjacent
Previous turn round a little, at this moment, its preceding key point is taken as starting point E of projected footprint ' (shown in bracket), from projection rail
To in chronological order from starting point E in mark ' to turning round, the subpoint occurred a F carries out fitting a straight line, it is thus achieved that fitting a straight line, so
After, take using by starting point E ' point to the F ray as direction the first ray as a F that turns round that turns round.
Simultaneously for a F that currently turns round, if in projected footprint, there is temporally adjacent rear one and turn round a G, then in it
To carrying out fitting a straight line from a F that turns round to all subpoints occurred a G that turn round in chronological order, it is thus achieved that fitting a straight line,
Then, take to be pointed to, by a F that turns round, the G ray as direction the second ray as a F that turns round that turns round.If at projected footprint
In, last that a F is projected footprint of turning round is turned round and a little and be there is not temporally adjacent rear one and turn round a little, at this moment, takes projection
The terminal G ' (shown in bracket) of track is key point, in chronological order from turning round a F to projected footprint terminal G '
The all subpoints occurred carry out fitting a straight line, it is thus achieved that fitting a straight line, then, take to be pointed to terminal G ' as direction by a F that turns round
Ray as second ray of a F that turns round.
After the first ray a little and the second ray are turned round in acquisition, try to achieve the slope of two rays respectively, i.e. can be according to two
Straight slope and the relation of angle, calculate the deflection angle of the first ray to the second ray as the deflection angle turned round a little.
Specifically, according to the relation of two straight slopes Yu angle, described in turn round deflection angle circular a little can
Calculate in the following way:
As shown in Figure 4, in plane right-angle coordinate xOy, straight line l1Inclination angle be α1, straight line l2Inclination angle be α2,
Assume that θ (θ ≠ 90 °) is straight line l1, l2Formed one jiao, according to the tangent formula of two angular differences
Straight line l2With straight line l2Between angle α circular be:
Assume that θ (θ ≠ 90 °) is straight line l1,l2Formed one jiao, it is clear that α2=α1+ θ, then θ=α2-α1, formula obtain:
Again because two crossing and mutual off plumb straight angle α scopes are (0 °, 90 °) in plane, so
Tan α > 0. thus:
That is, straight line l in plane1With
Straight line l2Angle
Then, try to achieve the supplementary angle of this angle, the deflection angle of turning round defined in the present embodiment can be tried to achieve.
Another parameter a little of turning round displacement ratio a little that turns round is the crucial line segment and second of corresponding first that currently turns round
Higher value and the ratio of smaller value in crucial both line segments.Currently turn round a little exist temporally adjacent previous turn round some time, institute
Stating the first crucial line segment, to be described first ray previous turn round a little to the line segment currently turning round a little from temporally adjacent;No
Then, described first crucial line segment is described first ray from projected footprint starting point to the line segment currently turning round a little;Currently
Turn round and a little there is temporally adjacent rear one when turning round, the described second crucial line segment be described second ray from currently turn round a little to
This temporally adjacent rear one turn round a little between line segment;Otherwise, the described second crucial line segment is that described second ray is from currently turning
Curved point is to the line segment between projected footprint terminal.
Still, as a example by Fig. 3, the first crucial line segment of a F that turns round is line segment EF or E ' F, the second crucial line segment be FG or
FG’。
The described speed proportional turned round a little is currently turn round the first corresponding crucial line segment and the speed of the second crucial line segment
Degree ratio.
Currently turn round a little exist temporally adjacent previous turn round some time, the speed of the described first crucial line segment is according to first
The length of crucial line segment and projected footprint previous turn round a little to the Time Calculation a little experienced of currently turning round from temporally adjacent;No
Then, according to the length of the first crucial line segment and projected footprint from starting point to the Time Calculation a little experienced of currently turning round;
Currently turn round a little exist temporally adjacent rear one turn round some time, the speed of the described second crucial line segment is according to second
The length of crucial line segment and projected footprint from currently turn round a little to projected footprint temporally adjacent rear one turn round a little experienced time
Between calculate;Otherwise, length and projected footprint according to the second crucial line segment are a little experienced to projected footprint terminal from currently turning round
Time Calculation.
Still, as a example by Fig. 3, the speed of the crucial line segment EF of the first of a F that turns round can be according to line segment EF length divided by projection
From subpoint E to subpoint F, track occurs that the Time Calculation experienced obtains.The speed of the second crucial line segment FG can be according to line
From subpoint F to subpoint G, the length of section FG occurs that the Time Calculation experienced obtains divided by projected footprint.
The adjacent velocity rate turned round a little of another parameter a little of turning round is fixed for there is multiple situation about turning round a little in projection
Justice, its be defined as the temporally adjacent speed at a little the first crucial line segment that front turns round with temporally adjacent after turn round a little
The ratio of the speed of the second crucial line segment.
In a preferred implementation of the present embodiment, if needing the default gesture identified for identifying object aloft
Draw " √ ", then the required parameter of turning round extracted is the deflection angle turned round a little and the displacement ratio a little that turns round.Preferably, also
The speed proportional turned round a little can be included.
In another preferred implementation of the present embodiment, if needing the default gesture identified aerial for identifying object
Swing, then the required parameter of turning round extracted be turn round deflection angle a little, turn round displacement ratio a little.
In this another preferred implementation implemented, if needing the default gesture identified for identifying that object is drawn in the air
"×", then the required parameter of turning round extracted is the deflection angle turned round a little.Preferably, it is also possible to include adjacent turning round a little
Velocity rate.
Characteristic matching with perform module 804, for when described in turn round parameter a little meet set in advance instruction judgement bar
During part, perform the instruction that this instruction decision condition set in advance is corresponding.
In a preferred implementation of the present embodiment, characteristic matching is used for identifying aerial picture with performing module 804
The gesture of " √ ", it includes that the first instruction assert that unit 8041, described first instruction assert that unit 8041 is in described projection
Track occur a deflection angle turned round a little between 30 degree to 170 degree, and this turn round a displacement ratio 1.5 to 2.5 it
Between time, assert identify object draw in the air " √ ", perform first instruction.Preferably, parameter a little of turning round described in also includes turning round a little
Speed proportional;The condition that described first instruction identification unit identification identification object draws " √ " in the air is turned round a little described in also including
Speed proportional is between 0.7 to 1.5.Speed proportional a little of turning round described in it is highly preferred that is 1.3.Described first instruction is preferably
Determine instruction or select "Yes" instruction.
In a preferred implementation of the present embodiment, characteristic matching is used for identifying oscillating air with performing module 804
Gesture, it includes that the second instruction assert that unit 8042, described second instruction assert that unit 8042 is at described projected footprint
Occur a deflection angle turned round a little-180 degree to-170 degree between or 170 degree to 180 degree between, and described in turn round a little
When displacement ratio is between 1.5 to 2, assert that gesture, for wave in the air, performs the second instruction.Described second instruction is preferably to be cancelled
Instruction.
In another preferred implementation of the present embodiment, characteristic matching is used for identifying aerial picture with performing module 804
"×" gesture, it includes that the 3rd instruction assert that unit 8043, described 3rd instruction assert that unit 8043 is at described projection rail
Mark includes two deflection angles turning round a little between 100 degree to 174 degree, and temporally adjacent turning round a little in front appearance
First crucial line segment has an intersection point with the temporally adjacent crucial line segment of second a little of turning round in rear appearance, assert that this gesture is
Draw "×" in the air, perform the 3rd instruction.Described 3rd instruction is preferably ignored instruction or selects "No" to instruct.Preferably, described
Parameter a little of turning round also includes that the adjacent velocity rate turned round a little, described first instruction assert that unit identification identification object is drawn in the air
The condition of "×" also includes that the described adjacent velocity rate turned round a little is between 0.7 to 1.5.Adjacent turn round it is highly preferred that described
The velocity rate of point is 1.3.
The present embodiment is by, in trajectory map to the plane of the three-dimensional motion by identifying object, extracting projected footprint
A parameter of turning round a little and turn round captures the gesture of manipulator, and further, the present invention can be based on turning round a little and turn round a parameter
Assert rapidly and accurately and aerial draw " √ ", draw "×" and/or the gesture such as wave, and perform the instruction that its gesture is corresponding.
All or part of content in the technical scheme that above example provides can be realized by software programming, its software
Program is stored in the storage medium that can read, storage medium such as: hard disk, CD or the floppy disk in computer.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all spirit in the present invention and
Within principle, any modification, equivalent substitution and improvement etc. made, should be included within the scope of the present invention.