[][src]Struct opencv::core::_OutputArray

pub struct _OutputArray { /* fields omitted */ }

This type is very similar to InputArray except that it is used for input/output and output function parameters.

Just like with InputArray, OpenCV users should not care about OutputArray, they just pass Mat, vector<T> etc. to the functions. The same limitation as for InputArray: Do not explicitly create OutputArray instances applies here too.

If you want to make your function polymorphic (i.e. accept different arrays as output parameters), it is also not very difficult. Take the sample above as the reference. Note that _OutputArray::create() needs to be called before _OutputArray::getMat(). This way you guarantee that the output array is properly allocated.

Optional output parameters. If you do not need certain output array to be computed and returned to you, pass cv::noArray(), just like you would in the case of optional input array. At the implementation level, use _OutputArray::needed() to check if certain output array needs to be computed or not.

There are several synonyms for OutputArray that are used to assist automatic Python/Java/... wrapper generators:

This example is not tested
typedef OutputArray OutputArrayOfArrays;
typedef OutputArray InputOutputArray;
typedef OutputArray InputOutputArrayOfArrays;

Methods

impl _OutputArray[src]

pub fn as_raw__OutputArray(&self) -> *mut c_void[src]

pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self[src]

impl _OutputArray[src]

Trait Implementations

impl Drop for _OutputArray[src]

impl Send for _OutputArray[src]

impl _InputArrayTrait for _OutputArray[src]

impl _OutputArrayTrait for _OutputArray[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.