Class cv::_OutputArray#

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

Collaboration diagram for cv::_OutputArray:

Public Types#

enum DepthMask {
    DEPTH_MASK_8U = 1 << CV_8U,
    DEPTH_MASK_8S = 1 << CV_8S,
    DEPTH_MASK_16U = 1 << CV_16U,
    DEPTH_MASK_16S = 1 << CV_16S,
    DEPTH_MASK_32S = 1 << CV_32S,
    DEPTH_MASK_32F = 1 << CV_32F,
    DEPTH_MASK_64F = 1 << CV_64F,
    DEPTH_MASK_16F = 1 << CV_16F,
    DEPTH_MASK_16BF = 1 << CV_16BF,
    DEPTH_MASK_BOOL = 1 << CV_Bool,
    DEPTH_MASK_64U = 1 << CV_64U,
    DEPTH_MASK_64S = 1 << CV_64S,
    DEPTH_MASK_32U = 1 << CV_32U,
    DEPTH_MASK_ALL = (1 << CV_DEPTH_CURR_MAX)-1,
    DEPTH_MASK_ALL_BUT_8S = DEPTH_MASK_ALL & ~DEPTH_MASK_8S,
    DEPTH_MASK_ALL_16F = DEPTH_MASK_ALL,
    DEPTH_MASK_FLT = DEPTH_MASK_32F + DEPTH_MASK_64F
}
Public Types inherited from cv::_InputArray

Return

Name

Description

KindFlag

Public Member Functions#

Public Member Functions inherited from cv::_InputArray

Return

Name

Description

_InputArray()

_InputArray(
    const _Tp * vec,
    int n )

_InputArray(const cuda::GpuMat & d_mat)

_InputArray(const cuda::GpuMatND & d_mat)

_InputArray(const cuda::HostMem & cuda_mem)

_InputArray(const cudev::GpuMat_< _Tp > & m)

_InputArray(const double & val)

_InputArray(const Mat & m)

_InputArray(const Mat_< _Tp > & m)

_InputArray(const MatExpr & expr)

_InputArray(const Matx< _Tp, m, n > & matx)

_InputArray(const ogl::Buffer & buf)

_InputArray(const std::array< _Tp, _Nm > & arr)

_InputArray(const std::array< Mat, _Nm > & arr)

_InputArray(const std::vector< _Tp > & vec)

_InputArray(const std::vector< bool > & vec)

_InputArray(const std::vector< cuda::GpuMat > & d_mat_array)

_InputArray(const std::vector< cuda::GpuMatND > & d_mat_array)

_InputArray(const std::vector< Mat > & vec)

_InputArray(const std::vector< Mat_< _Tp > > & vec)

_InputArray(const std::vector< std::vector< _Tp > > & vec)

_InputArray(const std::vector< std::vector< bool > > &)

_InputArray(const std::vector< UMat > & umv)

_InputArray(const UMat & um)

_InputArray(
    int _flags,
    void * _obj )

~_InputArray()

int

channels(int i = -1)

int

cols(int i = -1)

void

copyTo(const _OutputArray & arr)

void

copyTo(
    const _OutputArray & arr,
    const _InputArray & mask )

int

depth(int i = -1)

int

dims(int i = -1)

bool

empty()

bool

empty(int i)

int

getFlags()

cuda::GpuMat

getGpuMat()

cuda::GpuMatND

getGpuMatND()

void

getGpuMatNDVector(std::vector< cuda::GpuMatND > & gpumv)

void

getGpuMatVector(std::vector< cuda::GpuMat > & gpumv)

Mat

getMat(int idx = -1)

Mat

getMat_(int idx = -1)

void

getMatVector(std::vector< Mat > & mv)

void *

getObj()

ogl::Buffer

getOGlBuffer()

Size

getSz()

UMat

getUMat(int idx = -1)

void

getUMatVector(std::vector< UMat > & umv)

bool

isContinuous(int i = -1)

bool

isGpuMat()

bool

isGpuMatND()

bool

isGpuMatVector()

bool

isMat()

bool

isMatVector()

bool

isMatx()

bool

