Crate cv_convert[][src]

Expand description

Data conversion among computer vision libraries.

Traits

The traits FromCv and IntoCv respectively define .from_cv() and .into_cv() methods. The usage is similar to std’s From and Into. The traits TryFromCv and TryIntoCv are fallible counterparts. They respective define .try_from_cv() and .try_into_cv() methods. These traits can be imported from prelude.

use cv_convert::prelude::*;

Supported conversions

The notations are used for simplicity.

  • S -> T suggests the conversion is defined by non-fallible FromCv.
  • S ->? T suggests the conversion is defined by fallible TryFromCv.
  • (&)T means the type can be either owned or borrowed.
  • &'a S -> &'a T suggests that the target type borrows the source type.

opencv -> opencv

std -> tch

tch -> std

tch -> ndarray

ndarray -> tch

image -> tch

image -> opencv

opencv -> nalgebra

nalgebra -> opencv

opencv -> tch

tch -> opencv

Re-exports

pub use opencv;
pub use image;
pub use nalgebra;
pub use ndarray;
pub use tch;

Modules

Structs

A pair of rvec and tvec from OpenCV, standing for rotation and translation.

A tensor with image shape convention that is used to convert to Tensor.

A Tensor which data reference borrows from a Mat. It can be dereferenced to a Tensor.

Enums

Describes the image channel order of a Tensor.

Traits

Type conversion that is analogous to From.

Type conversion that is analogous to Into.

Fallible type conversion that is analogous to TryFrom.

Fallible type conversion that is analogous to TryInto.