Struct flydra_feature_detector_types::ImPtDetectCfg

source ·
pub struct ImPtDetectCfg {
Show 14 fields pub do_update_background_model: bool, pub polarity: ContrastPolarity, pub alpha: f32, pub n_sigma: f32, pub bright_non_gaussian_cutoff: u8, pub bright_non_gaussian_replacement: u8, pub bg_update_interval: u32, pub diff_threshold: u8, pub use_cmp: bool, pub max_num_points: u16, pub feature_window_size: u16, pub clear_fraction: f32, pub despeckle_threshold: u8, pub valid_region: Shape,
}
Expand description

Configuration parameters for feature detection.

These parameters are used in the 2D feature detection step. As such, they are used to parameterize how incoming images are analyzed so that relevant features are extracted and sent onwards for consideration as candidates for 3D tracking.

Fields§

§do_update_background_model: bool

Switch whether to continuously update the background model or not.

§polarity: ContrastPolarity

What kind of difference from the background model to detect.

§alpha: f32

How much to weight the update of the background model.

Valid range is 0.0 - 1.0. 0.0 means never update, 1.0 means complete replacement on every update.

§n_sigma: f32

Number of standard deviations a pixel must differ by to be detected.

Used when use_cmp is true. No effect when use_cmp is false. Valid range is 0.0 - infinity. 0.0 means any difference is detected, large value means only large deviations from mean are detected.

§bright_non_gaussian_cutoff: u8

(used when use_cmp is true)

§bright_non_gaussian_replacement: u8

(used when use_cmp is true)

§bg_update_interval: u32

How often to update the background model, in number of frames.

Valid range is 0-4294967295.

§diff_threshold: u8

This is the absolute difference required to detect a point. (For both use_cmp true and false.)

§use_cmp: bool

If use_cmp is true, use n_sigma based difference.

§max_num_points: u16

How many points above threshold can be detected.

§feature_window_size: u16

Half the width (and half the height) of the analysis region. In pixels.

§clear_fraction: f32

Reduces moment arm when detecting pixels.

The result of this computation or despecked_threshold is used, whichever is larger. Fraction of the maximum difference value in pixel intensity. Valid range is 0.0 - 1.0. 0.0 means the value is 0, 1.0 means the value used is the maximum difference in pixel intensity between the current image and the mean of the background model.

§despeckle_threshold: u8

Reduces moment arm when detecting pixels.

This value or the result of the clear_fraction computation is used, whichever is larger. Intensity difference value. Value range is 0-255.

§valid_region: Shape

The shape of the reason over which detected points are checked.

Trait Implementations§

source§

impl Clone for ImPtDetectCfg

source§

fn clone(&self) -> ImPtDetectCfg

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ImPtDetectCfg

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ImPtDetectCfg

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for ImPtDetectCfg

source§

fn eq(&self, other: &ImPtDetectCfg) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ImPtDetectCfg

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for ImPtDetectCfg

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,