diff options
author | Théo de la Hogue | 2024-06-19 14:06:17 +0200 |
---|---|---|
committer | Théo de la Hogue | 2024-06-19 14:06:17 +0200 |
commit | 0ca3a8f96860192202a45b9be96d1a9b32d72c89 (patch) | |
tree | 70ed169fd977975818f486375ec23cc7430ea444 /src | |
parent | 51ff48fb59b2ee49226c2757d3826ec29ccf7b33 (diff) | |
download | argaze-0ca3a8f96860192202a45b9be96d1a9b32d72c89.zip argaze-0ca3a8f96860192202a45b9be96d1a9b32d72c89.tar.gz argaze-0ca3a8f96860192202a45b9be96d1a9b32d72c89.tar.bz2 argaze-0ca3a8f96860192202a45b9be96d1a9b32d72c89.tar.xz |
Removing map processing temporary. Adding new draw_pipeline option.
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/ArFeatures.py | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py index 4e19466..c5d1e4b 100644 --- a/src/argaze/ArFeatures.py +++ b/src/argaze/ArFeatures.py @@ -1481,6 +1481,7 @@ class ArCamera(ArFrame): # Define default ArContext image parameters DEFAULT_ARCONTEXT_IMAGE_PARAMETERS = { + "draw_pipeline": True, "draw_times": True, "draw_exceptions": True } @@ -1638,15 +1639,13 @@ class ArContext(DataFeatures.PipelineStepObject): self.__pipeline.watch(DataFeatures.TimestampedImage(image, timestamp=timestamp)) - - self.__pipeline.map(timestamp=timestamp) - except DataFeatures.TimestampedException as e: logging.warning('%s._process_camera_image: %s', DataFeatures.get_class_path(self), e) self.__exceptions.append(e) + ''' # TODO: make map step optional try: @@ -1659,6 +1658,7 @@ class ArContext(DataFeatures.PipelineStepObject): logging.warning('%s._process_camera_image: %s', DataFeatures.get_class_path(self), e) self.__exceptions.append(e) + ''' else: @@ -1687,20 +1687,30 @@ class ArContext(DataFeatures.PipelineStepObject): return watch_time, self.__process_camera_image_frequency @DataFeatures.PipelineStepImage - def image(self, draw_times: bool = None, draw_exceptions: bool = None): + def image(self, draw_pipeline: bool = True, draw_times: bool = True, draw_exceptions: bool = True): """ Get pipeline image with execution information. Parameters: + draw_pipeline: draw pipeline image if True else only pipeline background draw_times: draw pipeline execution times draw_exceptions: draw pipeline exception messages """ logging.debug('ArContext.image %s', self.name) - image = self.__pipeline.image() - height, width, _ = image.shape + if draw_pipeline: + + image = self.__pipeline.image() + height, width, _ = image.shape + + logging.debug('\t> get image (%i x %i)', width, height) + + else: + + image = self.__pipeline.background + height, width, _ = image.shape - logging.debug('\t> get image (%i x %i)', width, height) + logging.debug('\t> get background (%i x %i)', width, height) last_position = self.__pipeline.last_gaze_position() |