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 control methods based on gesture identification, control device and robot.
Background technique
Domestic robot used at present is usually required user's key of bending over when manipulation and is either controlled using mobile phone, remote controler, 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 providing 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, experience of the user to product is improved, and at low cost.
To achieve the above object, the embodiment of the invention provides a kind of robot control methods based on gesture identification, comprising steps of
When being detected in the preset range of robot by distance measuring sensor there are when object, then start gesture identification operation of waving;
After gesture identification operation is waved in starting, if the distance measuring sensor currently detected duration in the preset range of robot there are object in values, is recorded as once waving to operate;If the distance measuring sensor is currently detected, there are the duration of object not in values in the preset range of robot, or the distance measuring sensor it is currently detected in the preset range of robot there are object to the distance measuring sensor detect next time be greater than threshold value there are the time interval of object in the preset range of robot when, gesture identification operation of waving described in stopping;
When gesture identification of waving described in stopping operation, waves number of operations according to record and preset mapping table executes corresponding operation 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 detected by distance measuring sensor in the preset range of robot there are object 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 is 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, judging the distance measuring sensor by the following method, currently detected there are objects to the distance measuring sensor to detect that there are the time intervals of object greater than threshold value in the preset range of robot next time in the preset range of robot:
After gesture identification operation is waved in starting, when the distance measuring sensor detects that there are when object, issue first control signal to start timing to start the first timer in the preset range of robot for the first time;
After gesture identification operation is waved in starting, when the distance measuring sensor detected in the preset range of robot each time in addition to for the first time
There are when object, 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 judging the distance measuring sensor, currently detected there are objects to the distance measuring sensor to detect that there are the time intervals of object greater than threshold value in the preset range of robot next time in the preset range of robot.
As an improvement of the above scheme, after gesture identification operation is waved in starting, judging the distance measuring sensor by the following method, currently detected whether there are the duration of object in values in the preset range of robot:
After gesture identification operation is waved in starting, detect that there are when object, issue third control signal to start timing to start the second timer in the preset range of robot when the distance measuring sensor moment;
After starting the second timer and starting timing, when not detecting in the preset range of robot there are the 4th control signal when object, is issued to stop second timer distance measuring sensor moment;
Timing time when second timer receives the 4th control signal is fallen into the values, then judges the distance measuring sensor currently detected duration in the preset range of robot there are object in values;Otherwise judging the distance measuring sensor, currently detected there are the duration of object not in values in the preset range of robot.
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 the gesture identification operation of waving by a riming instructions, control instruction or switch order.
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 when being detected in the preset range of robot by distance measuring sensor there are when object, then starting gesture identification operation of waving;
Operation judges of waving module, for starting wave gesture identification operation after, if the distance measuring sensor currently detected duration in the preset range of robot there are object in values, is recorded as once waving to operate;If the distance measuring sensor is currently detected, there are the duration of object not in values in the preset range of robot, or the distance measuring sensor it is currently detected in the preset range of robot there are object to the distance measuring sensor detect next time be greater than threshold value there are the time interval of object in the preset range of robot when, gesture identification operation of waving described in stopping;
Execution module, for wave described in the stopping gesture identification operation when, wave number of operations according to record and preset mapping table execute corresponding operation 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, the gesture identification operation starting module of waving is also used to: when detected by distance measuring sensor in the preset range of robot there are object start wave gesture identification operation when, shone by control robot and/or sounding prompt 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 is 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 starting wave gesture identification operation after, when the distance measuring sensor is detected for the first time in machine
There are when object, issue first control signal to start timing to start the first timer in the preset range of people;
Second control signal generation unit, for after gesture identification operation is waved in starting, when sending second control signal is there are when object in the preset range of robot to control the first timer reclocking each time for the distance measuring sensor detecting in addition to for the first time;
First judging unit, when timing time when first timer receives the second control signal is greater than threshold value, then judging the distance measuring sensor, currently detected there are objects to the distance measuring sensor to detect that there are the time intervals of object greater than threshold value in the preset range of robot next time in the preset range of robot.
As an improvement of the above scheme, the operation judges module of waving further comprises:
Third controls signal generation unit, for detecting that there are when object, issue third control signal to start timing to start the second timer in the preset range of robot when the distance measuring sensor moment after gesture identification operation is waved in starting;
4th control signal generation unit, for starting after the second timer starts timing, when not detecting in the preset range of robot there are the 4th control signal when object, is issued to stop second timer distance measuring sensor moment;
Second judgment unit, it is fallen into the values for the timing time when second timer receives the 4th control signal, then judges the distance measuring sensor currently detected duration in the preset range of robot there are object in values;Otherwise judging the distance measuring sensor, currently detected there are the duration of object not in values in the preset range of robot.
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, the operation judges module of waving starts/stops the gesture identification operation of waving by issuing a riming instructions, control instruction or switch order.
Compared with prior art, a kind of robot control method and control device based on gesture identification disclosed by the invention detects that there are when object in the preset range of robot by distance measuring sensor, then start gesture identification operation of waving, after gesture identification operation is waved in starting, if the distance measuring sensor currently detected duration in the preset range of robot there are object in values, is recorded as once waving to operate;If the distance measuring sensor is currently detected, there are the duration of object not in values in the preset range of robot, or the distance measuring sensor it is currently detected in the preset range of robot there are object to the distance measuring sensor detect next time be greater than threshold value there are the time interval of object in the preset range of robot when, gesture identification operation of waving described in stopping;And wave described in the stopping gesture identification operation when, wave number of operations according to record and preset mapping table execute corresponding operation to robot;Wherein, the mapping table, which records, waves number of operations and executes the corresponding relationship operated.To realize can the gesture identification based on user corresponding operation (such as operation of starting to work or stop working) is executed to robot, 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.
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 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 recognizes the existence in the coverage of robot
The duration of body is not in values, or the camera currently recognize in the coverage of robot there are object to the camera recognize next time be greater than threshold value there are the time interval of object in the coverage of robot when, gesture identification of waving described in stopping operation;
When gesture identification of waving described in stopping operation, waves number of operations according to record and preset mapping table executes corresponding operation 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 recognized by camera in the coverage of robot there are object 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, after gesture identification operation is waved in starting, judges that the camera currently recognizes in the coverage of robot by the following method and recognizes in the coverage of robot that there are the time intervals of object to be greater than threshold value next time there are object and the camera:
Filming frequency based on 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 the frame number that object moment is passed through from scratch in the coverage of robot time interval is calculated;
When the time interval is greater than threshold value, then judges that the camera currently recognizes in the coverage of robot and recognize in the coverage of robot that there are the time intervals of object greater than threshold value next time there are object to the camera.
As an improvement of the above scheme, after gesture identification operation is waved in starting, judge that the camera currently recognizes in the coverage of robot that there are the duration of object whether in values by the following method:
Filming frequency based on the camera, it by judging the camera recognizes and there is object moment from scratch in the preset range of robot, recognized in the preset range of robot from having the duration is being calculated without the frame number passed through there are object moment to the camera;
It is fallen into the values when the duration, then judges the distance measuring sensor currently detected duration in the preset range of robot there are object in values;Otherwise judging the distance measuring sensor, currently detected there are the duration of object not in values in the preset range of robot.
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, and photo is opened in the front and back two that camera is continuously shot and is compared, if the matching degree that photo is opened in front and back two is greater than the set value, is identified as that object is not present in the coverage of robot;If the matching degree that photo is opened in front and back two is less than setting value, it is identified as in the coverage of robot that there are objects;
When robot is kept in motion, camera is taken pictures according to predeterminated frequency, photo is opened in the front and back two that camera is continuously shot to compare, if front and back shoots two photos and there was only small translation difference, is identified as that object is not present in the coverage of robot;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 it is identified as in the coverage of robot that there are objects.
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 the gesture identification operation of waving by a riming instructions, control instruction or switch order.
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 when being recognized in the coverage of robot by camera there are when object, then starting gesture identification operation of waving;
Operation judges of waving module, for if the camera currently recognizes the duration in the coverage of robot there are object in values, being recorded as once waving to operate after gesture identification operation is waved in starting;If the camera currently recognizes in the coverage of robot, there are the duration of object not in values, or the camera currently recognize in the coverage of robot there are object to the camera recognize next time be greater than threshold value there are the time interval of object in the coverage of robot when, gesture identification of waving described in stopping operation;
Execution module, for wave described in the stopping gesture identification operation when, wave number of operations according to record and preset mapping table execute corresponding operation 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, the gesture identification operation starting module of waving is also used to: when recognized by camera in the coverage of robot there are object start wave gesture identification operation when, shone by control robot and/or sounding prompt 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, filming frequency based on the camera, by judging that the camera recognizes in the coverage of robot from having to without there are object, is recognized to the camera and there is the frame number that object is passed through from scratch in the coverage of robot time interval is calculated;
First judging unit, recognize in the coverage of robot that there are the time intervals of object greater than threshold value next time there are object to the camera for when the time interval is greater than threshold value, then judging that the camera currently recognizes in the coverage of robot.
As an improvement of the above scheme, the operation judges module of waving further comprises:
Second frame number counting unit, filming frequency based on the camera, it by judging the camera recognizes and there is object from scratch in the coverage of robot, recognized in the coverage of robot from having the duration is being calculated without the frame number passed through there are object to the camera;
Second judgment unit, falls into the values when the duration, then judges the distance measuring sensor currently detected duration in the coverage of robot there are object in values;Otherwise judging the distance measuring 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 is identified in the coverage of camera in the following manner with the presence or absence of object:
When robot is in halted state, camera is taken pictures according to predeterminated frequency, and photo is opened in the front and back two that camera is continuously shot and is compared, if the matching degree that photo is opened in front and back two is greater than the set value, is identified as that object is not present in the coverage of robot;If the matching degree that photo is opened in front and back two is less than setting value, it is identified as in the coverage of robot that there are objects;
When robot is kept in motion, camera is taken pictures according to predeterminated frequency, photo is opened in the front and back two that camera is continuously shot to compare, if front and back shoots two photos and there was only small translation difference, is identified as that object is not present in the coverage of robot;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 it is identified as in the coverage of robot that there are objects.
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, the operation judges module of waving starts/stops the gesture identification operation of waving by issuing a riming instructions, control instruction or switch order.
Compared with prior art, a kind of robot control method and control device based on gesture identification disclosed by the invention recognizes in the coverage of robot that there are when object by camera, 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 recognizes in the coverage of robot, there are the duration of object not in values, or the camera currently recognize in the coverage of robot there are object to the camera recognize next time be greater than threshold value there are the time interval of object in the coverage of robot when, gesture identification of waving described in stopping operation;And wave described in the stopping gesture identification operation when, wave number of operations according to record and preset mapping table execute corresponding operation to robot;Wherein, the mapping table, which records, waves number of operations and executes the corresponding relationship operated.Therefore, realize can the gesture identification based on user corresponding operation (such as operation of starting to work or stop working) is executed to robot, 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.
The embodiment of the invention also provides a kind of robots, including as described above based on the robot controller of gesture identification.
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 brandishes schematic diagram in the embodiment of the present invention 2.
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 structural block diagram of the operation judges module of waving of the robot controller based on gesture identification in the embodiment of the present invention 3.
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 structural block diagram of the operation judges module of waving of the robot controller based on gesture identification in the embodiment of the present invention 4.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, every other embodiment obtained by those of ordinary skill in the art without making creative efforts, shall fall within the protection scope of the present invention.
It is a kind of flow chart for robot control method based on gesture identification that the embodiment of the present invention 1 provides, which includes step S11~S13 referring to Fig. 1:
S11, when being detected by distance measuring sensor in the preset range of robot there are when object, then starting is waved gesture identification operation;
S12, starting wave gesture identification operation after, if the distance measuring sensor currently detected duration in the preset range of robot there are object in values, is recorded as once waving to operate;If the distance measuring sensor is currently detected, there are the duration of object not in values in the preset range of robot, or the distance measuring sensor it is currently detected in the preset range of robot there are object to the distance measuring sensor detect next time be greater than threshold value there are the time interval of object in the preset range of robot when, gesture identification operation of waving described in stopping;
When S13, gesture identification of waving described in stopping operation, waves number of operations according to record and preset mapping table executes corresponding operation to robot;Wherein, the mapping table, which records, waves number of operations and executes the corresponding relationship operated.
In step s 11, when detected by distance measuring sensor in the preset range of robot there are object 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.
It is understood that, indicator light in no user's operation in robot goes out, only when being sensed by distance measuring sensor has object (for example, hand of user) in preset range, ability control instructions lamp lights, while gesture operation can be carried out above with voice prompting user.
Wherein, the preset range is 50cm~120cm, preferably 60cm~100cm.The distance measuring sensor is laser range 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, there is object to have passed through the detection zone of distance measuring sensor.The preset range is set according to the range that sensor can be detected effectively, by taking user waves operation as an example, it is an object that hand, which is regarded, the preset range is hand to, artificially by testing preset relatively reasonable distance, this range has determined the detection range of the present apparatus between distance measuring sensor.Distance value 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.Choosing reasonable range has following some criterion, but not limited to this: preset range should be within the scope of sensor instrument distance, it needs the specific detection characteristic of reference sensor and sets, and detection range appropriate is set, when having object to be detected by a sensor but distance is beyond the range, algorithm 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 whether there is object in detection preset range.
When it is implemented, when detecting that there are when object, can start/stop the gesture identification operation of waving by sending a riming instructions, control instruction or switch order in the preset range of robot by distance measuring sensor.
In step s 12, as shown in Figure 2, after gesture identification operation is waved in starting, judging the distance measuring sensor by the following method, currently detected there are objects to the distance measuring sensor to detect that there are the time intervals of object greater than threshold value in the preset range of robot next time in the preset range of robot:
S1211, after gesture identification operation is waved in starting, when the distance measuring sensor is detected in the preset range of robot for the first time there are when object, issue first control signal to start the first timer and start timing;
S1212, after gesture identification operation is waved in starting, when the distance measuring sensor detected in the preset range of robot each time there are when object except for the first time in addition to, issue second control signal to control the first timer reclocking;
When S1213, 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 objects to the distance measuring sensor to detect that there are the time intervals of object greater than threshold value in the preset range of robot next time in the preset range of robot.
Wherein, the threshold value is less than the values.
As shown in figure 3, in the step S12, after gesture identification operation is waved in starting, judging the distance measuring sensor by the following method, currently detected whether there are the duration of object in values in the preset range of robot:
S1221, after gesture identification operation is waved in starting, detect in the preset range of robot when the distance measuring sensor moment there are when object, issue third control signal to start the second timer and start timing;
S1222, starting after the second timer starts timing, when not detecting in the preset range of robot there are the 4th control signal when object, is issued to stop second timer distance measuring sensor moment;
S1223, the timing time when second timer receives the 4th control signal are fallen into the values, then judge the distance measuring sensor currently detected duration in the preset range of robot there are object in values;Otherwise judging the distance measuring sensor, currently detected there are the duration of object not in values in the preset range of robot.
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.Whether there is reflection signal using distance measuring sensor scanning machine people top.If reflection signal is arranged at top, robot issues acousto-optic instruction, and at this moment operator is brandishing gesture, and the operation of robot can be realized.Wherein, distance measuring sensor includes but is not limited to laser range sensor/infrared distance sensor/ultrasonic distance-measuring sensor/TOF measurement sensor).
This implementation realizes that user gesture is identified by single distance measuring sensor, single distance measuring sensor is set at the top of robot, after robot is powered, whether distance measuring sensor has object in sniffing robot top always, when sensing that object is in a certain range (such as 60cm-100cm), issues acousto-optic indication signal and continue to detect.If top is operator, the left and right right above sensor is waved, and distance measuring sensor can detect in one's hands --- it can't detect hand, so recycle, until stopping waving.
In addition, the present embodiment is used as anti-interference method from (preferably 60cm-100cm) by the way that distance measuring sensor institute's ranging is added, robot is avoided to identify mistake.
In addition, top has other objects such as furniture at runtime for robot, in order to avoid robot identifies wrong (not instead of gesture, other objects).Anti-interference method is added in the present embodiment, specific as follows: the residence time, (speed is brandished above because of hand can be than very fast above distance measuring sensor for monitoring hand (object), therefore the residence time is less than a certain particular value and is greater than another particular value, that is the duration of object is just that hand is brandished above in values).Other interference are considered if interval time is greater than a certain definition time (threshold value), are not gesture.If detecting that object and the switching time that object is not detected are shorter (i.e., time interval is less than threshold value), and number of waving is that predetermined number of times is then considered normal operating (number of waving reaches corresponding executable operation in preset mapping table).Number can be waved by detection to judge user's operation content (such as starting to work, stop working).
It can be seen that, it is disclosed disclosed in the present embodiment a kind of to detect that there are when object in the preset range of robot by distance measuring sensor based on the robot control method of gesture identification, then start gesture identification operation of waving, after gesture identification operation is waved in starting, if the distance measuring sensor currently detected duration in the preset range of robot there are object in values, is recorded as once waving to operate;If the distance measuring sensor is currently detected, there are the duration of object not in values in the preset range of robot, or the distance measuring sensor it is currently detected in the preset range of robot there are object to the distance measuring sensor detect next time be greater than threshold value there are the time interval of object in the preset range of robot when, gesture identification operation of waving described in stopping;And wave described in the stopping gesture identification operation when, wave number of operations according to record and preset mapping table execute corresponding operation to robot;Wherein, the mapping table, which records, waves number of operations and executes the corresponding relationship operated.To realize can the gesture identification based on user corresponding operation (such as operation of starting to work or stop working) is executed to robot, 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.
Referring to fig. 4, it is a kind of flow diagram for robot control method based on gesture identification that the embodiment of the present invention 2 provides, which includes step S21~S23:
S21, when being recognized in the coverage of robot by camera, there are when object, then start gesture identification of waving to operate;
S22, starting wave gesture identification operation after, if the camera currently recognizes the duration in the coverage of robot there are object in values, be 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 recognize in the coverage of robot there are object to the camera recognize next time be greater than threshold value there are the time interval of object in the coverage of robot when, gesture identification of waving described in stopping operation;
When S23, gesture identification of waving described in stopping operation, waves number of operations according to record and preset mapping table executes corresponding operation to robot;Wherein, the mapping table, which records, waves number of operations and executes the corresponding relationship operated.
Wherein, in the step s 21, it is described by camera recognize in the coverage of robot exist object refer to, the shooting area that moment has object to have passed through camera.Specifically it can whether there is object (for example, hand) in coverage of the pass-through mode to identify camera:
Mode A: robot is in halted state, and camera is taken pictures according to predeterminated frequency, and photo is opened in the front and back two that camera is continuously shot
It compares, if the matching degree that photo is opened in front and back two is relatively high (being greater than the set value), is identified as that object is not present in the coverage of robot;If front and back two, which is opened, has apparent difference (matching degree be less than setting value), it is identified as in the coverage of robot that there are objects.
Mode B: robot is kept in motion, camera is taken pictures according to predeterminated frequency, photo is opened in the front and back two that camera is continuously shot to compare, if front and back shoots two photos and there was only faint translation difference, is identified as that object is not present in the coverage of robot;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 it is identified as in the coverage of robot that there are objects.It should be understood that the faint translation difference can be pre-set translation reference value.
In the step s 21, when recognized by camera in the coverage of robot there are object 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.
It is understood that, indicator light in no user's operation in robot goes out, only when being sensed by distance measuring sensor has object (for example, hand of user) in preset range, ability control instructions lamp lights, while gesture operation can be carried out above with voice prompting user.
In the present embodiment, the camera is set at the top of the robot, in favor of whether there is object in detection coverage.When it is implemented, when being recognized in the coverage of robot by camera, there are when object, can start/stop the gesture identification operation of waving by sending a riming instructions, control instruction or switch order.
In step S22, as shown in Figure 5, after gesture identification operation is waved in starting, judges that the camera currently recognizes in the coverage of robot by the following method and recognizes in the coverage of robot that there are the time intervals of object to be greater than threshold value next time there are object and the camera:
S2211, the filming frequency based on 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 the frame number that object moment is passed through from scratch in the coverage of robot time interval is calculated;
S2212, when the time interval is greater than threshold value, then judge that the camera currently recognizes in the coverage of robot and recognize in the coverage of robot that there are the time intervals of object greater than threshold value next time there are object to the camera.
In step S22, as shown in fig. 6, judging that the camera currently recognizes in the coverage of robot that there are the duration of object whether in values by the following method after gesture identification operation is waved in starting:
S2221, the filming frequency based on the camera, it by judging the camera recognizes and there is object moment from scratch in the preset range of robot, recognized in the preset range of robot from having the duration is being calculated without the frame number passed through there are object moment to the camera;
S2222, it is fallen into the values when the duration, then judges the distance measuring sensor currently detected duration in the preset range of robot there are object in values;Otherwise judge that the distance measuring sensor is currently detected in the pre- of robot
If there are the duration of object not in values in range.
Wherein, the filming frequency of the camera is 10~50 frames/second, preferably 20~30 frames/second.The values are 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, by hand as being an object, as long as object is brandished on camera, a series of picture will form, realized by comparing the multiple pictures continuously clapped comparison.As Fig. 7 a~Fig. 7 b show hand in camera upper direction, 5 photos (or the 5 frame images intercepted inside video flowing) that CCD/CMOS was continuously photographed, it is understood that, 5 photos are only illustrated, it is also possible to 3 or 8, when hand is brandished on camera CCD/CMOS relative to static state when have an object and inside move, there is object quickly moving above by may determine that with the photo comparison clapped when static state.
5 photos shown in Fig. 7 a~Fig. 7 b are a series of photos of the hand from left movement to the right, from left to right may determine that in CCD/CMOS by object (hand) and wave once, to may determine that waved once again from right to left.Number of waving can so be recorded.
For the above-mentioned duration referred to, can calculate in the following way: camera frequency of taking pictures is known (software set), assuming that it is 1/24 second that 24 photos of taking pictures for 1 second (corresponding video flowing is 24 frames/second), which so clap the time interval of two serial-grams, namely 0.042 second, that can occur to the photographed number of pictures that disappears by judgment object (hand) in CCD/CMOS come calculating prolongeding time: be 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, so 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 (software set), assuming that it is 1/24 second that 24 photos of taking pictures for 1 second (corresponding video flowing is 24 frames/second), which so clap the time interval of two serial-grams, namely 0.042 second, then time interval can be calculated by judgment object (hand) number of pictures photographed from disappearing to occurring in CCD/CMOS.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, hand is waved to the right will not just the visual field CCD be just stopped out, it may also continue to move right, it is assumed that and 3 photos have been taken, then the time is 0.126 second, entrance the right visual field CCD, which is come back to, from the right has taken 3 photos again, time is 0.126 second, enters from the right and goes 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 solves the problems, such as gesture identification (because much for example finger closes up the shape of hand by the recognition methods that camera carries out gesture identification, finger is opened, 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.It interferes in order to prevent, introduces duration, interval time and number of waving is anti-interference.Usual situation not will form successive projection generally and section time interval have and repeatedly waves if it is interference.
It can be seen that, it is a kind of disclosed in the present embodiment to recognize in the coverage of robot that there are when object by camera based on the robot control method of gesture identification, 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 is currently recognized, there are the duration of object not in values in the coverage of robot or the camera currently identifies
To in the coverage of robot there are object to the camera recognize next time be greater than threshold value there are the time interval of object in the coverage of robot when, gesture identification of waving described in stopping operation;And wave described in the stopping gesture identification operation when, wave number of operations according to record and preset mapping table execute corresponding operation to robot;Wherein, the mapping table, which records, waves number of operations and executes the corresponding relationship operated.Therefore, realize can the gesture identification based on user corresponding operation (such as operation of starting to work or stop working) is executed to robot, 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 that a kind of structural block diagram of the robot controller based on gesture identification, the control device include: in the embodiment of the present invention 3 with reference to Fig. 8
Gesture identification of waving operates starting module 31, for when being detected in the preset range of robot by distance measuring sensor there are when object, then starting gesture identification operation of waving;
Operation judges of waving module 32, for starting wave gesture identification operation after, if the distance measuring sensor currently detected duration in the preset range of robot there are object in values, is recorded as once waving to operate;If the distance measuring sensor is currently detected, there are the duration of object not in values in the preset range of robot, or the distance measuring sensor it is currently detected in the preset range of robot there are object to the distance measuring sensor detect next time be greater than threshold value there are the time interval of object in the preset range of robot when, gesture identification operation of waving described in stopping;
Execution module 33, for wave described in the stopping gesture identification operation when, wave number of operations according to record and preset mapping table execute corresponding operation to robot;Wherein, the mapping table, which records, waves number of operations and executes the corresponding relationship operated.
Wherein, the gesture identification operation starting module of waving is also used to: when detected by distance measuring sensor in the preset range of robot there are object start wave gesture identification operation when, shone by control robot and/or sounding prompt the user to carry out waving to operate.
As shown in figure 9, the operation judges module 32 of waving specifically includes:
First control signal generation unit 321 when the distance measuring sensor is detected in the preset range of robot for the first time there are when object, issues first control signal to start the first timer and starts timing for after gesture identification operation is waved in starting;
Second control signal generation unit 322, for after gesture identification operation is waved in starting, when sending second control signal is there are when object in the preset range of robot to control the first timer reclocking each time for the distance measuring sensor detecting in addition to for the first time;
First judging unit 323, when timing time when first timer receives the second control signal is greater than threshold value, then judging the distance measuring sensor, currently detected there are objects to the distance measuring sensor to detect that there are the time intervals of object greater than threshold value in the preset range of robot next time in the preset range of robot;
Third controls signal generation unit 324, for detecting that there are when object, issue third control signal to start timing to start the second timer in the preset range of robot when the distance measuring sensor moment after gesture identification operation is waved in starting;
4th control signal generation unit 325, for starting after the second timer starts timing, when not detecting in the preset range of robot there are the 4th control signal when object, is issued to stop second timer distance measuring sensor moment;And
Second judgment unit 326, it is fallen into the values for the timing time when second timer receives the 4th control signal, then judges the distance measuring sensor currently detected duration in the preset range of robot there are object in values;Otherwise judging the distance measuring sensor, currently detected there are the duration of object not in values in the preset range of robot.
When it is implemented, the operation judges module of waving starts/stops the gesture identification operation of waving by issuing a riming instructions, control instruction or switch order.
Preferably, the values are greater than the threshold value.The distance measuring sensor is located at the top of the robot.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 and above-described embodiment 1 of robot controller based on gesture identification disclosed in this implementation are consistent, and detailed process please refers to above-described embodiment 1, and details are not described herein.
It is that a kind of structural block diagram of the robot controller based on gesture identification, the control device include: in the embodiment of the present invention 4 with reference to Figure 10
Gesture identification of waving operates starting module 41, for when being recognized in the coverage of robot by camera there are when object, then starting gesture identification operation of waving;
Operation judges of waving module 42, for if the camera currently recognizes the duration in the coverage of robot there are object in values, being recorded as once waving to operate after gesture identification operation is waved in starting;If the camera currently recognizes in the coverage of robot, there are the duration of object not in values, or the camera currently recognize in the coverage of robot there are object to the camera recognize next time be greater than threshold value there are the time interval of object in the coverage of robot when, gesture identification of waving described in stopping operation;And
Execution module 43, for wave described in the stopping gesture identification operation when, wave number of operations according to record and preset mapping table execute corresponding operation to robot;Wherein, the mapping table, which records, waves number of operations and executes the corresponding relationship operated.
Wherein, wave gesture identification operation starting module 41 in, by camera recognize in the coverage of robot exist object refer to, the shooting area that moment has object to have passed through camera.Specifically it can whether there is object (for example, hand) in coverage of the pass-through mode to identify camera:
Mode A: robot is in halted state, camera is taken pictures according to predeterminated frequency, photo is opened in the front and back two that camera is continuously shot to compare, if the matching degree that photo is opened in front and back two is relatively high (being greater than the set value), it is identified as that object is not present in the coverage of robot;If front and back two, which is opened, has apparent difference (matching degree be less than setting value), it is identified as in the coverage of robot that there are objects.
Mode B: robot is kept in motion, camera is taken pictures according to predeterminated frequency, photo is opened in the front and back two that camera is continuously shot to compare, if front and back shoots two photos and there was only faint translation difference, is identified as that object is not present in the coverage of robot;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 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: when recognized by camera in the coverage of robot there are object start wave gesture identification operation when, shone by control robot and/or sounding prompt the user to carry out waving to operate.
As shown in figure 11, the operation judges module 42 of waving specifically includes:
First frame counting number unit 421, filming frequency based on the camera, by judging that the camera recognizes in the coverage of robot from having to without there are object, is recognized to the camera and there is the frame number that object is passed through from scratch in the coverage of robot time interval is calculated;
First judging unit 422, recognize in the coverage of robot that there are the time intervals of object greater than threshold value next time there are object to the camera for when the time interval is greater than threshold value, then judging that the camera currently recognizes in the coverage of robot;
Second frame number counting unit 423, filming frequency based on the camera, it by judging the camera recognizes and there is object from scratch in the coverage of robot, recognized in the coverage of robot from having the duration is being calculated without the frame number passed through there are object to the camera;And
Second judgment unit 424, falls into the values when the duration, then judges the distance measuring sensor currently detected duration in the coverage of robot there are object in values;Otherwise judging the distance measuring sensor, currently detected 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 starts/stops the gesture identification operation of waving by issuing a riming instructions, control instruction or switch order.
As the improvement of the present embodiment, the values are greater than the threshold value.The camera is located at the top of the robot.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 and above-described embodiment 2 of robot controller based on gesture identification disclosed in this implementation are consistent, and 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 the robot controller of gesture identification.
It should be noted that, the apparatus embodiments described above are merely exemplary, wherein the unit as illustrated by the separation member may or may not be physically separated, component shown as a unit may or may not be physical unit, can be in one place, or may be distributed over multiple network units.Some or all of the modules therein can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.In addition, connection relationship between module indicates there is communication connection between them in Installation practice attached drawing provided by the invention, one or more communication bus or signal wire specifically can be implemented as.Those of ordinary skill in the art can understand and implement without creative efforts.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention can add by software it is required
The mode of common hardware is realized, naturally it is also possible to be realized by the way that specialized hardware includes specific integrated circuit, dedicated cpu, private memory, special components and parts etc..Under normal circumstances, several functions of being completed by computer program can be realized easily with corresponding hardware, moreover, it is diversified for realizing that the specific hardware structure of same function is also possible to, such as analog circuit, digital circuit or special circuit etc..But software program realization is more preferably embodiment in situations more for the purpose of the present invention.Based on this understanding, substantially the part that contributes to existing technology can be embodied in the form of software products technical solution of the present invention in other words, the computer software product stores in a readable storage medium, such as the floppy disk of computer, USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc., it uses including some instructions so that a computer equipment (can be personal computer, server, or network equipment etc.) execute method described in each embodiment of the present invention.
The above is a preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, without departing from the principle of the present invention; several improvements and modifications can also be made, these modifications and embellishments are also considered to be within the scope of the present invention.