isSubmatrix(int i = -1)

bool

isUMat()

bool

isUMatVector()

bool

isVector()

bool

isVecVector()

_InputArray::KindFlag

kind()

size_t

offset(int i = -1)

int

rows(int i = -1)

bool

sameSize(const _InputArray & arr)

MatShape

shape(int i = -1)

Size

size(int i = -1)

int

sizend(
    int * sz,
    int i = -1 )

size_t

step(int i = -1)

size_t

total(int i = -1)

int

type(int i = -1)

Static Public Member Functions#

Static Public Member Functions inherited from cv::_InputArray

Additional Inherited Members#

Protected Member Functions inherited from cv::_InputArray
Protected Attributes inherited from cv::_InputArray

Return

Name

Description

int

flags

void *

obj

Size

sz

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:

Member Enumeration Documentation#

enum DepthMask

DEPTH_MASK_8U
Python: cv._OutputArray_DEPTH_MASK_8U

DEPTH_MASK_8S
Python: cv._OutputArray_DEPTH_MASK_8S

DEPTH_MASK_16U
Python: cv._OutputArray_DEPTH_MASK_16U

DEPTH_MASK_16S
Python: cv._OutputArray_DEPTH_MASK_16S

DEPTH_MASK_32S
Python: cv._OutputArray_DEPTH_MASK_32S

DEPTH_MASK_32F
Python: cv._OutputArray_DEPTH_MASK_32F

DEPTH_MASK_64F
Python: cv._OutputArray_DEPTH_MASK_64F

DEPTH_MASK_16F
Python: cv._OutputArray_DEPTH_MASK_16F

DEPTH_MASK_16BF
Python: cv._OutputArray_DEPTH_MASK_16BF

DEPTH_MASK_BOOL
Python: cv._OutputArray_DEPTH_MASK_BOOL

DEPTH_MASK_64U
Python: cv._OutputArray_DEPTH_MASK_64U

DEPTH_MASK_64S
Python: cv._OutputArray_DEPTH_MASK_64S

DEPTH_MASK_32U
Python: cv._OutputArray_DEPTH_MASK_32U

DEPTH_MASK_ALL
Python: cv._OutputArray_DEPTH_MASK_ALL

DEPTH_MASK_ALL_BUT_8S
Python: cv._OutputArray_DEPTH_MASK_ALL_BUT_8S

DEPTH_MASK_ALL_16F
Python: cv._OutputArray_DEPTH_MASK_ALL_16F

DEPTH_MASK_FLT
Python: cv._OutputArray_DEPTH_MASK_FLT

Constructor & Destructor Documentation#

_OutputArray()#

cv::_OutputArray::_OutputArray()

_OutputArray()#

template<typename _Tp>
cv::_OutputArray::_OutputArray(
_Tp * vec,
int n )

_OutputArray()#

template<typename _Tp>
cv::_OutputArray::_OutputArray(
const _Tp * vec,
int n )

_OutputArray()#

cv::_OutputArray::_OutputArray(const cuda::GpuMat & d_mat)

_OutputArray()#

cv::_OutputArray::_OutputArray(const cuda::GpuMatND & d_mat)

_OutputArray()#

cv::_OutputArray::_OutputArray(const cuda::HostMem & cuda_mem)

_OutputArray()#

template<typename _Tp>
cv::_OutputArray::OutputArray(const cudev::GpuMat< _Tp > & m)

_OutputArray()#

cv::_OutputArray::_OutputArray(const Mat & m)

_OutputArray()#

template<typename _Tp>
cv::_OutputArray::OutputArray(const Mat< _Tp > & m)

_OutputArray()#

template<typename _Tp, int m, int n>
cv::_OutputArray::_OutputArray(const Matx< _Tp, m, n > & matx)

_OutputArray()#

cv::_OutputArray::_OutputArray(const ogl::Buffer & buf)

_OutputArray()#

template<typename _Tp, std::size_t _Nm>
cv::_OutputArray::_OutputArray(const std::array< _Tp, _Nm > & arr)

_OutputArray()#

template<std::size_t _Nm>
cv::_OutputArray::_OutputArray(const std::array< Mat, _Nm > & arr)

