MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / FaceRecognitionNode

Class FaceRecognitionNode

recognition/scripts/face_recognition_node.py:18–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17
18class FaceRecognitionNode:
19 def __init__(self):
20 self.load_parameters()
21
22 subscribers = [
23 message_filters.Subscriber('/detector/detections', DetectionArray),
24 message_filters.Subscriber('/face_feature_extractor/features', FeatureVectorArray)
25 ]
26
27 # TypeSynchronizer doesn't work, the image time and the detection time are slightly different?
28 # self.ts = message_filters.TimeSynchronizer(subscribers, 5)
29 self.ts = message_filters.ApproximateTimeSynchronizer(subscribers, 5, 0.0001)
30 self.ts.registerCallback(self.callback)
31
32 # load parameters from somewhere
33 def load_parameters(self):
34 package_path = rospkg.RosPack().get_path('recognition')
35
36 # callback
37 def callback(self, people_detection_msg, face_features_msg):
38 print 'receive'
39
40
41def main():

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected