Browse Source

ready to coding...

Diegoinsh 4 years ago
parent
commit
affd8535f5
1 changed files with 10 additions and 0 deletions
  1. 10 0
      ros_code/src/face_location_tracker/src/face_location.py

+ 10 - 0
ros_code/src/face_location_tracker/src/face_location.py

@@ -63,12 +63,22 @@ class FaceLocation():
 
             process_this_frame = process_this_frame + 1
 
+            # 超时没有检测到人脸则自动移动到原始位置
             if (len(face_locations) == 0 and (not onceMoveOrgDeg)):
                 checkTime = rospy.get_time()
                 if((checkTime-recordTime) > self.face_detect_timeout):
                     self.moveServoOrgDeg()
                     onceMoveOrgDeg = True
 
+            """
+            此处可以加入自己的行为检测代码,比如眨眼、张嘴等
+            """
+
+
+            """
+            自定义代码结束
+            """
+
             # calculate face center ready to move servo
             for (top, right, bottom, left) in face_locations:
                 onceMoveOrgDeg = False