Struct ERStat

Source
pub struct ERStat { /* private fields */ }
Expand description

The ERStat structure represents a class-specific Extremal Region (ER).

An ER is a 4-connected set of pixels with all its grey-level values smaller than the values in its outer boundary. A class-specific ER is selected (using a classifier) from all the ER’s in the component tree of the image. :

Implementations§

Source§

impl ERStat

Source

pub fn new(level: i32, pixel: i32, x: i32, y: i32) -> Result<ERStat>

Constructor

§C++ default parameters
  • level: 256
  • pixel: 0
  • x: 0
  • y: 0
Source

pub fn new_def() -> Result<ERStat>

Constructor

§Note

This alternative version of [new] function uses the following default values for its arguments:

  • level: 256
  • pixel: 0
  • x: 0
  • y: 0

Trait Implementations§

Source§

impl Boxed for ERStat

Source§

unsafe fn from_raw(ptr: <ERStat as OpenCVFromExtern>::ExternReceive) -> Self

Wrap the specified raw pointer Read more
Source§

fn into_raw(self) -> <ERStat as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying raw pointer while consuming this wrapper. Read more
Source§

fn as_raw(&self) -> <ERStat as OpenCVTypeExternContainer>::ExternSend

Return the underlying raw pointer. Read more
Source§

fn as_raw_mut(&mut self) -> <ERStat as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying mutable raw pointer Read more
Source§

impl Debug for ERStat

Source§

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

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

impl Drop for ERStat

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl ERStatTrait for ERStat

Source§

fn as_raw_mut_ERStat(&mut self) -> *mut c_void

Source§

fn set_pixel(&mut self, val: i32)

seed point and the threshold (max grey-level value)
Source§

fn set_level(&mut self, val: i32)

Source§

fn set_area(&mut self, val: i32)

incrementally computable features
Source§

fn set_perimeter(&mut self, val: i32)

Source§

fn set_euler(&mut self, val: i32)

Euler’s number
Source§

fn set_rect(&mut self, val: Rect)

Source§

fn raw_moments_mut(&mut self) -> &mut [f64; 2]

order 1 raw moments to derive the centroid
Source§

fn central_moments_mut(&mut self) -> &mut [f64; 3]

order 2 central moments to construct the covariance matrix
Source§

fn set_med_crossings(&mut self, val: f32)

median of the crossings at three different height levels
Source§

fn set_hole_area_ratio(&mut self, val: f32)

2nd stage features
Source§

fn set_convex_hull_ratio(&mut self, val: f32)

Source§

fn set_num_inflexion_points(&mut self, val: f32)

Source§

fn set_probability(&mut self, val: f64)

probability that the ER belongs to the class we are looking for
Source§

fn parent(&mut self) -> ERStat

pointers preserving the tree structure of the component tree
Source§

fn set_parent(&mut self, val: &impl ERStatTraitConst)

pointers preserving the tree structure of the component tree
Source§

fn child(&mut self) -> ERStat

Source§

fn set_child(&mut self, val: &impl ERStatTraitConst)

Source§

fn next(&mut self) -> ERStat

Source§

fn set_next(&mut self, val: &impl ERStatTraitConst)

Source§

fn prev(&mut self) -> ERStat

Source§

fn set_prev(&mut self, val: &impl ERStatTraitConst)

Source§

fn set_local_maxima(&mut self, val: bool)

whenever the regions is a local maxima of the probability
Source§

fn max_probability_ancestor(&mut self) -> ERStat

Source§

fn set_max_probability_ancestor(&mut self, val: &impl ERStatTraitConst)

Source§

fn min_probability_ancestor(&mut self) -> ERStat

Source§

fn set_min_probability_ancestor(&mut self, val: &impl ERStatTraitConst)

Source§

impl ERStatTraitConst for ERStat

Source§

fn as_raw_ERStat(&self) -> *const c_void

Source§

fn pixel(&self) -> i32

seed point and the threshold (max grey-level value)
Source§

fn level(&self) -> i32

Source§

fn area(&self) -> i32

incrementally computable features
Source§

fn perimeter(&self) -> i32

Source§

fn euler(&self) -> i32

Euler’s number
Source§

fn rect(&self) -> Rect

Source§

fn raw_moments(&self) -> &[f64; 2]

order 1 raw moments to derive the centroid
Source§

fn central_moments(&self) -> &[f64; 3]

order 2 central moments to construct the covariance matrix
Source§

fn med_crossings(&self) -> f32

median of the crossings at three different height levels
Source§

fn hole_area_ratio(&self) -> f32

2nd stage features
Source§

fn convex_hull_ratio(&self) -> f32

Source§

fn num_inflexion_points(&self) -> f32

Source§

fn probability(&self) -> f64

probability that the ER belongs to the class we are looking for
Source§

fn local_maxima(&self) -> bool

whenever the regions is a local maxima of the probability
Source§

impl Send for ERStat

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<Mat> ModifyInplace for Mat
where Mat: Boxed,

Source§

unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res, ) -> Res

Helper function to call OpenCV functions that allow in-place modification of a Mat or another similar object. By passing a mutable reference to the Mat to this function your closure will get called with the read reference and a write references to the same Mat. This is unsafe in a general case as it leads to having non-exclusive mutable access to the internal data, but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place modification is imgproc::threshold. Read more
Source§

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

Source§

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>,

Source§

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.