pub struct SpatialModerateFilter { /* private fields */ }Expand description
Spatial Moderate Filter
This filter smooths the depth frame while preserving edges. It uses an optimized average smoothing algorithm and is a balance between speed and quality.
Implementations§
Source§impl SpatialModerateFilter
impl SpatialModerateFilter
Sourcepub fn new() -> Result<Self, OrbbecError>
pub fn new() -> Result<Self, OrbbecError>
Create a new spatial moderate filter.
Sourcepub fn set_radius(&mut self, radius: u16) -> Result<(), OrbbecError>
pub fn set_radius(&mut self, radius: u16) -> Result<(), OrbbecError>
Set the filter radius parameter.
Radius is how many neighbors will be considered for smoothing.
§Arguments
radius- The radius value. Usually between 3 and 7.
Sourcepub fn set_magnitude(&mut self, magnitude: u8) -> Result<(), OrbbecError>
pub fn set_magnitude(&mut self, magnitude: u8) -> Result<(), OrbbecError>
Set the filter magnitude parameter.
Magnitude is the strength of the filter.
§Arguments
magnitude- The magnitude value. Usually between 1 and 3.
Sourcepub fn set_threshold(&mut self, threshold: u16) -> Result<(), OrbbecError>
pub fn set_threshold(&mut self, threshold: u16) -> Result<(), OrbbecError>
Set the filter threshold parameter.
Threshold is the maximum difference between pixels to be considered part of the same surface.
§Arguments
threshold- The threshold value. Usually between 1 and 10000.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpatialModerateFilter
impl RefUnwindSafe for SpatialModerateFilter
impl !Send for SpatialModerateFilter
impl !Sync for SpatialModerateFilter
impl Unpin for SpatialModerateFilter
impl UnwindSafe for SpatialModerateFilter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more