def _yield_detection(self, detection): screen_pos = tuple(detection["screen_pos"]) frame_index = detection["index"] timestamp = detection["timestamp"] reference_location = model.ReferenceLocation(screen_pos, frame_index, timestamp) self.on_yield(reference_location)
def _add_reference(self, pos): screen_pos = tuple(pos) frame_index = self._get_current_frame_index() timestamp = self._all_timestamps[frame_index] reference_location = model.ReferenceLocation(screen_pos, frame_index, timestamp) self._reference_location_storage.add(reference_location)