opencv on mbed
_OutputArray Class Reference
[Basic structures]
This type is very similar to InputArray except that it is used for input/output and output function parameters. More...
#include <mat.hpp>
Inherits cv::_InputArray.
Inherited by _InputOutputArray.
Detailed 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;
Generated on Tue Jul 12 2022 16:42:43 by 1.7.2