Struct opencv::text::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 of course unsafe as it breaks the Rust aliasing rules, but it might 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>,

§

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.