robokudo.annotators.image_preprocessor ====================================== .. py:module:: robokudo.annotators.image_preprocessor .. autoapi-nested-parse:: Image preprocessing and point cloud generation. This module provides an annotator for: * Converting RGB-D camera data to point clouds * Handling color and depth image synchronization * Managing camera intrinsic parameters * Providing visualization modes for debugging .. note:: Depth values are expected to be in millimeters. Classes ------- .. autoapisummary:: robokudo.annotators.image_preprocessor.ImagePreprocessorAnnotator Module Contents --------------- .. py:class:: ImagePreprocessorAnnotator(name='ImagePreprocessor', descriptor=Descriptor()) Bases: :py:obj:`robokudo.annotators.core.BaseAnnotator` RGB-D image preprocessor and point cloud generator. This annotator: * Converts RGB-D camera data to point clouds * Handles color/depth image synchronization * Manages camera intrinsic parameters * Provides visualization modes for debugging .. warning:: Requires properly configured camera intrinsics and color-to-depth ratio. .. py:class:: ViewMode Visualization mode enumeration. :cvar color: Display color image (1) :type color: int :cvar depth: Display depth image (2) :type depth: int .. py:attribute:: color :value: 1 .. py:attribute:: depth :value: 2 .. py:class:: Descriptor Bases: :py:obj:`robokudo.annotators.core.BaseAnnotator.Descriptor` Configuration descriptor for image preprocessing. .. py:class:: Parameters Parameters for configuring preprocessing. :ivar depth_trunc: Maximum depth distance in meters, points beyond are discarded :type depth_trunc: float .. py:attribute:: depth_trunc :value: 9.0 .. py:attribute:: parameters .. py:attribute:: color :value: None .. py:attribute:: depth :value: None .. py:attribute:: display_mode :value: 1 .. py:method:: update() Process RGB-D images and generate point cloud. The method: * Loads color and depth images from CAS * Synchronizes and scales images * Converts to Open3D format * Generates point cloud * Updates visualization based on view mode :return: SUCCESS after processing :rtype: py_trees.Status :raises RuntimeError: If color-to-depth ratio is not set .. py:method:: key_callback(key) Handle keyboard input for view mode switching. :param key: ASCII value of pressed key :type key: int Available keys: * '1': Switch to color view mode * '2': Switch to depth view mode