realsense_rust/kind/
hole_filling.rs

1//! Enumeration of methods that can be used to fill invalid pixels.
2//!
3//! The filter implements several methods to rectify missing data in the resulting image.
4//! The filter obtains the four immediate pixel "neighbors" (up, down ,left, right), and
5//! selects one of them according to a user-defined rule.
6//!
7//! See the [RealSense post-processing documentation](https://dev.intelrealsense.com/docs/post-processing-filters)
8//! for more information.
9
10use num_derive::{FromPrimitive, ToPrimitive};
11
12/// A type describing the method that will be used to fill invalid pixels.
13#[repr(usize)]
14#[derive(FromPrimitive, ToPrimitive, Debug, Clone, Copy, PartialEq, Eq, Hash)]
15pub enum HoleFillingMode {
16    /// Use the value from the left neighbor pixel to fill the hole.
17    FillFromLeft = 0,
18    /// Use the value from the neighboring pixel which is furthest away from the sensor.
19    FarestFromAround = 1,
20    /// Use the value from the neighboring pixel closest to the sensor.
21    NearestFromAround = 2,
22}