lightstereo_depth ================= .. py:module:: lightstereo_depth Attributes ---------- .. autoapisummary:: lightstereo_depth.plugin_name Classes ------- .. autoapisummary:: lightstereo_depth.Constants lightstereo_depth.MyPlugin Module Contents --------------- .. py:data:: plugin_name :value: 'lightstereo_depth' .. py:class:: Constants .. py:attribute:: OUT_BFFERSIZE :value: 0 .. py:attribute:: PAD_TOP :value: 168 .. py:attribute:: PAD_BOTTOM :value: 168 .. py:attribute:: PAD_RIGHT :value: 16 .. py:attribute:: PAD_LEFT :value: 16 .. py:class:: MyPlugin A Python based gstreamer plugin template. Enables the user to: - Accept incoming buffers from dynamic pads - Define any custom plugin runtime logic User has to only override the run() function .. py:attribute:: unpack_shapes :value: [479232, 15335424] .. py:attribute:: output_shapes :value: [[1, 96, 312, 8], [1, 384, 1248, 16]] .. py:attribute:: bin_map .. py:attribute:: cbins .. py:attribute:: color_values .. py:attribute:: frame_count :value: 0 .. py:attribute:: cvt_obj .. py:method:: build_lut(resolution=1024) Precompute a lookup table mapping disparity [0,1] to color values. .. py:method:: disp_map(disp) Map disparity values to color values using a precomputed LUT. .. py:method:: disp_to_color(disp, max_disp=None) Convert disparity map to a color image. The disparity is normalized by max_disp, mapped to color, then scaled to [0, 255]. .. py:method:: simple_upsample(init_disp, target_height=384, target_width=1248) .. py:method:: run(input_buffers: List[python_plugin_template.SimaaiPythonBuffer], output_buffer: bytes) -> None Define your plugin logic HERE Inputs: input_buffers List[SimaaiPythonBuffer]: List of input buffers Object of class SimaaiPythonBuffer has three fields: 1. metadata MetaStruct Refer to the structure above 2. data bytes - raw bytes of the incoming buffer 3. size int - size of incoming buffer in bytes