lightstereo_depth
Attributes
Classes
A Python based gstreamer plugin template. Enables the user to: |
Module Contents
- lightstereo_depth.plugin_name = 'lightstereo_depth'
- class lightstereo_depth.Constants
- OUT_BFFERSIZE = 0
- PAD_TOP = 168
- PAD_BOTTOM = 168
- PAD_RIGHT = 16
- PAD_LEFT = 16
- class lightstereo_depth.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
- unpack_shapes = [479232, 15335424]
- output_shapes = [[1, 96, 312, 8], [1, 384, 1248, 16]]
- bin_map
- cbins
- color_values
- frame_count = 0
- cvt_obj
- build_lut(resolution=1024)
Precompute a lookup table mapping disparity [0,1] to color values.
- disp_map(disp)
Map disparity values to color values using a precomputed LUT.
- 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].
- simple_upsample(init_disp, target_height=384, target_width=1248)
- 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