diff options
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() |