pub struct SpatialAdvancedFilter { /* private fields */ }Expand description
Spatial Advanced Filter
This filter smooths the depth frame while preserving edges. It uses a more advanced algorithm with more parameters to tune.
Implementations§
Source§impl SpatialAdvancedFilter
impl SpatialAdvancedFilter
Sourcepub fn new() -> Result<Self, OrbbecError>
pub fn new() -> Result<Self, OrbbecError>
Create a new spatial advanced filter.
Sourcepub fn set_alpha(&mut self, alpha: f32) -> Result<(), OrbbecError>
pub fn set_alpha(&mut self, alpha: f32) -> Result<(), OrbbecError>
Set the filter alpha parameter.
Alpha is the weight of a pixel vs neighbors of the same surface.
§Arguments
alpha- The alpha value. Usually between 0.1 and 1.0.
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.
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 missing pixels will be filled in.
§Arguments
radius- The radius value. Usually between 0 and 8.
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 5.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpatialAdvancedFilter
impl RefUnwindSafe for SpatialAdvancedFilter
impl !Send for SpatialAdvancedFilter
impl !Sync for SpatialAdvancedFilter
impl Unpin for SpatialAdvancedFilter
impl UnwindSafe for SpatialAdvancedFilter
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