oakutils.filters package
Submodules
oakutils.filters.smoothing module
Module for filters which smooth numpy arrays.
Classes
- ExpSmooth
A class for exponentially smoothing numpy arrays.
- class oakutils.filters.smoothing.ExpSmooth(alpha: float = 0.9)
Bases:
objectA class for exponentially smoothing numpy arrays.
- smooth()
Use to smooth a numpy array.
oakutils.filters.wls module
Module for using the WLS filter on disparity images.
Classes
- WLSFilter
A class for computing the weighted-least-squares filter, on disparity images.
- class oakutils.filters.wls.WLSFilter(cam_data: StereoCalibrationData, lamb: int = 8000, sigma: float = 1.0, disp_levels: int = 96)
Bases:
objectA class for computing the weighted-least-squares filter on disparity images.
- filter_frame(disparity: np.ndarray, mono_frame: np.ndarray, *, use_mono_left: bool | None = None) tuple[np.ndarray, np.ndarray]
Use to filter the disparity image.
- Parameters:
disparity (np.ndarray) – The disparity image to filter.
mono_frame (np.ndarray) – The mono frame to use for the filter.
use_mono_left (bool) – Whether to use the left mono frame. Defaults to True.
- Returns:
np.ndarray – The filtered disparity image.
np.ndarray – The new depth image.
Module contents
Module for performing filtering on typical datatypes.
Submodules
- wls
Module for performing WLS filtering.
Classes
- WLSFilter
A class for computing the weighted-least-squares filter, on disparity images.
- class oakutils.filters.WLSFilter(cam_data: StereoCalibrationData, lamb: int = 8000, sigma: float = 1.0, disp_levels: int = 96)
Bases:
objectA class for computing the weighted-least-squares filter on disparity images.
- filter_frame(disparity: np.ndarray, mono_frame: np.ndarray, *, use_mono_left: bool | None = None) tuple[np.ndarray, np.ndarray]
Use to filter the disparity image.
- Parameters:
disparity (np.ndarray) – The disparity image to filter.
mono_frame (np.ndarray) – The mono frame to use for the filter.
use_mono_left (bool) – Whether to use the left mono frame. Defaults to True.
- Returns:
np.ndarray – The filtered disparity image.
np.ndarray – The new depth image.