_OutputArray()#

template<typename _Tp>
cv::_OutputArray::_OutputArray(const std::vector< _Tp > & vec)

_OutputArray()#

cv::_OutputArray::_OutputArray(const std::vector< cuda::GpuMat > & d_mat)

_OutputArray()#

cv::_OutputArray::_OutputArray(const std::vector< cuda::GpuMatND > & d_mat)

_OutputArray()#

cv::_OutputArray::_OutputArray(const std::vector< Mat > & vec)

_OutputArray()#

template<typename _Tp>
cv::_OutputArray::OutputArray(const std::vector< Mat< _Tp > > & vec)

_OutputArray()#

template<typename _Tp>
cv::_OutputArray::_OutputArray(const std::vector< std::vector< _Tp > > & vec)

_OutputArray()#

cv::_OutputArray::_OutputArray(const std::vector< UMat > & vec)

_OutputArray()#

cv::_OutputArray::_OutputArray(const UMat & m)

_OutputArray()#

cv::_OutputArray::_OutputArray(cuda::GpuMat & d_mat)

_OutputArray()#

cv::_OutputArray::_OutputArray(cuda::GpuMatND & d_mat)

_OutputArray()#

cv::_OutputArray::_OutputArray(cuda::HostMem & cuda_mem)

_OutputArray()#

template<typename _Tp>
cv::_OutputArray::OutputArray(cudev::GpuMat< _Tp > & m)

_OutputArray()#

cv::_OutputArray::_OutputArray(
int _flags,
void * _obj )

_OutputArray()#

cv::_OutputArray::_OutputArray(Mat & m)

_OutputArray()#

template<typename _Tp>
cv::_OutputArray::OutputArray(Mat< _Tp > & m)

_OutputArray()#

template<typename _Tp, int m, int n>
cv::_OutputArray::_OutputArray(Matx< _Tp, m, n > & matx)

_OutputArray()#

cv::_OutputArray::_OutputArray(ogl::Buffer & buf)

_OutputArray()#

template<typename _Tp, std::size_t _Nm>
cv::_OutputArray::_OutputArray(std::array< _Tp, _Nm > & arr)

_OutputArray()#

template<std::size_t _Nm>
cv::_OutputArray::_OutputArray(std::array< Mat, _Nm > & arr)

_OutputArray()#

template<typename _Tp>
cv::_OutputArray::_OutputArray(std::vector< _Tp > & vec)

_OutputArray()#

cv::_OutputArray::_OutputArray(std::vector< bool > & vec)

_OutputArray()#

cv::_OutputArray::_OutputArray(std::vector< cuda::GpuMat > & d_mat)

_OutputArray()#

cv::_OutputArray::_OutputArray(std::vector< cuda::GpuMatND > & d_mat)

_OutputArray()#

cv::_OutputArray::_OutputArray(std::vector< Mat > & vec)

_OutputArray()#

template<typename _Tp>
cv::_OutputArray::OutputArray(std::vector< Mat< _Tp > > & vec)

_OutputArray()#

template<typename _Tp>
cv::_OutputArray::_OutputArray(std::vector< std::vector< _Tp > > & vec)

_OutputArray()#

cv::_OutputArray::_OutputArray(std::vector< std::vector< bool > > &)

_OutputArray()#

cv::_OutputArray::_OutputArray(std::vector< UMat > & vec)

_OutputArray()#

cv::_OutputArray::_OutputArray(UMat & m)

Member Function Documentation#

assign()#

void cv::_OutputArray::assign(const Mat & m)

assign()#

void cv::_OutputArray::assign(const std::vector< Mat > & v)

assign()#

void cv::_OutputArray::assign(const std::vector< UMat > & v)

assign()#

void cv::_OutputArray::assign(const UMat & u)

clear()#

void cv::_OutputArray::clear()

create()#

void cv::_OutputArray::create(
const MatShape & shape,
int type,
int i = -1,
bool allowTransposed = false,
_OutputArray::DepthMask fixedDepthMask = static_cast< _OutputArray::DepthMask >(0) )

