Struct opencv::mcc::MCC_CCheckerDraw

source ·
pub struct MCC_CCheckerDraw { /* private fields */ }
Expand description

\brief checker draw

This class contains the functions for drawing a detected chart. This class expects a pointer to the checker which will be drawn by this object in the constructor and then later on whenever the draw function is called the checker will be drawn. Remember that it is not possible to change the checkers which will be draw by a given object, as it is decided in the constructor itself. If you want to draw some other object you can create a new CCheckerDraw instance.

The reason for this type of design is that in some videos we can assume that the checker is always in the same position, even if the image changes, so the drawing will always take place at the same position.

Implementations§

source§

impl MCC_CCheckerDraw

source

pub fn create( p_checker: Ptr<MCC_CChecker>, color: Scalar, thickness: i32 ) -> Result<Ptr<MCC_CCheckerDraw>>

\brief Create a new CCheckerDraw object. \param pChecker The checker which will be drawn by this object. \param color The color by with which the squares of the checker will be drawn \param thickness The thickness with which the sqaures will be drawn \return A pointer to the implementation of the CCheckerDraw

§C++ default parameters
  • color: CV_RGB(0,250,0)
  • thickness: 2
source

pub fn create_def(p_checker: Ptr<MCC_CChecker>) -> Result<Ptr<MCC_CCheckerDraw>>

\brief Create a new CCheckerDraw object. \param pChecker The checker which will be drawn by this object. \param color The color by with which the squares of the checker will be drawn \param thickness The thickness with which the sqaures will be drawn \return A pointer to the implementation of the CCheckerDraw

§Note

This alternative version of MCC_CCheckerDraw::create function uses the following default values for its arguments:

  • color: CV_RGB(0,250,0)
  • thickness: 2

Trait Implementations§

source§

impl Boxed for MCC_CCheckerDraw

source§

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

Wrap the specified raw pointer Read more
source§

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

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

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

Return the underlying raw pointer. Read more
source§

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

Return the underlying mutable raw pointer Read more
source§

impl Debug for MCC_CCheckerDraw

source§

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

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

impl Drop for MCC_CCheckerDraw

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl MCC_CCheckerDrawTrait for MCC_CCheckerDraw

source§

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

source§

fn draw(&mut self, img: &mut impl ToInputOutputArray) -> Result<()>

\brief Draws the checker to the given image. \param img image in color space BGR \return void
source§

impl MCC_CCheckerDrawTraitConst for MCC_CCheckerDraw

source§

impl Send for MCC_CCheckerDraw

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.