def test_fileDoesNotExist(self):
     rospack = rospkg.RosPack()
     face_service = rospy.get_param("rapp_face_detection_detect_faces_topic")
     rospy.wait_for_service(face_service)
     fd_service = rospy.ServiceProxy(face_service, FaceDetectionRosSrv)
     req = FaceDetectionRosSrvRequest()
     req.imageFilename = rospack.get_path('rapp_testing_tools') + \
             '/test_data/qr_code_rapp.png'
     response = fd_service(req)
     faces_num = len(response.faces_up_left)
     self.assertEqual( faces_num, 0 )
 def test_faceExists_realistic_2(self):
     rospack = rospkg.RosPack()
     face_service = rospy.get_param("rapp_face_detection_detect_faces_topic")
     rospy.wait_for_service(face_service)
     fd_service = rospy.ServiceProxy(face_service, FaceDetectionRosSrv)
     req = FaceDetectionRosSrvRequest()
     req.imageFilename = rospack.get_path('rapp_testing_tools') + \
             '/test_data/face_samples/klpanagi_medium_straight.jpg'
     response = fd_service(req)
     faces_num = len(response.faces_up_left)
     self.assertEqual( faces_num, 1 )
 def test_faceExists_stress(self):
     rospack = rospkg.RosPack()
     face_service = rospy.get_param("rapp_face_detection_detect_faces_topic")
     rospy.wait_for_service(face_service)
     fd_service = rospy.ServiceProxy(face_service, FaceDetectionRosSrv)
     req = FaceDetectionRosSrvRequest()
     req.imageFilename = rospack.get_path('rapp_testing_tools') + \
             '/test_data/Lenna.png'
     for i in range(0, 20):
         response = fd_service(req)
         faces_num = len(response.faces_up_left)
         self.assertEqual( faces_num, 1 )
示例#4
0
 def test_fileDoesNotExist(self):
     rospack = rospkg.RosPack()
     face_service = rospy.get_param(
         "rapp_face_detection_detect_faces_topic")
     rospy.wait_for_service(face_service)
     fd_service = rospy.ServiceProxy(face_service, FaceDetectionRosSrv)
     req = FaceDetectionRosSrvRequest()
     req.imageFilename = rospack.get_path('rapp_testing_tools') + \
             '/test_data/qr_code_rapp.png'
     response = fd_service(req)
     faces_num = len(response.faces_up_left)
     self.assertEqual(faces_num, 0)
示例#5
0
 def test_faceExists_realistic_2(self):
     rospack = rospkg.RosPack()
     face_service = rospy.get_param(
         "rapp_face_detection_detect_faces_topic")
     rospy.wait_for_service(face_service)
     fd_service = rospy.ServiceProxy(face_service, FaceDetectionRosSrv)
     req = FaceDetectionRosSrvRequest()
     req.imageFilename = rospack.get_path('rapp_testing_tools') + \
             '/test_data/face_samples/klpanagi_medium_straight.jpg'
     response = fd_service(req)
     faces_num = len(response.faces_up_left)
     self.assertEqual(faces_num, 1)
示例#6
0
 def test_faceExists_stress(self):
     rospack = rospkg.RosPack()
     face_service = rospy.get_param(
         "rapp_face_detection_detect_faces_topic")
     rospy.wait_for_service(face_service)
     fd_service = rospy.ServiceProxy(face_service, FaceDetectionRosSrv)
     req = FaceDetectionRosSrvRequest()
     req.imageFilename = rospack.get_path('rapp_testing_tools') + \
             '/test_data/Lenna.png'
     for i in range(0, 20):
         response = fd_service(req)
         faces_num = len(response.faces_up_left)
         self.assertEqual(faces_num, 1)