robokudo.vis.cv_visualizer ========================== .. py:module:: robokudo.vis.cv_visualizer .. autoapi-nested-parse:: OpenCV-based visualization for RoboKudo pipelines. This module provides OpenCV-based visualization capabilities for RoboKudo pipelines. It handles: * 2D image visualization with annotator overlays * Mouse interaction handling * Keyboard controls for navigation and control * Window management * Pipeline state visualization Dependencies ----------- * cv2 for image display and window management * numpy for image manipulation * py_trees for behavior tree integration * robokudo.annotators for annotator access * robokudo.vis.visualizer for base visualization interface See Also -------- * :mod:`robokudo.vis.visualizer` : Base visualization interface * :mod:`robokudo.vis.o3d_visualizer` : 3D visualization * :mod:`robokudo.vis.ros_visualizer` : ROS-based visualization Classes ------- .. autoapisummary:: robokudo.vis.cv_visualizer.CVVisualizer Module Contents --------------- .. py:class:: CVVisualizer(*args, **kwargs) Bases: :py:obj:`robokudo.vis.visualizer.Visualizer`, :py:obj:`robokudo.vis.visualizer.Visualizer.Observer` OpenCV-based visualizer for 2D image data. This class provides visualization of 2D image data from pipeline annotators using OpenCV windows. It supports: * Image display with annotator overlays * Mouse interaction handling * Keyboard navigation between annotators * Window management * Shared visualization state Parameters ---------- *args Variable length argument list passed to parent classes **kwargs Arbitrary keyword arguments passed to parent classes Attributes ---------- shared_visualizer_state : Visualizer.SharedState Shared state object for coordinating between visualizers update_output : bool Flag indicating if display needs updating .. py:method:: tick() Update the visualization display. This method: * Gets current annotator outputs * Updates display if needed * Renders annotator name overlay * Manages OpenCV window .. py:method:: mouse_callback_cv(event, x, y, flags, param) Mouse callback for the 2D Visualizer. Prints double click events and forwards every event to the active annotator. :param event: OpenCV mouse event type :type event: int :param x: X coordinate of mouse event :type x: int :param y: Y coordinate of mouse event :type y: int :param flags: OpenCV event flags :type flags: int :param param: Additional parameters (unused) :type param: any .. py:method:: window_title() Get the window title for this visualizer. :returns: Window title in format "RoboKudo/pipeline_name" :rtype: str .. py:method:: notify(observable, *args, **kwargs) Handle notification of state changes. :param observable: The object that sent the notification :type observable: object .. py:method:: static_post_tick() :staticmethod: Handle keyboard input after visualization update. This method: * Checks for keyboard input * Routes input to appropriate visualizer * Handles termination requests .. py:method:: get_gui_handler_for_detected_key() :staticmethod: Get the visualizer instance for the focused window. :returns: The visualizer instance for the focused window, or None if not found :rtype: Optional[CVVisualizer] .. py:method:: handle_keycallback(key) Handle a key-press that happened in the corresponding GUI of this GUIHandler. :param key: An ASCII char :type key: int :return: false if GUI reports abort (right now this only happens when ESC is pressed) :rtype: bool