create()#

void cv::_OutputArray::create(
int dims,
const int * size,
int type,
int i = -1,
bool allowTransposed = false,
_OutputArray::DepthMask fixedDepthMask = static_cast< _OutputArray::DepthMask >(0) )

create()#

void cv::_OutputArray::create(
int rows,
int cols,
int type,
int i = -1,
bool allowTransposed = false,
_OutputArray::DepthMask fixedDepthMask = static_cast< _OutputArray::DepthMask >(0) )

create()#

void cv::_OutputArray::create(
Size sz,
int type,
int i = -1,
bool allowTransposed = false,
_OutputArray::DepthMask fixedDepthMask = static_cast< _OutputArray::DepthMask >(0) )

createSameSize()#

void cv::_OutputArray::createSameSize(
const _InputArray & arr,
int mtype )

fit()#

void cv::_OutputArray::fit(
const MatShape & shape,
int type,
int i = -1,
bool allowTransposed = false,
_OutputArray::DepthMask fixedDepthMask = static_cast< _OutputArray::DepthMask >(0) )

fit()#

void cv::_OutputArray::fit(
int dims,
const int * size,
int type,
int i = -1,
bool allowTransposed = false,
_OutputArray::DepthMask fixedDepthMask = static_cast< _OutputArray::DepthMask >(0) )

fit()#

void cv::_OutputArray::fit(
int rows,
int cols,
int type,
int i = -1,
bool allowTransposed = false,
_OutputArray::DepthMask fixedDepthMask = static_cast< _OutputArray::DepthMask >(0) )

fit()#

void cv::_OutputArray::fit(
Size sz,
int type,
int i = -1,
bool allowTransposed = false,
_OutputArray::DepthMask fixedDepthMask = static_cast< _OutputArray::DepthMask >(0) )

fitSameSize()#

void cv::_OutputArray::fitSameSize(
const _InputArray & arr,
int mtype )

fixedSize()#

bool cv::_OutputArray::fixedSize()

fixedType()#

bool cv::_OutputArray::fixedType()

getGpuMatNDRef()#

cuda::GpuMatND & cv::_OutputArray::getGpuMatNDRef()

getGpuMatNDVecRef()#

std::vector< cuda::GpuMatND > & cv::_OutputArray::getGpuMatNDVecRef()

getGpuMatRef()#

cuda::GpuMat & cv::_OutputArray::getGpuMatRef()

getGpuMatVecRef()#

std::vector< cuda::GpuMat > & cv::_OutputArray::getGpuMatVecRef()

getHostMemRef()#

cuda::HostMem & cv::_OutputArray::getHostMemRef()

getMatRef()#

Mat & cv::_OutputArray::getMatRef(int i = -1)

getMatVecRef()#

std::vector< Mat > & cv::_OutputArray::getMatVecRef()

getOGlBufferRef()#

ogl::Buffer & cv::_OutputArray::getOGlBufferRef()

getUMatRef()#

UMat & cv::_OutputArray::getUMatRef(int i = -1)

getUMatVecRef()#

std::vector< UMat > & cv::_OutputArray::getUMatVecRef()

getVecVecRef()#

template<typename _Tp>
std::vector< std::vector< _Tp > > & cv::_OutputArray::getVecVecRef()

move()#

void cv::_OutputArray::move(Mat & m)

move()#

void cv::_OutputArray::move(UMat & u)

needed()#

bool cv::_OutputArray::needed()

reinterpret()#

Mat cv::_OutputArray::reinterpret(int type)

release()#

void cv::_OutputArray::release()

setTo()#

void cv::_OutputArray::setTo(
const _InputArray & value,
const _InputArray & mask = _InputArray() )

setZero()#

void cv::_OutputArray::setZero()

rawOut()#

template<typename _Tp, std::size_t _Nm>
static _OutputArray cv::_OutputArray::rawOut(std::array< _Tp, _Nm > & arr)

rawOut()#

template<typename _Tp>
static _OutputArray cv::_OutputArray::rawOut(std::vector< _Tp > & vec)

Source file#

The documentation for this class was generated from the following file: