robokudo.io.camera_without_depth_interface ========================================== .. py:module:: robokudo.io.camera_without_depth_interface .. autoapi-nested-parse:: OpenCV camera interface for RGB-only devices in RoboKudo. This module provides an interface for OpenCV-compatible cameras and video sources that only provide RGB data without depth information. It supports: * Live camera streams * Video file playback * Single image loading * Contrast/brightness normalization * Configurable looping behavior The module is used for: * USB webcams * IP cameras * Video file playback * Image sequence processing Attributes ---------- .. autoapisummary:: robokudo.io.camera_without_depth_interface.TYPE_VIDEO robokudo.io.camera_without_depth_interface.TYPE_CAMERA robokudo.io.camera_without_depth_interface.TYPE_IMAGE Classes ------- .. autoapisummary:: robokudo.io.camera_without_depth_interface.OpenCVCameraWithoutDepthInterface Module Contents --------------- .. py:data:: TYPE_VIDEO :type: int :value: 0 .. py:data:: TYPE_CAMERA :type: int :value: 1 .. py:data:: TYPE_IMAGE :type: int :value: 2 .. py:class:: OpenCVCameraWithoutDepthInterface(camera_config) Bases: :py:obj:`robokudo.io.camera_interface.CameraInterface` An openCV camera without depth information. An OpenCV-based interface for RGB-only cameras and video sources. This class handles various types of RGB input sources through OpenCV: * Live camera feeds (USB webcams, IP cameras) * Video file playback * Single image or image sequence loading Supports features like: * Automatic input type detection * Configurable frame looping * Image normalization * Static camera calibration :ivar video_capture: OpenCV video capture object :type video_capture: cv2.VideoCapture :ivar device_driver_flag: OpenCV-specific driver flags :type device_driver_flag: int :ivar stream_type: Type of input (video/camera/image) :type stream_type: int :ivar _loop_counter: Number of remaining playback loops :type _loop_counter: int :ivar _backup_color: Backup of image for single-image mode :type _backup_color: numpy.ndarray or None .. py:attribute:: video_capture .. py:attribute:: device_driver_flag .. py:attribute:: stream_type :value: 0 .. py:attribute:: _loop_counter .. py:attribute:: _backup_color :value: None .. py:method:: has_new_data() Check if new frame data is available. For video/camera streams, attempts to grab the next frame. For single images, checks if backup image is available. :return: True if new data is available, False otherwise :rtype: bool .. py:method:: set_data(cas: robokudo.cas.CAS) Update the Common Analysis Structure with latest frame data. This method: * Retrieves the next frame from video/camera or backup * Handles looping behavior for videos and images * Applies optional contrast/brightness normalization * Updates the CAS with frame and camera data :param cas: Common Analysis Structure to update :type cas: robokudo.cas.CAS