def _cam_humans_2_person_list(self, humansFromCam): new_person_list = [] for cam_person in humansFromCam.humanList: detected_person = Person() #TODO: is the camera id the one we assume for the person? How we update this? detected_person.person_id = cam_person.id detected_person.confidence = cam_person.confidence detected_person.cameras.append(humansFromCam.idCamera) detected_person.initialice_tracker( Position2D(cam_person.pos.x, cam_person.pos.z)) new_person_list.append(detected_person) return new_person_list
def from_ice_struct(humansFromCam): # struct humansDetected # { # int idCamera; # long timeStamp; # personList humanList; # }; new_camera_frame = CameraFrame() new_camera_frame.id_camera = humansFromCam.idCamera new_camera_frame.timestamp = humansFromCam.timeStamp new_camera_frame.person_list = [] for cam_person in humansFromCam.humanList: detected_person = Person() # TODO: is the camera id the one we assume for the person? How we update this? detected_person.person_id = cam_person.id detected_person.confidence = cam_person.pos.confidence detected_person.cameras.append(humansFromCam.idCamera) detected_person.initialice_tracker(Position2D(cam_person.pos.x, cam_person.pos.z)) new_camera_frame.person_list.append(detected_person) return new_camera_frame