44#ifndef OPENCV_CORE_MAT_HPP
45#define OPENCV_CORE_MAT_HPP
48# error mat.hpp header must be compiled as C++
51#include "opencv2/core/matx.hpp"
52#include "opencv2/core/types.hpp"
54#include "opencv2/core/bufferpool.hpp"
164 FIXED_TYPE = 0x8000 << KIND_SHIFT,
165 FIXED_SIZE = 0x4000 << KIND_SHIFT,
166 KIND_MASK = 31 << KIND_SHIFT,
168 NONE = 0 << KIND_SHIFT,
170 MATX = 2 << KIND_SHIFT,
171 STD_VECTOR = 3 << KIND_SHIFT,
172 STD_VECTOR_VECTOR = 4 << KIND_SHIFT,
173 STD_VECTOR_MAT = 5 << KIND_SHIFT,
174#if OPENCV_ABI_COMPATIBILITY < 500
175 EXPR = 6 << KIND_SHIFT,
177 OPENGL_BUFFER = 7 << KIND_SHIFT,
178 CUDA_HOST_MEM = 8 << KIND_SHIFT,
179 CUDA_GPU_MAT = 9 << KIND_SHIFT,
180 UMAT =10 << KIND_SHIFT,
181 STD_VECTOR_UMAT =11 << KIND_SHIFT,
182 STD_BOOL_VECTOR =12 << KIND_SHIFT,
183 STD_VECTOR_CUDA_GPU_MAT = 13 << KIND_SHIFT,
184#if OPENCV_ABI_COMPATIBILITY < 500
185 STD_ARRAY =14 << KIND_SHIFT,
187 STD_ARRAY_MAT =15 << KIND_SHIFT
264 void init(
int _flags,
const void* _obj);
308 DEPTH_MASK_ALL = (DEPTH_MASK_64F<<1)-1,
309 DEPTH_MASK_ALL_BUT_8S = DEPTH_MASK_ALL & ~DEPTH_MASK_8S,
310 DEPTH_MASK_ALL_16F = (DEPTH_MASK_16F<<1)-1,
311 DEPTH_MASK_FLT = DEPTH_MASK_32F + DEPTH_MASK_64F
496 const size_t srcofs[],
const size_t srcstep[],
497 const size_t dststep[])
const;
499 const size_t dstofs[],
const size_t dststep[],
500 const size_t srcstep[])
const;
502 const size_t srcofs[],
const size_t srcstep[],
503 const size_t dstofs[],
const size_t dststep[],
bool sync)
const;
547 DEVICE_COPY_OBSOLETE=4, TEMP_UMAT=8, TEMP_COPIED_UMAT=24,
548 USER_ALLOCATED=32, DEVICE_MEM_MAPPED=64,
592 const
int& operator[](
int i) const;
593 int& operator[](
int i);
607 operator
size_t() const;
1025 template<typename _Tp> explicit
Mat(const
std::vector<_Tp>& vec,
bool copyData=false);
1029 template<typename _Tp, typename = typename
std::enable_if<
std::is_arithmetic<_Tp>::
value>::
type>
1030 explicit
Mat(const
std::initializer_list<_Tp> list);
1034 template<typename _Tp> explicit
Mat(const
std::initializer_list<
int>
sizes, const
std::initializer_list<_Tp> list);
1038 template<typename _Tp,
size_t _Nm> explicit
Mat(const
std::array<_Tp, _Nm>&
arr,
bool copyData=false);
1042 template<typename _Tp,
int n> explicit
Mat(const
Vec<_Tp, n>& vec,
bool copyData=true);
1046 template<typename _Tp,
int m,
int n> explicit
Mat(const
Matx<_Tp, m, n>& mtx,
bool copyData=true);
1050 template<typename _Tp> explicit
Mat(const
Point_<_Tp>&
pt,
bool copyData=true);
1054 template<typename _Tp> explicit
Mat(const
Point3_<_Tp>&
pt,
bool copyData=true);
1061 explicit
Mat(const cuda::GpuMat& m);
1139 Mat rowRange(
int startrow,
int endrow) const;
1153 Mat colRange(
int startcol,
int endcol) const;
1316 Mat reshape(
int cn,
int newndims, const
int* newsz) const;
1323 Mat reshape(
int cn, const
std::vector<
int>& newshape) const;
1553 void reserve(
size_t sz);
1561 void reserveBuffer(
size_t sz);
1588 template<typename _Tp>
void push_back(const _Tp&
elem);
1593 template<typename _Tp>
void push_back(const
Mat_<_Tp>&
elem);
1598 template<typename _Tp>
void push_back(const
std::vector<_Tp>&
elem);
1611 void pop_back(
size_t nelems=1);
1653 Mat& adjustROI(
int dtop,
int dbottom,
int dleft,
int dright );
1683 template<typename _Tp> operator
std::vector<_Tp>() const;
1684 template<typename _Tp,
int n> operator
Vec<_Tp, n>() const;
1685 template<typename _Tp,
int m,
int n> operator
Matx<_Tp, m, n>() const;
1687 template<typename _Tp,
std::
size_t _Nm> operator
std::array<_Tp, _Nm>() const;
1763 bool isContinuous() const;
1766 bool isSubmatrix() const;
1773 size_t elemSize() const;
1780 size_t elemSize1() const;
1815 size_t step1(
int i=0) const;
1835 size_t total(
int startDim,
int endDim=INT_MAX) const;
1858 int checkVector(
int elemChannels,
int depth=-1,
bool requireContinuous=true) const;
1879 const
uchar* ptr(
int row,
int col) const;
1884 const
uchar* ptr(
int i0,
int i1,
int i2) const;
1896 template<typename _Tp> _Tp* ptr(
int i0=0);
1898 template<typename _Tp> const _Tp* ptr(
int i0=0) const;
1903 template<typename _Tp> _Tp* ptr(
int row,
int col);
1908 template<typename _Tp> const _Tp* ptr(
int row,
int col) const;
1910 template<typename _Tp> _Tp* ptr(
int i0,
int i1,
int i2);
1912 template<typename _Tp> const _Tp* ptr(
int i0,
int i1,
int i2) const;
1914 template<typename _Tp> _Tp* ptr(const
int*
idx);
1916 template<typename _Tp> const _Tp* ptr(const
int*
idx) const;
1918 template<typename _Tp,
int n> _Tp* ptr(const
Vec<
int, n>&
idx);
1920 template<typename _Tp,
int n> const _Tp* ptr(const
Vec<
int, n>&
idx) const;
1952 template<typename _Tp> _Tp& at(
int i0=0);
1956 template<typename _Tp> const _Tp& at(
int i0=0) const;
1961 template<typename _Tp> _Tp& at(
int row,
int col);
1966 template<typename _Tp> const _Tp& at(
int row,
int col) const;
1973 template<typename _Tp> _Tp& at(
int i0,
int i1,
int i2);
1979 template<typename _Tp> const _Tp& at(
int i0,
int i1,
int i2) const;
1984 template<typename _Tp> _Tp& at(const
int*
idx);
1988 template<typename _Tp> const _Tp& at(const
int*
idx) const;
1991 template<typename _Tp,
int n> _Tp& at(const
Vec<
int, n>&
idx);
1993 template<typename _Tp,
int n> const _Tp& at(const
Vec<
int, n>&
idx) const;
2004 template<typename _Tp> const _Tp& at(
Point pt) const;
2118 template<typename _Tp, typename Functor>
void forEach(const Functor&
operation);
2120 template<typename _Tp, typename Functor>
void forEach(const Functor&
operation) const;
2126 enum { MAGIC_MASK = 0xFFFF0000, TYPE_MASK = 0x00000FFF, DEPTH_MASK = 7 };
2164 template<
typename _Tp,
typename Functor>
void forEach_impl(
const Functor&
operation);
2248 Mat_(
int _ndims, const
int* _sizes);
2258 Mat_(
int _ndims, const
int* _sizes, _Tp* _data, const
size_t* _steps=0);
2270 explicit
Mat_(const
std::vector<_Tp>& vec,
bool copyData=false);
2278 explicit
Mat_(const
std::initializer_list<
int>
sizes, const
std::initializer_list<_Tp> values);
2280 template <
std::
size_t _Nm> explicit
Mat_(const
std::array<_Tp, _Nm>&
arr,
bool copyData=false);
2317 template<typename T2> operator
Mat_<T2>() const;
2352 _Tp* operator [](
int y);
2353 const _Tp* operator [](
int y) const;
2356 _Tp& operator ()(const
int*
idx);
2358 const _Tp& operator ()(const
int*
idx) const;
2361 template<
int n> _Tp& operator ()(const
Vec<
int, n>&
idx);
2363 template<
int n> const _Tp& operator ()(const
Vec<
int, n>&
idx) const;
2368 const _Tp& operator ()(
int idx0) const;
2372 const _Tp& operator ()(
int row,
int col) const;
2382 operator
std::vector<_Tp>() const;
2385 template<
std::
size_t _Nm> operator
std::array<_Tp, _Nm>() const;
2740 enum { MAGIC_VAL=0x42FD0000, MAX_DIM=32, HASH_SCALE=0x5bd1e995, HASH_BIT=0x80000000 };
2745 Hdr(
int _dims,
const int* _sizes,
int _type);
2866 size_t hash(
int i0,
int i1,
int i2)
const;
2882 uchar*
ptr(
int i0,
bool createMissing,
size_t* hashval=0);
2884 uchar*
ptr(
int i0,
int i1,
bool createMissing,
size_t* hashval=0);
2886 uchar*
ptr(
int i0,
int i1,
int i2,
bool createMissing,
size_t* hashval=0);
2900 template<
typename _Tp> _Tp&
ref(
int i0,
size_t* hashval=0);
2902 template<
typename _Tp> _Tp&
ref(
int i0,
int i1,
size_t* hashval=0);
2904 template<
typename _Tp> _Tp&
ref(
int i0,
int i1,
int i2,
size_t* hashval=0);
2906 template<
typename _Tp> _Tp&
ref(
const int*
idx,
size_t* hashval=0);
2921 template<
typename _Tp> _Tp
value(
int i0,
size_t* hashval=0)
const;
2923 template<
typename _Tp> _Tp
value(
int i0,
int i1,
size_t* hashval=0)
const;
2925 template<
typename _Tp> _Tp
value(
int i0,
int i1,
int i2,
size_t* hashval=0)
const;
2927 template<
typename _Tp> _Tp
value(
const int*
idx,
size_t* hashval=0)
const;
2939 template<
typename _Tp>
const _Tp*
find(
int i0,
size_t* hashval=0)
const;
2941 template<
typename _Tp>
const _Tp*
find(
int i0,
int i1,
size_t* hashval=0)
const;
2943 template<
typename _Tp>
const _Tp*
find(
int i0,
int i1,
int i2,
size_t* hashval=0)
const;
2945 template<
typename _Tp>
const _Tp*
find(
const int*
idx,
size_t* hashval=0)
const;
2949 void erase(
int i0,
int i1,
size_t* hashval=0);
2951 void erase(
int i0,
int i1,
int i2,
size_t* hashval=0);
2983 template<
typename _Tp>
const _Tp&
value(
const Node* n)
const;
3052 _Tp&
ref(
int i0,
size_t* hashval=0);
3054 _Tp&
ref(
int i0,
int i1,
size_t* hashval=0);
3056 _Tp&
ref(
int i0,
int i1,
int i2,
size_t* hashval=0);
3111 const uchar* operator [](ptrdiff_t i)
const;
3131 void seek(ptrdiff_t ofs,
bool relative =
false);
3132 void seek(
const int* _idx,
bool relative =
false);
3147template<
typename _Tp>
3174 const _Tp& operator *()
const;
3176 const _Tp& operator [](ptrdiff_t i)
const;
3200template<
typename _Tp>
3225 _Tp& operator *()
const;
3227 _Tp& operator [](ptrdiff_t i)
const;
3273 template<
typename _Tp>
const _Tp&
value()
const;
3318 template<
typename _Tp> _Tp&
value()
const;
3354 const _Tp& operator *()
const;
3388 _Tp& operator *()
const;
3592 const Mat& _c =
Mat(),
double _alpha = 1,
double _beta = 1,
const Scalar& _s =
Scalar());
3636template<
typename _Tp,
int m,
int n>
static inline
3638template<
typename _Tp,
int m,
int n>
static inline
3649template<
typename _Tp,
int m,
int n>
static inline
3651template<
typename _Tp,
int m,
int n>
static inline
3665template<
typename _Tp,
int m,
int n>
static inline
3667template<
typename _Tp,
int m,
int n>
static inline
3678template<
typename _Tp,
int m,
int n>
static inline
3680template<
typename _Tp,
int m,
int n>
static inline
3686template<
typename _Tp,
int m,
int n>
static inline
3688template<
typename _Tp,
int m,
int n>
static inline
3694template<
typename _Tp,
int m,
int n>
static inline
3696template<
typename _Tp,
int m,
int n>
static inline
3702template<
typename _Tp,
int m,
int n>
static inline
3704template<
typename _Tp,
int m,
int n>
static inline
3710template<
typename _Tp,
int m,
int n>
static inline
3712template<
typename _Tp,
int m,
int n>
static inline
3718template<
typename _Tp,
int m,
int n>
static inline
3720template<
typename _Tp,
int m,
int n>
static inline
3726template<
typename _Tp,
int m,
int n>
static inline
3728template<
typename _Tp,
int m,
int n>
static inline
3734template<
typename _Tp,
int m,
int n>
static inline
3736template<
typename _Tp,
int m,
int n>
static inline
3742template<
typename _Tp,
int m,
int n>
static inline
3744template<
typename _Tp,
int m,
int n>
static inline
3750template<
typename _Tp,
int m,
int n>
static inline
3752template<
typename _Tp,
int m,
int n>
static inline
3760template<
typename _Tp,
int m,
int n>
static inline
3762template<
typename _Tp,
int m,
int n>
static inline
3768template<
typename _Tp,
int m,
int n>
static inline
3770template<
typename _Tp,
int m,
int n>
static inline
3795#include "opencv2/core/mat.inl.hpp"
Definition bufferpool.hpp:22
Template "trait" class for OpenCV primitive data types.
Definition traits.hpp:113
Custom array allocator.
Definition mat.hpp:480
MatAllocator()
Definition mat.hpp:482
virtual void copy(UMatData *srcdata, UMatData *dstdata, int dims, const size_t sz[], const size_t srcofs[], const size_t srcstep[], const size_t dstofs[], const size_t dststep[], bool sync) const
virtual ~MatAllocator()
Definition mat.hpp:483
virtual void download(UMatData *data, void *dst, int dims, const size_t sz[], const size_t srcofs[], const size_t srcstep[], const size_t dststep[]) const
virtual UMatData * allocate(int dims, const int *sizes, int type, void *data, size_t *step, AccessFlag flags, UMatUsageFlags usageFlags) const =0
virtual void upload(UMatData *data, const void *src, int dims, const size_t sz[], const size_t dstofs[], const size_t dststep[], const size_t srcstep[]) const
virtual void unmap(UMatData *data) const
virtual BufferPoolController * getBufferPoolController(const char *id=NULL) const
virtual bool allocate(UMatData *data, AccessFlag accessflags, UMatUsageFlags usageFlags) const =0
virtual void map(UMatData *data, AccessFlag accessflags) const
virtual void deallocate(UMatData *data) const =0
Comma-separated Matrix Initializer.
Definition mat.hpp:525
MatIterator_< _Tp > it
Definition mat.hpp:534
MatCommaInitializer_(Mat_< _Tp > *_m)
the constructor, created by "matrix << firstValue" operator, where matrix is cv::Mat
MatCommaInitializer_< _Tp > & operator,(T2 v)
the operator that takes the next value and put it to the matrix
Matrix read-only iterator.
Definition mat.hpp:3149
_Tp value_type
Definition mat.hpp:3151
MatConstIterator_()
default constructor
const _Tp * pointer
Definition mat.hpp:3153
const _Tp & reference
Definition mat.hpp:3154
MatConstIterator_(const Mat_< _Tp > *_m, Point _pt)
constructor that sets the iterator to the specified element of the matrix
std::random_access_iterator_tag iterator_category
Definition mat.hpp:3156
MatConstIterator_(const MatConstIterator_ &it)
copy constructor
MatConstIterator_(const Mat_< _Tp > *_m, int _row, int _col=0)
constructor that sets the iterator to the specified element of the matrix
MatConstIterator_(const Mat_< _Tp > *_m, const int *_idx)
constructor that sets the iterator to the specified element of the matrix
Point pos() const
returns the current iterator position
MatConstIterator_(const Mat_< _Tp > *_m)
constructor that sets the iterator to the beginning of the matrix
ptrdiff_t difference_type
Definition mat.hpp:3152
const uchar * sliceStart
Definition mat.hpp:3137
MatConstIterator(const Mat *_m, const int *_idx)
constructor that sets the iterator to the specified element of the matrix
MatConstIterator()
default constructor
const uchar * sliceEnd
Definition mat.hpp:3138
const Mat * m
Definition mat.hpp:3134
uchar * value_type
Definition mat.hpp:3086
const uchar * ptr
Definition mat.hpp:3136
Point pos() const
returns the current iterator position
MatConstIterator(const Mat *_m, Point _pt)
constructor that sets the iterator to the specified element of the matrix
MatConstIterator(const MatConstIterator &it)
copy constructor
void seek(ptrdiff_t ofs, bool relative=false)
void pos(int *_idx) const
returns the current iterator position
size_t elemSize
Definition mat.hpp:3135
const uchar ** pointer
Definition mat.hpp:3088
std::random_access_iterator_tag iterator_category
Definition mat.hpp:3091
MatConstIterator(const Mat *_m, int _row, int _col=0)
constructor that sets the iterator to the specified element of the matrix
void seek(const int *_idx, bool relative=false)
uchar * reference
Definition mat.hpp:3089
MatConstIterator(const Mat *_m)
constructor that sets the iterator to the beginning of the matrix
ptrdiff_t difference_type
Definition mat.hpp:3087
Matrix expression representation This is a list of implemented matrix operations that can be combined...
Definition mat.hpp:3586
CV_EXPORTS MatExpr min(const Mat &a, const Mat &b)
int flags
Definition mat.hpp:3617
MatExpr mul(const MatExpr &e, double scale=1) const
static MatExpr min(const Matx< _Tp, m, n > &a, const Mat &b)
Definition mat.hpp:3763
CV_EXPORTS MatExpr abs(const Mat &m)
Calculates an absolute value of each matrix element.
MatExpr diag(int d=0) const
CV_EXPORTS MatExpr max(const Mat &a, const Mat &b)
double dot(const Mat &m) const
MatExpr mul(const Mat &m, double scale=1) const
Scalar s
Definition mat.hpp:3621
CV_EXPORTS MatExpr min(double s, const Mat &a)
CV_EXPORTS MatExpr min(const Mat &a, double s)
MatExpr inv(int method=DECOMP_LU) const
MatExpr operator()(const Range &rowRange, const Range &colRange) const
static MatExpr min(const Mat &a, const Matx< _Tp, m, n > &b)
Definition mat.hpp:3761
Mat cross(const Mat &m) const
static MatExpr max(const Matx< _Tp, m, n > &a, const Mat &b)
Definition mat.hpp:3771
const MatOp * op
Definition mat.hpp:3616
CV_EXPORTS MatExpr max(double s, const Mat &a)
static MatExpr max(const Mat &a, const Matx< _Tp, m, n > &b)
Definition mat.hpp:3769
double alpha
Definition mat.hpp:3620
CV_EXPORTS MatExpr max(const Mat &a, double s)
MatExpr(const MatOp *_op, int _flags, const Mat &_a=Mat(), const Mat &_b=Mat(), const Mat &_c=Mat(), double _alpha=1, double _beta=1, const Scalar &_s=Scalar())
MatExpr operator()(const Rect &roi) const
CV_EXPORTS MatExpr abs(const MatExpr &e)
Mat a
Definition mat.hpp:3619
Matrix read-write iterator.
Definition mat.hpp:3202
MatIterator_(Mat_< _Tp > *_m, int _row, int _col=0)
constructor that sets the iterator to the specified element of the matrix
MatIterator_(Mat_< _Tp > *_m, Point _pt)
constructor that sets the iterator to the specified element of the matrix
MatIterator_()
the default constructor
std::random_access_iterator_tag iterator_category
Definition mat.hpp:3207
MatIterator_(Mat_< _Tp > *_m, const int *_idx)
constructor that sets the iterator to the specified element of the matrix
MatIterator_(const MatIterator_ &it)
copy constructor
_Tp * pointer
Definition mat.hpp:3204
_Tp & reference
Definition mat.hpp:3205
MatIterator_(Mat_< _Tp > *_m)
constructor that sets the iterator to the beginning of the matrix
virtual void abs(const MatExpr &expr, MatExpr &res) const
virtual void divide(double s, const MatExpr &expr, MatExpr &res) const
virtual void subtract(const Scalar &s, const MatExpr &expr, MatExpr &res) const
virtual void augAssignMultiply(const MatExpr &expr, Mat &m) const
virtual void invert(const MatExpr &expr, int method, MatExpr &res) const
virtual void augAssignAnd(const MatExpr &expr, Mat &m) const
virtual void augAssignSubtract(const MatExpr &expr, Mat &m) const
virtual void diag(const MatExpr &expr, int d, MatExpr &res) const
virtual void roi(const MatExpr &expr, const Range &rowRange, const Range &colRange, MatExpr &res) const
virtual void augAssignXor(const MatExpr &expr, Mat &m) const
virtual void multiply(const MatExpr &expr1, double s, MatExpr &res) const
virtual void assign(const MatExpr &expr, Mat &m, int type=-1) const =0
virtual Size size(const MatExpr &expr) const
virtual void augAssignOr(const MatExpr &expr, Mat &m) const
virtual void divide(const MatExpr &expr1, const MatExpr &expr2, MatExpr &res, double scale=1) const
virtual void multiply(const MatExpr &expr1, const MatExpr &expr2, MatExpr &res, double scale=1) const
virtual int type(const MatExpr &expr) const
virtual void add(const MatExpr &expr1, const Scalar &s, MatExpr &res) const
virtual void transpose(const MatExpr &expr, MatExpr &res) const
virtual void subtract(const MatExpr &expr1, const MatExpr &expr2, MatExpr &res) const
virtual bool elementWise(const MatExpr &expr) const
virtual void augAssignDivide(const MatExpr &expr, Mat &m) const
virtual void augAssignAdd(const MatExpr &expr, Mat &m) const
virtual void add(const MatExpr &expr1, const MatExpr &expr2, MatExpr &res) const
virtual void matmul(const MatExpr &expr1, const MatExpr &expr2, MatExpr &res) const
Template matrix class derived from Mat.
Definition mat.hpp:2230
MatConstIterator_< _Tp > const_iterator
Definition mat.hpp:2235
MatIterator_< _Tp > iterator
Definition mat.hpp:2234
_Tp value_type
Definition mat.hpp:2232
DataType< _Tp >::channel_type channel_type
Definition mat.hpp:2233
size_t step1(int i=0) const
static CV_NODISCARD_STD MatExpr eye(int rows, int cols)
void forEach(const Functor &operation)
template methods for operation over all matrix elements.
std::reverse_iterator< iterator > rend()
Mat_() CV_NOEXCEPT
default constructor
static CV_NODISCARD_STD MatExpr zeros(int rows, int cols)
overridden forms of Mat::zeros() etc. Data type is omitted, of course
Mat_ row(int y) const
overridden forms of Mat::row() etc.
size_t elemSize() const
overridden forms of Mat::elemSize() etc.
iterator begin()
iterators; they are smart enough to skip gaps in the end of rows
Mat_ cross(const Mat_ &m) const
cross-product
void release()
equivalent to Mat::release()
size_t stepT(int i=0) const
returns step()/sizeof(_Tp)
CV_NODISCARD_STD Mat_ clone() const
void create(int _rows, int _cols)
equivalent to Mat::create(_rows, _cols, DataType<_Tp>::type)
static CV_NODISCARD_STD MatExpr ones(int rows, int cols)
std::reverse_iterator< iterator > rbegin()
Mat_ & operator=(const Mat &m)
Mat_ & adjustROI(int dtop, int dbottom, int dleft, int dright)
some more overridden methods
n-dimensional dense array class
Definition mat.hpp:812
MatSize size
Definition mat.hpp:2160
const uchar * datalimit
Definition mat.hpp:2145
UMatData * u
interaction with UMat
Definition mat.hpp:2158
void updateContinuityFlag()
internal use method: updates the continuity flag
int dims
the matrix dimensionality, >= 2
Definition mat.hpp:2136
static MatAllocator * getDefaultAllocator()
MatAllocator * allocator
custom allocator
Definition mat.hpp:2148
uchar * data
pointer to the data
Definition mat.hpp:2140
static void setDefaultAllocator(MatAllocator *allocator)
@ AUTO_STEP
Definition mat.hpp:2125
@ SUBMATRIX_FLAG
Definition mat.hpp:2125
@ MAGIC_VAL
Definition mat.hpp:2125
@ CONTINUOUS_FLAG
Definition mat.hpp:2125
int cols
Definition mat.hpp:2138
Mat rowRange(int startrow, int endrow) const
Creates a matrix header for the specified row span.
Mat colRange(int startcol, int endcol) const
Creates a matrix header for the specified column span.
MatStep step
Definition mat.hpp:2161
int rows
the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions
Definition mat.hpp:2138
@ TYPE_MASK
Definition mat.hpp:2126
@ DEPTH_MASK
Definition mat.hpp:2126
@ MAGIC_MASK
Definition mat.hpp:2126
const uchar * dataend
Definition mat.hpp:2144
static MatAllocator * getStdAllocator()
and the standard allocator
const uchar * datastart
helper fields used in locateROI and adjustROI
Definition mat.hpp:2143
int flags
Definition mat.hpp:2134
Template class for small matrices whose type and size are known at compilation time.
Definition matx.hpp:100
n-ary multi-dimensional array iterator.
Definition mat.hpp:3461
const Mat ** arrays
the iterated arrays
Definition mat.hpp:3478
int iterdepth
Definition mat.hpp:3490
size_t size
the size of each segment (in elements)
Definition mat.hpp:3488
size_t idx
Definition mat.hpp:3491
size_t nplanes
the number of hyper-planes that the iterator steps through
Definition mat.hpp:3486
NAryMatIterator(const Mat **arrays, uchar **ptrs, int narrays=-1)
the full constructor taking arbitrary number of n-dim matrices
uchar ** ptrs
data pointers
Definition mat.hpp:3482
NAryMatIterator(const Mat **arrays, Mat *planes, int narrays=-1)
the full constructor taking arbitrary number of n-dim matrices
void init(const Mat **arrays, Mat *planes, uchar **ptrs, int narrays=-1)
the separate iterator initialization method
Mat * planes
the current planes
Definition mat.hpp:3480
NAryMatIterator()
the default constructor
int narrays
the number of arrays
Definition mat.hpp:3484
Template class for 3D points specified by its coordinates x, y and z.
Definition types.hpp:255
Template class for 2D points specified by its coordinates x and y.
Definition types.hpp:163
Template class specifying a continuous subsequence (slice) of a sequence.
Definition types.hpp:623
Template class for 2D rectangles.
Definition types.hpp:444
Template class for specifying the size of an image or rectangle.
Definition types.hpp:335
Template Read-Only Sparse Matrix Iterator Class.
Definition mat.hpp:3338
SparseMatConstIterator_(const SparseMatConstIterator_ &it)
the copy constructor
std::forward_iterator_tag iterator_category
Definition mat.hpp:3341
SparseMatConstIterator_(const SparseMat_< _Tp > *_m)
the full constructor setting the iterator to the first sparse matrix element
SparseMatConstIterator_(const SparseMat *_m)
SparseMatConstIterator_()
the default constructor
Read-Only Sparse Matrix Iterator.
Definition mat.hpp:3260
uchar * ptr
Definition mat.hpp:3291
size_t hashidx
Definition mat.hpp:3290
const _Tp & value() const
template method returning the current matrix element
SparseMatConstIterator(const SparseMat *_m)
the full constructor setting the iterator to the first sparse matrix element
SparseMatConstIterator(const SparseMatConstIterator &it)
the copy constructor
const SparseMat * m
Definition mat.hpp:3289
const SparseMat::Node * node() const
returns the current node of the sparse matrix. it.node->idx is the current element index
void seekEnd()
moves iterator to the element after the last element
SparseMatConstIterator()
the default constructor
Template Read-Write Sparse Matrix Iterator Class.
Definition mat.hpp:3372
std::forward_iterator_tag iterator_category
Definition mat.hpp:3375
SparseMatIterator_(SparseMat *_m)
SparseMatIterator_()
the default constructor
SparseMatIterator_(const SparseMatIterator_ &it)
the copy constructor
SparseMatIterator_(SparseMat_< _Tp > *_m)
the full constructor setting the iterator to the first sparse matrix element
Read-write Sparse Matrix Iterator.
Definition mat.hpp:3304
SparseMatIterator(SparseMat *_m, const int *idx)
the full constructor setting the iterator to the specified sparse matrix element
SparseMatIterator()
the default constructor
SparseMat::Node * node() const
returns pointer to the current sparse matrix node. it.node->idx is the index of the current element (...
SparseMatIterator(const SparseMatIterator &it)
the copy constructor
SparseMatIterator(SparseMat *_m)
the full constructor setting the iterator to the first sparse matrix element
_Tp & value() const
returns read-write reference to the current sparse matrix element
Template sparse n-dimensional array class derived from SparseMat.
Definition mat.hpp:3013
SparseMat_(const Mat &m)
converts dense matrix to the sparse form
void create(int dims, const int *_sizes)
equivalent to cv::SparseMat::create(dims, _sizes, DataType<_Tp>::type)
SparseMatIterator_< _Tp > end()
returns sparse matrix iterator pointing to the element following the last sparse matrix element
SparseMat_()
the default constructor
_Tp & ref(int i0, size_t *hashval=0)
equivalent to SparseMat::ref<_Tp>(i0, hashval)
SparseMatConstIterator_< _Tp > const_iterator
Definition mat.hpp:3016
SparseMatIterator_< _Tp > begin()
returns sparse matrix iterator pointing to the first sparse matrix element
SparseMat_(const SparseMat_ &m)
the copy constructor. This is O(1) operation - no data is copied
_Tp operator()(int i0, int i1, size_t *hashval=0) const
equivalent to SparseMat::value<_Tp>(i0, i1, hashval)
_Tp & ref(const int *idx, size_t *hashval=0)
equivalent to SparseMat::ref<_Tp>(idx, hashval)
SparseMatConstIterator_< _Tp > end() const
returns read-only sparse matrix iterator pointing to the element following the last sparse matrix ele...
SparseMatConstIterator_< _Tp > begin() const
returns read-only sparse matrix iterator pointing to the first sparse matrix element
SparseMatIterator_< _Tp > iterator
Definition mat.hpp:3015
SparseMat_(const SparseMat &m)
the copy constructor. If DataType<_Tp>.type != m.type(), the m elements are converted
_Tp operator()(int i0, int i1, int i2, size_t *hashval=0) const
equivalent to SparseMat::value<_Tp>(i0, i1, i2, hashval)
int type() const
converts sparse matrix to the old-style CvSparseMat. All the elements are copied
_Tp & ref(int i0, int i1, int i2, size_t *hashval=0)
equivalent to SparseMat::ref<_Tp>(i0, i1, i2, hashval)
_Tp operator()(int i0, size_t *hashval=0) const
equivalent to SparseMat::value<_Tp>(i0, hashval)
SparseMat_(int dims, const int *_sizes)
the full constructor equivalent to SparseMat(dims, _sizes, DataType<_Tp>::type)
_Tp & ref(int i0, int i1, size_t *hashval=0)
equivalent to SparseMat::ref<_Tp>(i0, i1, hashval)
int depth() const
returns depth of the matrix elements
_Tp operator()(const int *idx, size_t *hashval=0) const
equivalent to SparseMat::value<_Tp>(idx, hashval)
CV_NODISCARD_STD SparseMat_ clone() const
makes full copy of the matrix. All the elements are duplicated
int channels() const
returns the number of channels in each matrix element
The class SparseMat represents multi-dimensional sparse numerical arrays.
Definition mat.hpp:2735
const _Tp * find(const int *idx, size_t *hashval=0) const
returns pointer to the specified element (nD case)
SparseMatIterator_< _Tp > begin()
returns the sparse matrix iterator at the matrix beginning
SparseMatConstIterator begin() const
returns the read-only sparse matrix iterator at the matrix beginning
const int * size() const
returns the array of sizes, or NULL if the matrix is not allocated
int dims() const
returns the matrix dimensionality
void copyTo(SparseMat &m) const
copies all the data to the destination matrix. All the previous content of m is erased
~SparseMat()
the destructor
void clear()
sets all the sparse matrix elements to 0, which means clearing the hash table.
int type() const
returns type of sparse matrix elements
_Tp value(int i0, int i1, int i2, size_t *hashval=0) const
returns value of the specified element (3D case)
size_t elemSize1() const
returns elemSize()/channels()
Hdr * hdr
Definition mat.hpp:2994
SparseMatConstIterator end() const
returns the read-only sparse matrix iterator at the matrix end
_Tp & ref(const int *idx, size_t *hashval=0)
returns reference to the specified element (nD case)
SparseMatConstIterator const_iterator
Definition mat.hpp:2738
int size(int i) const
returns the size of i-th matrix dimension (or 0)
const _Tp * find(int i0, int i1, int i2, size_t *hashval=0) const
returns pointer to the specified element (3D case)
_Tp value(int i0, int i1, size_t *hashval=0) const
returns value of the specified element (2D case)
_Tp & ref(int i0, int i1, int i2, size_t *hashval=0)
returns reference to the specified element (3D case)
void convertTo(SparseMat &m, int rtype, double alpha=1) const
multiplies all the matrix elements by the specified scale factor alpha and converts the results to th...
uchar * ptr(int i0, int i1, bool createMissing, size_t *hashval=0)
returns pointer to the specified element (2D case)
void removeNode(size_t hidx, size_t nidx, size_t previdx)
size_t hash(const int *idx) const
computes the element hash value (nD case)
SparseMat(int dims, const int *_sizes, int _type)
_Tp value(int i0, size_t *hashval=0) const
returns value of the specified element (1D case)
void convertTo(Mat &m, int rtype, double alpha=1, double beta=0) const
converts sparse matrix to dense n-dim matrix with optional type conversion and scaling.
size_t hash(int i0, int i1, int i2) const
computes the element hash value (3D case)
void copyTo(Mat &m) const
converts sparse matrix to dense matrix.
uchar * ptr(const int *idx, bool createMissing, size_t *hashval=0)
returns pointer to the specified element (nD case)
SparseMatIterator_< _Tp > end()
returns the typed sparse matrix iterator at the matrix end
void erase(const int *idx, size_t *hashval=0)
erases the specified element (nD case)
SparseMatIterator end()
returns the sparse matrix iterator at the matrix end
SparseMat(const SparseMat &m)
CV_NODISCARD_STD SparseMat clone() const
creates full copy of the matrix
const _Tp & value(const Node *n) const
returns the value stored in the sparse martix node
const Node * node(size_t nidx) const
const _Tp * find(int i0, int i1, size_t *hashval=0) const
returns pointer to the specified element (2D case)
void addref()
manually increments the reference counter to the header.
_Tp & ref(int i0, size_t *hashval=0)
returns reference to the specified element (1D case)
SparseMat()
Various SparseMat constructors.
_Tp & ref(int i0, int i1, size_t *hashval=0)
returns reference to the specified element (2D case)
uchar * newNode(const int *idx, size_t hashval)
SparseMatIterator iterator
Definition mat.hpp:2737
const _Tp * find(int i0, size_t *hashval=0) const
returns pointer to the specified element (1D case)
size_t hash(int i0, int i1) const
computes the element hash value (2D case)
uchar * ptr(int i0, int i1, int i2, bool createMissing, size_t *hashval=0)
returns pointer to the specified element (3D case)
void erase(int i0, int i1, int i2, size_t *hashval=0)
erases the specified element (3D case)
uchar * ptr(int i0, bool createMissing, size_t *hashval=0)
returns pointer to the specified element (1D case)
SparseMatConstIterator_< _Tp > end() const
returns the typed read-only sparse matrix iterator at the matrix end
int channels() const
returns the number of channels
size_t nzcount() const
returns the number of non-zero elements (=the number of hash table nodes)
SparseMatConstIterator_< _Tp > begin() const
returns the read-only sparse matrix iterator at the matrix beginning
SparseMatIterator begin()
returns the sparse matrix iterator at the matrix beginning
void erase(int i0, int i1, size_t *hashval=0)
erases the specified element (2D case)
int flags
Definition mat.hpp:2993
void create(int dims, const int *_sizes, int _type)
reallocates sparse matrix.
void assignTo(SparseMat &m, int type=-1) const
int depth() const
returns the depth of sparse matrix elements
size_t hash(int i0) const
computes the element hash value (1D case)
_Tp value(const int *idx, size_t *hashval=0) const
returns value of the specified element (nD case)
size_t elemSize() const
converts sparse matrix to the old-style representation; all the elements are copied.
void resizeHashTab(size_t newsize)
_Tp & value(Node *n)
returns the value stored in the sparse martix node
static CV_NODISCARD_STD UMat zeros(int ndims, const int *sz, int type, UMatUsageFlags usageFlags)
void updateContinuityFlag()
internal use method: updates the continuity flag
void create(int ndims, const int *sizes, int type, UMatUsageFlags usageFlags=USAGE_DEFAULT)
UMat operator()(const Range *ranges) const
UMat(const std::vector< _Tp > &vec, bool copyData=false)
builds matrix from std::vector with or without copying the data
static CV_NODISCARD_STD UMat diag(const UMat &d, UMatUsageFlags usageFlags)
constructs a square diagonal matrix which main diagonal is vector "d"
UMat(int rows, int cols, int type, const Scalar &s, UMatUsageFlags usageFlags=USAGE_DEFAULT)
constructs 2D matrix and fills it with the specified value _s.
int cols
number of columns in the matrix; -1 when the matrix has more than 2 dimensions
Definition mat.hpp:2623
UMat & setTo(InputArray value, InputArray mask=noArray())
sets some of the matrix elements to s, according to the mask
UMat(Size size, int type, UMatUsageFlags usageFlags=USAGE_DEFAULT)
void create(const std::vector< int > &sizes, int type, UMatUsageFlags usageFlags=USAGE_DEFAULT)
MatAllocator * allocator
custom allocator
Definition mat.hpp:2626
static MatAllocator * getStdAllocator()
and the standard allocator
UMat reshape(int cn, int rows=0) const
creates alternative matrix header for the same data, with different
static CV_NODISCARD_STD UMat zeros(int rows, int cols, int type)
Definition mat.hpp:2523
static CV_NODISCARD_STD UMat ones(Size size, int type)
Definition mat.hpp:2530
UMat & adjustROI(int dtop, int dbottom, int dleft, int dright)
moves/resizes the current matrix ROI inside the parent matrix.
static CV_NODISCARD_STD UMat eye(int rows, int cols, int type)
Definition mat.hpp:2534
void copySize(const UMat &m)
internal use function; properly re-allocates _size, _step arrays
size_t elemSize1() const
returns the size of element channel in bytes.
size_t elemSize() const
returns element size in bytes,
Mat getMat(AccessFlag flags) const
int checkVector(int elemChannels, int depth=-1, bool requireContinuous=true) const
returns N if the matrix is 1-channel (N x ptdim) or ptdim-channel (1 x N) or (N x 1); negative number...
static CV_NODISCARD_STD UMat zeros(Size size, int type)
Definition mat.hpp:2524
static CV_NODISCARD_STD UMat ones(Size size, int type, UMatUsageFlags usageFlags)
CV_NODISCARD_STD UMat clone() const
returns deep copy of the matrix, i.e. the data is copied
static CV_NODISCARD_STD UMat ones(int ndims, const int *sz, int type)
Definition mat.hpp:2531
static CV_NODISCARD_STD UMat ones(int rows, int cols, int type)
Definition mat.hpp:2529
UMat row(int y) const
returns a new matrix header for the specified row
UMat(UMatUsageFlags usageFlags=USAGE_DEFAULT) CV_NOEXCEPT
default constructor
UMat(const UMat &m, const std::vector< Range > &ranges)
int channels() const
returns element type, similar to CV_MAT_CN(cvmat->type)
size_t step1(int i=0) const
returns step/elemSize1()
UMat(int ndims, const int *sizes, int type, const Scalar &s, UMatUsageFlags usageFlags=USAGE_DEFAULT)
int type() const
returns element type, similar to CV_MAT_TYPE(cvmat->type)
void locateROI(Size &wholeSize, Point &ofs) const
locates matrix header within a parent matrix. See below
static CV_NODISCARD_STD UMat zeros(Size size, int type, UMatUsageFlags usageFlags)
UMat(const UMat &m)
copy constructor
double dot(InputArray m) const
computes dot-product
void convertTo(OutputArray m, int rtype, double alpha=1, double beta=0) const
converts matrix to another datatype with optional scaling. See cvConvertScale.
MatSize size
dimensional size of the matrix; accessible in various formats
Definition mat.hpp:2644
UMat operator()(const Rect &roi) const
int dims
the matrix dimensionality, >= 2
Definition mat.hpp:2617
static CV_NODISCARD_STD UMat diag(const UMat &d)
Definition mat.hpp:2486
int rows
number of rows in the matrix; -1 when the matrix has more than 2 dimensions
Definition mat.hpp:2620
UMat rowRange(int startrow, int endrow) const
... for the specified row span
UMat operator()(Range rowRange, Range colRange) const
extracts a rectangular sub-matrix
int depth() const
returns element type, similar to CV_MAT_DEPTH(cvmat->type)
void deallocate()
deallocates the matrix data
bool empty() const
returns true if matrix data is NULL
MatStep step
number of bytes each matrix element/row/plane/dimension occupies
Definition mat.hpp:2647
UMat(const UMat &m, const Range *ranges)
static CV_NODISCARD_STD UMat eye(Size size, int type, UMatUsageFlags usageFlags)
void addref()
increases the reference counter; use with care to avoid memleaks
void copyTo(OutputArray m, InputArray mask) const
copies those matrix elements to "m" that are marked with non-zero mask elements.
void * handle(AccessFlag accessFlags) const
UMat(Size size, int type, const Scalar &s, UMatUsageFlags usageFlags=USAGE_DEFAULT)
static CV_NODISCARD_STD UMat eye(Size size, int type)
Definition mat.hpp:2535
UMatUsageFlags usageFlags
usage flags for allocator; recommend do not set directly, instead set during construct/create/getUMat
Definition mat.hpp:2629
static CV_NODISCARD_STD UMat zeros(int rows, int cols, int type, UMatUsageFlags usageFlags)
Matlab-style matrix initialization.
void release()
decreases reference counter;
UMat(const UMat &m, const Rect &roi)
UMat col(int x) const
returns a new matrix header for the specified column
static CV_NODISCARD_STD UMat eye(int rows, int cols, int type, UMatUsageFlags usageFlags)
void copyTo(OutputArray m) const
copies the matrix content to "m".
UMat inv(int method=DECOMP_LU) const
matrix inversion by means of matrix expressions
size_t total() const
returns the total number of matrix elements
void create(Size size, int type, UMatUsageFlags usageFlags=USAGE_DEFAULT)
UMat reshape(int cn, int newndims, const int *newsz) const
UMat t() const
matrix transposition by means of matrix expressions
~UMat()
destructor - calls release()
UMat rowRange(const Range &r) const
bool isSubmatrix() const
returns true if the matrix is a submatrix of another matrix
UMatData * u
black-box container of UMat data
Definition mat.hpp:2638
int flags
Definition mat.hpp:2614
UMat colRange(int startcol, int endcol) const
... for the specified column span
UMat(int rows, int cols, int type, UMatUsageFlags usageFlags=USAGE_DEFAULT)
constructs 2D matrix of the specified size and type
UMat colRange(const Range &r) const
static CV_NODISCARD_STD UMat ones(int ndims, const int *sz, int type, UMatUsageFlags usageFlags)
static CV_NODISCARD_STD UMat ones(int rows, int cols, int type, UMatUsageFlags usageFlags)
void assignTo(UMat &m, int type=-1) const
size_t offset
offset of the submatrix (or 0)
Definition mat.hpp:2641
UMat(int ndims, const int *sizes, int type, UMatUsageFlags usageFlags=USAGE_DEFAULT)
constructs n-dimensional matrix
static CV_NODISCARD_STD UMat zeros(int ndims, const int *sz, int type)
Definition mat.hpp:2525
UMat operator()(const std::vector< Range > &ranges) const
UMat mul(InputArray m, double scale=1) const
per-element matrix multiplication by means of matrix expressions
bool isContinuous() const
returns true iff the matrix data is continuous
void ndoffset(size_t *ofs) const
void create(int rows, int cols, int type, UMatUsageFlags usageFlags=USAGE_DEFAULT)
allocates new matrix data unless the matrix already has specified size and type.
UMat(const UMat &m, const Range &rowRange, const Range &colRange=Range::all())
creates a matrix header for a part of the bigger matrix
Template class for short numerical vectors, a partial case of Matx.
Definition matx.hpp:369
This type is very similar to InputArray except that it is used for input/output and output function p...
Definition mat.hpp:296
Mat & getMatRef(int i=-1) const
_OutputArray(std::vector< Mat_< _Tp > > &vec)
_OutputArray(ogl::Buffer &buf)
static _OutputArray rawOut(std::array< _Tp, _Nm > &arr)
_OutputArray(std::vector< std::vector< bool > > &)=delete
_OutputArray(Matx< _Tp, m, n > &matx)
_OutputArray(const std::vector< std::vector< _Tp > > &vec)
static _OutputArray rawOut(std::vector< _Tp > &vec)
_OutputArray(std::array< _Tp, _Nm > &arr)
_OutputArray(const std::vector< _Tp > &vec)
cuda::GpuMat & getGpuMatRef() const
std::vector< cuda::GpuMat > & getGpuMatVecRef() const
_OutputArray(std::vector< UMat > &vec)
_OutputArray(std::vector< cuda::GpuMat > &d_mat)
void create(Size sz, int type, int i=-1, bool allowTransposed=false, _OutputArray::DepthMask fixedDepthMask=static_cast< _OutputArray::DepthMask >(0)) const
_OutputArray(const ogl::Buffer &buf)
_OutputArray(const Mat_< _Tp > &m)
_OutputArray(const Mat &m)
void setTo(const _InputArray &value, const _InputArray &mask=_InputArray()) const
void create(int dims, const int *size, int type, int i=-1, bool allowTransposed=false, _OutputArray::DepthMask fixedDepthMask=static_cast< _OutputArray::DepthMask >(0)) const
_OutputArray(const _Tp *vec, int n)
_OutputArray(cuda::GpuMat &d_mat)
_OutputArray(cudev::GpuMat_< _Tp > &m)
void assign(const UMat &u) const
void assign(const std::vector< UMat > &v) const
_OutputArray(_Tp *vec, int n)
_OutputArray(const std::vector< UMat > &vec)
_OutputArray(const std::vector< Mat > &vec)
_OutputArray(std::vector< std::vector< _Tp > > &vec)
_OutputArray(const std::vector< Mat_< _Tp > > &vec)
_OutputArray(Mat_< _Tp > &m)
_OutputArray(const std::array< Mat, _Nm > &arr)
ogl::Buffer & getOGlBufferRef() const
_OutputArray(int _flags, void *_obj)
DepthMask
Definition mat.hpp:299
_OutputArray(cuda::HostMem &cuda_mem)
_OutputArray(const std::vector< cuda::GpuMat > &d_mat)
_OutputArray(std::array< Mat, _Nm > &arr)
_OutputArray(const std::array< _Tp, _Nm > &arr)
_OutputArray(const cuda::HostMem &cuda_mem)
_OutputArray(const UMat &m)
void assign(const Mat &m) const
_OutputArray(const cudev::GpuMat_< _Tp > &m)
_OutputArray(std::vector< Mat > &vec)
void assign(const std::vector< Mat > &v) const
void create(int rows, int cols, int type, int i=-1, bool allowTransposed=false, _OutputArray::DepthMask fixedDepthMask=static_cast< _OutputArray::DepthMask >(0)) const
_OutputArray(const cuda::GpuMat &d_mat)
_OutputArray(std::vector< _Tp > &vec)
cuda::HostMem & getHostMemRef() const
UMat & getUMatRef(int i=-1) const
void createSameSize(const _InputArray &arr, int mtype) const
_OutputArray(std::vector< bool > &vec)=delete
_OutputArray(const Matx< _Tp, m, n > &matx)
Base storage class for GPU memory with reference counting.
Definition cuda.hpp:106
Class with reference counting wrapping special memory type allocation functions from CUDA.
Definition cuda.hpp:790
Smart pointer for OpenGL buffer object with reference counting.
Definition opengl.hpp:80
void CV_EXPORTS_W copyTo(InputArray src, OutputArray dst, InputArray mask)
This is an overloaded member function, provided for convenience (python) Copies the matrix to another...
@ DECOMP_LU
Definition base.hpp:135
static _InputOutputArray rawInOut(_Tp &v)
static _InputArray rawIn(_Tp &v)
static bool operator!=(const Matx< _Tp, m, n > &a, const Matx< _Tp, m, n > &b)
UMatUsageFlags
Usage flags for allocator.
Definition mat.hpp:464
CV_EXPORTS InputOutputArray noArray()
static bool operator==(const Matx< _Tp, m, n > &a, const Matx< _Tp, m, n > &b)
InputArray InputArrayOfArrays
Definition mat.hpp:443
AccessFlag
Definition mat.hpp:65
static _OutputArray rawOut(_Tp &v)
InputOutputArray InputOutputArrayOfArrays
Definition mat.hpp:447
OutputArray OutputArrayOfArrays
Definition mat.hpp:445
const _OutputArray & OutputArray
Definition mat.hpp:444
CV__DEBUG_NS_END typedef const _InputArray & InputArray
Definition mat.hpp:442
const _InputOutputArray & InputOutputArray
Definition mat.hpp:446
@ USAGE_ALLOCATE_SHARED_MEMORY
Definition mat.hpp:470
@ USAGE_ALLOCATE_HOST_MEMORY
Definition mat.hpp:468
@ __UMAT_USAGE_FLAGS_32BIT
Definition mat.hpp:472
@ USAGE_DEFAULT
Definition mat.hpp:465
@ USAGE_ALLOCATE_DEVICE_MEMORY
Definition mat.hpp:469
@ ACCESS_FAST
Definition mat.hpp:66
@ ACCESS_READ
Definition mat.hpp:65
@ ACCESS_MASK
Definition mat.hpp:66
@ ACCESS_RW
Definition mat.hpp:66
@ ACCESS_WRITE
Definition mat.hpp:65
int rows
Definition core_c.h:257
int CvScalar value
Definition core_c.h:720
int int idx1
Definition core_c.h:654
int int void int total
Definition core_c.h:1689
const CvArr const CvArr const CvArr CvArr int flags
Definition core_c.h:1342
int int channels
Definition core_c.h:100
double double end
Definition core_c.h:1381
const void * elem
Definition core_c.h:1715
CvArr * dst
Definition core_c.h:875
int cols
Definition core_c.h:221
int int int idx2
Definition core_c.h:656
double const CvArr double beta
Definition core_c.h:1094
Cv_iplAllocateImageData Cv_iplDeallocate deallocate
Definition core_c.h:1964
const int * idx
Definition core_c.h:668
CvScalar scale
Definition core_c.h:1088
CvSize size
Definition core_c.h:112
int int type
Definition core_c.h:221
void int step
Definition core_c.h:905
CvArr const CvArr * mask
Definition core_c.h:589
CvArr * arr
Definition core_c.h:1247
int depth
Definition core_c.h:100
void * data
Definition core_c.h:427
const CvArr CvArr * x
Definition core_c.h:1195
double alpha
Definition core_c.h:1093
int dims
Definition core_c.h:464
int idx0
Definition core_c.h:652
const CvArr * y
Definition core_c.h:1187
const int * sizes
Definition core_c.h:440
#define CV_8S
Definition interface.h:74
#define CV_16F
Definition interface.h:80
#define CV_64F
Definition interface.h:79
#define CV_8U
Definition interface.h:73
#define CV_32S
Definition interface.h:77
#define CV_32F
Definition interface.h:78
unsigned char uchar
Definition interface.h:51
#define CV_16S
Definition interface.h:76
unsigned short ushort
Definition interface.h:52
#define CV_16U
Definition interface.h:75
CV_INLINE v_reg< _Tp, n > operator|(const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b)
Bitwise OR.
CV_INLINE v_reg< _Tp, n > operator&(const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b)
Bitwise AND.
CV_INLINE v_reg< _Tp, n > operator/(const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b)
Divide values.
CV_INLINE v_reg< _Tp, n > operator~(const v_reg< _Tp, n > &a)
Bitwise NOT.
CV_INLINE v_reg< _Tp, n > operator^(const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b)
Bitwise XOR.
#define CV_EXPORTS
Definition cvdef.h:435
#define CV_MAT_CONT_FLAG
Definition cvdef.h:499
#define CV_ENUM_FLAGS(EnumType)
Definition cvdef.h:649
#define CV_NODISCARD_STD
Definition cvdef.h:767
#define CV_NOEXCEPT
Definition cvdef.h:800
#define __CV_ENUM_FLAGS_BITWISE_AND(EnumType, Arg1Type, Arg2Type)
Definition cvdef.h:611
#define CV_SUBMAT_FLAG
Definition cvdef.h:503
#define CV__DEBUG_NS_BEGIN
Definition cvdef.h:69
#define CV__DEBUG_NS_END
Definition cvdef.h:70
CvPoint2D32f pt[4]
Definition imgproc_c.h:571
CvRect r
Definition imgproc_c.h:984
float ** ranges
Definition imgproc_c.h:636
const CvArr CvArr int method
Definition imgproc_c.h:384
CvArr CvArr IplConvKernel int operation
Definition imgproc_c.h:330
CV_EXPORTS OutputArray int double double InputArray mask
Definition imgproc.hpp:2132
"black box" representation of the file storage associated with a file on disk.
Definition calib3d.hpp:441
DualQuat< T > inv(const DualQuat< T > &dq, QuatAssumeType assumeUnit=QUAT_ASSUME_NOT_UNIT)
Definition dualquaternion.inl.hpp:187
DualQuat< T > operator-(const DualQuat< T > &q, const T a)
Definition dualquaternion.inl.hpp:255
static bool operator<(const FileNodeIterator &it1, const FileNodeIterator &it2)
Definition persistence.hpp:1303
DualQuat< T > operator+(const T a, const DualQuat< T > &q)
Definition dualquaternion.inl.hpp:243
DualQuat< T > operator*(const T a, const DualQuat< T > &q)
Definition dualquaternion.inl.hpp:274
MatSize(int *_p) CV_NOEXCEPT
int dims() const CV_NOEXCEPT
the sparse matrix header
Definition mat.hpp:2744
int valueOffset
Definition mat.hpp:2749
size_t nodeSize
Definition mat.hpp:2750
std::vector< uchar > pool
Definition mat.hpp:2753
size_t freeList
Definition mat.hpp:2752
int refcount
Definition mat.hpp:2747
int dims
Definition mat.hpp:2748
std::vector< size_t > hashtab
Definition mat.hpp:2754
Hdr(int _dims, const int *_sizes, int _type)
size_t nodeCount
Definition mat.hpp:2751
sparse matrix node - element of a hash table
Definition mat.hpp:2760
size_t hashval
hash value
Definition mat.hpp:2762
size_t next
index of the next node in the same hash table entry
Definition mat.hpp:2764
std::shared_ptr< void > allocatorContext
Definition mat.hpp:582
void * userdata
Definition mat.hpp:578
uchar * data
Definition mat.hpp:572
int refcount
Definition mat.hpp:571
void markDeviceMemMapped(bool flag)
int allocatorFlags_
Definition mat.hpp:579
MemoryFlag
Definition mat.hpp:546
UMatData * originalUMatData
Definition mat.hpp:581
bool hostCopyObsolete() const
void markHostCopyObsolete(bool flag)
bool deviceCopyObsolete() const
const MatAllocator * currAllocator
Definition mat.hpp:569
bool tempCopiedUMat() const
int mapcount
Definition mat.hpp:580
void markDeviceCopyObsolete(bool flag)
const MatAllocator * prevAllocator
Definition mat.hpp:568
size_t size
Definition mat.hpp:574
void * handle
Definition mat.hpp:577
UMatData::MemoryFlag flags
Definition mat.hpp:576
UMatData(const MatAllocator *allocator)
bool deviceMemMapped() const
uchar * origdata
Definition mat.hpp:573
int urefcount
Definition mat.hpp:570