Robot control method, device and robot based on gesture identification
Technical field
The present invention relates to intelligent appliance technology technical field more particularly to a kind of robot controlling parties based on gesture identification
Method, control device and robot.
Background technique
Domestic robot used at present manipulation when usually require user bend over key either use mobile phone,
Remote controler controls, and the not very convenient user of these modes of operation uses, and can not improve user to the usage experience of product.
Summary of the invention
The purpose of the embodiment of the present invention is that provide a kind of robot control method based on gesture identification, control device and
Robot, can the gesture identification based on user corresponding operation is executed to robot, it is user-friendly, improve user to production
The experience of product, and it is at low cost.
To achieve the above object, the embodiment of the invention provides a kind of robot control method based on gesture identification, packets
Include step:
When being detected in the preset range of robot by distance measuring sensor there are when object, then start gesture knowledge of waving
It does not operate;
After gesture identification operation is waved in starting, if the currently detected preset range in robot of the distance measuring sensor
Inside there is the duration of object in values, is then recorded as once waving to operate;If the distance measuring sensor is current
Detect that there are the duration of object not in values in the preset range of robot or the ranging senses
Device is currently detected, and there are objects in the preset range of robot is detected next time to the distance measuring sensor in robot
Preset range in when being greater than threshold value there are the time interval of object, gesture identification of waving described in stopping operation;
When gesture identification of waving described in stopping operation, wave according to record number of operations and preset mapping table
Corresponding operation is executed to robot;Wherein, the mapping table, which records, waves number of operations and executes the corresponding relationship operated.
As an improvement of the above scheme, when detecting that there are objects in the preset range of robot by distance measuring sensor
And start wave gesture identification operation when, further comprise the steps of:
It is shone by control robot and/or sounding prompts the user to carry out waving to operate.
As an improvement of the above scheme, the preset range is 50cm~120cm.
As an improvement of the above scheme, the distance measuring sensor be laser range sensor, ultrasonic distance-measuring sensor or
Infrared distance sensor.
As an improvement of the above scheme, after gesture identification operation is waved in starting, the ranging is judged by the following method
Sensor is currently detected, and there are objects in the preset range of robot is detected next time to the distance measuring sensor in machine
There are the time intervals of object to be greater than threshold value in the preset range of device people:
After gesture identification operation is waved in starting, when the distance measuring sensor detects the preset range in robot for the first time
When inside there is object, first control signal is issued to start the first timer and starts timing;
After gesture identification operation is waved in starting, when the distance measuring sensor detected each time in machine in addition to for the first time
There are when object in the preset range of people, sending second control signal is to control the first timer reclocking;
When timing time when first timer receives the second control signal is greater than threshold value, then institute is judged
Stating distance measuring sensor, currently detected there are objects in the preset range of robot detects next time to the distance measuring sensor
To there are the time intervals of object to be greater than threshold value in the preset range of robot.
As an improvement of the above scheme, after gesture identification operation is waved in starting, the ranging is judged by the following method
Sensor is currently detected, and whether there are the duration of object in values in the preset range of robot:
After gesture identification operation is waved in starting, the preset range in robot is detected when the distance measuring sensor moment
When inside there is object, third control signal is issued to start the second timer and starts timing;
After starting the second timer and starting timing, do not detect when the distance measuring sensor moment in the pre- of robot
If when in range there are the 4th control signal when object, is issued to stop second timer;
Timing time when second timer receives the 4th control signal falls into the values
Interior, then judging the distance measuring sensor, currently detected there are the duration of object default in the preset range of robot
It is worth in range;Otherwise judge the distance measuring sensor it is currently detected in the preset range of robot there are object it is lasting when
Between not in values.
As an improvement of the above scheme, the values are greater than the threshold value.
As an improvement of the above scheme, the distance measuring sensor is located at the top of the robot.
As an improvement of the above scheme, executing the corresponding operation to robot includes starting to work or stopping working.
As an improvement of the above scheme, start/stop described waving by a riming instructions, control instruction or switch order
The operation of hand gesture identification.
Correspondence of the embodiment of the present invention provides a kind of robot controller based on gesture identification, comprising:
Gesture identification of waving operates starting module, for working as the preset range detected by distance measuring sensor in robot
When inside there is object, then start gesture identification operation of waving;
Operation judges of waving module, for starting wave gesture identification operation after, if the distance measuring sensor is currently examined
The duration in the preset range of robot there are object is measured in values, then is recorded as once waving to grasp
Make;If the distance measuring sensor is currently detected, there are the duration of object not in preset value in the preset range of robot
In range or the distance measuring sensor currently detected there are objects in the preset range of robot senses to the ranging
Device detects that there are the time intervals of object greater than threshold value in the preset range of robot next time when, hand of waving described in stopping
Gesture identification operation;
Execution module, for wave described in the stopping gesture identification operation when, number of operations of waving according to record
Corresponding operation is executed to robot with preset mapping table;Wherein, the mapping table, which records, waves number of operations and executes behaviour
The corresponding relationship of work.
As an improvement of the above scheme, the gesture identification operation starting module of waving is also used to: being sensed when by ranging
When device detects that starting gesture identification of waving there are object in the preset range of robot operates, passes through and control machine human hair
Light and/or sounding prompt user to carry out waving to operate.
As an improvement of the above scheme, the preset range is 50cm~120cm.
As an improvement of the above scheme, the distance measuring sensor be laser range sensor, ultrasonic distance-measuring sensor or
Infrared distance sensor.
As an improvement of the above scheme, the operation judges module of waving includes:
First control signal generation unit, for after gesture identification operation is waved in starting, when the distance measuring sensor is first
It is secondary to detect in the preset range of robot there are when object, first control signal is issued to start in terms of the first timer starts
When;
Second control signal generation unit, for starting wave gesture identification operation after, when the distance measuring sensor removes
Outer for the first time detects that sending second control signal is there are when object in the preset range of robot to control each time
State the first timer reclocking;
First judging unit, the timing time when first timer receives the second control signal are greater than threshold
When value, then judging the distance measuring sensor, currently detected there are objects in the preset range of robot senses to the ranging
Device detects that there are the time intervals of object to be greater than threshold value in the preset range of robot next time.
As an improvement of the above scheme, the operation judges module of waving further comprises:
Third control signal generation unit, for starting wave gesture identification operation after, when the distance measuring sensor wink
Between detect in the preset range of robot there are when object, issue third control signal to start in terms of the second timer starts
When;
4th control signal generation unit, for starting after the second timer starts timing, when the distance measuring sensor
Moment does not detect that there are when object, issue the 4th control signal to stop in terms of described second in the preset range of robot
When device timing;
Second judgment unit is fallen for the timing time when second timer receives the 4th control signal
Enter in the values, then judging the distance measuring sensor, currently detected there are objects in the preset range of robot
Duration in values;Otherwise judge that the distance measuring sensor is currently detected in the preset range of robot
There are the duration of object not in values.
As an improvement of the above scheme, the values are greater than the threshold value.
As an improvement of the above scheme, the distance measuring sensor is located at the top of the robot.
As an improvement of the above scheme, executing the corresponding operation to robot includes starting to work or stopping working.
As an improvement of the above scheme, it is described wave operation judges module by issue a riming instructions, control instruction or
Switch order operates to start/stop the gesture identification of waving.
Compared with prior art, a kind of robot control method and control device based on gesture identification disclosed by the invention
It is detected in the preset range of robot by distance measuring sensor there are when object, then starts gesture identification operation of waving,
Starting is waved after gesture identification operation, if the distance measuring sensor is currently detected, there are objects in the preset range of robot
Duration in values, then be recorded as once waving to operate;If the distance measuring sensor is currently detected in machine
There are the duration of object in the preset range of device people not in values or the distance measuring sensor current detection
To the preset range detected there are object to the distance measuring sensor in the preset range of robot in robot next time
When the time interval that inside there is object is greater than threshold value, gesture identification of waving described in stopping operation;And gesture of waving described in the stopping
When identification operation, wave according to record number of operations and preset mapping table execute corresponding operation to robot;Its
In, the mapping table, which records, waves number of operations and executes the corresponding relationship operated.It can be based on the hand of user to realize
Gesture identification executes corresponding operation (such as operation of starting to work or stop working) to robot, bends over key without user
Either controlled using mobile phone, remote controler, it is user-friendly, improve experience of the user to product.
The embodiment of the invention also provides a kind of robot control methods based on gesture identification, comprising steps of
When being recognized in the coverage of robot by camera there are when object, then start the gesture identification behaviour that waves
Make;
After gesture identification operation is waved in starting, if the camera currently recognizes the coverage memory in robot
Object duration in values, then be recorded as once waving to operate;If the camera currently recognizes
There are the duration of object in the coverage of robot not in values or the camera currently recognizes
It recognizes there are object to the camera in the coverage of robot and exists in the coverage of robot next time
When the time interval of object is greater than threshold value, gesture identification of waving described in stopping operation;
When gesture identification of waving described in stopping operation, wave according to record number of operations and preset mapping table
Corresponding operation is executed to robot;Wherein, the mapping table, which records, waves number of operations and executes the corresponding relationship operated.
As an improvement of the above scheme, when being recognized in the coverage of robot by camera, there are objects to open
When dynamic gesture identification of waving operates, further comprise the steps of:
It is shone by control robot and/or sounding prompts the user to carry out waving to operate.
As an improvement of the above scheme, after gesture identification operation is waved in starting, the camera shooting is judged by the following method
Head currently recognizes in the coverage of robot the bat recognized next time there are object and the camera in robot
Take the photograph in range there are the time interval of object be greater than threshold value:
Based on the filming frequency of the camera, by judging that the camera recognizes in the coverage of robot
From having to without there are object moment, is recognized to the camera and there is object wink from scratch in the coverage of robot
Between the frame number that is passed through time interval is calculated;
When the time interval is greater than threshold value, then judge that the camera currently recognizes the coverage in robot
Inside there is object to be greater than to the time interval that the camera recognizes in the coverage of robot there are object next time
Threshold value.
As an improvement of the above scheme, after gesture identification operation is waved in starting, the camera shooting is judged by the following method
Head currently recognizes in the coverage of robot that there are the duration of object whether in values:
Based on the filming frequency of the camera, by judging that the camera recognizes in the preset range of robot
There is object moment from scratch, recognizes in the preset range of robot to the camera from having to without there are object winks
Between the frame number that is passed through the duration is calculated;
It is fallen into the values when the duration, then judges that the distance measuring sensor is currently detected in machine
Duration in the preset range of device people there are object is in values;Otherwise judge that the distance measuring sensor is currently examined
Measure in the preset range of robot that there are the duration of object not in values.
As an improvement of the above scheme, it can identify in the following manner in the coverage of camera with the presence or absence of object:
When robot is in halted state, camera is taken pictures according to predeterminated frequency, the front and back two that camera is continuously shot
It opens photo to compare, if the matching degree that photo is opened in front and back two is greater than the set value, be identified as in the coverage of robot
There is no objects;If the matching degree that photo is opened in front and back two is less than setting value, it is identified as existing in the coverage of robot
Object;
When robot is kept in motion, camera is taken pictures according to predeterminated frequency, the front and back two that camera is continuously shot
It opens photo to compare, if front and back shoots two photos and there was only small translation difference, is identified as the shooting in robot
Object is not present in range;If front and back two, which is opened, not only translational difference, and there are also whether there is or not the momentary differences of object, then identifies
For there are objects in the coverage of robot.
As an improvement of the above scheme, the filming frequency of the camera is 10~50 frames/second.
As an improvement of the above scheme, the filming frequency of the camera is 20~30 frames/second.
As an improvement of the above scheme, the values are greater than the threshold value.
As an improvement of the above scheme, the camera is located at the top of the robot.
As an improvement of the above scheme, executing the corresponding operation to robot includes starting to work or stopping working.
As an improvement of the above scheme, start/stop described waving by a riming instructions, control instruction or switch order
The operation of hand gesture identification.
Correspondence of the embodiment of the present invention provides a kind of robot controller based on gesture identification, comprising:
Gesture identification of waving operates starting module, for working as the coverage memory recognized by camera in robot
In object, then start gesture identification operation of waving;
Operation judges of waving module, for starting wave gesture identification operation after, if the camera currently recognizes
Duration in the coverage of robot there are object in values, then is recorded as once waving to operate;If
The camera currently recognizes in the coverage of robot that there are the duration of object not in values, or
Camera described in person currently recognizes in the coverage of robot that there are objects to recognize next time to the camera
When being greater than threshold value there are the time interval of object in the coverage of robot, gesture identification of waving described in stopping operation;
Execution module, for wave described in the stopping gesture identification operation when, number of operations of waving according to record
Corresponding operation is executed to robot with preset mapping table;Wherein, the mapping table, which records, waves number of operations and executes behaviour
The corresponding relationship of work.
As an improvement of the above scheme, the gesture identification operation starting module of waving is also used to: being known when by camera
Be clipped in the coverage of robot start there are object wave gesture identification operation when, by control robot shine
And/or sounding prompts the user to carry out waving to operate.
As an improvement of the above scheme, the operation judges module of waving includes:
First frame counting number unit, based on the filming frequency of the camera, by judging that the camera recognizes
From having to without there are objects in the coverage of robot, recognize in the coverage of robot to the camera from nothing
Time interval is calculated to there is the frame number passed through there are object;
First judging unit, for when the time interval is greater than threshold value, then judging that the camera currently recognizes
It recognizes there are object to the camera in the coverage of robot and exists in the coverage of robot next time
The time interval of object is greater than threshold value.
As an improvement of the above scheme, the operation judges module of waving further comprises:
Second frame number counting unit, based on the filming frequency of the camera, by judging that the camera recognizes
There is object from scratch in the coverage of robot, recognizes in the coverage of robot to the camera from having
To the duration is calculated without the frame number passed through there are object;
Second judgment unit, falls into the values when the duration, then judges the distance measuring sensor
The currently detected duration in the coverage of robot there are object is in values;Otherwise judge the survey
Away from sensor, currently detected there are the duration of object not in values in the coverage of robot.
As an improvement of the above scheme, the gesture identification operation starting module of waving identifies camera in the following manner
Coverage in whether there is object:
When robot is in halted state, camera is taken pictures according to predeterminated frequency, the front and back two that camera is continuously shot
It opens photo to compare, if the matching degree that photo is opened in front and back two is greater than the set value, be identified as in the coverage of robot
There is no objects;If the matching degree that photo is opened in front and back two is less than setting value, it is identified as existing in the coverage of robot
Object;
When robot is kept in motion, camera is taken pictures according to predeterminated frequency, the front and back two that camera is continuously shot
It opens photo to compare, if front and back shoots two photos and there was only small translation difference, is identified as the shooting in robot
Object is not present in range;If front and back two, which is opened, not only translational difference, and there are also whether there is or not the momentary differences of object, then identifies
For there are objects in the coverage of robot.
As an improvement of the above scheme, the filming frequency of the camera is 10~50 frames/second.
As an improvement of the above scheme, the filming frequency of the camera is 20~30 frames/second.
As an improvement of the above scheme, the values are greater than the threshold value.
As an improvement of the above scheme, the camera is located at the top of the robot.
As an improvement of the above scheme, executing the corresponding operation to robot includes starting to work or stopping working.
As an improvement of the above scheme, it is described wave operation judges module by issue a riming instructions, control instruction or
Switch order operates to start/stop the gesture identification of waving.
Compared with prior art, a kind of robot control method and control device based on gesture identification disclosed by the invention
It is recognized in the coverage of robot by camera there are when object, then starts gesture identification operation of waving, starting
Gesture identification of waving operation after, if the camera currently recognize in the coverage of robot there are object it is lasting when
Between in values, then be recorded as once waving to operate;If the camera currently recognizes the shooting model in robot
Enclose that interior there are the duration of object not in values or the camera currently recognizes the shooting in robot
The time interval in the coverage of robot there are object is recognized there are object to the camera in range next time
When greater than threshold value, gesture identification of waving described in stopping operation;And wave described in the stopping gesture identification operation when, according to record
Wave number of operations and the preset mapping table execute corresponding operation to robot;Wherein, the mapping table record is waved
Number of operations and the corresponding relationship for executing operation.It is thereby achieved that can the gesture identification based on user to robot execute pair
The operation (such as operation of starting to work or stop working) answered, without user bend over key either use mobile phone, remote control
Device controls, user-friendly, improves experience of the user to product.
The embodiment of the invention also provides a kind of robots, including the robot control as described above based on gesture identification
Device.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of the robot control method based on gesture identification in the embodiment of the present invention 1.
Fig. 2 is a kind of specific implementation flow chart of the robot control method based on gesture identification in the embodiment of the present invention 1.
Fig. 3 is a kind of specific implementation flow chart of the robot control method based on gesture identification in the embodiment of the present invention 1.
Fig. 4 is a kind of flow diagram of the robot control method based on gesture identification in the embodiment of the present invention 2.
Fig. 5 is a kind of specific implementation flow chart of the robot control method based on gesture identification in the embodiment of the present invention 2.
Fig. 6 is a kind of specific implementation flow chart of the robot control method based on gesture identification in the embodiment of the present invention 2.
Fig. 7 a~Fig. 7 b is that a kind of gesture of the robot control method based on gesture identification is waved in the embodiment of the present invention 2
Dynamic schematic diagram.
Fig. 8 is a kind of structural block diagram of the robot controller based on gesture identification in the embodiment of the present invention 3.
Fig. 9 is a kind of operation judges mould of waving of the robot controller based on gesture identification in the embodiment of the present invention 3
The structural block diagram of block.
Figure 10 is a kind of structural block diagram of the robot controller based on gesture identification in the embodiment of the present invention 4.
Figure 11 is a kind of operation judges mould of waving of the robot controller based on gesture identification in the embodiment of the present invention 4
The structural block diagram of block.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
It is a kind of process for robot control method based on gesture identification that the embodiment of the present invention 1 provides referring to Fig. 1
Figure, which includes step S11~S13:
S11, when being detected by distance measuring sensor in the preset range of robot there are when object, then starting is waved hand
Gesture identification operation;
S12, after gesture identification operation is waved in starting, if the distance measuring sensor is currently detected in the default of robot
Duration in range there are object in values, then is recorded as once waving to operate;If the distance measuring sensor
It is currently detected that there are the duration of object in the preset range of robot not in values or the ranging
Sensor is currently detected, and there are objects in the preset range of robot is detected next time to the distance measuring sensor in machine
When being greater than threshold value there are the time interval of object in the preset range of device people, gesture identification of waving described in stopping operation;
When S13, gesture identification of waving described in stopping operation, wave number of operations and preset to reflect according to record
Firing table executes corresponding operation to robot;Wherein, the mapping table, which records, waves number of operations and executes the corresponding pass operated
System.
In step s 11, when detecting that there are objects to start in the preset range of robot by distance measuring sensor
When gesture identification of waving operates, further comprise the steps of:
It is shone by control robot and/or sounding prompts the user to carry out waving to operate.
It should be understood that the indicator light in no user's operation in robot goes out, only when passing through distance measuring sensor
Sense that ability control instructions lamp lights, while can be with voice prompting when having object (for example, hand of user) in preset range
User carries out gesture operation above.
Wherein, the preset range is 50cm~120cm, preferably 60cm~100cm.The distance measuring sensor is laser
Distance measuring sensor, ultrasonic distance-measuring sensor or infrared distance sensor.
Wherein, it is described by distance measuring sensor detect in the preset range of robot exist object refer to, have object
It has passed through the detection zone of distance measuring sensor.The range that the preset range can be detected effectively according to sensor is set, with
Family is waved for operation, i.e., by hand as being an object, the preset range is hand to artificially passing through between distance measuring sensor
Preset relatively reasonable distance is tested, this range has determined the detection range of the present apparatus.Distance value is within that range
When be judged as detecting it is in one's hands, distance value exceed the range when be judged as that hand is not detected.Choose reasonable range have it is following
Some criterion, but not limited to this: preset range should need the specific detection of reference sensor within the scope of sensor instrument distance
Characteristic and set, and detection range appropriate is set, when having object to be detected by a sensor but distance is beyond the range, is calculated
Method is determined as that no object passes through;Only there is hand channel is out-of-date just to can be regarded as effective detection within a preset range.
In the present embodiment, the distance measuring sensor is set at the top of the robot, in favor of in detection preset range
With the presence or absence of object.
When it is implemented, can lead to when being detected by distance measuring sensor in the preset range of robot there are when object
It crosses and sends a riming instructions, control instruction or switch order to start/stop the gesture identification operation of waving.
In step s 12, as shown in Fig. 2, judging the survey by the following method after gesture identification operation is waved in starting
Away from sensor, currently detected there are objects in the preset range of robot detects next time to the distance measuring sensor
There are the time intervals of object to be greater than threshold value in the preset range of robot:
S1211, starting wave gesture identification operation after, when the distance measuring sensor is detected for the first time in the pre- of robot
If there are when object, issue first control signal to start timing to start the first timer in range;
S1212, starting wave gesture identification operation after, when the distance measuring sensor detecting in addition to for the first time each time
There are when object in the preset range of robot, sending second control signal by control first timer again in terms of
When;
When S1213, the timing time when first timer receives the second control signal are greater than threshold value, then
Judging the distance measuring sensor, currently detected there are under object to the distance measuring sensor one in the preset range of robot
It is secondary to detect that there are the time intervals of object to be greater than threshold value in the preset range of robot.
Wherein, the threshold value is less than the values.
As shown in figure 3, after gesture identification operation is waved in starting, judging institute by the following method in the step S12
Stating distance measuring sensor, currently detected whether there are the duration of object in values in the preset range of robot
It is interior:
S1221, starting wave gesture identification operation after, detect when the distance measuring sensor moment in the pre- of robot
If there are when object, issue third control signal to start timing to start the second timer in range;
S1222, starting after the second timer starts timing, do not detecting when the distance measuring sensor moment in machine
When in the preset range of people there are the 4th control signal when object, is issued to stop second timer;
S1223, the timing time when second timer receives the 4th control signal fall into described default
It is worth in range, then judging the distance measuring sensor, currently detected there are the duration of object in the preset range of robot
In values;Otherwise judging the distance measuring sensor, currently detected there are objects in the preset range of robot
Duration is not in values.
In step s 13, executing the corresponding operation to robot includes start-up operation or the operation that stops working.
Everybody top of machine is equipped with distance measuring sensor.Believed using whether having to reflect at the top of distance measuring sensor scanning machine people
Number.If reflection signal is arranged at top, robot issues acousto-optic instruction, and at this moment operator is brandishing gesture, and machine can be realized
The operation of people.Wherein, distance measuring sensor includes but is not limited to laser range sensor/infrared distance sensor/ultrasonic distance measurement
Sensor/TOF measurement sensor).
This implementation realizes that user gesture is identified by single distance measuring sensor, and single distance measuring sensor is set to robot
Top, after robot is powered, whether distance measuring sensor has object above sniffing robot always, when sensing that object is in certain
When range (such as 60cm-100cm), issues acousto-optic indication signal and continue to detect.If top be operator sensor just
Top or so is waved, and distance measuring sensor can detect in one's hands --- and it can't detect hand, so recycle, until stopping waving.
In addition, the present embodiment is arranged from (preferably 60cm-100cm) as anti-tampering by the way that distance measuring sensor institute's ranging is added
It applies, robot is avoided to identify mistake.
In addition, top has other objects such as furniture at runtime for robot, in order to avoid robot identification mistake (is not
Gesture, but other objects).Anti-interference method is added in the present embodiment, specific as follows: monitoring hand (object) is on distance measuring sensor
The square residence time, (speed is brandished above because of hand can be than very fast, and the residence time is less than a certain particular value and is greater than another
An outer particular value, the i.e. duration of object are just that hand is brandished above in values).If interval time
Other interference are then considered greater than a certain definition time (threshold value), are not gesture.If detecting object and object being not detected
The switching time of body is shorter (that is, time interval is less than threshold value), and number of waving is that predetermined number of times is then considered normal operating (i.e.
Number of waving reaches in preset mapping table corresponding executable operation).Number can be waved by detection to judge user's operation
Content (such as starting to work, stop working).
As it can be seen that disclosed in the present embodiment it is disclosed it is a kind of based on the robot control method of gesture identification pass through ranging sense
Device detects in the preset range of robot there are when object, then starting is waved gesture identification operation, waves gesture in starting
After identification operation, if the distance measuring sensor currently detected duration in the preset range of robot there are object exists
In values, then it is recorded as once waving to operate;If the currently detected default model in robot of the distance measuring sensor
Enclose that interior there are the duration of object not in values or the distance measuring sensor is currently detected in robot
There are objects to the distance measuring sensor to detect that there are objects in the preset range of robot next time in preset range
When time interval is greater than threshold value, gesture identification of waving described in stopping operation;And wave described in the stopping gesture identification operation when, root
Corresponding operation is executed to robot according to number of operations and preset mapping table is waved described in record;Wherein, the mapping table
It records and waves number of operations and execute the corresponding relationship operated.To realize can the gesture identification based on user to robot
Corresponding operation (such as operation of starting to work or stop working) is executed, either uses hand without user's key of bending over
Machine, remote controler control, user-friendly, improve experience of the user to product.
It referring to fig. 4, is that the process of a kind of robot control method based on gesture identification that the embodiment of the present invention 2 provides is shown
It is intended to, which includes step S21~S23:
S21, when being recognized in the coverage of robot by camera, there are when object, then start gesture of waving to know
It does not operate;
S22, starting wave gesture identification operation after, if the camera currently recognizes the coverage in robot
Inside there is the duration of object in values, is then recorded as once waving to operate;If the camera currently identifies
To there are the duration of object in the coverage of robot not in values or the camera is currently known
It is clipped in the coverage of robot that there are objects to recognize in the coverage of robot next time to the camera
When being greater than threshold value there are the time interval of object, gesture identification of waving described in stopping operation;
When S23, gesture identification of waving described in stopping operation, wave number of operations and preset to reflect according to record
Firing table executes corresponding operation to robot;Wherein, the mapping table, which records, waves number of operations and executes the corresponding pass operated
System.
Wherein, in the step s 21, described to recognize in the coverage of robot that there are objects to be by camera
Refer to, the shooting area that moment has object to have passed through camera.Can be in coverage of the pass-through mode to identify camera specifically
It is no that there are object (for example, hands):
Mode A: robot is in halted state, and camera is taken pictures according to predeterminated frequency, before camera is continuously shot
Two photos compare afterwards, if the matching degree that photo is opened in front and back two is relatively high (being greater than the set value), are identified as in machine
Object is not present in the coverage of device people;If front and back two, which is opened, has apparent difference (matching degree is less than setting value), identification
For there are objects in the coverage of robot.
Mode B: robot is kept in motion, and camera is taken pictures according to predeterminated frequency, before camera is continuously shot
Two photos compare afterwards, if front and back shoots two photos and there was only faint translation difference, are identified as in robot
Object is not present in coverage;If front and back two, which is opened, not only translational difference, and also whether there is or not the momentary differences of object, then
It is identified as in the coverage of robot that there are objects.It should be understood that the faint translation difference can be and set in advance
The translation reference value set.
In the step s 21, it waves when recognizing to start there are object in the coverage of robot by camera
When gesture identification operates, further comprise the steps of:
It is shone by control robot and/or sounding prompts the user to carry out waving to operate.
It should be understood that the indicator light in no user's operation in robot goes out, only when passing through distance measuring sensor
Sense that ability control instructions lamp lights, while can be with voice prompting when having object (for example, hand of user) in preset range
User carries out gesture operation above.
In the present embodiment, whether the camera is set at the top of the robot, in favor of depositing in detection coverage
In object.When it is implemented, transmission can be passed through when being recognized in the coverage of robot by camera there are when object
One riming instructions, control instruction or switch order operate to start/stop the gesture identification of waving.
In step S22, as shown in figure 5, being taken the photograph described in judgement by the following method after gesture identification operation is waved in starting
As head currently recognizes in the coverage of robot, there are objects and the camera is recognized next time in robot
There are the time intervals of object to be greater than threshold value in coverage:
S2211, the filming frequency based on the camera, by judging that the camera recognizes the shooting in robot
From having to without there are object moment in range, recognizes to the camera and exist from scratch in the coverage of robot
Time interval is calculated in frame number that object moment is passed through;
S2212, when the time interval be greater than threshold value when, then judge that the camera currently recognizes the bat in robot
It takes the photograph in range and to recognize in the coverage of robot that there are between the time of object next time there are object to the camera
Every greater than threshold value.
In step S22, as shown in fig. 6, being taken the photograph described in judgement by the following method after gesture identification operation is waved in starting
As head currently recognizes in the coverage of robot, whether there are the duration of object in values:
S2221, the filming frequency based on the camera, by judging that the camera is recognized in the default of robot
There is object moment in range from scratch, recognizes in the preset range of robot to the camera from having no presence
The duration is calculated in frame number that object moment is passed through;
S2222, it is fallen into the values when the duration, then judges the distance measuring sensor current detection
To the duration in the preset range of robot there are object in values;Otherwise judge the distance measuring sensor
It is currently detected that there are the duration of object not in values in the preset range of robot.
Wherein, the filming frequency of the camera is 10~50 frames/second, preferably 20~30 frames/second.The preset value model
It encloses and is greater than the threshold value.
In the following, the present embodiment is described in detail in conjunction with Fig. 7 a~Fig. 7 b.By taking user waves as an example, hand, which is regarded, is
One object will form a series of picture as long as object is brandished on camera, by comparing the multiple pictures continuously clapped
Comparison is to realize.Such as 5 photos that Fig. 7 a~Fig. 7 b show hand in camera upper direction, and CCD/CMOS was continuously photographed
(or the 5 frame images intercepted inside video flowing), it is possible to understand that, 5 photos are only illustrated, and 3 or 8 are also possible to
, when hand is brandished on camera CCD/CMOS relative to static state when have an object and inside move, by with
The photo comparison clapped when static, which may determine that above, has object quickly moving.
5 photos shown in Fig. 7 a~Fig. 7 b are a series of photos of the hand from left movement to the right, are existed by object (hand)
It from left to right may determine that in CCD/CMOS and wave once, to may determine that waved once again from right to left.Can so it remember
Record number of waving.
For the above-mentioned duration referred to, can calculate in the following way: camera frequency of taking pictures is known (soft
Part setting), it is assumed that 24 photos of taking pictures for 1 second (corresponding video flowing is 24 frames/second) so clap the time interval of two serial-grams
It is 1/24 second, that is, 0.042 second, that can occur by judgment object (hand) in CCD/CMOS to the photographed photograph that disappears
Piece quantity carrys out calculating prolongeding time: it is exemplified below: assuming that hand has taken 5 photos to going out from the right from left entrance CCD, then
Hand residence time in CCD is 0.21 second, then the duration is 0.21 second.
For the above-mentioned time interval referred to, can calculate in the following way: camera frequency of taking pictures is known (soft
Part setting), it is assumed that 24 photos of taking pictures for 1 second (corresponding video flowing is 24 frames/second) so clap the time interval of two serial-grams
It is 1/24 second, that is, 0.042 second, then can be photographed from disappearing to occurring in CCD/CMOS by judgment object (hand)
Number of pictures calculate time interval.It is exemplified below: assuming that hand has taken 5 photos to going out from the right from left entrance CCD,
So hand residence time in CCD is 0.21 second, and hand is waved to the right will not just the visual field CCD be just stopped out, it is possible to
It also will continue to move right, it is assumed that and 3 photos have been taken, then the time is 0.126 second, entrance the right CCD is come back to from the right
3 photos have been taken in the visual field again, and the time is 0.126 second, enter from the right and go out to clap 5 photos from the left side, the time is 0.21 second.
It so can be according to two 3 photos (namely time of the hand not on CCD calculates), that is, 0.126*2=0.252 seconds.
The present embodiment by camera carry out gesture identification recognition methods solve the problems, such as gesture identification (because
Much for example finger closes up the shape of hand, and finger is opened, and clenching fist etc. will identify), this method identifies hand as object,
Therefore, what is continuously brandished above is not that hand is also possible to identify from gesture.Interfere in order to prevent, introduce the duration,
It is anti-interference every time and number of waving.Usual situation not will form successive projection and section generally if it is interference
Time interval, which has, repeatedly waves.
As it can be seen that a kind of robot control method based on gesture identification disclosed in the present embodiment is recognized by camera
There are when object in the coverage of robot, then start gesture identification operation of waving, after gesture identification operation is waved in starting,
If the camera currently recognizes the duration in the coverage of robot there are object in values,
It is recorded as once waving to operate;If the camera currently recognize in the coverage of robot there are object it is lasting when
Between not in values or the camera currently recognizes in the coverage of robot that there are objects to described
Camera recognizes next time when being greater than threshold value there are the time interval of object in the coverage of robot, waves described in stopping
The operation of hand gesture identification;And wave described in the stopping gesture identification operation when, the number of operations and pre- of waving according to record
If mapping table corresponding operation is executed to robot;Wherein, the mapping table record waves what number of operations was operated with execution
Corresponding relationship.It is thereby achieved that can the gesture identification based on user corresponding operation executed to robot (such as start to work
Or the operation that stops working), it is either controlled using mobile phone, remote controler without user's key of bending over, it is user-friendly,
Improve experience of the user to product.
It is a kind of structural block diagram of the robot controller based on gesture identification in the embodiment of the present invention 3 with reference to Fig. 8,
The control device includes:
Gesture identification of waving operates starting module 31, for working as the default model detected by distance measuring sensor in robot
Enclose interior there are when object, then starting is waved gesture identification operation;
Operation judges of waving module 32, for starting wave gesture identification operation after, if the distance measuring sensor is current
The duration in the preset range of robot there are object is detected in values, then is recorded as once waving to grasp
Make;If the distance measuring sensor is currently detected, there are the duration of object not in preset value in the preset range of robot
In range or the distance measuring sensor currently detected there are objects in the preset range of robot senses to the ranging
Device detects that there are the time intervals of object greater than threshold value in the preset range of robot next time when, hand of waving described in stopping
Gesture identification operation;
Execution module 33, for wave described in the stopping gesture identification operation when, wave to operate according to record time
Several and preset mapping table executes corresponding operation to robot;Wherein, the mapping table records wave number of operations and execution
The corresponding relationship of operation.
Wherein, the gesture identification operation starting module of waving is also used to: being detected when by distance measuring sensor in machine
Start in the preset range of people there are object wave gesture identification operation when, by control robot shine and/or sounding come
Prompt user carries out waving to operate.
As shown in figure 9, the operation judges module 32 of waving specifically includes:
First control signal generation unit 321, for starting wave gesture identification operation after, when the distance measuring sensor
Detect that there are when object, issue first control signal to start to start the first timer in the preset range of robot for the first time
Timing;
Second control signal generation unit 322, for starting wave gesture identification operation after, when the distance measuring sensor
Sending second control signal is there are when object in the preset range of robot to control for detecting in addition to for the first time each time
The first timer reclocking;
First judging unit 323, the timing time when first timer receives the second control signal are big
When threshold value, then judging the distance measuring sensor, currently detected there are objects to the ranging in the preset range of robot
Sensor detects that there are the time intervals of object to be greater than threshold value in the preset range of robot next time;
Third control signal generation unit 324, for starting wave gesture identification operation after, when the distance measuring sensor
Moment detects that there are when object, issue third control signal to start to start the second timer in the preset range of robot
Timing;
4th control signal generation unit 325, for starting after the second timer starts timing, when the ranging senses
Device moment does not detect that there are when object, issue the 4th control signal to stop described second in the preset range of robot
When timer;And
Second judgment unit 326, for when second timer receive it is described 4th control signal when timing when
Between fall into the values, then judge that the distance measuring sensor is currently detected and exist in the preset range of robot
The duration of object is in values;Otherwise judge the currently detected default model in robot of the distance measuring sensor
Enclose that interior there are the duration of object not in values.
When it is implemented, the operation judges module of waving is by issuing a riming instructions, control instruction or switch order
To start/stop the gesture identification operation of waving.
Preferably, the values are greater than the threshold value.The distance measuring sensor is located at the top of the robot.On
Stating and executing the corresponding operation to robot includes starting to work or stopping working.
The working principle and the course of work of robot controller based on gesture identification disclosed in this implementation and above-mentioned reality
It is consistent to apply example 1, detailed process please refers to above-described embodiment 1, and details are not described herein.
It is a kind of structural block diagram of the robot controller based on gesture identification in the embodiment of the present invention 4 with reference to Figure 10,
The control device includes:
Gesture identification of waving operates starting module 41, is recognized in the coverage of robot for working as by camera
There are when object, then start gesture identification operation of waving;
Operation judges of waving module 42, for starting wave gesture identification operation after, if the camera currently identifies
To the duration in the coverage of robot there are object in values, then it is recorded as once waving to operate;
If the camera currently recognizes in the coverage of robot, there are the duration of object not in values,
Or the camera currently recognizes in the coverage of robot that there are objects to recognize to the camera next time
When being greater than threshold value there are the time interval of object in the coverage of robot, gesture identification of waving described in stopping operation;With
And
Execution module 43, for wave described in the stopping gesture identification operation when, wave to operate according to record time
Several and preset mapping table executes corresponding operation to robot;Wherein, the mapping table records wave number of operations and execution
The corresponding relationship of operation.
Wherein, in gesture identification operation starting module 41 of waving, the shooting model in robot is recognized by camera
It encloses interior presence to object refer to, the shooting area that moment has object to have passed through camera.Specifically can pass-through mode identify camera
Coverage in whether there is object (for example, hand):
Mode A: robot is in halted state, and camera is taken pictures according to predeterminated frequency, before camera is continuously shot
Two photos compare afterwards, if the matching degree that photo is opened in front and back two is relatively high (being greater than the set value), are identified as in machine
Object is not present in the coverage of device people;If front and back two, which is opened, has apparent difference (matching degree is less than setting value), identification
For there are objects in the coverage of robot.
Mode B: robot is kept in motion, and camera is taken pictures according to predeterminated frequency, before camera is continuously shot
Two photos compare afterwards, if front and back shoots two photos and there was only faint translation difference, are identified as in robot
Object is not present in coverage;If front and back two, which is opened, not only translational difference, and also whether there is or not the momentary differences of object, then
It is identified as in the coverage of robot that there are objects.
Wherein, the gesture identification operation starting module 41 of waving is also used to: being recognized when by camera in robot
Coverage in start when waving gesture identification operation there are object, shone by control robot and/or sounding mention
Show that user carries out waving to operate.
As shown in figure 11, the operation judges module 42 of waving specifically includes:
First frame counting number unit 421, based on the filming frequency of the camera, by judging that the camera recognizes
From having to without there are object in the coverage of robot, to the camera recognize in the coverage of robot from
Time interval is calculated to there is the frame number passed through there are object in nothing;
First judging unit 422, for when the time interval is greater than threshold value, then judging that the camera currently identifies
To there are objects to the camera to recognize the coverage memory in robot next time in the coverage of robot
It is greater than threshold value in the time interval of object;
Second frame number counting unit 423, based on the filming frequency of the camera, by judging that the camera recognizes
There is object from scratch in the coverage of robot, to the camera recognize in the coverage of robot from
Have to the duration is calculated without the frame number passed through there are object;And
Second judgment unit 424, falls into the values when the duration, then judges the ranging sensing
The device currently detected duration in the coverage of robot there are object is in values;Otherwise described in judgement
Distance measuring sensor is currently detected, and there are the duration of object not in values in the coverage of robot.
Wherein, the filming frequency of the camera is 10~50 frames/second, preferably 20~30 frames/second.
When it is implemented, the operation judges module of waving is by issuing a riming instructions, control instruction or switch order
To start/stop the gesture identification operation of waving.
As the improvement of the present embodiment, the values are greater than the threshold value.The camera is located at the machine
At the top of people.It is above-mentioned that the corresponding operation is executed including starting to work or stopping working to robot.
The working principle and the course of work of robot controller based on gesture identification disclosed in this implementation and above-mentioned reality
It is consistent to apply example 2, detailed process please refers to above-described embodiment 2, and details are not described herein.
Another embodiment of the present invention also discloses a kind of robot, including described in embodiment as above based on gesture identification
Robot controller.
It should be noted that the apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
It needs that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.In addition, device provided by the invention
In embodiment attached drawing, the connection relationship between module indicate between them have communication connection, specifically can be implemented as one or
A plurality of communication bus or signal wire.Those of ordinary skill in the art are without creative efforts, it can understand
And implement.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention can borrow
Help software that the mode of required common hardware is added to realize, naturally it is also possible to by specialized hardware include specific integrated circuit, specially
It is realized with CPU, private memory, special components and parts etc..Under normal circumstances, all functions of being completed by computer program are ok
It is easily realized with corresponding hardware, moreover, being used to realize that the specific hardware structure of same function is also possible to a variety of more
Sample, such as analog circuit, digital circuit or special circuit etc..But software program is real in situations more for the purpose of the present invention
It is now more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words makes the prior art
The part of contribution can be embodied in the form of software products, which is stored in the storage medium that can be read
In, such as the floppy disk of computer, USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory
Device (RAM, Random Access Memory), magnetic or disk etc., including some instructions are with so that a computer is set
Standby (can be personal computer, server or the network equipment etc.) executes method described in each embodiment of the present invention.
The above is a preferred embodiment of the present invention, it is noted that for those skilled in the art
For, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also considered as
Protection scope of the present invention.