Struct opencv::core::_OutputArray

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

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:

   typedef OutputArray OutputArrayOfArrays;
   typedef OutputArray InputOutputArray;
   typedef OutputArray InputOutputArrayOfArrays;

Implementations§

/////////////////////////////////////////////////////////////////////////////////////

Trait Implementations§

Wrap the specified raw pointer Read more
Return an the underlying raw pointer while consuming this wrapper. Read more
Return the underlying raw pointer. Read more
Return the underlying mutable raw pointer Read more
Executes the destructor for this type. Read more
Converts to this type from the input type.
Converts to this type from the input type.
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more
C++ default parameters Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.