| OpenCV 3.4.8 Open Source Computer Vision

Modules | Classes | Macros | Typedefs | Enumerations | Functions
C structures and operations
Core functionality

## Modules
| Connections with C++

## Classes
struct | CvAttrList
| List of attributes. : More...
struct | CvBox2D
struct | CvChain
struct | CvContour
struct | CvFileNode
struct | CvGraph
struct | CvGraphEdge
struct | CvGraphScanner
struct | CvGraphVtx
struct | CvGraphVtx2D
struct | CvHistogram
struct | CvLineIterator
struct | CvMat
struct | CvMatND
struct | CvMemBlock
struct | CvMemStorage
struct | CvMemStoragePos
struct | CvModuleInfo
struct | CvNArrayIterator
struct | CvPluginFuncInfo
struct | CvPoint
struct | CvPoint2D32f
struct | CvPoint2D64f
struct | CvPoint3D32f
struct | CvPoint3D64f
struct | CvRect
struct | CvScalar
struct | CvSeq
struct | CvSeqBlock
struct | CvSeqReader
struct | CvSeqWriter
struct | CvSet
struct | CvSetElem
struct | CvSize
struct | CvSize2D32f
struct | CvSlice
struct | CvSparseMat
struct | CvSparseMatIterator
struct | CvSparseNode
struct | CvString
struct | CvStringHashNode
struct | CvTermCriteria
struct | CvTreeNodeIterator
struct | CvTypeInfo
| Type information. More...
struct | IplConvKernel
struct | IplConvKernelFP
struct | IplImage
struct | IplROI

## Macros
#define | CV_ARE_CNS_EQ(mat1, mat2) ((((mat1)->type ^ (mat2)->type) & CV_MAT_CN_MASK) == 0)
#define | CV_ARE_DEPTHS_EQ(mat1, mat2) ((((mat1)->type ^ (mat2)->type) & CV_MAT_DEPTH_MASK) == 0)
#define | CV_ARE_SIZES_EQ(mat1, mat2) ((mat1)->rows == (mat2)->rows && (mat1)->cols == (mat2)->cols)
#define | CV_ARE_TYPES_EQ(mat1, mat2) ((((mat1)->type ^ (mat2)->type) & CV_MAT_TYPE_MASK) == 0)
#define | CV_ASSERT(Condition)
#define | CV_AUTO_STEP 0x7fffffff
#define | CV_AUTOSTEP 0x7fffffff
#define | CV_BACK 0
#define | CV_CALL(Func)
#define | CV_CHECK()
#define | CV_CHECK_QUIET 2
#define | CV_CHECK_RANGE 1
#define | CV_CHOLESKY 3
#define | CV_CMP(a, b) (((a) > (b)) - ((a) < (b)))
#define | CV_CMP_EQ 0
#define | CV_CMP_GE 2
#define | CV_CMP_GT 1
#define | CV_CMP_LE 4
#define | CV_CMP_LT 3
#define | CV_CMP_NE 5
#define | CV_CONTOUR_FIELDS()
#define | CV_CURRENT_POINT(reader) (*((CvPoint*)((reader).ptr)))
#define | CV_ErrModeLeaf 0 /* Print error and exit program */
#define | CV_ErrModeParent 1 /* Print error and continue */
#define | CV_ErrModeSilent 2 /* Don't print and continue */
#define | CV_ERROR(Code, Msg)
#define | CV_FRONT 1
#define | CV_FUNCNAME(Name) static char cvFuncName[] = Name
#define | CV_GEMM_A_T 1
#define | CV_GEMM_B_T 2
#define | CV_GEMM_C_T 4
#define | CV_GET_SEQ_ELEM(elem_type, seq, index) CV_SEQ_ELEM( (seq), elem_type, (index) )
#define | CV_GRAPH CV_SEQ_KIND_GRAPH
#define | CV_GRAPH_ALL_ITEMS -1
#define | CV_GRAPH_ANY_EDGE 30
#define | CV_GRAPH_BACK_EDGE 4
#define | CV_GRAPH_BACKTRACKING 64
#define | CV_GRAPH_CROSS_EDGE 16
#define | CV_GRAPH_FLAG_ORIENTED (1 << CV_SEQ_FLAG_SHIFT)
#define | CV_GRAPH_FORWARD_EDGE 8
#define | CV_GRAPH_FORWARD_EDGE_FLAG (1 << 28)
#define | CV_GRAPH_ITEM_VISITED_FLAG (1 << 30)
#define | CV_GRAPH_NEW_TREE 32
#define | CV_GRAPH_OVER -1
#define | CV_GRAPH_SEARCH_TREE_NODE_FLAG (1 << 29)
#define | CV_GRAPH_TREE_EDGE 2
#define | CV_GRAPH_VERTEX 1
#define | CV_HIST_ARRAY 0
#define | CV_HIST_HAS_RANGES(hist) (((hist)->type & CV_HIST_RANGES_FLAG) != 0)
#define | CV_HIST_MAGIC_VAL 0x42450000
#define | CV_HIST_RANGES_FLAG (1 << 11)
#define | CV_HIST_SPARSE 1
#define | CV_HIST_TREE CV_HIST_SPARSE
#define | CV_HIST_UNIFORM 1
#define | CV_HIST_UNIFORM_FLAG (1 << 10)
#define | CV_IABS(a) abs(a)
#define | CV_IMAGE_ELEM(image, elemtype, row, col) (((elemtype*)((image)->imageData + (image)->widthStep*(row)))[(col)])
#define | CV_IMAX(a, b) ((a) ^ (((a)^(b)) & (((a) > (b)) - 1)))
#define | CV_IMIN(a, b) ((a) ^ (((a)^(b)) & (((a) < (b)) - 1)))
#define | CV_IS_GRAPH(seq) (CV_IS_SET(seq) && CV_SEQ_KIND((CvSet*)(seq)) == CV_SEQ_KIND_GRAPH)
#define | CV_IS_GRAPH_EDGE_VISITED(edge) (((CvGraphEdge*)(edge))->flags & CV_GRAPH_ITEM_VISITED_FLAG)
#define | CV_IS_GRAPH_ORIENTED(seq) (((seq)->flags & CV_GRAPH_FLAG_ORIENTED) != 0)
#define | CV_IS_GRAPH_VERTEX_VISITED(vtx) (((CvGraphVtx*)(vtx))->flags & CV_GRAPH_ITEM_VISITED_FLAG)
#define | CV_IS_HIST(hist)
#define | CV_IS_IMAGE(img) (CV_IS_IMAGE_HDR(img) && ((IplImage*)img)->imageData != NULL)
#define | CV_IS_IMAGE_HDR(img) ((img) != NULL && ((const IplImage*)(img))->nSize == sizeof(IplImage))
#define | CV_IS_MASK_ARR(mat) (((mat)->type & (CV_MAT_TYPE_MASK & ~CV_8SC1)) == 0)
#define | CV_IS_MAT(mat) (CV_IS_MAT_HDR(mat) && ((const CvMat*)(mat))->data.ptr != NULL)
#define | CV_IS_MAT_CONST(mat) (((mat)->rows|(mat)->cols) == 1)
#define | CV_IS_MAT_HDR(mat)
#define | CV_IS_MAT_HDR_Z(mat)
#define | CV_IS_MATND(mat) (CV_IS_MATND_HDR(mat) && ((const CvMatND*)(mat))->data.ptr != NULL)
#define | CV_IS_MATND_HDR(mat) ((mat) != NULL && (((const CvMatND*)(mat))->type & CV_MAGIC_MASK) == CV_MATND_MAGIC_VAL)
#define | CV_IS_SEQ(seq) ((seq) != NULL && (((CvSeq*)(seq))->flags & CV_MAGIC_MASK) == CV_SEQ_MAGIC_VAL)
#define | CV_IS_SEQ_CHAIN(seq) (CV_SEQ_KIND(seq) == CV_SEQ_KIND_CURVE && (seq)->elem_size == 1)
#define | CV_IS_SEQ_CHAIN_CONTOUR(seq) (CV_IS_SEQ_CHAIN( seq ) && CV_IS_SEQ_CLOSED( seq ))
#define | CV_IS_SEQ_CLOSED(seq) (((seq)->flags & CV_SEQ_FLAG_CLOSED) != 0)
#define | CV_IS_SEQ_CONTOUR(seq) (CV_IS_SEQ_CLOSED(seq) && (CV_IS_SEQ_POLYLINE(seq) || CV_IS_SEQ_CHAIN(seq)))
#define | CV_IS_SEQ_CONVEX(seq) 0
#define | CV_IS_SEQ_CURVE(seq) (CV_SEQ_KIND(seq) == CV_SEQ_KIND_CURVE)
#define | CV_IS_SEQ_HOLE(seq) (((seq)->flags & CV_SEQ_FLAG_HOLE) != 0)
#define | CV_IS_SEQ_INDEX(seq)
#define | CV_IS_SEQ_POINT_SET(seq) ((CV_SEQ_ELTYPE(seq) == CV_32SC2 || CV_SEQ_ELTYPE(seq) == CV_32FC2))
#define | CV_IS_SEQ_POINT_SUBSET(seq) (CV_IS_SEQ_INDEX( seq ) || CV_SEQ_ELTYPE(seq) == CV_SEQ_ELTYPE_PPOINT)
#define | CV_IS_SEQ_POLYGON(seq) (CV_IS_SEQ_POLYLINE(seq) && CV_IS_SEQ_CLOSED(seq))
#define | CV_IS_SEQ_POLYGON_TREE(seq)
#define | CV_IS_SEQ_POLYLINE(seq) (CV_SEQ_KIND(seq) == CV_SEQ_KIND_CURVE && CV_IS_SEQ_POINT_SET(seq))
#define | CV_IS_SEQ_SIMPLE(seq) 1
#define | CV_IS_SET(set) ((set) != NULL && (((CvSeq*)(set))->flags & CV_MAGIC_MASK) == CV_SET_MAGIC_VAL)
#define | CV_IS_SET_ELEM(ptr) (((CvSetElem*)(ptr))->flags >= 0)
#define | CV_IS_SPARSE_HIST(hist) CV_IS_SPARSE_MAT((hist)->bins)
#define | CV_IS_SPARSE_MAT(mat) CV_IS_SPARSE_MAT_HDR(mat)
#define | CV_IS_SPARSE_MAT_HDR(mat)
#define | CV_IS_STORAGE(storage)
#define | CV_IS_SUBDIV2D(seq) (CV_IS_SET(seq) && CV_SEQ_KIND((CvSet*)(seq)) == CV_SEQ_KIND_SUBDIV2D)
#define | CV_IS_UNIFORM_HIST(hist) (((hist)->type & CV_HIST_UNIFORM_FLAG) != 0)
#define | CV_KMEANS_USE_INITIAL_LABELS 1
#define | CV_LU 0
#define | CV_MAGIC_MASK 0xFFFF0000
#define | CV_MAT_ELEM(mat, elemtype, row, col) (*(elemtype*)CV_MAT_ELEM_PTR_FAST( mat, row, col, sizeof(elemtype)))
#define | CV_MAT_ELEM_PTR(mat, row, col) CV_MAT_ELEM_PTR_FAST( mat, row, col, CV_ELEM_SIZE((mat).type) )
#define | CV_MAT_ELEM_PTR_FAST(mat, row, col, pix_size)
#define | CV_MAT_MAGIC_VAL 0x42420000
#define | CV_MATND_MAGIC_VAL 0x42430000
#define | CV_MAX_ARR 10
#define | CV_MAX_DIM 32
#define | CV_NEXT_GRAPH_EDGE(edge, vertex)
#define | CV_NEXT_SEQ_ELEM(elem_size, reader)
#define | CV_NO_CN_CHECK 2
#define | CV_NO_DEPTH_CHECK 1
#define | CV_NO_SIZE_CHECK 4
#define | CV_NODE_EMPTY 32
#define | CV_NODE_FLOAT CV_NODE_REAL
#define | CV_NODE_FLOW 8
#define | CV_NODE_HAS_NAME(flags) (((flags) & CV_NODE_NAMED) != 0)
#define | CV_NODE_IDX(mat, node) ((int*)((uchar*)(node) + (mat)->idxoffset))
#define | CV_NODE_INT 1
#define | CV_NODE_INTEGER CV_NODE_INT
#define | CV_NODE_IS_COLLECTION(flags) (CV_NODE_TYPE(flags) >= CV_NODE_SEQ)
#define | CV_NODE_IS_EMPTY(flags) (((flags) & CV_NODE_EMPTY) != 0)
#define | CV_NODE_IS_FLOW(flags) (((flags) & CV_NODE_FLOW) != 0)
#define | CV_NODE_IS_INT(flags) (CV_NODE_TYPE(flags) == CV_NODE_INT)
#define | CV_NODE_IS_MAP(flags) (CV_NODE_TYPE(flags) == CV_NODE_MAP)
#define | CV_NODE_IS_REAL(flags) (CV_NODE_TYPE(flags) == CV_NODE_REAL)
#define | CV_NODE_IS_SEQ(flags) (CV_NODE_TYPE(flags) == CV_NODE_SEQ)
#define | CV_NODE_IS_STRING(flags) (CV_NODE_TYPE(flags) == CV_NODE_STRING)
#define | CV_NODE_IS_USER(flags) (((flags) & CV_NODE_USER) != 0)
#define | CV_NODE_MAP 6
#define | CV_NODE_NAMED 64
#define | CV_NODE_NONE 0
#define | CV_NODE_REAL 2
#define | CV_NODE_REF 4
#define | CV_NODE_SEQ 5
#define | CV_NODE_SEQ_IS_SIMPLE(seq) (((seq)->flags & CV_NODE_SEQ_SIMPLE) != 0)
#define | CV_NODE_SEQ_SIMPLE 256
#define | CV_NODE_STR 3
#define | CV_NODE_STRING CV_NODE_STR
#define | CV_NODE_TYPE(flags) ((flags) & CV_NODE_TYPE_MASK)
#define | CV_NODE_TYPE_MASK 7
#define | CV_NODE_USER 16
#define | CV_NODE_VAL(mat, node) ((void*)((uchar*)(node) + (mat)->valoffset))
#define | CV_NORMAL 16
#define | CV_ORIENTED_GRAPH (CV_SEQ_KIND_GRAPH|CV_GRAPH_FLAG_ORIENTED)
#define | CV_PCA_DATA_AS_COL 1
#define | CV_PCA_DATA_AS_ROW 0
#define | CV_PCA_USE_AVG 2
#define | CV_PREV_POINT(reader) (*((CvPoint*)((reader).prev_elem)))
#define | CV_PREV_SEQ_ELEM(elem_size, reader)
#define | CV_QR 4
#define | CV_RAND_NORMAL 1
#define | CV_RAND_UNI 0
#define | CV_READ_CHAIN_POINT(_pt, reader)
#define | CV_READ_EDGE(pt1, pt2, reader)
#define | CV_READ_SEQ_ELEM(elem, reader)
#define | CV_REV_READ_SEQ_ELEM(elem, reader)
#define | CV_RNG_COEFF 4164903690U
#define | CV_SEQ_CHAIN (CV_SEQ_KIND_CURVE | CV_SEQ_ELTYPE_CODE)
#define | CV_SEQ_CHAIN_CONTOUR (CV_SEQ_FLAG_CLOSED | CV_SEQ_CHAIN)
#define | CV_SEQ_CONNECTED_COMP (CV_SEQ_KIND_GENERIC | CV_SEQ_ELTYPE_CONNECTED_COMP)
#define | CV_SEQ_CONTOUR CV_SEQ_POLYGON
#define | CV_SEQ_ELEM(seq, elem_type, index)
#define | CV_SEQ_ELTYPE(seq) ((seq)->flags & CV_SEQ_ELTYPE_MASK)
#define | CV_SEQ_ELTYPE_BITS 12
#define | CV_SEQ_ELTYPE_CODE CV_8UC1
#define | CV_SEQ_ELTYPE_CONNECTED_COMP 0
#define | CV_SEQ_ELTYPE_GENERIC 0
#define | CV_SEQ_ELTYPE_GRAPH_EDGE 0
#define | CV_SEQ_ELTYPE_GRAPH_VERTEX 0
#define | CV_SEQ_ELTYPE_INDEX CV_32SC1
#define | CV_SEQ_ELTYPE_MASK ((1 << CV_SEQ_ELTYPE_BITS) - 1)
#define | CV_SEQ_ELTYPE_POINT CV_32SC2
#define | CV_SEQ_ELTYPE_POINT3D CV_32FC3
#define | CV_SEQ_ELTYPE_PPOINT CV_SEQ_ELTYPE_PTR
#define | CV_SEQ_ELTYPE_PTR CV_USRTYPE1
#define | CV_SEQ_ELTYPE_TRIAN_ATR 0
#define | CV_SEQ_FLAG_CLOSED (1 << CV_SEQ_FLAG_SHIFT)
#define | CV_SEQ_FLAG_CONVEX (0 << CV_SEQ_FLAG_SHIFT)
#define | CV_SEQ_FLAG_HOLE (2 << CV_SEQ_FLAG_SHIFT)
#define | CV_SEQ_FLAG_SHIFT (CV_SEQ_KIND_BITS + CV_SEQ_ELTYPE_BITS)
#define | CV_SEQ_FLAG_SIMPLE (0 << CV_SEQ_FLAG_SHIFT)
#define | CV_SEQ_INDEX (CV_SEQ_KIND_GENERIC | CV_SEQ_ELTYPE_INDEX)
#define | CV_SEQ_KIND(seq) ((seq)->flags & CV_SEQ_KIND_MASK )
#define | CV_SEQ_KIND_BIN_TREE (2 << CV_SEQ_ELTYPE_BITS)
#define | CV_SEQ_KIND_BITS 2
#define | CV_SEQ_KIND_CURVE (1 << CV_SEQ_ELTYPE_BITS)
#define | CV_SEQ_KIND_GENERIC (0 << CV_SEQ_ELTYPE_BITS)
#define | CV_SEQ_KIND_GRAPH (1 << CV_SEQ_ELTYPE_BITS)
#define | CV_SEQ_KIND_MASK (((1 << CV_SEQ_KIND_BITS) - 1)<<CV_SEQ_ELTYPE_BITS)
#define | CV_SEQ_KIND_SUBDIV2D (2 << CV_SEQ_ELTYPE_BITS)
#define | CV_SEQ_MAGIC_VAL 0x42990000
#define | CV_SEQ_POINT3D_SET (CV_SEQ_KIND_GENERIC| CV_SEQ_ELTYPE_POINT3D)
#define | CV_SEQ_POINT_SET (CV_SEQ_KIND_GENERIC| CV_SEQ_ELTYPE_POINT)
#define | CV_SEQ_POLYGON (CV_SEQ_FLAG_CLOSED | CV_SEQ_POLYLINE )
#define | CV_SEQ_POLYGON_TREE (CV_SEQ_KIND_BIN_TREE | CV_SEQ_ELTYPE_TRIAN_ATR)
#define | CV_SEQ_POLYLINE (CV_SEQ_KIND_CURVE | CV_SEQ_ELTYPE_POINT)
#define | CV_SEQ_READER_FIELDS()
#define | CV_SEQ_SIMPLE_POLYGON (CV_SEQ_FLAG_SIMPLE | CV_SEQ_POLYGON )
#define | CV_SEQ_WRITER_FIELDS()
#define | CV_SEQUENCE_FIELDS()
#define | CV_SET_ELEM_FIELDS(elem_type)
| Set Order is not preserved. There can be gaps between sequence elements. After the element has been inserted it stays in the same place all the time. The MSB(most-significant or sign bit) of the first field (flags) is 0 iff the element exists. More...
#define | CV_SET_ELEM_FREE_FLAG (1 << (sizeof(int)*8-1))
#define | CV_SET_ELEM_IDX_MASK ((1 << 26) - 1)
#define | CV_SET_FIELDS()
#define | CV_SET_MAGIC_VAL 0x42980000
#define | CV_SIGN(a) CV_CMP((a),0)
#define | CV_SORT_ASCENDING 0
#define | CV_SORT_DESCENDING 16
#define | CV_SORT_EVERY_COLUMN 1
#define | CV_SORT_EVERY_ROW 0
#define | CV_SPARSE_MAT_MAGIC_VAL 0x42440000
#define | CV_STORAGE_APPEND 2
#define | CV_STORAGE_BASE64 64
#define | CV_STORAGE_FORMAT_AUTO 0
#define | CV_STORAGE_FORMAT_JSON 24
#define | CV_STORAGE_FORMAT_MASK (7<<3)
#define | CV_STORAGE_FORMAT_XML 8
#define | CV_STORAGE_FORMAT_YAML 16
#define | CV_STORAGE_MAGIC_VAL 0x42890000
#define | CV_STORAGE_MEMORY 4
#define | CV_STORAGE_READ 0
#define | CV_STORAGE_WRITE 1
#define | CV_STORAGE_WRITE_BASE64 (CV_STORAGE_BASE64 | CV_STORAGE_WRITE)
#define | CV_STORAGE_WRITE_BINARY CV_STORAGE_WRITE
#define | CV_STORAGE_WRITE_TEXT CV_STORAGE_WRITE
#define | CV_SVD 1
#define | CV_SVD_MODIFY_A 1
#define | CV_SVD_SYM 2
#define | CV_SVD_U_T 2
#define | CV_SVD_V_T 4
#define | CV_SWAP(a, b, t) ((t) = (a), (a) = (b), (b) = (t))
#define | CV_TERMCRIT_EPS 2
#define | CV_TERMCRIT_ITER 1
#define | CV_TERMCRIT_NUMBER CV_TERMCRIT_ITER
#define | CV_TREE_NODE_FIELDS(node_type)
#define | CV_TURN_ON_IPL_COMPATIBILITY()
#define | CV_TYPE_NAME_IMAGE "opencv-image"
#define | CV_TYPE_NAME_MAT "opencv-matrix"
#define | CV_TYPE_NAME_MATND "opencv-nd-matrix"
#define | CV_TYPE_NAME_SEQ "opencv-sequence"
#define | CV_TYPE_NAME_SEQ_TREE "opencv-sequence-tree"
#define | CV_TYPE_NAME_SPARSE_MAT "opencv-sparse-matrix"
#define | CV_WHOLE_ARR cvSlice( 0, 0x3fffffff )
#define | CV_WHOLE_SEQ cvSlice(0, CV_WHOLE_SEQ_END_INDEX)
#define | CV_WHOLE_SEQ_END_INDEX 0x3fffffff
#define | CV_WRITE_SEQ_ELEM(elem, writer)
#define | CV_WRITE_SEQ_ELEM_VAR(elem_ptr, writer)
#define | cvAbs(src, dst) cvAbsDiffS( (src), (dst), cvScalarAll(0))
#define | cvAXPY(A, real_scalar, B, C) cvScaleAdd(A, cvRealScalar(real_scalar), B, C)
#define | cvCheckArray cvCheckArr
#define | cvConvert(src, dst) cvConvertScale( (src), (dst), 1, 0 )
#define | cvCvtScale cvConvertScale
#define | cvCvtScaleAbs cvConvertScaleAbs
#define | cvFFT cvDFT
#define | cvFree(ptr) (cvFree_(*(ptr)), *(ptr)=0)
#define | cvGetGraphVtx(graph, idx) (CvGraphVtx*)cvGetSetElem((CvSet*)(graph), (idx))
#define | cvGetSubArr cvGetSubRect
#define | cvGraphEdgeIdx(graph, edge) ((edge)->flags & CV_SET_ELEM_IDX_MASK)
#define | cvGraphFindEdge cvFindGraphEdge
#define | cvGraphFindEdgeByPtr cvFindGraphEdgeByPtr
#define | cvGraphGetEdgeCount(graph) ((graph)->edges->active_count)
#define | cvGraphGetVtxCount(graph) ((graph)->active_count)
#define | cvGraphVtxIdx(graph, vtx) ((vtx)->flags & CV_SET_ELEM_IDX_MASK)
#define | cvInv cvInvert
#define | cvInvSqrt(value) ((float)(1./sqrt(value)))
#define | cvMahalonobis cvMahalanobis
#define | cvMatMul(src1, src2, dst) cvMatMulAdd( (src1), (src2), NULL, (dst))
#define | cvMatMulAdd(src1, src2, src3, dst) cvGEMM( (src1), (src2), 1., (src3), 1., (dst), 0 )
#define | cvMatMulAddEx cvGEMM
#define | cvMatMulAddS cvTransform
#define | cvMirror cvFlip
#define | cvReshapeND(arr, header, new_cn, new_dims, new_sizes)
#define | cvScale cvConvertScale
#define | cvSqrt(value) ((float)sqrt(value))
#define | cvT cvTranspose
#define | cvZero cvSetZero
#define | IPL2CV_DEPTH(depth)
#define | IPL_ALIGN_16BYTES 16
#define | IPL_ALIGN_32BYTES 32
#define | IPL_ALIGN_4BYTES 4
#define | IPL_ALIGN_8BYTES 8
#define | IPL_ALIGN_DWORD IPL_ALIGN_4BYTES
#define | IPL_ALIGN_QWORD IPL_ALIGN_8BYTES
#define | IPL_BORDER_CONSTANT 0
#define | IPL_BORDER_REFLECT 2
#define | IPL_BORDER_REFLECT_101 4
#define | IPL_BORDER_REPLICATE 1
#define | IPL_BORDER_TRANSPARENT 5
#define | IPL_BORDER_WRAP 3
#define | IPL_DATA_ORDER_PIXEL 0
#define | IPL_DATA_ORDER_PLANE 1
#define | IPL_DEPTH_16S (IPL_DEPTH_SIGN|16)
#define | IPL_DEPTH_16U 16
#define | IPL_DEPTH_1U 1
#define | IPL_DEPTH_32F 32
#define | IPL_DEPTH_32S (IPL_DEPTH_SIGN|32)
#define | IPL_DEPTH_64F 64
#define | IPL_DEPTH_8S (IPL_DEPTH_SIGN| 8)
#define | IPL_DEPTH_8U 8
#define | IPL_DEPTH_SIGN 0x80000000
#define | IPL_IMAGE_DATA 2
#define | IPL_IMAGE_HEADER 1
#define | IPL_IMAGE_MAGIC_VAL ((int)sizeof(IplImage))
#define | IPL_IMAGE_ROI 4
#define | IPL_ORIGIN_BL 1
#define | IPL_ORIGIN_TL 0
#define | OPENCV_ASSERT(expr, func, context)
#define | OPENCV_CALL(Func)
#define | OPENCV_ERROR(status, func, context) cvError((status),(func),(context),__FILE__,__LINE__)

## Typedefs
typedef void(CV_STDCALL * | Cv_iplAllocateImageData) (IplImage *, int, int)
typedef IplImage *(CV_STDCALL * | Cv_iplCloneImage) (const IplImage *)
typedef IplImage *(CV_STDCALL * | Cv_iplCreateImageHeader) (int, int, int, char *, char *, int, int, int, int, int, IplROI *, IplImage *, void *, IplTileInfo *)
typedef IplROI *(CV_STDCALL * | Cv_iplCreateROI) (int, int, int, int, int)
typedef void(CV_STDCALL * | Cv_iplDeallocate) (IplImage *, int)
typedef void | CvArr
| This is the "metatype" used only as a function parameter. More...
typedef void *(* | CvCloneFunc) (const void *struct_ptr)
typedef int(* | CvCmpFunc) (const void *a, const void *b, void *userdata)
typedef int(* | CvErrorCallback) (int status, const char *func_name, const char *err_msg, const char *file_name, int line, void *userdata)
typedef struct CvGenericHash | CvFileNodeHash
typedef struct CvFileStorage | CvFileStorage
| "black box" representation of the file storage associated with a file on disk. More...
typedef struct CvFileStorage | CvFileStorage
typedef int | CvHistType
typedef int(* | CvIsInstanceFunc) (const void *struct_ptr)
typedef CvContour | CvPoint2DSeq
typedef void *(* | CvReadFunc) (CvFileStorage *storage, CvFileNode *node)
typedef void(* | CvReleaseFunc) (void **struct_dblptr)
typedef uint64 | CvRNG
typedef int | CVStatus
typedef void(* | CvWriteFunc) (CvFileStorage *storage, const char *name, const void *struct_ptr, CvAttrList attributes)
typedef struct _IplImage | IplImage
typedef struct _IplTileInfo | IplTileInfo

## Enumerations
enum | { CV_StsOk = 0, CV_StsBackTrace = -1, CV_StsError = -2, CV_StsInternal = -3, CV_StsNoMem = -4, CV_StsBadArg = -5, CV_StsBadFunc = -6, CV_StsNoConv = -7, CV_StsAutoTrace = -8, CV_HeaderIsNull = -9, CV_BadImageSize = -10, CV_BadOffset = -11, CV_BadDataPtr = -12, CV_BadStep = -13, CV_BadModelOrChSeq = -14, CV_BadNumChannels = -15, CV_BadNumChannel1U = -16, CV_BadDepth = -17, CV_BadAlphaChannel = -18, CV_BadOrder = -19, CV_BadOrigin = -20, CV_BadAlign = -21, CV_BadCallBack = -22, CV_BadTileSize = -23, CV_BadCOI = -24, CV_BadROISize = -25, CV_MaskIsTiled = -26, CV_StsNullPtr = -27, CV_StsVecLengthErr = -28, CV_StsFilterStructContentErr = -29, CV_StsKernelStructContentErr = -30, CV_StsFilterOffsetErr = -31, CV_StsBadSize = -201, CV_StsDivByZero = -202, CV_StsInplaceNotSupported = -203, CV_StsObjectNotFound = -204, CV_StsUnmatchedFormats = -205, CV_StsBadFlag = -206, CV_StsBadPoint = -207, CV_StsBadMask = -208, CV_StsUnmatchedSizes = -209, CV_StsUnsupportedFormat = -210, CV_StsOutOfRange = -211, CV_StsParseError = -212, CV_StsNotImplemented = -213, CV_StsBadMemBlock = -214, CV_StsAssert = -215, CV_GpuNotSupported = -216, CV_GpuApiCallError = -217, CV_OpenGlNotSupported = -218, CV_OpenGlApiCallError = -219, CV_OpenCLApiCallError = -220, CV_OpenCLDoubleNotSupported = -221, CV_OpenCLInitError = -222, CV_OpenCLNoAMDBlasFft = -223 }

## Functions
void | cvAbsDiff (const CvArr *src1, const CvArr *src2, CvArr *dst)
void | cvAbsDiffS (const CvArr *src, CvArr *dst, CvScalar value)
void | cvAdd (const CvArr *src1, const CvArr *src2, CvArr *dst, const CvArr *mask=NULL)
void | cvAddS (const CvArr *src, CvScalar value, CvArr *dst, const CvArr *mask=NULL)
void | cvAddWeighted (const CvArr *src1, double alpha, const CvArr *src2, double beta, double gamma, CvArr *dst)
void * | cvAlloc (size_t size)
void | cvAnd (const CvArr *src1, const CvArr *src2, CvArr *dst, const CvArr *mask=NULL)
void | cvAndS (const CvArr *src, CvScalar value, CvArr *dst, const CvArr *mask=NULL)
CvAttrList | cvAttrList (const char **attr=NULL, CvAttrList *next=NULL)
const char * | cvAttrValue (const CvAttrList *attr, const char *attr_name)
CvScalar | cvAvg (const CvArr *arr, const CvArr *mask=NULL)
void | cvAvgSdv (const CvArr *arr, CvScalar *mean, CvScalar *std_dev, const CvArr *mask=NULL)
void | cvBackProjectPCA (const CvArr *proj, const CvArr *mean, const CvArr *eigenvects, CvArr *result)
CvBox2D | cvBox2D (CvPoint2D32f c=CvPoint2D32f(), CvSize2D32f s=CvSize2D32f(), float a=0)
CvBox2D | cvBox2D (const cv::RotatedRect &rr)
void | cvCalcCovarMatrix (const CvArr **vects, int count, CvArr *cov_mat, CvArr *avg, int flags)
void | cvCalcPCA (const CvArr *data, CvArr *mean, CvArr *eigenvals, CvArr *eigenvects, int flags)
void | cvCartToPolar (const CvArr *x, const CvArr *y, CvArr *magnitude, CvArr *angle=NULL, int angle_in_degrees=0)
float | cvCbrt (float value)
void | cvChangeSeqBlock (void *reader, int direction)
int | cvCheckArr (const CvArr *arr, int flags=0, double min_val=0, double max_val=0)
int | cvCheckHardwareSupport (int feature)
CvTermCriteria | cvCheckTermCriteria (CvTermCriteria criteria, double default_eps, int default_max_iters)
void | cvClearGraph (CvGraph *graph)
void | cvClearMemStorage (CvMemStorage *storage)
void | cvClearND (CvArr *arr, const int *idx)
void | cvClearSeq (CvSeq *seq)
void | cvClearSet (CvSet *set_header)
void * | cvClone (const void *struct_ptr)
| Makes a clone of an object. More...
CvGraph * | cvCloneGraph (const CvGraph *graph, CvMemStorage *storage)
IplImage * | cvCloneImage (const IplImage *image)
CvMat * | cvCloneMat (const CvMat *mat)
CvMatND * | cvCloneMatND (const CvMatND *mat)
CvSeq * | cvCloneSeq (const CvSeq *seq, CvMemStorage *storage=NULL)
CvSparseMat * | cvCloneSparseMat (const CvSparseMat *mat)
void | cvCmp (const CvArr *src1, const CvArr *src2, CvArr *dst, int cmp_op)
void | cvCmpS (const CvArr *src, double value, CvArr *dst, int cmp_op)
void | cvCompleteSymm (CvMat *matrix, int LtoR=0)
void | cvConvertScale (const CvArr *src, CvArr *dst, double scale=1, double shift=0)
| Converts one array to another with optional linear transformation. More...
void | cvConvertScaleAbs (const CvArr *src, CvArr *dst, double scale=1, double shift=0)
void | cvCopy (const CvArr *src, CvArr *dst, const CvArr *mask=NULL)
| Copies one array to another. More...
int | cvCountNonZero (const CvArr *arr)
CvMemStorage * | cvCreateChildMemStorage (CvMemStorage *parent)
void | cvCreateData (CvArr *arr)
| Allocates array data. More...
CvGraph * | cvCreateGraph (int graph_flags, int header_size, int vtx_size, int edge_size, CvMemStorage *storage)
CvGraphScanner * | cvCreateGraphScanner (CvGraph *graph, CvGraphVtx *vtx=NULL, int mask=-1)
IplImage * | cvCreateImage (CvSize size, int depth, int channels)
| Creates an image header and allocates the image data. More...
IplImage * | cvCreateImageHeader (CvSize size, int depth, int channels)
| Creates an image header but does not allocate the image data. More...
CvMat * | cvCreateMat (int rows, int cols, int type)
| Creates a matrix header and allocates the matrix data. More...
CvMat * | cvCreateMatHeader (int rows, int cols, int type)
| Creates a matrix header but does not allocate the matrix data. More...
CvMatND * | cvCreateMatND (int dims, const int *sizes, int type)
| Creates the header and allocates the data for a multi-dimensional dense array. More...
CvMatND * | cvCreateMatNDHeader (int dims, const int *sizes, int type)
| Creates a new matrix header but does not allocate the matrix data. More...
CvMemStorage * | cvCreateMemStorage (int block_size=0)
CvSeq * | cvCreateSeq (int seq_flags, size_t header_size, size_t elem_size, CvMemStorage *storage)
void | cvCreateSeqBlock (CvSeqWriter *writer)
CvSet * | cvCreateSet (int set_flags, int header_size, int elem_size, CvMemStorage *storage)
CvSparseMat * | cvCreateSparseMat (int dims, const int *sizes, int type)
| Creates sparse array. More...
CvSparseMat * | cvCreateSparseMat (const cv::SparseMat &m)
void | cvCrossProduct (const CvArr *src1, const CvArr *src2, CvArr *dst)
| Calculates the cross product of two 3D vectors. More...
void * | cvCvtSeqToArray (const CvSeq *seq, void *elements, CvSlice slice=CV_WHOLE_SEQ)
void | cvDCT (const CvArr *src, CvArr *dst, int flags)
void | cvDecRefData (CvArr *arr)
| Decrements an array data reference counter. More...
double | cvDet (const CvArr *mat)
void | cvDFT (const CvArr *src, CvArr *dst, int flags, int nonzero_rows=0)
void | cvDiv (const CvArr *src1, const CvArr *src2, CvArr *dst, double scale=1)
double | cvDotProduct (const CvArr *src1, const CvArr *src2)
| Calculates the dot product of two arrays in Euclidean metrics. More...
void | cvEigenVV (CvArr *mat, CvArr *evects, CvArr *evals, double eps=0, int lowindex=-1, int highindex=-1)
CvSeq * | cvEndWriteSeq (CvSeqWriter *writer)
void | cvEndWriteStruct (CvFileStorage *fs)
| Finishes writing to a file node collection. More...
void | cvError (int status, const char *func_name, const char *err_msg, const char *file_name, int line)
int | cvErrorFromIppStatus (int ipp_status)
const char * | cvErrorStr (int status)
void | cvExp (const CvArr *src, CvArr *dst)
float | cvFastArctan (float y, float x)
CvGraphEdge * | cvFindGraphEdge (const CvGraph *graph, int start_idx, int end_idx)
CvGraphEdge * | cvFindGraphEdgeByPtr (const CvGraph *graph, const CvGraphVtx *start_vtx, const CvGraphVtx *end_vtx)
CvTypeInfo * | cvFindType (const char *type_name)
| Finds a type by its name. More...
CvTypeInfo * | cvFirstType (void)
| Returns the beginning of a type list. More...
void | cvFlip (const CvArr *src, CvArr *dst=NULL, int flip_mode=0)
void | cvFlushSeqWriter (CvSeqWriter *writer)
void | cvFree_ (void *ptr)
void | cvGEMM (const CvArr *src1, const CvArr *src2, double alpha, const CvArr *src3, double beta, CvArr *dst, int tABC=0)
CvScalar | cvGet1D (const CvArr *arr, int idx0)
| Return a specific array element. More...
CvScalar | cvGet2D (const CvArr *arr, int idx0, int idx1)
CvScalar | cvGet3D (const CvArr *arr, int idx0, int idx1, int idx2)
CvMat * | cvGetCol (const CvArr *arr, CvMat *submat, int col)
CvMat * | cvGetCols (const CvArr *arr, CvMat *submat, int start_col, int end_col)
| Returns one of more array columns. More...
CvMat * | cvGetDiag (const CvArr *arr, CvMat *submat, int diag=0)
| Returns one of array diagonals. More...
int | cvGetDims (const CvArr *arr, int *sizes=NULL)
| Return number of array dimensions. More...
int | cvGetDimSize (const CvArr *arr, int index)
| Returns array size along the specified dimension. More...
int | cvGetElemType (const CvArr *arr)
| Returns type of array elements. More...
int | cvGetErrInfo (const char **errcode_desc, const char **description, const char **filename, int *line)
int | cvGetErrMode (void)
int | cvGetErrStatus (void)
CvFileNode * | cvGetFileNode (CvFileStorage *fs, CvFileNode *map, const CvStringHashNode *key, int create_missing=0)
| Finds a node in a map or file storage. More...
CvFileNode * | cvGetFileNodeByName (const CvFileStorage *fs, const CvFileNode *map, const char *name)
| Finds a node in a map or file storage. More...
const char * | cvGetFileNodeName (const CvFileNode *node)
| Returns the name of a file node. More...
CvStringHashNode * | cvGetHashedKey (CvFileStorage *fs, const char *name, int len=-1, int create_missing=0)
| Returns a unique pointer for a given name. More...
IplImage * | cvGetImage (const CvArr *arr, IplImage *image_header)
| Returns image header for arbitrary array. More...
int | cvGetImageCOI (const IplImage *image)
| Returns the index of the channel of interest. More...
CvRect | cvGetImageROI (const IplImage *image)
| Returns the image ROI. More...
CvMat * | cvGetMat (const CvArr *arr, CvMat *header, int *coi=NULL, int allowND=0)
| Returns matrix header for arbitrary array. More...
CvScalar | cvGetND (const CvArr *arr, const int *idx)
CvSparseNode * | cvGetNextSparseNode (CvSparseMatIterator *mat_iterator)
| Returns the next sparse matrix element. More...
int | cvGetNumThreads (void)
int | cvGetOptimalDFTSize (int size0)
void | cvGetRawData (const CvArr *arr, uchar **data, int *step=NULL, CvSize *roi_size=NULL)
| Retrieves low-level information about the array. More...
double | cvGetReal1D (const CvArr *arr, int idx0)
| Return a specific element of single-channel 1D, 2D, 3D or nD array. More...
double | cvGetReal2D (const CvArr *arr, int idx0, int idx1)
double | cvGetReal3D (const CvArr *arr, int idx0, int idx1, int idx2)
double | cvGetRealND (const CvArr *arr, const int *idx)
CvFileNode * | cvGetRootFileNode (const CvFileStorage *fs, int stream_index=0)
| Retrieves one of the top-level nodes of the file storage. More...
CvMat * | cvGetRow (const CvArr *arr, CvMat *submat, int row)
CvMat * | cvGetRows (const CvArr *arr, CvMat *submat, int start_row, int end_row, int delta_row=1)
| Returns array row or row span. More...
schar * | cvGetSeqElem (const CvSeq *seq, int index)
int | cvGetSeqReaderPos (CvSeqReader *reader)
CvSetElem * | cvGetSetElem (const CvSet *set_header, int idx)
CvSize | cvGetSize (const CvArr *arr)
| Returns size of matrix or image ROI. More...
CvMat * | cvGetSubRect (const CvArr *arr, CvMat *submat, CvRect rect)
| Returns matrix header corresponding to the rectangular sub-array of input image or matrix. More...
int | cvGetThreadNum (void)
int64 | cvGetTickCount (void)
double | cvGetTickFrequency (void)
int | cvGraphAddEdge (CvGraph *graph, int start_idx, int end_idx, const CvGraphEdge *edge=NULL, CvGraphEdge **inserted_edge=NULL)
int | cvGraphAddEdgeByPtr (CvGraph *graph, CvGraphVtx *start_vtx, CvGraphVtx *end_vtx, const CvGraphEdge *edge=NULL, CvGraphEdge **inserted_edge=NULL)
int | cvGraphAddVtx (CvGraph *graph, const CvGraphVtx *vtx=NULL, CvGraphVtx **inserted_vtx=NULL)
void | cvGraphRemoveEdge (CvGraph *graph, int start_idx, int end_idx)
void | cvGraphRemoveEdgeByPtr (CvGraph *graph, CvGraphVtx *start_vtx, CvGraphVtx *end_vtx)
int | cvGraphRemoveVtx (CvGraph *graph, int index)
int | cvGraphRemoveVtxByPtr (CvGraph *graph, CvGraphVtx *vtx)
int | cvGraphVtxDegree (const CvGraph *graph, int vtx_idx)
int | cvGraphVtxDegreeByPtr (const CvGraph *graph, const CvGraphVtx *vtx)
int | cvGuiBoxReport (int status, const char *func_name, const char *err_msg, const char *file_name, int line, void *userdata)
int | cvIncRefData (CvArr *arr)
| Increments array data reference counter. More...
IplImage * | cvInitImageHeader (IplImage *image, CvSize size, int depth, int channels, int origin=0, int align=4)
| Initializes an image header that was previously allocated. More...
CvMat * | cvInitMatHeader (CvMat *mat, int rows, int cols, int type, void *data=NULL, int step=0x7fffffff)
| Initializes a pre-allocated matrix header. More...
CvMatND * | cvInitMatNDHeader (CvMatND *mat, int dims, const int *sizes, int type, void *data=NULL)
| Initializes a pre-allocated multi-dimensional array header. More...
int | cvInitNArrayIterator (int count, CvArr **arrs, const CvArr *mask, CvMatND *stubs, CvNArrayIterator *array_iterator, int flags=0)
CvSparseNode * | cvInitSparseMatIterator (const CvSparseMat *mat, CvSparseMatIterator *mat_iterator)
| Initializes sparse array elements iterator. More...
void | cvInitTreeNodeIterator (CvTreeNodeIterator *tree_iterator, const void *first, int max_level)
void | cvInRange (const CvArr *src, const CvArr *lower, const CvArr *upper, CvArr *dst)
void | cvInRangeS (const CvArr *src, CvScalar lower, CvScalar upper, CvArr *dst)
void | cvInsertNodeIntoTree (void *node, void *parent, void *frame)
double | cvInvert (const CvArr *src, CvArr *dst, int method=0)
int | cvIplDepth (int type)
_IplImage | cvIplImage (const cv::Mat &m)
IplImage | cvIplImage ()
int | cvKMeans2 (const CvArr *samples, int cluster_count, CvArr *labels, CvTermCriteria termcrit, int attempts=1, CvRNG *rng=0, int flags=0, CvArr *_centers=0, double *compactness=0)
void * | cvLoad (const char *filename, CvMemStorage *memstorage=NULL, const char *name=NULL, const char **real_name=NULL)
| Loads an object from a file. More...
void | cvLog (const CvArr *src, CvArr *dst)
void | cvLUT (const CvArr *src, CvArr *dst, const CvArr *lut)
double | cvMahalanobis (const CvArr *vec1, const CvArr *vec2, const CvArr *mat)
CvSeq * | cvMakeSeqHeaderForArray (int seq_type, int header_size, int elem_size, void *elements, int total, CvSeq *seq, CvSeqBlock *block)
CvMat | cvMat (const cv::Mat &m)
CvMat | cvMat (int rows, int cols, int type, void *data=NULL)
CvMat | cvMat ()
CvMat | cvMat (const CvMat &m)
CvMatND | cvMatND (const cv::Mat &m)
CvMatND | cvMatND ()
void | cvMax (const CvArr *src1, const CvArr *src2, CvArr *dst)
void | cvMaxS (const CvArr *src, double value, CvArr *dst)
void * | cvMemStorageAlloc (CvMemStorage *storage, size_t size)
CvString | cvMemStorageAllocString (CvMemStorage *storage, const char *ptr, int len=-1)
void | cvMerge (const CvArr *src0, const CvArr *src1, const CvArr *src2, const CvArr *src3, CvArr *dst)
double | cvmGet (const CvMat *mat, int row, int col)
| Returns the particular element of single-channel floating-point matrix. More...
void | cvMin (const CvArr *src1, const CvArr *src2, CvArr *dst)
void | cvMinMaxLoc (const CvArr *arr, double *min_val, double *max_val, CvPoint *min_loc=NULL, CvPoint *max_loc=NULL, const CvArr *mask=NULL)
void | cvMinS (const CvArr *src, double value, CvArr *dst)
void | cvMixChannels (const CvArr **src, int src_count, CvArr **dst, int dst_count, const int *from_to, int pair_count)
void | cvmSet (CvMat *mat, int row, int col, double value)
| Sets a specific element of a single-channel floating-point matrix. More...
void | cvMul (const CvArr *src1, const CvArr *src2, CvArr *dst, double scale=1)
void | cvMulSpectrums (const CvArr *src1, const CvArr *src2, CvArr *dst, int flags)
void | cvMulTransposed (const CvArr *src, CvArr *dst, int order, const CvArr *delta=NULL, double scale=1.)
int | cvNextGraphItem (CvGraphScanner *scanner)
int | cvNextNArraySlice (CvNArrayIterator *array_iterator)
void * | cvNextTreeNode (CvTreeNodeIterator *tree_iterator)
double | cvNorm (const CvArr *arr1, const CvArr *arr2=NULL, int norm_type=4, const CvArr *mask=NULL)
void | cvNormalize (const CvArr *src, CvArr *dst, double a=1., double b=0., int norm_type=4, const CvArr *mask=NULL)
void | cvNot (const CvArr *src, CvArr *dst)
int | cvNulDevReport (int status, const char *func_name, const char *err_msg, const char *file_name, int line, void *userdata)
CvFileStorage * | cvOpenFileStorage (const char *filename, CvMemStorage *memstorage, int flags, const char *encoding=NULL)
| Opens file storage for reading or writing data. More...
void | cvOr (const CvArr *src1, const CvArr *src2, CvArr *dst, const CvArr *mask=NULL)
void | cvOrS (const CvArr *src, CvScalar value, CvArr *dst, const CvArr *mask=NULL)
void | cvPerspectiveTransform (const CvArr *src, CvArr *dst, const CvMat *mat)
CvPoint | cvPoint (int x, int y)
CvPoint | cvPoint (const cv::Point &pt)
CvPoint2D32f | cvPoint2D32f (double x, double y)
template<typename _Tp >
CvPoint2D32f | cvPoint2D32f (const cv::Point_< _Tp > &pt)
CvPoint2D64f | cvPoint2D64f (double x, double y)
CvPoint3D32f | cvPoint3D32f (double x, double y, double z)
template<typename _Tp >
CvPoint3D32f | cvPoint3D32f (const cv::Point3_< _Tp > &pt)
CvPoint3D64f | cvPoint3D64f (double x, double y, double z)
CvPoint | cvPointFrom32f (CvPoint2D32f point)
CvPoint2D32f | cvPointTo32f (CvPoint point)
void | cvPolarToCart (const CvArr *magnitude, const CvArr *angle, CvArr *x, CvArr *y, int angle_in_degrees=0)
void | cvPow (const CvArr *src, CvArr *dst, double power)
void * | cvPrevTreeNode (CvTreeNodeIterator *tree_iterator)
void | cvProjectPCA (const CvArr *data, const CvArr *mean, const CvArr *eigenvects, CvArr *result)
uchar * | cvPtr1D (const CvArr *arr, int idx0, int *type=NULL)
| Return pointer to a particular array element. More...
uchar * | cvPtr2D (const CvArr *arr, int idx0, int idx1, int *type=NULL)
uchar * | cvPtr3D (const CvArr *arr, int idx0, int idx1, int idx2, int *type=NULL)
uchar * | cvPtrND (const CvArr *arr, const int *idx, int *type=NULL, int create_node=1, unsigned *precalc_hashval=NULL)
void | cvRandArr (CvRNG *rng, CvArr *arr, int dist_type, CvScalar param1, CvScalar param2)
| Fills an array with random numbers and updates the RNG state. More...
unsigned | cvRandInt (CvRNG *rng)
| Returns a 32-bit unsigned integer and updates RNG. More...
double | cvRandReal (CvRNG *rng)
| Returns a floating-point random number and updates RNG. More...
void | cvRandShuffle (CvArr *mat, CvRNG *rng, double iter_factor=1.)
CvArr * | cvRange (CvArr *mat, double start, double end)
void | cvRawDataToScalar (const void *data, int type, CvScalar *scalar)
void * | cvRead (CvFileStorage *fs, CvFileNode *node, CvAttrList *attributes=NULL)
| Decodes an object and returns a pointer to it. More...
void * | cvReadByName (CvFileStorage *fs, const CvFileNode *map, const char *name, CvAttrList *attributes=NULL)
| Finds an object by name and decodes it. More...
int | cvReadInt (const CvFileNode *node, int default_value=0)
| Retrieves an integer value from a file node. More...
int | cvReadIntByName (const CvFileStorage *fs, const CvFileNode *map, const char *name, int default_value=0)
| Finds a file node and returns its value. More...
void | cvReadRawData (const CvFileStorage *fs, const CvFileNode *src, void *dst, const char *dt)
| Reads multiple numbers. More...
void | cvReadRawDataSlice (const CvFileStorage *fs, CvSeqReader *reader, int count, void *dst, const char *dt)
| Initializes file node sequence reader. More...
double | cvReadReal (const CvFileNode *node, double default_value=0.)
| Retrieves a floating-point value from a file node. More...
double | cvReadRealByName (const CvFileStorage *fs, const CvFileNode *map, const char *name, double default_value=0.)
| Finds a file node and returns its value. More...
const char * | cvReadString (const CvFileNode *node, const char *default_value=NULL)
| Retrieves a text string from a file node. More...
const char * | cvReadStringByName (const CvFileStorage *fs, const CvFileNode *map, const char *name, const char *default_value=NULL)
| Finds a file node by its name and returns its value. More...
CvScalar | cvRealScalar (double val0)
CvRect | cvRect (int x, int y, int width, int height)
CvRect | cvRect (const cv::Rect &rc)
IplROI | cvRectToROI (CvRect rect, int coi)
CvErrorCallback | cvRedirectError (CvErrorCallback error_handler, void *userdata=NULL, void **prev_userdata=NULL)
void | cvReduce (const CvArr *src, CvArr *dst, int dim=-1, int op=0)
void | cvRegisterType (const CvTypeInfo *info)
| Registers a new type. More...
void | cvRelease (void **struct_ptr)
| Releases an object. More...
void | cvReleaseData (CvArr *arr)
| Releases array data. More...
void | cvReleaseFileStorage (CvFileStorage **fs)
| Releases file storage. More...
void | cvReleaseGraphScanner (CvGraphScanner **scanner)
void | cvReleaseImage (IplImage **image)
| Deallocates the image header and the image data. More...
void | cvReleaseImageHeader (IplImage **image)
| Deallocates an image header. More...
void | cvReleaseMat (CvMat **mat)
| Deallocates a matrix. More...
void | cvReleaseMatND (CvMatND **mat)
| Deallocates a multi-dimensional array. More...
void | cvReleaseMemStorage (CvMemStorage **storage)
void | cvReleaseSparseMat (CvSparseMat **mat)
| Deallocates sparse array. More...
void | cvRemoveNodeFromTree (void *node, void *frame)
void | cvRepeat (const CvArr *src, CvArr *dst)
void | cvResetImageROI (IplImage *image)
| Resets the image ROI to include the entire image and releases the ROI structure. More...
CvMat * | cvReshape (const CvArr *arr, CvMat *header, int new_cn, int new_rows=0)
| Changes shape of matrix/image without copying data. More...
CvArr * | cvReshapeMatND (const CvArr *arr, int sizeof_header, CvArr *header, int new_cn, int new_dims, int *new_sizes)
| Changes the shape of a multi-dimensional array without copying the data. More...
void | cvRestoreMemStoragePos (CvMemStorage *storage, CvMemStoragePos *pos)
CvRNG | cvRNG (int64 seed=-1)
| Initializes a random number generator state. More...
CvRect | cvROIToRect (IplROI roi)
void | cvSave (const char *filename, const void *struct_ptr, const char *name=NULL, const char *comment=NULL, CvAttrList attributes=cvAttrList())
| Saves an object to a file. More...
void | cvSaveMemStoragePos (const CvMemStorage *storage, CvMemStoragePos *pos)
CvScalar | cvScalar (double val0, double val1=0, double val2=0, double val3=0)
CvScalar | cvScalar ()
CvScalar | cvScalar (const cv::Scalar &s)
CvScalar | cvScalarAll (double val0123)
void | cvScalarToRawData (const CvScalar *scalar, void *data, int type, int extend_to_12=0)
void | cvScaleAdd (const CvArr *src1, CvScalar scale, const CvArr *src2, CvArr *dst)
int | cvSeqElemIdx (const CvSeq *seq, const void *element, CvSeqBlock **block=NULL)
schar * | cvSeqInsert (CvSeq *seq, int before_index, const void *element=NULL)
void | cvSeqInsertSlice (CvSeq *seq, int before_index, const CvArr *from_arr)
void | cvSeqInvert (CvSeq *seq)
int | cvSeqPartition (const CvSeq *seq, CvMemStorage *storage, CvSeq **labels, CvCmpFunc is_equal, void *userdata)
void | cvSeqPop (CvSeq *seq, void *element=NULL)
void | cvSeqPopFront (CvSeq *seq, void *element=NULL)
void | cvSeqPopMulti (CvSeq *seq, void *elements, int count, int in_front=0)
schar * | cvSeqPush (CvSeq *seq, const void *element=NULL)
schar * | cvSeqPushFront (CvSeq *seq, const void *element=NULL)
void | cvSeqPushMulti (CvSeq *seq, const void *elements, int count, int in_front=0)
void | cvSeqRemove (CvSeq *seq, int index)
void | cvSeqRemoveSlice (CvSeq *seq, CvSlice slice)
schar * | cvSeqSearch (CvSeq *seq, const void *elem, CvCmpFunc func, int is_sorted, int *elem_idx, void *userdata=NULL)
CvSeq * | cvSeqSlice (const CvSeq *seq, CvSlice slice, CvMemStorage *storage=NULL, int copy_data=0)
void | cvSeqSort (CvSeq *seq, CvCmpFunc func, void *userdata=NULL)
void | cvSet (CvArr *arr, CvScalar value, const CvArr *mask=NULL)
| Sets every element of an array to a given value. More...
void | cvSet1D (CvArr *arr, int idx0, CvScalar value)
| Change the particular array element. More...
void | cvSet2D (CvArr *arr, int idx0, int idx1, CvScalar value)
void | cvSet3D (CvArr *arr, int idx0, int idx1, int idx2, CvScalar value)
int | cvSetAdd (CvSet *set_header, CvSetElem *elem=NULL, CvSetElem **inserted_elem=NULL)
void | cvSetData (CvArr *arr, void *data, int step)
| Assigns user data to the array header. More...
int | cvSetErrMode (int mode)
void | cvSetErrStatus (int status)
void | cvSetIdentity (CvArr *mat, CvScalar value=cvRealScalar(1))
void | cvSetImageCOI (IplImage *image, int coi)
| Sets the channel of interest in an IplImage. More...
void | cvSetImageROI (IplImage *image, CvRect rect)
| Sets an image Region Of Interest (ROI) for a given rectangle. More...
void | cvSetIPLAllocators (Cv_iplCreateImageHeader create_header, Cv_iplAllocateImageData allocate_data, Cv_iplDeallocate deallocate, Cv_iplCreateROI create_roi, Cv_iplCloneImage clone_image)
| Makes OpenCV use IPL functions for allocating IplImage and IplROI structures. More...
void | cvSetND (CvArr *arr, const int *idx, CvScalar value)
CvSetElem * | cvSetNew (CvSet *set_header)
void | cvSetNumThreads (int threads=0)
void | cvSetReal1D (CvArr *arr, int idx0, double value)
| Change a specific array element. More...
void | cvSetReal2D (CvArr *arr, int idx0, int idx1, double value)
void | cvSetReal3D (CvArr *arr, int idx0, int idx1, int idx2, double value)
void | cvSetRealND (CvArr *arr, const int *idx, double value)
void | cvSetRemove (CvSet *set_header, int index)
void | cvSetRemoveByPtr (CvSet *set_header, void *elem)
void | cvSetSeqBlockSize (CvSeq *seq, int delta_elems)
void | cvSetSeqReaderPos (CvSeqReader *reader, int index, int is_relative=0)
void | cvSetZero (CvArr *arr)
| Clears the array. More...
CvSize | cvSize (int width, int height)
CvSize | cvSize (const cv::Size &sz)
CvSize2D32f | cvSize2D32f (double width, double height)
template<typename _Tp >
CvSize2D32f | cvSize2D32f (const cv::Size_< _Tp > &sz)
CvSlice | cvSlice (int start, int end)
CvSlice | cvSlice (const cv::Range &r)
int | cvSliceLength (CvSlice slice, const CvSeq *seq)
int | cvSolve (const CvArr *src1, const CvArr *src2, CvArr *dst, int method=0)
int | cvSolveCubic (const CvMat *coeffs, CvMat *roots)
void | cvSolvePoly (const CvMat *coeffs, CvMat *roots2, int maxiter=20, int fig=100)
void | cvSort (const CvArr *src, CvArr *dst=NULL, CvArr *idxmat=NULL, int flags=0)
void | cvSplit (const CvArr *src, CvArr *dst0, CvArr *dst1, CvArr *dst2, CvArr *dst3)
void | cvStartAppendToSeq (CvSeq *seq, CvSeqWriter *writer)
void | cvStartNextStream (CvFileStorage *fs)
| Starts the next stream. More...
void | cvStartReadRawData (const CvFileStorage *fs, const CvFileNode *src, CvSeqReader *reader)
| Initializes the file node sequence reader. More...
void | cvStartReadSeq (const CvSeq *seq, CvSeqReader *reader, int reverse=0)
void | cvStartWriteSeq (int seq_flags, int header_size, int elem_size, CvMemStorage *storage, CvSeqWriter *writer)
void | cvStartWriteStruct (CvFileStorage *fs, const char *name, int struct_flags, const char *type_name=NULL, CvAttrList attributes=cvAttrList())
| Starts writing a new structure. More...
int | cvStdErrReport (int status, const char *func_name, const char *err_msg, const char *file_name, int line, void *userdata)
void | cvSub (const CvArr *src1, const CvArr *src2, CvArr *dst, const CvArr *mask=NULL)
void | cvSubRS (const CvArr *src, CvScalar value, CvArr *dst, const CvArr *mask=NULL)
void | cvSubS (const CvArr *src, CvScalar value, CvArr *dst, const CvArr *mask=NULL)
CvScalar | cvSum (const CvArr *arr)
void | cvSVBkSb (const CvArr *W, const CvArr *U, const CvArr *V, const CvArr *B, CvArr *X, int flags)
void | cvSVD (CvArr *A, CvArr *W, CvArr *U=NULL, CvArr *V=NULL, int flags=0)
CvTermCriteria | cvTermCriteria (int type, int max_iter, double epsilon)
CvTermCriteria | cvTermCriteria (const cv::TermCriteria &t)
CvScalar | cvTrace (const CvArr *mat)
void | cvTransform (const CvArr *src, CvArr *dst, const CvMat *transmat, const CvMat *shiftvec=NULL)
void | cvTranspose (const CvArr *src, CvArr *dst)
CvSeq * | cvTreeToNodeSeq (const void *first, int header_size, CvMemStorage *storage)
CvTypeInfo * | cvTypeOf (const void *struct_ptr)
| Returns the type of an object. More...
void | cvUnregisterType (const char *type_name)
| Unregisters the type. More...
int | cvUseOptimized (int on_off)
void | cvWrite (CvFileStorage *fs, const char *name, const void *ptr, CvAttrList attributes=cvAttrList())
| Writes an object to file storage. More...
void | cvWriteComment (CvFileStorage *fs, const char *comment, int eol_comment)
| Writes a comment. More...
void | cvWriteFileNode (CvFileStorage *fs, const char *new_node_name, const CvFileNode *node, int embed)
| Writes a file node to another file storage. More...
void | cvWriteInt (CvFileStorage *fs, const char *name, int value)
| Writes an integer value. More...
void | cvWriteRawData (CvFileStorage *fs, const void *src, int len, const char *dt)
| Writes multiple numbers. More...
void | cvWriteRawDataBase64 (CvFileStorage *fs, const void *src, int len, const char *dt)
| Writes multiple numbers in Base64. More...
void | cvWriteReal (CvFileStorage *fs, const char *name, double value)
| Writes a floating-point value. More...
void | cvWriteString (CvFileStorage *fs, const char *name, const char *str, int quote=0)
| Writes a text string. More...
void | cvXor (const CvArr *src1, const CvArr *src2, CvArr *dst, const CvArr *mask=NULL)
void | cvXorS (const CvArr *src, CvScalar value, CvArr *dst, const CvArr *mask=NULL)

## Flags for cvCalcCovarMatrix
See also cvCalcCovarMatrix
#define | CV_COVAR_SCRAMBLED 0
#define | CV_COVAR_NORMAL 1
#define | CV_COVAR_USE_AVG 2
#define | CV_COVAR_SCALE 4
#define | CV_COVAR_ROWS 8
#define | CV_COVAR_COLS 16

## Flags for cvNorm and cvNormalize
#define | CV_C 1
#define | CV_L1 2
#define | CV_L2 4
#define | CV_NORM_MASK 7
#define | CV_RELATIVE 8
#define | CV_DIFF 16
#define | CV_MINMAX 32
#define | CV_DIFF_C (CV_DIFF | CV_C)
#define | CV_DIFF_L1 (CV_DIFF | CV_L1)
#define | CV_DIFF_L2 (CV_DIFF | CV_L2)
#define | CV_RELATIVE_C (CV_RELATIVE | CV_C)
#define | CV_RELATIVE_L1 (CV_RELATIVE | CV_L1)
#define | CV_RELATIVE_L2 (CV_RELATIVE | CV_L2)

## Flags for cvReduce
#define | CV_REDUCE_SUM 0
#define | CV_REDUCE_AVG 1
#define | CV_REDUCE_MAX 2
#define | CV_REDUCE_MIN 3

## Flags for cvDFT, cvDCT and cvMulSpectrums
#define | CV_DXT_FORWARD 0
#define | CV_DXT_INVERSE 1
#define | CV_DXT_SCALE 2
#define | CV_DXT_INV_SCALE (CV_DXT_INVERSE + CV_DXT_SCALE)
#define | CV_DXT_INVERSE_SCALE CV_DXT_INV_SCALE
#define | CV_DXT_ROWS 4
#define | CV_DXT_MUL_CONJ 8

## Graph
We represent a graph as a set of vertices. Vertices contain their adjacency lists (more exactly, pointers to first incoming or outcoming edge (or 0 if isolated vertex)). Edges are stored in another set. There is a singly-linked list of incoming/outcoming edges for each vertex. Each edge consists of: Two pointers to the starting and ending vertices (vtx[0] and vtx[1] respectively). A graph may be oriented or not. In the latter case, edges between vertex i to vertex j are not distinguished during search operations. Two pointers to next edges for the starting and ending vertices, where next[0] points to the next edge in the vtx[0] adjacency list and next[1] points to the next edge in the vtx[1] adjacency list. See also CvGraphEdge, CvGraphVtx, CvGraphVtx2D, CvGraph
#define | CV_GRAPH_EDGE_FIELDS()
#define | CV_GRAPH_VERTEX_FIELDS()
#define | CV_GRAPH_FIELDS()
#define | CV_TYPE_NAME_GRAPH "opencv-graph"

## Detailed Description

## Macro Definition Documentation

## § CV_ARE_CNS_EQ

#define CV_ARE_CNS_EQ | ( |  | mat1,
|  |  | mat2
| ) |  | ((((mat1)->type ^ (mat2)->type) & CV_MAT_CN_MASK) == 0)

`#include <opencv2/core/types_c.h>`

## § CV_ARE_DEPTHS_EQ

#define CV_ARE_DEPTHS_EQ | ( |  | mat1,
|  |  | mat2
| ) |  | ((((mat1)->type ^ (mat2)->type) & CV_MAT_DEPTH_MASK) == 0)

`#include <opencv2/core/types_c.h>`

## § CV_ARE_SIZES_EQ

#define CV_ARE_SIZES_EQ | ( |  | mat1,
|  |  | mat2
| ) |  | ((mat1)->rows == (mat2)->rows && (mat1)->cols == (mat2)->cols)

`#include <opencv2/core/types_c.h>`

## § CV_ARE_TYPES_EQ

#define CV_ARE_TYPES_EQ | ( |  | mat1,
|  |  | mat2
| ) |  | ((((mat1)->type ^ (mat2)->type) & CV_MAT_TYPE_MASK) == 0)

`#include <opencv2/core/types_c.h>`

## § CV_ASSERT

#define CV_ASSERT | ( |  | Condition | ) |

`#include <opencv2/core/core_c.h>`

Value:
{ \
if( !(Condition) ) \
CV_ERROR( CV_StsInternal, "Assertion: " #Condition " failed" ); \
}
CV_StsInternal
Definition: types_c.h:146

Runtime assertion macro

## § CV_AUTO_STEP

#define CV_AUTO_STEP 0x7fffffff

`#include <opencv2/core/types_c.h>`

## § CV_AUTOSTEP

#define CV_AUTOSTEP 0x7fffffff

`#include <opencv2/core/core_c.h>`

## § CV_BACK

#define CV_BACK 0

`#include <opencv2/core/core_c.h>`

## § CV_C

#define CV_C 1

`#include <opencv2/core/core_c.h>`

## § CV_CALL

#define CV_CALL | ( |  | Func | ) |

`#include <opencv2/core/core_c.h>`

Value:
{ \
Func; \
CV_CHECK(); \
}

CV_CALL macro calls CV (or IPL) function, checks error status and signals a error if the function failed. Useful in "parent node" error processing mode

## § CV_CHECK

#define CV_CHECK | ( |  | ) |

`#include <opencv2/core/core_c.h>`

Value:
{ \
if( cvGetErrStatus() < 0 ) \
CV_ERROR( CV_StsBackTrace, "Inner function failed." ); \
}
CV_StsBackTrace
Definition: types_c.h:144
cvGetErrStatus
int cvGetErrStatus(void)

CV_CHECK macro checks error status after CV (or IPL) function call. If error detected, control will be transferred to the exit label.

## § CV_CHECK_QUIET

#define CV_CHECK_QUIET 2

`#include <opencv2/core/core_c.h>`

## § CV_CHECK_RANGE

#define CV_CHECK_RANGE 1

`#include <opencv2/core/core_c.h>`

## § CV_CHOLESKY

#define CV_CHOLESKY 3

`#include <opencv2/core/core_c.h>`

## § CV_CMP

#define CV_CMP | ( |  | a,
|  |  | b
| ) |  | (((a) > (b)) - ((a) < (b)))

`#include <opencv2/core/types_c.h>`

## § CV_CMP_EQ

#define CV_CMP_EQ 0

`#include <opencv2/core/core_c.h>`

## § CV_CMP_GE

#define CV_CMP_GE 2

`#include <opencv2/core/core_c.h>`

## § CV_CMP_GT

#define CV_CMP_GT 1

`#include <opencv2/core/core_c.h>`

## § CV_CMP_LE

#define CV_CMP_LE 4

`#include <opencv2/core/core_c.h>`

## § CV_CMP_LT

#define CV_CMP_LT 3

`#include <opencv2/core/core_c.h>`

## § CV_CMP_NE

#define CV_CMP_NE 5

`#include <opencv2/core/core_c.h>`

## § CV_CONTOUR_FIELDS

#define CV_CONTOUR_FIELDS | ( |  | ) |

`#include <opencv2/core/types_c.h>`

Value:
CV_SEQUENCE_FIELDS() \
CvRect rect; \
int color; \
int reserved[3];
CV_SEQUENCE_FIELDS
#define CV_SEQUENCE_FIELDS()
Definition: types_c.h:1547

## § CV_COVAR_COLS

#define CV_COVAR_COLS 16

`#include <opencv2/core/core_c.h>`

flag for cvCalcCovarMatrix, all the input vectors are stored in a single matrix, as its columns

## § CV_COVAR_NORMAL

#define CV_COVAR_NORMAL 1

`#include <opencv2/core/core_c.h>`

flag for cvCalcCovarMatrix, [v1-avg, v2-avg,...] * transpose([v1-avg,v2-avg,...])

## § CV_COVAR_ROWS

#define CV_COVAR_ROWS 8

`#include <opencv2/core/core_c.h>`

flag for cvCalcCovarMatrix, all the input vectors are stored in a single matrix, as its rows

## § CV_COVAR_SCALE

#define CV_COVAR_SCALE 4

`#include <opencv2/core/core_c.h>`

flag for cvCalcCovarMatrix, scale the covariance matrix coefficients by number of the vectors

## § CV_COVAR_SCRAMBLED

#define CV_COVAR_SCRAMBLED 0

`#include <opencv2/core/core_c.h>`

flag for cvCalcCovarMatrix, transpose([v1-avg, v2-avg,...]) * [v1-avg,v2-avg,...]

## § CV_COVAR_USE_AVG

#define CV_COVAR_USE_AVG 2

`#include <opencv2/core/core_c.h>`

flag for cvCalcCovarMatrix, do not calc average (i.e. mean vector) - use the input vector instead (useful for calculating covariance matrix by parts)

## § CV_CURRENT_POINT

#define CV_CURRENT_POINT | ( |  | reader | ) | (*((CvPoint*)((reader).ptr)))

`#include <opencv2/core/types_c.h>`

## § CV_DIFF

#define CV_DIFF 16

`#include <opencv2/core/core_c.h>`

## § CV_DIFF_C

#define CV_DIFF_C (CV_DIFF | CV_C)

`#include <opencv2/core/core_c.h>`

## § CV_DIFF_L1

#define CV_DIFF_L1 (CV_DIFF | CV_L1)

`#include <opencv2/core/core_c.h>`

## § CV_DIFF_L2

#define CV_DIFF_L2 (CV_DIFF | CV_L2)

`#include <opencv2/core/core_c.h>`

## § CV_DXT_FORWARD

#define CV_DXT_FORWARD 0

`#include <opencv2/core/core_c.h>`

## § CV_DXT_INV_SCALE

#define CV_DXT_INV_SCALE (CV_DXT_INVERSE + CV_DXT_SCALE)

`#include <opencv2/core/core_c.h>`

## § CV_DXT_INVERSE

#define CV_DXT_INVERSE 1

`#include <opencv2/core/core_c.h>`

## § CV_DXT_INVERSE_SCALE

#define CV_DXT_INVERSE_SCALE CV_DXT_INV_SCALE

`#include <opencv2/core/core_c.h>`

## § CV_DXT_MUL_CONJ

#define CV_DXT_MUL_CONJ 8

`#include <opencv2/core/core_c.h>`

conjugate the second argument of cvMulSpectrums

## § CV_DXT_ROWS

#define CV_DXT_ROWS 4

`#include <opencv2/core/core_c.h>`

transform each row individually

## § CV_DXT_SCALE

#define CV_DXT_SCALE 2

`#include <opencv2/core/core_c.h>`

divide result by size of array

## § CV_ErrModeLeaf

#define CV_ErrModeLeaf 0 /* Print error and exit program */

`#include <opencv2/core/core_c.h>`

## § CV_ErrModeParent

#define CV_ErrModeParent 1 /* Print error and continue */

`#include <opencv2/core/core_c.h>`

## § CV_ErrModeSilent

#define CV_ErrModeSilent 2 /* Don't print and continue */

`#include <opencv2/core/core_c.h>`

## § CV_ERROR

#define CV_ERROR | ( |  | Code,
|  |  | Msg
| ) |  |

`#include <opencv2/core/core_c.h>`

Value:
{ \
cvError( (Code), cvFuncName, Msg, __FILE__, __LINE__ ); \
__CV_EXIT__; \
}
cv::Error::Code
Code
error codes
Definition: base.hpp:68

CV_ERROR macro unconditionally raises error with passed code and message. After raising error, control will be transferred to the exit label.

## § CV_FRONT

#define CV_FRONT 1

`#include <opencv2/core/core_c.h>`

## § CV_FUNCNAME

#define CV_FUNCNAME | ( |  | Name | ) | static char cvFuncName[] = Name

`#include <opencv2/core/core_c.h>`

CV_FUNCNAME macro defines icvFuncName constant which is used by CV_ERROR macro

## § CV_GEMM_A_T

#define CV_GEMM_A_T 1

`#include <opencv2/core/core_c.h>`

## § CV_GEMM_B_T

#define CV_GEMM_B_T 2

`#include <opencv2/core/core_c.h>`

## § CV_GEMM_C_T

#define CV_GEMM_C_T 4

`#include <opencv2/core/core_c.h>`

## § CV_GET_SEQ_ELEM

#define CV_GET_SEQ_ELEM | ( |  | elem_type,
|  |  | seq,
|  |  | index
| ) |  | CV_SEQ_ELEM( (seq), elem_type, (index) )

`#include <opencv2/core/types_c.h>`

## § CV_GRAPH

#define CV_GRAPH CV_SEQ_KIND_GRAPH

`#include <opencv2/core/types_c.h>`

## § CV_GRAPH_ALL_ITEMS

#define CV_GRAPH_ALL_ITEMS -1

`#include <opencv2/core/core_c.h>`

## § CV_GRAPH_ANY_EDGE

#define CV_GRAPH_ANY_EDGE 30

`#include <opencv2/core/core_c.h>`

## § CV_GRAPH_BACK_EDGE

#define CV_GRAPH_BACK_EDGE 4

`#include <opencv2/core/core_c.h>`

## § CV_GRAPH_BACKTRACKING

#define CV_GRAPH_BACKTRACKING 64

`#include <opencv2/core/core_c.h>`

## § CV_GRAPH_CROSS_EDGE

#define CV_GRAPH_CROSS_EDGE 16

`#include <opencv2/core/core_c.h>`

## § CV_GRAPH_EDGE_FIELDS

#define CV_GRAPH_EDGE_FIELDS | ( |  | ) |

`#include <opencv2/core/types_c.h>`

Value:
int flags; \
float weight; \
struct CvGraphEdge* next[2]; \
struct CvGraphVtx* vtx[2];
CvGraphEdge
Definition: types_c.h:1644
CvGraphVtx
Definition: types_c.h:1650

## § CV_GRAPH_FIELDS

#define CV_GRAPH_FIELDS | ( |  | ) |

`#include <opencv2/core/types_c.h>`

Value:
CV_SET_FIELDS() \
CvSet* edges;
CV_SET_FIELDS
#define CV_SET_FIELDS()
Definition: types_c.h:1592

Graph is "derived" from the set (this is set a of vertices) and includes another set (edges)

## § CV_GRAPH_FLAG_ORIENTED

#define CV_GRAPH_FLAG_ORIENTED (1 << CV_SEQ_FLAG_SHIFT)

`#include <opencv2/core/types_c.h>`

flags for graphs

## § CV_GRAPH_FORWARD_EDGE

#define CV_GRAPH_FORWARD_EDGE 8

`#include <opencv2/core/core_c.h>`

## § CV_GRAPH_FORWARD_EDGE_FLAG

#define CV_GRAPH_FORWARD_EDGE_FLAG (1 << 28)

`#include <opencv2/core/core_c.h>`

## § CV_GRAPH_ITEM_VISITED_FLAG

#define CV_GRAPH_ITEM_VISITED_FLAG (1 << 30)

`#include <opencv2/core/core_c.h>`

flags for graph vertices and edges

## § CV_GRAPH_NEW_TREE

#define CV_GRAPH_NEW_TREE 32

`#include <opencv2/core/core_c.h>`

## § CV_GRAPH_OVER

#define CV_GRAPH_OVER -1

`#include <opencv2/core/core_c.h>`

## § CV_GRAPH_SEARCH_TREE_NODE_FLAG

#define CV_GRAPH_SEARCH_TREE_NODE_FLAG (1 << 29)

`#include <opencv2/core/core_c.h>`

## § CV_GRAPH_TREE_EDGE

#define CV_GRAPH_TREE_EDGE 2

`#include <opencv2/core/core_c.h>`

## § CV_GRAPH_VERTEX

#define CV_GRAPH_VERTEX 1

`#include <opencv2/core/core_c.h>`

## § CV_GRAPH_VERTEX_FIELDS

#define CV_GRAPH_VERTEX_FIELDS | ( |  | ) |

`#include <opencv2/core/types_c.h>`

Value:
int flags; \
struct CvGraphEdge* first;
CvGraphEdge
Definition: types_c.h:1644

## § CV_HIST_ARRAY

#define CV_HIST_ARRAY 0

`#include <opencv2/core/types_c.h>`

## § CV_HIST_HAS_RANGES

#define CV_HIST_HAS_RANGES | ( |  | hist | ) | (((hist)->type & CV_HIST_RANGES_FLAG) != 0)

`#include <opencv2/core/types_c.h>`

## § CV_HIST_MAGIC_VAL

#define CV_HIST_MAGIC_VAL 0x42450000

`#include <opencv2/core/types_c.h>`

## § CV_HIST_RANGES_FLAG

#define CV_HIST_RANGES_FLAG (1 << 11)

`#include <opencv2/core/types_c.h>`

indicates whether bin ranges are set already or not

## § CV_HIST_SPARSE

#define CV_HIST_SPARSE 1

`#include <opencv2/core/types_c.h>`

## § CV_HIST_TREE

#define CV_HIST_TREE CV_HIST_SPARSE

`#include <opencv2/core/types_c.h>`

## § CV_HIST_UNIFORM

#define CV_HIST_UNIFORM 1

`#include <opencv2/core/types_c.h>`

should be used as a parameter only, it turns to CV_HIST_UNIFORM_FLAG of hist->type

## § CV_HIST_UNIFORM_FLAG

#define CV_HIST_UNIFORM_FLAG (1 << 10)

`#include <opencv2/core/types_c.h>`

## § CV_IABS

#define CV_IABS | ( |  | a | ) | abs(a)

`#include <opencv2/core/types_c.h>`

absolute value without jumps

## § CV_IMAGE_ELEM

#define CV_IMAGE_ELEM | ( |  | image,
|  |  | elemtype,
|  |  | row,
|  |  | col
| ) |  | (((elemtype*)((image)->imageData + (image)->widthStep*(row)))[(col)])

`#include <opencv2/core/types_c.h>`

get reference to pixel at (col,row), for multi-channel images (col) should be multiplied by number of channels

## § CV_IMAX

#define CV_IMAX | ( |  | a,
|  |  | b
| ) |  | ((a) ^ (((a)^(b)) & (((a) > (b)) - 1)))

`#include <opencv2/core/types_c.h>`

## § CV_IMIN

#define CV_IMIN | ( |  | a,
|  |  | b
| ) |  | ((a) ^ (((a)^(b)) & (((a) < (b)) - 1)))

`#include <opencv2/core/types_c.h>`

min & max without jumps

## § CV_IS_GRAPH

#define CV_IS_GRAPH | ( |  | seq | ) | (CV_IS_SET(seq) && CV_SEQ_KIND((CvSet*)(seq)) == CV_SEQ_KIND_GRAPH)

`#include <opencv2/core/types_c.h>`

## § CV_IS_GRAPH_EDGE_VISITED

#define CV_IS_GRAPH_EDGE_VISITED | ( |  | edge | ) | (((CvGraphEdge*)(edge))->flags & CV_GRAPH_ITEM_VISITED_FLAG)

`#include <opencv2/core/core_c.h>`

## § CV_IS_GRAPH_ORIENTED

#define CV_IS_GRAPH_ORIENTED | ( |  | seq | ) | (((seq)->flags & CV_GRAPH_FLAG_ORIENTED) != 0)

`#include <opencv2/core/types_c.h>`

## § CV_IS_GRAPH_VERTEX_VISITED

#define CV_IS_GRAPH_VERTEX_VISITED | ( |  | vtx | ) | (((CvGraphVtx*)(vtx))->flags & CV_GRAPH_ITEM_VISITED_FLAG)

`#include <opencv2/core/core_c.h>`

## § CV_IS_HIST

#define CV_IS_HIST | ( |  | hist | ) |

`#include <opencv2/core/types_c.h>`

Value:
((hist) != NULL && \
(((CvHistogram*)(hist))->type & CV_MAGIC_MASK) == CV_HIST_MAGIC_VAL && \
(hist)->bins != NULL)
CvHistogram
Definition: types_c.h:811
CV_MAGIC_MASK
#define CV_MAGIC_MASK
Definition: types_c.h:442
CV_HIST_MAGIC_VAL
#define CV_HIST_MAGIC_VAL
Definition: types_c.h:797

## § CV_IS_IMAGE

#define CV_IS_IMAGE | ( |  | img | ) | (CV_IS_IMAGE_HDR(img) && ((IplImage*)img)->imageData != NULL)

`#include <opencv2/core/types_c.h>`

## § CV_IS_IMAGE_HDR

#define CV_IS_IMAGE_HDR | ( |  | img | ) | ((img) != NULL && ((const IplImage*)(img))->nSize == sizeof(IplImage))

`#include <opencv2/core/types_c.h>`

## § CV_IS_MASK_ARR

#define CV_IS_MASK_ARR | ( |  | mat | ) | (((mat)->type & (CV_MAT_TYPE_MASK & ~CV_8SC1)) == 0)

`#include <opencv2/core/types_c.h>`

## § CV_IS_MAT

#define CV_IS_MAT | ( |  | mat | ) | (CV_IS_MAT_HDR(mat) && ((const CvMat*)(mat))->data.ptr != NULL)

`#include <opencv2/core/types_c.h>`

## § CV_IS_MAT_CONST

#define CV_IS_MAT_CONST | ( |  | mat | ) | (((mat)->rows|(mat)->cols) == 1)

`#include <opencv2/core/types_c.h>`

## § CV_IS_MAT_HDR

#define CV_IS_MAT_HDR | ( |  | mat | ) |

`#include <opencv2/core/types_c.h>`

Value:
((mat) != NULL && \
(((const CvMat*)(mat))->type & CV_MAGIC_MASK) == CV_MAT_MAGIC_VAL && \
((const CvMat*)(mat))->cols > 0 && ((const CvMat*)(mat))->rows > 0)
CV_MAGIC_MASK
#define CV_MAGIC_MASK
Definition: types_c.h:442
CvMat
Definition: types_c.h:462
CV_MAT_MAGIC_VAL
#define CV_MAT_MAGIC_VAL
Definition: types_c.h:443

## § CV_IS_MAT_HDR_Z

#define CV_IS_MAT_HDR_Z | ( |  | mat | ) |

`#include <opencv2/core/types_c.h>`

Value:
((mat) != NULL && \
(((const CvMat*)(mat))->type & CV_MAGIC_MASK) == CV_MAT_MAGIC_VAL && \
((const CvMat*)(mat))->cols >= 0 && ((const CvMat*)(mat))->rows >= 0)
CV_MAGIC_MASK
#define CV_MAGIC_MASK
Definition: types_c.h:442
CvMat
Definition: types_c.h:462
CV_MAT_MAGIC_VAL
#define CV_MAT_MAGIC_VAL
Definition: types_c.h:443

## § CV_IS_MATND

#define CV_IS_MATND | ( |  | mat | ) | (CV_IS_MATND_HDR(mat) && ((const CvMatND*)(mat))->data.ptr != NULL)

`#include <opencv2/core/types_c.h>`

## § CV_IS_MATND_HDR

#define CV_IS_MATND_HDR | ( |  | mat | ) | ((mat) != NULL && (((const CvMatND*)(mat))->type & CV_MAGIC_MASK) == CV_MATND_MAGIC_VAL)

`#include <opencv2/core/types_c.h>`

## § CV_IS_SEQ

#define CV_IS_SEQ | ( |  | seq | ) | ((seq) != NULL && (((CvSeq*)(seq))->flags & CV_MAGIC_MASK) == CV_SEQ_MAGIC_VAL)

`#include <opencv2/core/types_c.h>`

## § CV_IS_SEQ_CHAIN

#define CV_IS_SEQ_CHAIN | ( |  | seq | ) | (CV_SEQ_KIND(seq) == CV_SEQ_KIND_CURVE && (seq)->elem_size == 1)

`#include <opencv2/core/types_c.h>`

## § CV_IS_SEQ_CHAIN_CONTOUR

#define CV_IS_SEQ_CHAIN_CONTOUR | ( |  | seq | ) | (CV_IS_SEQ_CHAIN( seq ) && CV_IS_SEQ_CLOSED( seq ))

`#include <opencv2/core/types_c.h>`

## § CV_IS_SEQ_CLOSED

#define CV_IS_SEQ_CLOSED | ( |  | seq | ) | (((seq)->flags & CV_SEQ_FLAG_CLOSED) != 0)

`#include <opencv2/core/types_c.h>`

## § CV_IS_SEQ_CONTOUR

#define CV_IS_SEQ_CONTOUR | ( |  | seq | ) | (CV_IS_SEQ_CLOSED(seq) && (CV_IS_SEQ_POLYLINE(seq) || CV_IS_SEQ_CHAIN(seq)))

`#include <opencv2/core/types_c.h>`

## § CV_IS_SEQ_CONVEX

#define CV_IS_SEQ_CONVEX | ( |  | seq | ) | 0

`#include <opencv2/core/types_c.h>`

## § CV_IS_SEQ_CURVE

#define CV_IS_SEQ_CURVE | ( |  | seq | ) | (CV_SEQ_KIND(seq) == CV_SEQ_KIND_CURVE)

`#include <opencv2/core/types_c.h>`

## § CV_IS_SEQ_HOLE

#define CV_IS_SEQ_HOLE | ( |  | seq | ) | (((seq)->flags & CV_SEQ_FLAG_HOLE) != 0)

`#include <opencv2/core/types_c.h>`

## § CV_IS_SEQ_INDEX

#define CV_IS_SEQ_INDEX | ( |  | seq | ) |

`#include <opencv2/core/types_c.h>`

Value:
((CV_SEQ_ELTYPE(seq) == CV_SEQ_ELTYPE_INDEX) && \
(CV_SEQ_KIND(seq) == CV_SEQ_KIND_GENERIC))
CV_SEQ_KIND_GENERIC
#define CV_SEQ_KIND_GENERIC
Definition: types_c.h:1736
CV_SEQ_KIND
#define CV_SEQ_KIND(seq)
Definition: types_c.h:1780
CV_SEQ_ELTYPE
#define CV_SEQ_ELTYPE(seq)
Definition: types_c.h:1779
CV_SEQ_ELTYPE_INDEX
#define CV_SEQ_ELTYPE_INDEX
Definition: types_c.h:1725

flag checking

## § CV_IS_SEQ_POINT_SET

#define CV_IS_SEQ_POINT_SET | ( |  | seq | ) | ((CV_SEQ_ELTYPE(seq) == CV_32SC2 || CV_SEQ_ELTYPE(seq) == CV_32FC2))

`#include <opencv2/core/types_c.h>`

type checking macros

## § CV_IS_SEQ_POINT_SUBSET

#define CV_IS_SEQ_POINT_SUBSET | ( |  | seq | ) | (CV_IS_SEQ_INDEX( seq ) || CV_SEQ_ELTYPE(seq) == CV_SEQ_ELTYPE_PPOINT)

`#include <opencv2/core/types_c.h>`

## § CV_IS_SEQ_POLYGON

#define CV_IS_SEQ_POLYGON | ( |  | seq | ) | (CV_IS_SEQ_POLYLINE(seq) && CV_IS_SEQ_CLOSED(seq))

`#include <opencv2/core/types_c.h>`

## § CV_IS_SEQ_POLYGON_TREE

#define CV_IS_SEQ_POLYGON_TREE | ( |  | seq | ) |

`#include <opencv2/core/types_c.h>`

Value:
(CV_SEQ_ELTYPE (seq) == CV_SEQ_ELTYPE_TRIAN_ATR && \
CV_SEQ_KIND( seq ) == CV_SEQ_KIND_BIN_TREE )
CV_SEQ_ELTYPE_TRIAN_ATR
#define CV_SEQ_ELTYPE_TRIAN_ATR
Definition: types_c.h:1728
CV_SEQ_KIND_BIN_TREE
#define CV_SEQ_KIND_BIN_TREE
Definition: types_c.h:1738
CV_SEQ_ELTYPE
#define CV_SEQ_ELTYPE(seq)
Definition: types_c.h:1779

## § CV_IS_SEQ_POLYLINE

#define CV_IS_SEQ_POLYLINE | ( |  | seq | ) | (CV_SEQ_KIND(seq) == CV_SEQ_KIND_CURVE && CV_IS_SEQ_POINT_SET(seq))

`#include <opencv2/core/types_c.h>`

## § CV_IS_SEQ_SIMPLE

#define CV_IS_SEQ_SIMPLE | ( |  | seq | ) | 1

`#include <opencv2/core/types_c.h>`

## § CV_IS_SET

#define CV_IS_SET | ( |  | set | ) | ((set) != NULL && (((CvSeq*)(set))->flags & CV_MAGIC_MASK) == CV_SET_MAGIC_VAL)

`#include <opencv2/core/types_c.h>`

## § CV_IS_SET_ELEM

#define CV_IS_SET_ELEM | ( |  | ptr | ) | (((CvSetElem*)(ptr))->flags >= 0)

`#include <opencv2/core/types_c.h>`

Checks whether the element pointed by ptr belongs to a set or not

## § CV_IS_SPARSE_HIST

#define CV_IS_SPARSE_HIST | ( |  | hist | ) | CV_IS_SPARSE_MAT((hist)->bins)

`#include <opencv2/core/types_c.h>`

## § CV_IS_SPARSE_MAT

#define CV_IS_SPARSE_MAT | ( |  | mat | ) | CV_IS_SPARSE_MAT_HDR(mat)

`#include <opencv2/core/types_c.h>`

## § CV_IS_SPARSE_MAT_HDR

#define CV_IS_SPARSE_MAT_HDR | ( |  | mat | ) |

`#include <opencv2/core/types_c.h>`

Value:
((mat) != NULL && \
(((const CvSparseMat*)(mat))->type & CV_MAGIC_MASK) == CV_SPARSE_MAT_MAGIC_VAL)
CvSparseMat
Definition: types_c.h:740
CV_SPARSE_MAT_MAGIC_VAL
#define CV_SPARSE_MAT_MAGIC_VAL
Definition: types_c.h:735
CV_MAGIC_MASK
#define CV_MAGIC_MASK
Definition: types_c.h:442

## § CV_IS_STORAGE

#define CV_IS_STORAGE | ( |  | storage | ) |

`#include <opencv2/core/types_c.h>`

Value:
((storage) != NULL && \
(((CvMemStorage*)(storage))->signature & CV_MAGIC_MASK) == CV_STORAGE_MAGIC_VAL)
CV_MAGIC_MASK
#define CV_MAGIC_MASK
Definition: types_c.h:442
CvMemStorage
Definition: types_c.h:1491
CV_STORAGE_MAGIC_VAL
#define CV_STORAGE_MAGIC_VAL
Definition: types_c.h:1489

## § CV_IS_SUBDIV2D

#define CV_IS_SUBDIV2D | ( |  | seq | ) | (CV_IS_SET(seq) && CV_SEQ_KIND((CvSet*)(seq)) == CV_SEQ_KIND_SUBDIV2D)

`#include <opencv2/core/types_c.h>`

## § CV_IS_UNIFORM_HIST

#define CV_IS_UNIFORM_HIST | ( |  | hist | ) | (((hist)->type & CV_HIST_UNIFORM_FLAG) != 0)

`#include <opencv2/core/types_c.h>`

## § CV_KMEANS_USE_INITIAL_LABELS

#define CV_KMEANS_USE_INITIAL_LABELS 1

`#include <opencv2/core/core_c.h>`

The function implements the K-means algorithm for clustering an array of sample vectors in a specified number of classes

## § CV_L1

#define CV_L1 2

`#include <opencv2/core/core_c.h>`

## § CV_L2

#define CV_L2 4

`#include <opencv2/core/core_c.h>`

## § CV_LU

#define CV_LU 0

`#include <opencv2/core/core_c.h>`

## § CV_MAGIC_MASK

#define CV_MAGIC_MASK 0xFFFF0000

`#include <opencv2/core/types_c.h>`

## § CV_MAT_ELEM

#define CV_MAT_ELEM | ( |  | mat,
|  |  | elemtype,
|  |  | row,
|  |  | col
| ) |  | (*(elemtype*)CV_MAT_ELEM_PTR_FAST( mat, row, col, sizeof(elemtype)))

`#include <opencv2/core/types_c.h>`

## § CV_MAT_ELEM_PTR

#define CV_MAT_ELEM_PTR | ( |  | mat,
|  |  | row,
|  |  | col
| ) |  | CV_MAT_ELEM_PTR_FAST( mat, row, col, CV_ELEM_SIZE((mat).type) )

`#include <opencv2/core/types_c.h>`

## § CV_MAT_ELEM_PTR_FAST

#define CV_MAT_ELEM_PTR_FAST | ( |  | mat,
|  |  | row,
|  |  | col,
|  |  | pix_size
| ) |  |

`#include <opencv2/core/types_c.h>`

Value:
(assert( (unsigned)(row) < (unsigned)(mat).rows && \
(unsigned)(col) < (unsigned)(mat).cols ), \
(mat).data.ptr + (size_t)(mat).step*(row) + (pix_size)*(col))

## § CV_MAT_MAGIC_VAL

#define CV_MAT_MAGIC_VAL 0x42420000

`#include <opencv2/core/types_c.h>`

## § CV_MATND_MAGIC_VAL

#define CV_MATND_MAGIC_VAL 0x42430000

`#include <opencv2/core/types_c.h>`

## § CV_MAX_ARR

#define CV_MAX_ARR 10

`#include <opencv2/core/core_c.h>`

## § CV_MAX_DIM

#define CV_MAX_DIM 32

`#include <opencv2/core/types_c.h>`

## § CV_MINMAX

#define CV_MINMAX 32

`#include <opencv2/core/core_c.h>`

## § CV_NEXT_GRAPH_EDGE

#define CV_NEXT_GRAPH_EDGE | ( |  | edge,
|  |  | vertex
| ) |  |

`#include <opencv2/core/types_c.h>`

Value:
(assert((edge)->vtx[0] == (vertex) || (edge)->vtx[1] == (vertex)), \
(edge)->next[(edge)->vtx[1] == (vertex)])

Return next graph edge for given vertex:

## § CV_NEXT_SEQ_ELEM

#define CV_NEXT_SEQ_ELEM | ( |  | elem_size,
|  |  | reader
| ) |  |

`#include <opencv2/core/types_c.h>`

Value:
{ \
if( ((reader).ptr += (elem_size)) >= (reader).block_max ) \
{ \
cvChangeSeqBlock( &(reader), 1 ); \
} \
}

Move reader position forward:

## § CV_NO_CN_CHECK

#define CV_NO_CN_CHECK 2

`#include <opencv2/core/core_c.h>`

## § CV_NO_DEPTH_CHECK

#define CV_NO_DEPTH_CHECK 1

`#include <opencv2/core/core_c.h>`

## § CV_NO_SIZE_CHECK

#define CV_NO_SIZE_CHECK 4

`#include <opencv2/core/core_c.h>`

## § CV_NODE_EMPTY

#define CV_NODE_EMPTY 32

`#include <opencv2/core/types_c.h>`

## § CV_NODE_FLOAT

#define CV_NODE_FLOAT CV_NODE_REAL

`#include <opencv2/core/types_c.h>`

## § CV_NODE_FLOW

#define CV_NODE_FLOW 8

`#include <opencv2/core/types_c.h>`

file node flags Used only for writing structures in YAML format.

## § CV_NODE_HAS_NAME

#define CV_NODE_HAS_NAME | ( |  | flags | ) | (((flags) & CV_NODE_NAMED) != 0)

`#include <opencv2/core/types_c.h>`

## § CV_NODE_IDX

#define CV_NODE_IDX | ( |  | mat,
|  |  | node
| ) |  | ((int*)((uchar*)(node) + (mat)->idxoffset))

`#include <opencv2/core/types_c.h>`

## § CV_NODE_INT

#define CV_NODE_INT 1

`#include <opencv2/core/types_c.h>`

## § CV_NODE_INTEGER

#define CV_NODE_INTEGER CV_NODE_INT

`#include <opencv2/core/types_c.h>`

## § CV_NODE_IS_COLLECTION

#define CV_NODE_IS_COLLECTION | ( |  | flags | ) | (CV_NODE_TYPE(flags) >= CV_NODE_SEQ)

`#include <opencv2/core/types_c.h>`

## § CV_NODE_IS_EMPTY

#define CV_NODE_IS_EMPTY | ( |  | flags | ) | (((flags) & CV_NODE_EMPTY) != 0)

`#include <opencv2/core/types_c.h>`

## § CV_NODE_IS_FLOW

#define CV_NODE_IS_FLOW | ( |  | flags | ) | (((flags) & CV_NODE_FLOW) != 0)

`#include <opencv2/core/types_c.h>`

## § CV_NODE_IS_INT

#define CV_NODE_IS_INT | ( |  | flags | ) | (CV_NODE_TYPE(flags) == CV_NODE_INT)

`#include <opencv2/core/types_c.h>`

## § CV_NODE_IS_MAP

#define CV_NODE_IS_MAP | ( |  | flags | ) | (CV_NODE_TYPE(flags) == CV_NODE_MAP)

`#include <opencv2/core/types_c.h>`

## § CV_NODE_IS_REAL

#define CV_NODE_IS_REAL | ( |  | flags | ) | (CV_NODE_TYPE(flags) == CV_NODE_REAL)

`#include <opencv2/core/types_c.h>`

## § CV_NODE_IS_SEQ

#define CV_NODE_IS_SEQ | ( |  | flags | ) | (CV_NODE_TYPE(flags) == CV_NODE_SEQ)

`#include <opencv2/core/types_c.h>`

## § CV_NODE_IS_STRING

#define CV_NODE_IS_STRING | ( |  | flags | ) | (CV_NODE_TYPE(flags) == CV_NODE_STRING)

`#include <opencv2/core/types_c.h>`

## § CV_NODE_IS_USER

#define CV_NODE_IS_USER | ( |  | flags | ) | (((flags) & CV_NODE_USER) != 0)

`#include <opencv2/core/types_c.h>`

## § CV_NODE_MAP

#define CV_NODE_MAP 6

`#include <opencv2/core/types_c.h>`

## § CV_NODE_NAMED

#define CV_NODE_NAMED 64

`#include <opencv2/core/types_c.h>`

## § CV_NODE_NONE

#define CV_NODE_NONE 0

`#include <opencv2/core/types_c.h>`

## § CV_NODE_REAL

#define CV_NODE_REAL 2

`#include <opencv2/core/types_c.h>`

## § CV_NODE_REF

#define CV_NODE_REF 4

`#include <opencv2/core/types_c.h>`

not used

## § CV_NODE_SEQ

#define CV_NODE_SEQ 5

`#include <opencv2/core/types_c.h>`

## § CV_NODE_SEQ_IS_SIMPLE

#define CV_NODE_SEQ_IS_SIMPLE | ( |  | seq | ) | (((seq)->flags & CV_NODE_SEQ_SIMPLE) != 0)

`#include <opencv2/core/types_c.h>`

## § CV_NODE_SEQ_SIMPLE

#define CV_NODE_SEQ_SIMPLE 256

`#include <opencv2/core/types_c.h>`

## § CV_NODE_STR

#define CV_NODE_STR 3

`#include <opencv2/core/types_c.h>`

## § CV_NODE_STRING

#define CV_NODE_STRING CV_NODE_STR

`#include <opencv2/core/types_c.h>`

## § CV_NODE_TYPE

#define CV_NODE_TYPE | ( |  | flags | ) | ((flags) & CV_NODE_TYPE_MASK)

`#include <opencv2/core/types_c.h>`

## § CV_NODE_TYPE_MASK

#define CV_NODE_TYPE_MASK 7

`#include <opencv2/core/types_c.h>`

## § CV_NODE_USER

#define CV_NODE_USER 16

`#include <opencv2/core/types_c.h>`

## § CV_NODE_VAL

#define CV_NODE_VAL | ( |  | mat,
|  |  | node
| ) |  | ((void*)((uchar*)(node) + (mat)->valoffset))

`#include <opencv2/core/types_c.h>`

## § CV_NORM_MASK

#define CV_NORM_MASK 7

`#include <opencv2/core/core_c.h>`

## § CV_NORMAL

#define CV_NORMAL 16

`#include <opencv2/core/core_c.h>`

## § CV_ORIENTED_GRAPH

#define CV_ORIENTED_GRAPH (CV_SEQ_KIND_GRAPH|CV_GRAPH_FLAG_ORIENTED)

`#include <opencv2/core/types_c.h>`

## § CV_PCA_DATA_AS_COL

#define CV_PCA_DATA_AS_COL 1

`#include <opencv2/core/core_c.h>`

## § CV_PCA_DATA_AS_ROW

#define CV_PCA_DATA_AS_ROW 0

`#include <opencv2/core/core_c.h>`

## § CV_PCA_USE_AVG

#define CV_PCA_USE_AVG 2

`#include <opencv2/core/core_c.h>`

## § CV_PREV_POINT

#define CV_PREV_POINT | ( |  | reader | ) | (*((CvPoint*)((reader).prev_elem)))

`#include <opencv2/core/types_c.h>`

## § CV_PREV_SEQ_ELEM

#define CV_PREV_SEQ_ELEM | ( |  | elem_size,
|  |  | reader
| ) |  |

`#include <opencv2/core/types_c.h>`

Value:
{ \
if( ((reader).ptr -= (elem_size)) < (reader).block_min ) \
{ \
cvChangeSeqBlock( &(reader), -1 ); \
} \
}

Move reader position backward:

## § CV_QR

#define CV_QR 4

`#include <opencv2/core/core_c.h>`

## § CV_RAND_NORMAL

#define CV_RAND_NORMAL 1

`#include <opencv2/core/core_c.h>`

## § CV_RAND_UNI

#define CV_RAND_UNI 0

`#include <opencv2/core/core_c.h>`

## § CV_READ_CHAIN_POINT

#define CV_READ_CHAIN_POINT | ( |  | _pt,
|  |  | reader
| ) |  |

`#include <opencv2/core/types_c.h>`

Value:
{ \
(_pt) = (reader).pt; \
if( (reader).ptr ) \
{ \
CV_READ_SEQ_ELEM( (reader).code, (reader)); \
assert( ((reader).code & ~7) == 0 ); \
(reader).pt.x += (reader).deltas[(int)(reader).code][0]; \
(reader).pt.y += (reader).deltas[(int)(reader).code][1]; \
} \
}

## § CV_READ_EDGE

#define CV_READ_EDGE | ( |  | pt1,
|  |  | pt2,
|  |  | reader
| ) |  |

`#include <opencv2/core/types_c.h>`

Value:
{ \
assert( sizeof(pt1) == sizeof(CvPoint) && \
sizeof(pt2) == sizeof(CvPoint) && \
reader.seq->elem_size == sizeof(CvPoint)); \
(pt1) = CV_PREV_POINT( reader ); \
(pt2) = CV_CURRENT_POINT( reader ); \
(reader).prev_elem = (reader).ptr; \
CV_NEXT_SEQ_ELEM( sizeof(CvPoint), (reader)); \
}
CV_CURRENT_POINT
#define CV_CURRENT_POINT(reader)
Definition: types_c.h:1962
CvPoint
Definition: types_c.h:944
CV_PREV_POINT
#define CV_PREV_POINT(reader)
Definition: types_c.h:1963

## § CV_READ_SEQ_ELEM

#define CV_READ_SEQ_ELEM | ( |  | elem,
|  |  | reader
| ) |  |

`#include <opencv2/core/types_c.h>`

Value:
{ \
assert( (reader).seq->elem_size == sizeof(elem)); \
memcpy( &(elem), (reader).ptr, sizeof((elem))); \
CV_NEXT_SEQ_ELEM( sizeof(elem), reader ) \
}

Read element and move read position forward:

## § CV_REDUCE_AVG

#define CV_REDUCE_AVG 1

`#include <opencv2/core/core_c.h>`

## § CV_REDUCE_MAX

#define CV_REDUCE_MAX 2

`#include <opencv2/core/core_c.h>`

## § CV_REDUCE_MIN

#define CV_REDUCE_MIN 3

`#include <opencv2/core/core_c.h>`

## § CV_REDUCE_SUM

#define CV_REDUCE_SUM 0

`#include <opencv2/core/core_c.h>`

## § CV_RELATIVE

#define CV_RELATIVE 8

`#include <opencv2/core/core_c.h>`

## § CV_RELATIVE_C

#define CV_RELATIVE_C (CV_RELATIVE | CV_C)

`#include <opencv2/core/core_c.h>`

## § CV_RELATIVE_L1

#define CV_RELATIVE_L1 (CV_RELATIVE | CV_L1)

`#include <opencv2/core/core_c.h>`

## § CV_RELATIVE_L2

#define CV_RELATIVE_L2 (CV_RELATIVE | CV_L2)

`#include <opencv2/core/core_c.h>`

## § CV_REV_READ_SEQ_ELEM

#define CV_REV_READ_SEQ_ELEM | ( |  | elem,
|  |  | reader
| ) |  |

`#include <opencv2/core/types_c.h>`

Value:
{ \
assert( (reader).seq->elem_size == sizeof(elem)); \
memcpy(&(elem), (reader).ptr, sizeof((elem))); \
CV_PREV_SEQ_ELEM( sizeof(elem), reader ) \
}

Read element and move read position backward:

## § CV_RNG_COEFF

#define CV_RNG_COEFF 4164903690U

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_CHAIN

#define CV_SEQ_CHAIN (CV_SEQ_KIND_CURVE | CV_SEQ_ELTYPE_CODE)

`#include <opencv2/core/types_c.h>`

chain-coded curves

## § CV_SEQ_CHAIN_CONTOUR

#define CV_SEQ_CHAIN_CONTOUR (CV_SEQ_FLAG_CLOSED | CV_SEQ_CHAIN)

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_CONNECTED_COMP

#define CV_SEQ_CONNECTED_COMP (CV_SEQ_KIND_GENERIC | CV_SEQ_ELTYPE_CONNECTED_COMP)

`#include <opencv2/core/types_c.h>`

sequence of the connected components

## § CV_SEQ_CONTOUR

#define CV_SEQ_CONTOUR CV_SEQ_POLYGON

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_ELEM

#define CV_SEQ_ELEM | ( |  | seq,
|  |  | elem_type,
|  |  | index
| ) |  |

`#include <opencv2/core/types_c.h>`

Value:
\
( assert(sizeof((seq)->first[0]) == sizeof(CvSeqBlock) && \
(seq)->elem_size == sizeof(elem_type)), \
(elem_type*)((seq)->first && (unsigned)index < \
(unsigned)((seq)->first->count) ? \
(seq)->first->data + (index) * sizeof(elem_type) : \
cvGetSeqElem( (CvSeq*)(seq), (index) )))
CvSeqBlock
Definition: types_c.h:1517
cv::datasets::index
Definition: gr_skig.hpp:77
cvGetSeqElem
schar * cvGetSeqElem(const CvSeq *seq, int index)
CvSeq
Definition: types_c.h:1567

## § CV_SEQ_ELTYPE

#define CV_SEQ_ELTYPE | ( |  | seq | ) | ((seq)->flags & CV_SEQ_ELTYPE_MASK)

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_ELTYPE_BITS

#define CV_SEQ_ELTYPE_BITS 12

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_ELTYPE_CODE

#define CV_SEQ_ELTYPE_CODE CV_8UC1

`#include <opencv2/core/types_c.h>`

freeman code: 0..7

## § CV_SEQ_ELTYPE_CONNECTED_COMP

#define CV_SEQ_ELTYPE_CONNECTED_COMP 0

`#include <opencv2/core/types_c.h>`

connected component

## § CV_SEQ_ELTYPE_GENERIC

#define CV_SEQ_ELTYPE_GENERIC 0

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_ELTYPE_GRAPH_EDGE

#define CV_SEQ_ELTYPE_GRAPH_EDGE 0

`#include <opencv2/core/types_c.h>`

&next_o, &next_d, &vtx_o, &vtx_d

## § CV_SEQ_ELTYPE_GRAPH_VERTEX

#define CV_SEQ_ELTYPE_GRAPH_VERTEX 0

`#include <opencv2/core/types_c.h>`

first_edge, &(x,y)

## § CV_SEQ_ELTYPE_INDEX

#define CV_SEQ_ELTYPE_INDEX CV_32SC1

`#include <opencv2/core/types_c.h>`

#(x,y)

## § CV_SEQ_ELTYPE_MASK

#define CV_SEQ_ELTYPE_MASK ((1 << CV_SEQ_ELTYPE_BITS) - 1)

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_ELTYPE_POINT

#define CV_SEQ_ELTYPE_POINT CV_32SC2

`#include <opencv2/core/types_c.h>`

(x,y)

## § CV_SEQ_ELTYPE_POINT3D

#define CV_SEQ_ELTYPE_POINT3D CV_32FC3

`#include <opencv2/core/types_c.h>`

(x,y,z)

## § CV_SEQ_ELTYPE_PPOINT

#define CV_SEQ_ELTYPE_PPOINT CV_SEQ_ELTYPE_PTR

`#include <opencv2/core/types_c.h>`

&(x,y)

## § CV_SEQ_ELTYPE_PTR

#define CV_SEQ_ELTYPE_PTR CV_USRTYPE1

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_ELTYPE_TRIAN_ATR

#define CV_SEQ_ELTYPE_TRIAN_ATR 0

`#include <opencv2/core/types_c.h>`

vertex of the binary tree

## § CV_SEQ_FLAG_CLOSED

#define CV_SEQ_FLAG_CLOSED (1 << CV_SEQ_FLAG_SHIFT)

`#include <opencv2/core/types_c.h>`

flags for curves

## § CV_SEQ_FLAG_CONVEX

#define CV_SEQ_FLAG_CONVEX (0 << CV_SEQ_FLAG_SHIFT)

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_FLAG_HOLE

#define CV_SEQ_FLAG_HOLE (2 << CV_SEQ_FLAG_SHIFT)

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_FLAG_SHIFT

#define CV_SEQ_FLAG_SHIFT (CV_SEQ_KIND_BITS + CV_SEQ_ELTYPE_BITS)

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_FLAG_SIMPLE

#define CV_SEQ_FLAG_SIMPLE (0 << CV_SEQ_FLAG_SHIFT)

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_INDEX

#define CV_SEQ_INDEX (CV_SEQ_KIND_GENERIC | CV_SEQ_ELTYPE_INDEX)

`#include <opencv2/core/types_c.h>`

sequence of the integer numbers

## § CV_SEQ_KIND

#define CV_SEQ_KIND | ( |  | seq | ) | ((seq)->flags & CV_SEQ_KIND_MASK )

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_KIND_BIN_TREE

#define CV_SEQ_KIND_BIN_TREE (2 << CV_SEQ_ELTYPE_BITS)

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_KIND_BITS

#define CV_SEQ_KIND_BITS 2

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_KIND_CURVE

#define CV_SEQ_KIND_CURVE (1 << CV_SEQ_ELTYPE_BITS)

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_KIND_GENERIC

#define CV_SEQ_KIND_GENERIC (0 << CV_SEQ_ELTYPE_BITS)

`#include <opencv2/core/types_c.h>`

types of sequences

## § CV_SEQ_KIND_GRAPH

#define CV_SEQ_KIND_GRAPH (1 << CV_SEQ_ELTYPE_BITS)

`#include <opencv2/core/types_c.h>`

types of sparse sequences (sets)

## § CV_SEQ_KIND_MASK

#define CV_SEQ_KIND_MASK (((1 << CV_SEQ_KIND_BITS) - 1)<<CV_SEQ_ELTYPE_BITS)

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_KIND_SUBDIV2D

#define CV_SEQ_KIND_SUBDIV2D (2 << CV_SEQ_ELTYPE_BITS)

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_MAGIC_VAL

#define CV_SEQ_MAGIC_VAL 0x42990000

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_POINT3D_SET

#define CV_SEQ_POINT3D_SET (CV_SEQ_KIND_GENERIC| CV_SEQ_ELTYPE_POINT3D)

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_POINT_SET

#define CV_SEQ_POINT_SET (CV_SEQ_KIND_GENERIC| CV_SEQ_ELTYPE_POINT)

`#include <opencv2/core/types_c.h>`

point sets

## § CV_SEQ_POLYGON

#define CV_SEQ_POLYGON (CV_SEQ_FLAG_CLOSED | CV_SEQ_POLYLINE )

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_POLYGON_TREE

#define CV_SEQ_POLYGON_TREE (CV_SEQ_KIND_BIN_TREE | CV_SEQ_ELTYPE_TRIAN_ATR)

`#include <opencv2/core/types_c.h>`

binary tree for the contour

## § CV_SEQ_POLYLINE

#define CV_SEQ_POLYLINE (CV_SEQ_KIND_CURVE | CV_SEQ_ELTYPE_POINT)

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_READER_FIELDS

#define CV_SEQ_READER_FIELDS | ( |  | ) |

`#include <opencv2/core/types_c.h>`

Value:
int header_size; \
CvSeq* seq; \
CvSeqBlock* block; \
schar* ptr; \
schar* block_min; \
schar* block_max; \
int delta_index; \
schar* prev_elem;

pointer to previous element

## § CV_SEQ_SIMPLE_POLYGON

#define CV_SEQ_SIMPLE_POLYGON (CV_SEQ_FLAG_SIMPLE | CV_SEQ_POLYGON )

`#include <opencv2/core/types_c.h>`

## § CV_SEQ_WRITER_FIELDS

#define CV_SEQ_WRITER_FIELDS | ( |  | ) |

`#include <opencv2/core/types_c.h>`

Value:
int header_size; \
CvSeq* seq; \
CvSeqBlock* block; \
schar* ptr; \
schar* block_min; \
schar* block_max;

pointer to the end of block

## § CV_SEQUENCE_FIELDS

#define CV_SEQUENCE_FIELDS | ( |  | ) |

`#include <opencv2/core/types_c.h>`

Value:
CV_TREE_NODE_FIELDS(CvSeq); \
int total; \
int elem_size; \
schar* block_max; \
schar* ptr; \
int delta_elems; \
CvMemStorage* storage; \
CvSeqBlock* free_blocks; \
CvSeqBlock* first;
CV_TREE_NODE_FIELDS
#define CV_TREE_NODE_FIELDS(node_type)
Definition: types_c.h:1529
cv::dnn::total
static int total(const MatShape &shape, int start=-1, int end=-1)
Definition: shape_utils.hpp:151
CvSeq
Definition: types_c.h:1567

Read/Write sequence. Elements can be dynamically inserted to or deleted from the sequence.Pointer to the first sequence block.

## § CV_SET_ELEM_FIELDS

#define CV_SET_ELEM_FIELDS | ( |  | elem_type | ) |

`#include <opencv2/core/types_c.h>`

Value:
int flags; \
struct elem_type* next_free;

Set Order is not preserved. There can be gaps between sequence elements. After the element has been inserted it stays in the same place all the time. The MSB(most-significant or sign bit) of the first field (flags) is 0 iff the element exists.

## § CV_SET_ELEM_FREE_FLAG

#define CV_SET_ELEM_FREE_FLAG (1 << (sizeof(int)*8-1))

`#include <opencv2/core/types_c.h>`

## § CV_SET_ELEM_IDX_MASK

#define CV_SET_ELEM_IDX_MASK ((1 << 26) - 1)

`#include <opencv2/core/types_c.h>`

## § CV_SET_FIELDS

#define CV_SET_FIELDS | ( |  | ) |

`#include <opencv2/core/types_c.h>`

Value:
CV_SEQUENCE_FIELDS() \
CvSetElem* free_elems; \
int active_count;
CV_SEQUENCE_FIELDS
#define CV_SEQUENCE_FIELDS()
Definition: types_c.h:1547

## § CV_SET_MAGIC_VAL

#define CV_SET_MAGIC_VAL 0x42980000

`#include <opencv2/core/types_c.h>`

## § CV_SIGN

#define CV_SIGN | ( |  | a | ) | CV_CMP((a),0)

`#include <opencv2/core/types_c.h>`

## § CV_SORT_ASCENDING

#define CV_SORT_ASCENDING 0

`#include <opencv2/core/core_c.h>`

## § CV_SORT_DESCENDING

#define CV_SORT_DESCENDING 16

`#include <opencv2/core/core_c.h>`

## § CV_SORT_EVERY_COLUMN

#define CV_SORT_EVERY_COLUMN 1

`#include <opencv2/core/core_c.h>`

## § CV_SORT_EVERY_ROW

#define CV_SORT_EVERY_ROW 0

`#include <opencv2/core/core_c.h>`

## § CV_SPARSE_MAT_MAGIC_VAL

#define CV_SPARSE_MAT_MAGIC_VAL 0x42440000

`#include <opencv2/core/types_c.h>`

## § CV_STORAGE_APPEND

#define CV_STORAGE_APPEND 2

`#include <opencv2/core/types_c.h>`

## § CV_STORAGE_BASE64

#define CV_STORAGE_BASE64 64

`#include <opencv2/core/types_c.h>`

## § CV_STORAGE_FORMAT_AUTO

#define CV_STORAGE_FORMAT_AUTO 0

`#include <opencv2/core/types_c.h>`

## § CV_STORAGE_FORMAT_JSON

#define CV_STORAGE_FORMAT_JSON 24

`#include <opencv2/core/types_c.h>`

## § CV_STORAGE_FORMAT_MASK

#define CV_STORAGE_FORMAT_MASK (7<<3)

`#include <opencv2/core/types_c.h>`

## § CV_STORAGE_FORMAT_XML

#define CV_STORAGE_FORMAT_XML 8

`#include <opencv2/core/types_c.h>`

## § CV_STORAGE_FORMAT_YAML

#define CV_STORAGE_FORMAT_YAML 16

`#include <opencv2/core/types_c.h>`

## § CV_STORAGE_MAGIC_VAL

#define CV_STORAGE_MAGIC_VAL 0x42890000

`#include <opencv2/core/types_c.h>`

## § CV_STORAGE_MEMORY

#define CV_STORAGE_MEMORY 4

`#include <opencv2/core/types_c.h>`

## § CV_STORAGE_READ

#define CV_STORAGE_READ 0

`#include <opencv2/core/types_c.h>`

Storage flags:

## § CV_STORAGE_WRITE

#define CV_STORAGE_WRITE 1

`#include <opencv2/core/types_c.h>`

## § CV_STORAGE_WRITE_BASE64

#define CV_STORAGE_WRITE_BASE64 (CV_STORAGE_BASE64 | CV_STORAGE_WRITE)

`#include <opencv2/core/types_c.h>`

## § CV_STORAGE_WRITE_BINARY

#define CV_STORAGE_WRITE_BINARY CV_STORAGE_WRITE

`#include <opencv2/core/types_c.h>`

## § CV_STORAGE_WRITE_TEXT

#define CV_STORAGE_WRITE_TEXT CV_STORAGE_WRITE

`#include <opencv2/core/types_c.h>`

## § CV_SVD

#define CV_SVD 1

`#include <opencv2/core/core_c.h>`

## § CV_SVD_MODIFY_A

#define CV_SVD_MODIFY_A 1

`#include <opencv2/core/core_c.h>`

## § CV_SVD_SYM

#define CV_SVD_SYM 2

`#include <opencv2/core/core_c.h>`

## § CV_SVD_U_T

#define CV_SVD_U_T 2

`#include <opencv2/core/core_c.h>`

## § CV_SVD_V_T

#define CV_SVD_V_T 4

`#include <opencv2/core/core_c.h>`

## § CV_SWAP

#define CV_SWAP | ( |  | a,
|  |  | b,
|  |  | t
| ) |  | ((t) = (a), (a) = (b), (b) = (t))

`#include <opencv2/core/types_c.h>`

## § CV_TERMCRIT_EPS

#define CV_TERMCRIT_EPS 2

`#include <opencv2/core/types_c.h>`

## § CV_TERMCRIT_ITER

#define CV_TERMCRIT_ITER 1

`#include <opencv2/core/types_c.h>`

## § CV_TERMCRIT_NUMBER

#define CV_TERMCRIT_NUMBER CV_TERMCRIT_ITER

`#include <opencv2/core/types_c.h>`

## § CV_TREE_NODE_FIELDS

#define CV_TREE_NODE_FIELDS | ( |  | node_type | ) |

`#include <opencv2/core/types_c.h>`

Value:
int flags; \
int header_size; \
struct node_type* h_prev; \
struct node_type* h_next; \
struct node_type* v_prev; \
struct node_type* v_next

2nd next sequence.

## § CV_TURN_ON_IPL_COMPATIBILITY

#define CV_TURN_ON_IPL_COMPATIBILITY | ( |  | ) |

`#include <opencv2/core/core_c.h>`

Value:
cvSetIPLAllocators( iplCreateImageHeader, iplAllocateImage, \
iplDeallocate, iplCreateROI, iplCloneImage )
cvSetIPLAllocators
void cvSetIPLAllocators(Cv_iplCreateImageHeader create_header, Cv_iplAllocateImageData allocate_data, Cv_iplDeallocate deallocate, Cv_iplCreateROI create_roi, Cv_iplCloneImage clone_image)
Makes OpenCV use IPL functions for allocating IplImage and IplROI structures.

## § CV_TYPE_NAME_GRAPH

#define CV_TYPE_NAME_GRAPH "opencv-graph"

`#include <opencv2/core/types_c.h>`

## § CV_TYPE_NAME_IMAGE

#define CV_TYPE_NAME_IMAGE "opencv-image"

`#include <opencv2/core/types_c.h>`

## § CV_TYPE_NAME_MAT

#define CV_TYPE_NAME_MAT "opencv-matrix"

`#include <opencv2/core/types_c.h>`

## § CV_TYPE_NAME_MATND

#define CV_TYPE_NAME_MATND "opencv-nd-matrix"

`#include <opencv2/core/types_c.h>`

## § CV_TYPE_NAME_SEQ

#define CV_TYPE_NAME_SEQ "opencv-sequence"

`#include <opencv2/core/types_c.h>`

## § CV_TYPE_NAME_SEQ_TREE

#define CV_TYPE_NAME_SEQ_TREE "opencv-sequence-tree"

`#include <opencv2/core/types_c.h>`

## § CV_TYPE_NAME_SPARSE_MAT

#define CV_TYPE_NAME_SPARSE_MAT "opencv-sparse-matrix"

`#include <opencv2/core/types_c.h>`

## § CV_WHOLE_ARR

#define CV_WHOLE_ARR cvSlice( 0, 0x3fffffff )

`#include <opencv2/core/types_c.h>`

## § CV_WHOLE_SEQ

#define CV_WHOLE_SEQ cvSlice(0, CV_WHOLE_SEQ_END_INDEX)

`#include <opencv2/core/types_c.h>`

## § CV_WHOLE_SEQ_END_INDEX

#define CV_WHOLE_SEQ_END_INDEX 0x3fffffff

`#include <opencv2/core/types_c.h>`

## § CV_WRITE_SEQ_ELEM

#define CV_WRITE_SEQ_ELEM | ( |  | elem,
|  |  | writer
| ) |  |

`#include <opencv2/core/types_c.h>`

Value:
{ \
assert( (writer).seq->elem_size == sizeof(elem)); \
if( (writer).ptr >= (writer).block_max ) \
{ \
cvCreateSeqBlock( &writer); \
} \
assert( (writer).ptr <= (writer).block_max - sizeof(elem));\
memcpy((writer).ptr, &(elem), sizeof(elem)); \
(writer).ptr += sizeof(elem); \
}

## § CV_WRITE_SEQ_ELEM_VAR

#define CV_WRITE_SEQ_ELEM_VAR | ( |  | elem_ptr,
|  |  | writer
| ) |  |

`#include <opencv2/core/types_c.h>`

Value:
{ \
if( (writer).ptr >= (writer).block_max ) \
{ \
cvCreateSeqBlock( &writer); \
} \
memcpy((writer).ptr, elem_ptr, (writer).seq->elem_size);\
(writer).ptr += (writer).seq->elem_size; \
}

Add element to sequence:

## § cvAbs

#define cvAbs | ( |  | src,
|  |  | dst
| ) |  | cvAbsDiffS( (src), (dst), cvScalarAll(0))

`#include <opencv2/core/core_c.h>`

## § cvAXPY

#define cvAXPY | ( |  | A,
|  |  | real_scalar,
|  |  | B,
|  |  | C
| ) |  | cvScaleAdd(A, cvRealScalar(real_scalar), B, C)

`#include <opencv2/core/core_c.h>`

## § cvCheckArray

#define cvCheckArray cvCheckArr

`#include <opencv2/core/core_c.h>`

## § cvConvert

#define cvConvert | ( |  | src,
|  |  | dst
| ) |  | cvConvertScale( (src), (dst), 1, 0 )

`#include <opencv2/core/core_c.h>`

## § cvCvtScale

#define cvCvtScale cvConvertScale

`#include <opencv2/core/core_c.h>`

## § cvCvtScaleAbs

#define cvCvtScaleAbs cvConvertScaleAbs

`#include <opencv2/core/core_c.h>`

## § cvFFT

#define cvFFT cvDFT

`#include <opencv2/core/core_c.h>`

## § cvFree

#define cvFree | ( |  | ptr | ) | (cvFree_(*(ptr)), *(ptr)=0)

`#include <opencv2/core/core_c.h>`

## § cvGetGraphVtx

#define cvGetGraphVtx | ( |  | graph,
|  |  | idx
| ) |  | (CvGraphVtx*)cvGetSetElem((CvSet*)(graph), (idx))

`#include <opencv2/core/core_c.h>`

Retrieves graph vertex by given index

## § cvGetSubArr

#define cvGetSubArr cvGetSubRect

`#include <opencv2/core/core_c.h>`

## § cvGraphEdgeIdx

#define cvGraphEdgeIdx | ( |  | graph,
|  |  | edge
| ) |  | ((edge)->flags & CV_SET_ELEM_IDX_MASK)

`#include <opencv2/core/core_c.h>`

Retrieves index of a graph edge given its pointer

## § cvGraphFindEdge

#define cvGraphFindEdge cvFindGraphEdge

`#include <opencv2/core/core_c.h>`

## § cvGraphFindEdgeByPtr

#define cvGraphFindEdgeByPtr cvFindGraphEdgeByPtr

`#include <opencv2/core/core_c.h>`

## § cvGraphGetEdgeCount

#define cvGraphGetEdgeCount | ( |  | graph | ) | ((graph)->edges->active_count)

`#include <opencv2/core/core_c.h>`

## § cvGraphGetVtxCount

#define cvGraphGetVtxCount | ( |  | graph | ) | ((graph)->active_count)

`#include <opencv2/core/core_c.h>`

## § cvGraphVtxIdx

#define cvGraphVtxIdx | ( |  | graph,
|  |  | vtx
| ) |  | ((vtx)->flags & CV_SET_ELEM_IDX_MASK)

`#include <opencv2/core/core_c.h>`

Retrieves index of a graph vertex given its pointer

## § cvInv

#define cvInv cvInvert

`#include <opencv2/core/core_c.h>`

## § cvInvSqrt

#define cvInvSqrt | ( |  | value | ) | ((float)(1./sqrt(value)))

`#include <opencv2/core/types_c.h>`

## § cvMahalonobis

#define cvMahalonobis cvMahalanobis

`#include <opencv2/core/core_c.h>`

## § cvMatMul

#define cvMatMul | ( |  | src1,
|  |  | src2,
|  |  | dst
| ) |  | cvMatMulAdd( (src1), (src2), NULL, (dst))

`#include <opencv2/core/core_c.h>`

## § cvMatMulAdd

#define cvMatMulAdd | ( |  | src1,
|  |  | src2,
|  |  | src3,
|  |  | dst
| ) |  | cvGEMM( (src1), (src2), 1., (src3), 1., (dst), 0 )

`#include <opencv2/core/core_c.h>`

Matrix transform: dst = A*B + C, C is optional

## § cvMatMulAddEx

#define cvMatMulAddEx cvGEMM

`#include <opencv2/core/core_c.h>`

## § cvMatMulAddS

#define cvMatMulAddS cvTransform

`#include <opencv2/core/core_c.h>`

## § cvMirror

#define cvMirror cvFlip

`#include <opencv2/core/core_c.h>`

## § cvReshapeND

#define cvReshapeND | ( |  | arr,
|  |  | header,
|  |  | new_cn,
|  |  | new_dims,
|  |  | new_sizes
| ) |  |

`#include <opencv2/core/core_c.h>`

Value:
cvReshapeMatND( (arr), sizeof(*(header)), (header), \
(new_cn), (new_dims), (new_sizes))
cvReshapeMatND
CvArr * cvReshapeMatND(const CvArr *arr, int sizeof_header, CvArr *header, int new_cn, int new_dims, int *new_sizes)
Changes the shape of a multi-dimensional array without copying the data.

## § cvScale

#define cvScale cvConvertScale

`#include <opencv2/core/core_c.h>`

## § cvSqrt

#define cvSqrt | ( |  | value | ) | ((float)sqrt(value))

`#include <opencv2/core/types_c.h>`

## § cvT

#define cvT cvTranspose

`#include <opencv2/core/core_c.h>`

## § cvZero

#define cvZero cvSetZero

`#include <opencv2/core/core_c.h>`

## § IPL2CV_DEPTH

#define IPL2CV_DEPTH | ( |  | depth | ) |

`#include <opencv2/core/types_c.h>`

Value:
((((CV_8U)+(CV_16U<<4)+(CV_32F<<8)+(CV_64F<<16)+(CV_8S<<20)+ \
(CV_16S<<24)+(CV_32S<<28)) >> ((((depth) & 0xF0) >> 2) + \
(((depth) & IPL_DEPTH_SIGN) ? 20 : 0))) & 15)
IPL_DEPTH_SIGN
#define IPL_DEPTH_SIGN
Definition: types_c.h:281
cv::sfm::depth
double depth(InputArray R, InputArray t, InputArray X)
Returns the depth of a point transformed by a rigid transform.
CV_8U
#define CV_8U
Definition: interface.h:71
CV_8S
#define CV_8S
Definition: interface.h:72
CV_32F
#define CV_32F
Definition: interface.h:76
CV_64F
#define CV_64F
Definition: interface.h:77
CV_16U
#define CV_16U
Definition: interface.h:73
CV_16S
#define CV_16S
Definition: interface.h:74

## § IPL_ALIGN_16BYTES

#define IPL_ALIGN_16BYTES 16

`#include <opencv2/core/types_c.h>`

## § IPL_ALIGN_32BYTES

#define IPL_ALIGN_32BYTES 32

`#include <opencv2/core/types_c.h>`

## § IPL_ALIGN_4BYTES

#define IPL_ALIGN_4BYTES 4

`#include <opencv2/core/types_c.h>`

## § IPL_ALIGN_8BYTES

#define IPL_ALIGN_8BYTES 8

`#include <opencv2/core/types_c.h>`

## § IPL_ALIGN_DWORD

#define IPL_ALIGN_DWORD IPL_ALIGN_4BYTES

`#include <opencv2/core/types_c.h>`

## § IPL_ALIGN_QWORD

#define IPL_ALIGN_QWORD IPL_ALIGN_8BYTES

`#include <opencv2/core/types_c.h>`

## § IPL_BORDER_CONSTANT

#define IPL_BORDER_CONSTANT 0

`#include <opencv2/core/types_c.h>`

## § IPL_BORDER_REFLECT

#define IPL_BORDER_REFLECT 2

`#include <opencv2/core/types_c.h>`

## § IPL_BORDER_REFLECT_101

#define IPL_BORDER_REFLECT_101 4

`#include <opencv2/core/types_c.h>`

extra border mode

## § IPL_BORDER_REPLICATE

#define IPL_BORDER_REPLICATE 1

`#include <opencv2/core/types_c.h>`

## § IPL_BORDER_TRANSPARENT

#define IPL_BORDER_TRANSPARENT 5

`#include <opencv2/core/types_c.h>`

## § IPL_BORDER_WRAP

#define IPL_BORDER_WRAP 3

`#include <opencv2/core/types_c.h>`

## § IPL_DATA_ORDER_PIXEL

#define IPL_DATA_ORDER_PIXEL 0

`#include <opencv2/core/types_c.h>`

## § IPL_DATA_ORDER_PLANE

#define IPL_DATA_ORDER_PLANE 1

`#include <opencv2/core/types_c.h>`

## § IPL_DEPTH_16S

#define IPL_DEPTH_16S (IPL_DEPTH_SIGN|16)

`#include <opencv2/core/types_c.h>`

## § IPL_DEPTH_16U

#define IPL_DEPTH_16U 16

`#include <opencv2/core/types_c.h>`

## § IPL_DEPTH_1U

#define IPL_DEPTH_1U 1

`#include <opencv2/core/types_c.h>`

## § IPL_DEPTH_32F

#define IPL_DEPTH_32F 32

`#include <opencv2/core/types_c.h>`

## § IPL_DEPTH_32S

#define IPL_DEPTH_32S (IPL_DEPTH_SIGN|32)

`#include <opencv2/core/types_c.h>`

## § IPL_DEPTH_64F

#define IPL_DEPTH_64F 64

`#include <opencv2/core/types_c.h>`

for storing double-precision floating point data in IplImage's

## § IPL_DEPTH_8S

#define IPL_DEPTH_8S (IPL_DEPTH_SIGN| 8)

`#include <opencv2/core/types_c.h>`

## § IPL_DEPTH_8U

#define IPL_DEPTH_8U 8

`#include <opencv2/core/types_c.h>`

## § IPL_DEPTH_SIGN

#define IPL_DEPTH_SIGN 0x80000000

`#include <opencv2/core/types_c.h>`

## § IPL_IMAGE_DATA

#define IPL_IMAGE_DATA 2

`#include <opencv2/core/types_c.h>`

## § IPL_IMAGE_HEADER

#define IPL_IMAGE_HEADER 1

`#include <opencv2/core/types_c.h>`

## § IPL_IMAGE_MAGIC_VAL

#define IPL_IMAGE_MAGIC_VAL ((int)sizeof(IplImage))

`#include <opencv2/core/types_c.h>`

## § IPL_IMAGE_ROI

#define IPL_IMAGE_ROI 4

`#include <opencv2/core/types_c.h>`

## § IPL_ORIGIN_BL

#define IPL_ORIGIN_BL 1

`#include <opencv2/core/types_c.h>`

## § IPL_ORIGIN_TL

#define IPL_ORIGIN_TL 0

`#include <opencv2/core/types_c.h>`

## § OPENCV_ASSERT

#define OPENCV_ASSERT | ( |  | expr,
|  |  | func,
|  |  | context
| ) |  |

`#include <opencv2/core/core_c.h>`

Value:
{if (! (expr)) \
{OPENCV_ERROR(CV_StsInternal,(func),(context));}}
OPENCV_ERROR
#define OPENCV_ERROR(status, func, context)
Definition: core_c.h:2684
CV_StsInternal
Definition: types_c.h:146

## § OPENCV_CALL

#define OPENCV_CALL | ( |  | Func | ) |

`#include <opencv2/core/core_c.h>`

Value:
{ \
Func; \
}

## § OPENCV_ERROR

#define OPENCV_ERROR | ( |  | status,
|  |  | func,
|  |  | context
| ) |  | cvError((status),(func),(context),__FILE__,__LINE__)

`#include <opencv2/core/core_c.h>`

## Typedef Documentation

## § Cv_iplAllocateImageData

typedef void(CV_STDCALL* Cv_iplAllocateImageData) (IplImage *, int, int)

`#include <opencv2/core/core_c.h>`

## § Cv_iplCloneImage

typedef IplImage*(CV_STDCALL* Cv_iplCloneImage) (const IplImage *)

`#include <opencv2/core/core_c.h>`

## § Cv_iplCreateImageHeader

typedef IplImage*(CV_STDCALL* Cv_iplCreateImageHeader) (int, int, int, char *, char *, int, int, int, int, int, IplROI *, IplImage *, void *, IplTileInfo *)

`#include <opencv2/core/core_c.h>`

## § Cv_iplCreateROI

typedef IplROI*(CV_STDCALL* Cv_iplCreateROI) (int, int, int, int, int)

`#include <opencv2/core/core_c.h>`

## § Cv_iplDeallocate

typedef void(CV_STDCALL* Cv_iplDeallocate) (IplImage *, int)

`#include <opencv2/core/core_c.h>`

## § CvArr

typedef void CvArr

`#include <opencv2/core/types_c.h>`

This is the "metatype" used only as a function parameter.

It denotes that the function accepts arrays of multiple types, such as IplImage*, CvMat* or even CvSeq* sometimes. The particular array type is determined at runtime by analyzing the first 4 bytes of the header. In C++ interface the role of CvArr is played by InputArray and OutputArray.

## § CvCloneFunc

typedef void*( * CvCloneFunc) (const void *struct_ptr)

`#include <opencv2/core/types_c.h>`

## § CvCmpFunc

typedef int(* CvCmpFunc) (const void *a, const void *b, void *userdata)

`#include <opencv2/core/core_c.h>`

a < b ? -1 : a > b ? 1 : 0

## § CvErrorCallback

typedef int( * CvErrorCallback) (int status, const char *func_name, const char *err_msg, const char *file_name, int line, void *userdata)

`#include <opencv2/core/core_c.h>`

## § CvFileNodeHash

typedef struct CvGenericHash CvFileNodeHash

`#include <opencv2/core/types_c.h>`

## § CvFileStorage [1/2]

typedef struct CvFileStorage CvFileStorage

`#include <opencv2/core/persistence.hpp>`

"black box" representation of the file storage associated with a file on disk.

Several functions that are described below take CvFileStorage* as inputs and allow the user to save or to load hierarchical collections that consist of scalar values, standard CXCore objects (such as matrices, sequences, graphs), and user-defined objects.

OpenCV can read and write data in XML (http://www.w3c.org/XML), YAML (http://www.yaml.org) or JSON (http://www.json.org/) formats. Below is an example of 3x3 floating-point identity matrix A, stored in XML and YAML files using CXCore functions: XML:

<?xml version="1.0">
<opencv_storage>
<A type_id="opencv-matrix">
<rows>3</rows>
<cols>3</cols>
<dt>f</dt>
<data>1. 0. 0. 0. 1. 0. 0. 0. 1.</data>
</A>
</opencv_storage>

YAML:

%YAML:1.0
A: !!opencv-matrix
rows: 3
cols: 3
dt: f
data: [ 1., 0., 0., 0., 1., 0., 0., 0., 1.]

As it can be seen from the examples, XML uses nested tags to represent hierarchy, while YAML uses indentation for that purpose (similar to the Python programming language).

The same functions can read and write data in both formats; the particular format is determined by the extension of the opened file, ".xml" for XML files, ".yml" or ".yaml" for YAML and ".json" for JSON.

## § CvFileStorage [2/2]

typedef struct CvFileStorage CvFileStorage

`#include <opencv2/core/types_c.h>`

"black box" file storage

## § CvHistType

typedef int CvHistType

`#include <opencv2/core/types_c.h>`

## § CvIsInstanceFunc

typedef int( * CvIsInstanceFunc) (const void *struct_ptr)

`#include <opencv2/core/types_c.h>`

## § CvPoint2DSeq

typedef CvContour CvPoint2DSeq

`#include <opencv2/core/types_c.h>`

## § CvReadFunc

typedef void*( * CvReadFunc) (CvFileStorage *storage, CvFileNode *node)

`#include <opencv2/core/types_c.h>`

## § CvReleaseFunc

typedef void( * CvReleaseFunc) (void **struct_dblptr)

`#include <opencv2/core/types_c.h>`

## § CvRNG

typedef uint64 CvRNG

`#include <opencv2/core/types_c.h>`

## § CVStatus

typedef int CVStatus

`#include <opencv2/core/types_c.h>`

## § CvWriteFunc

typedef void( * CvWriteFunc) (CvFileStorage *storage, const char *name, const void *struct_ptr, CvAttrList attributes)

`#include <opencv2/core/types_c.h>`

## § IplImage

typedef struct _IplImage IplImage

`#include <opencv2/core/types_c.h>`

## § IplTileInfo

typedef struct _IplTileInfo IplTileInfo

`#include <opencv2/core/types_c.h>`

## Enumeration Type Documentation

## § anonymous enum

anonymous enum

`#include <opencv2/core/types_c.h>`

See also
  cv::Error::Code

Enumerator
CV_StsOk | everything is ok
CV_StsBackTrace | pseudo error for back trace
CV_StsError | unknown /unspecified error
CV_StsInternal | internal error (bad state)
CV_StsNoMem | insufficient memory
CV_StsBadArg | function arg/param is bad
CV_StsBadFunc | unsupported function
CV_StsNoConv | iter. didn't converge
CV_StsAutoTrace | tracing
CV_HeaderIsNull | image header is NULL
CV_BadImageSize | image size is invalid
CV_BadOffset | offset is invalid
CV_BadDataPtr |
CV_BadStep | image step is wrong, this may happen for a non-continuous matrix
CV_BadModelOrChSeq |
CV_BadNumChannels | bad number of channels, for example, some functions accept only single channel matrices
CV_BadNumChannel1U |
CV_BadDepth | input image depth is not supported by the function
CV_BadAlphaChannel |
CV_BadOrder | number of dimensions is out of range
CV_BadOrigin | incorrect input origin
CV_BadAlign | incorrect input align
CV_BadCallBack |
CV_BadTileSize |
CV_BadCOI | input COI is not supported
CV_BadROISize | incorrect input roi
CV_MaskIsTiled |
CV_StsNullPtr | null pointer
CV_StsVecLengthErr | incorrect vector length
CV_StsFilterStructContentErr | incorrect filter structure content
CV_StsKernelStructContentErr | incorrect transform kernel content
CV_StsFilterOffsetErr | incorrect filter offset value
CV_StsBadSize | the input/output structure size is incorrect
CV_StsDivByZero | division by zero
CV_StsInplaceNotSupported | in-place operation is not supported
CV_StsObjectNotFound | request can't be completed
CV_StsUnmatchedFormats | formats of input/output arrays differ
CV_StsBadFlag | flag is wrong or not supported
CV_StsBadPoint | bad CvPoint
CV_StsBadMask | bad format of mask (neither 8uC1 nor 8sC1)
CV_StsUnmatchedSizes | sizes of input/output structures do not match
CV_StsUnsupportedFormat | the data format/type is not supported by the function
CV_StsOutOfRange | some of parameters are out of range
CV_StsParseError | invalid syntax/structure of the parsed file
CV_StsNotImplemented | the requested function/feature is not implemented
CV_StsBadMemBlock | an allocated block has been corrupted
CV_StsAssert | assertion failed
CV_GpuNotSupported | no CUDA support
CV_GpuApiCallError | GPU API call error
CV_OpenGlNotSupported | no OpenGL support
CV_OpenGlApiCallError | OpenGL API call error
CV_OpenCLApiCallError | OpenCL API call error
CV_OpenCLDoubleNotSupported |
CV_OpenCLInitError | OpenCL initialization error
CV_OpenCLNoAMDBlasFft |

## Function Documentation

## § cvAbsDiff()

void cvAbsDiff | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(x,y,c) = abs(src1(x,y,c) - src2(x,y,c))

## § cvAbsDiffS()

void cvAbsDiffS | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | CvScalar | value
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(x,y,c) = abs(src(x,y,c) - value(c))

## § cvAdd()

void cvAdd | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | CvArr * | dst,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(mask) = src1(mask) + src2(mask)

## § cvAddS()

void cvAddS | ( | const CvArr * | src,
|  | CvScalar | value,
|  | CvArr * | dst,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(mask) = src(mask) + value

## § cvAddWeighted()

void cvAddWeighted | ( | const CvArr * | src1,
|  | double | alpha,
|  | const CvArr * | src2,
|  | double | beta,
|  | double | gamma,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

dst = src1 * alpha + src2 * beta + gamma

## § cvAlloc()

void* cvAlloc | ( | size_t | size | ) |

`#include <opencv2/core/core_c.h>`

`malloc` wrapper. If there is no enough memory, the function (as well as other OpenCV functions that call cvAlloc) raises an error.

## § cvAnd()

void cvAnd | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | CvArr * | dst,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = src1(idx) & src2(idx)

## § cvAndS()

void cvAndS | ( | const CvArr * | src,
|  | CvScalar | value,
|  | CvArr * | dst,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = src(idx) & value

## § cvAttrList()

CvAttrList cvAttrList | ( | const char ** | attr = `NULL`,
|  | CvAttrList * | next = `NULL`
| ) |  |

`#include <opencv2/core/types_c.h>`

initializes CvAttrList structure

## § cvAttrValue()

const char* cvAttrValue | ( | const CvAttrList * | attr,
|  | const char * | attr_name
| ) |  |

`#include <opencv2/core/core_c.h>`

returns attribute value or 0 (NULL) if there is no such attribute

## § cvAvg()

CvScalar cvAvg | ( | const CvArr * | arr,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Calculates mean value of array elements

## § cvAvgSdv()

void cvAvgSdv | ( | const CvArr * | arr,
|  | CvScalar * | mean,
|  | CvScalar * | std_dev,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Calculates mean and standard deviation of pixel values

## § cvBackProjectPCA()

void cvBackProjectPCA | ( | const CvArr * | proj,
|  | const CvArr * | mean,
|  | const CvArr * | eigenvects,
|  | CvArr * | result
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvBox2D() [1/2]

CvBox2D cvBox2D | ( | CvPoint2D32f | c = `CvPoint2D32f()`,
|  | CvSize2D32f | s = `CvSize2D32f()`,
|  | float | a = `0`
| ) |  |

`#include <opencv2/core/types_c.h>`

## § cvBox2D() [2/2]

CvBox2D cvBox2D | ( | const cv::RotatedRect & | rr | ) |

`#include <opencv2/core/types_c.h>`

## § cvCalcCovarMatrix()

void cvCalcCovarMatrix | ( | const CvArr ** | vects,
|  | int | count,
|  | CvArr * | cov_mat,
|  | CvArr * | avg,
|  | int | flags
| ) |  |

`#include <opencv2/core/core_c.h>`

Calculates covariation matrix for a set of vectors

See also
  flags

## § cvCalcPCA()

void cvCalcPCA | ( | const CvArr * | data,
|  | CvArr * | mean,
|  | CvArr * | eigenvals,
|  | CvArr * | eigenvects,
|  | int | flags
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvCartToPolar()

void cvCartToPolar | ( | const CvArr * | x,
|  | const CvArr * | y,
|  | CvArr * | magnitude,
|  | CvArr * | angle = `NULL`,
|  | int | angle_in_degrees = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Does cartesian->polar coordinates conversion. Either of output components (magnitude or angle) is optional

## § cvCbrt()

float cvCbrt | ( | float | value | ) |

`#include <opencv2/core/core_c.h>`

Fast cubic root calculation

## § cvChangeSeqBlock()

void cvChangeSeqBlock | ( | void * | reader,
|  | int | direction
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvCheckArr()

int cvCheckArr | ( | const CvArr * | arr,
|  | int | flags = `0`,
|  | double | min_val = `0`,
|  | double | max_val = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Checks array values for NaNs, Infs or simply for too large numbers (if CV_CHECK_RANGE is set). If CV_CHECK_QUIET is set, no runtime errors is raised (function returns zero value in case of "bad" values). Otherwise cvError is called

## § cvCheckHardwareSupport()

int cvCheckHardwareSupport | ( | int | feature | ) |

`#include <opencv2/core/core_c.h>`

## § cvCheckTermCriteria()

CvTermCriteria cvCheckTermCriteria | ( | CvTermCriteria | criteria,
|  | double | default_eps,
|  | int | default_max_iters
| ) |  |

`#include <opencv2/core/core_c.h>`

checks termination criteria validity and sets eps to default_eps (if it is not set), max_iter to default_max_iters (if it is not set)

## § cvClearGraph()

void cvClearGraph | ( | CvGraph * | graph | ) |

`#include <opencv2/core/core_c.h>`

Remove all vertices and edges from the graph

## § cvClearMemStorage()

void cvClearMemStorage | ( | CvMemStorage * | storage | ) |

`#include <opencv2/core/core_c.h>`

Clears memory storage. This is the only way(!!!) (besides cvRestoreMemStoragePos) to reuse memory allocated for the storage - cvClearSeq,cvClearSet ... do not free any memory. A child storage returns all the blocks to the parent when it is cleared

## § cvClearND()

void cvClearND | ( | CvArr * | arr,
|  | const int * | idx
| ) |  |

`#include <opencv2/core/core_c.h>`

clears element of ND dense array, in case of sparse arrays it deletes the specified node

## § cvClearSeq()

void cvClearSeq | ( | CvSeq * | seq | ) |

`#include <opencv2/core/core_c.h>`

Removes all the elements from the sequence. The freed memory can be reused later only by the same sequence unless cvClearMemStorage or cvRestoreMemStoragePos is called

## § cvClearSet()

void cvClearSet | ( | CvSet * | set_header | ) |

`#include <opencv2/core/core_c.h>`

Removes all the elements from the set

## § cvClone()

void* cvClone | ( | const void * | struct_ptr | ) |

`#include <opencv2/core/core_c.h>`

Makes a clone of an object.

The function finds the type of a given object and calls clone with the passed object. Of course, if you know the object type, for example, struct_ptr is CvMat*, it is faster to call the specific function, like cvCloneMat.

Parameters

  struct_ptr | The object to clone

## § cvCloneGraph()

CvGraph* cvCloneGraph | ( | const CvGraph * | graph,
|  | CvMemStorage * | storage
| ) |  |

`#include <opencv2/core/core_c.h>`

Creates a copy of graph

## § cvCloneImage()

IplImage* cvCloneImage | ( | const IplImage * | image | ) |

`#include <opencv2/core/core_c.h>`

Creates a copy of IPL image (widthStep may differ)

## § cvCloneMat()

CvMat* cvCloneMat | ( | const CvMat * | mat | ) |

`#include <opencv2/core/core_c.h>`

Creates an exact copy of the input matrix (except, may be, step value)

## § cvCloneMatND()

CvMatND* cvCloneMatND | ( | const CvMatND * | mat | ) |

`#include <opencv2/core/core_c.h>`

Creates a copy of CvMatND (except, may be, steps)

## § cvCloneSeq()

CvSeq* cvCloneSeq | ( | const CvSeq * | seq,
|  | CvMemStorage * | storage = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvCloneSparseMat()

CvSparseMat* cvCloneSparseMat | ( | const CvSparseMat * | mat | ) |

`#include <opencv2/core/core_c.h>`

Creates a copy of CvSparseMat (except, may be, zero items)

## § cvCmp()

void cvCmp | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | CvArr * | dst,
|  | int | cmp_op
| ) |  |

`#include <opencv2/core/core_c.h>`

The comparison operation support single-channel arrays only. Destination image should be 8uC1 or 8sC1 dst(idx) = src1(idx) cmp_op src2(idx)

## § cvCmpS()

void cvCmpS | ( | const CvArr * | src,
|  | double | value,
|  | CvArr * | dst,
|  | int | cmp_op
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = src1(idx) cmp_op value

## § cvCompleteSymm()

void cvCompleteSymm | ( | CvMat * | matrix,
|  | int | LtoR = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Completes the symmetric matrix from the lower (LtoR=0) or from the upper (LtoR!=0) part

## § cvConvertScale()

void cvConvertScale | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | double | scale = `1`,
|  | double | shift = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Converts one array to another with optional linear transformation.

The function has several different purposes, and thus has several different names. It copies one array to another with optional scaling, which is performed first, and/or optional type conversion, performed after:

\[\texttt{dst} (I) = \texttt{scale} \texttt{src} (I) + ( \texttt{shift} _0, \texttt{shift} _1,...)\]

All the channels of multi-channel arrays are processed independently.

The type of conversion is done with rounding and saturation, that is if the result of scaling + conversion can not be represented exactly by a value of the destination array element type, it is set to the nearest representable value on the real axis.

Parameters

  src | Source array
  dst | Destination array
  scale | Scale factor
  shift | Value added to the scaled source array elements

## § cvConvertScaleAbs()

void cvConvertScaleAbs | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | double | scale = `1`,
|  | double | shift = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Performs linear transformation on every source array element, stores absolute value of the result: dst(x,y,c) = abs(scale*src(x,y,c)+shift). destination array must have 8u type. In other cases one may use cvConvertScale + cvAbsDiffS

## § cvCopy()

void cvCopy | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Copies one array to another.

The function copies selected elements from an input array to an output array:

\[\texttt{dst} (I)= \texttt{src} (I) \quad \text{if} \quad \texttt{mask} (I) \ne 0.\]

If any of the passed arrays is of IplImage type, then its ROI and COI fields are used. Both arrays must have the same type, the same number of dimensions, and the same size. The function can also copy sparse arrays (mask is not supported in this case).

Parameters

  src | The source array
  dst | The destination array
  mask | Operation mask, 8-bit single channel array; specifies elements of the destination array to be changed

## § cvCountNonZero()

int cvCountNonZero | ( | const CvArr * | arr | ) |

`#include <opencv2/core/core_c.h>`

Calculates number of non-zero pixels

## § cvCreateChildMemStorage()

CvMemStorage* cvCreateChildMemStorage | ( | CvMemStorage * | parent | ) |

`#include <opencv2/core/core_c.h>`

Creates a memory storage that will borrow memory blocks from parent storage

## § cvCreateData()

void cvCreateData | ( | CvArr * | arr | ) |

`#include <opencv2/core/core_c.h>`

Allocates array data.

The function allocates image, matrix or multi-dimensional dense array data. Note that in the case of matrix types OpenCV allocation functions are used. In the case of IplImage they are used unless CV_TURN_ON_IPL_COMPATIBILITY() has been called before. In the latter case IPL functions are used to allocate the data.

Parameters

  arr | Array header

## § cvCreateGraph()

CvGraph* cvCreateGraph | ( | int | graph_flags,
|  | int | header_size,
|  | int | vtx_size,
|  | int | edge_size,
|  | CvMemStorage * | storage
| ) |  |

`#include <opencv2/core/core_c.h>`

Creates new graph

## § cvCreateGraphScanner()

CvGraphScanner* cvCreateGraphScanner | ( | CvGraph * | graph,
|  | CvGraphVtx * | vtx = `NULL`,
|  | int | mask = `-1`
| ) |  |

`#include <opencv2/core/core_c.h>`

Creates new graph scanner.

## § cvCreateImage()

IplImage* cvCreateImage | ( | CvSize | size,
|  | int | depth,
|  | int | channels
| ) |  |

`#include <opencv2/core/core_c.h>`

Creates an image header and allocates the image data.

This function call is equivalent to the following code:

header = cvCreateImageHeader(size, depth, channels);
cvCreateData(header);

Parameters

  size | Image width and height
  depth | Bit depth of image elements. See IplImage for valid depths.
  channels | Number of channels per pixel. See IplImage for details. This function only creates images with interleaved channels.

## § cvCreateImageHeader()

IplImage* cvCreateImageHeader | ( | CvSize | size,
|  | int | depth,
|  | int | channels
| ) |  |

`#include <opencv2/core/core_c.h>`

Creates an image header but does not allocate the image data.

Parameters

  size | Image width and height
  depth | Image depth (see cvCreateImage )
  channels | Number of channels (see cvCreateImage )

## § cvCreateMat()

CvMat* cvCreateMat | ( | int | rows,
|  | int | cols,
|  | int | type
| ) |  |

`#include <opencv2/core/core_c.h>`

Creates a matrix header and allocates the matrix data.

The function call is equivalent to the following code:

CvMat* mat = cvCreateMatHeader(rows, cols, type);
cvCreateData(mat);

Parameters

  rows | Number of rows in the matrix
  cols | Number of columns in the matrix
  type | The type of the matrix elements in the form CV_<bit depth><S|U|F>C<number of channels> , where S=signed, U=unsigned, F=float. For example, CV _ 8UC1 means the elements are 8-bit unsigned and the there is 1 channel, and CV _ 32SC2 means the elements are 32-bit signed and there are 2 channels.

## § cvCreateMatHeader()

CvMat* cvCreateMatHeader | ( | int | rows,
|  | int | cols,
|  | int | type
| ) |  |

`#include <opencv2/core/core_c.h>`

Creates a matrix header but does not allocate the matrix data.

The function allocates a new matrix header and returns a pointer to it. The matrix data can then be allocated using cvCreateData or set explicitly to user-allocated data via cvSetData.

Parameters

  rows | Number of rows in the matrix
  cols | Number of columns in the matrix
  type | Type of the matrix elements, see cvCreateMat

## § cvCreateMatND()

CvMatND* cvCreateMatND | ( | int | dims,
|  | const int * | sizes,
|  | int | type
| ) |  |

`#include <opencv2/core/core_c.h>`

Creates the header and allocates the data for a multi-dimensional dense array.

This function call is equivalent to the following code:

CvMatND* mat = cvCreateMatNDHeader(dims, sizes, type);
cvCreateData(mat);

Parameters

  dims | Number of array dimensions. This must not exceed CV_MAX_DIM (32 by default, but can be changed at build time).
  sizes | Array of dimension sizes.
  type | Type of array elements, see cvCreateMat .

## § cvCreateMatNDHeader()

CvMatND* cvCreateMatNDHeader | ( | int | dims,
|  | const int * | sizes,
|  | int | type
| ) |  |

`#include <opencv2/core/core_c.h>`

Creates a new matrix header but does not allocate the matrix data.

The function allocates a header for a multi-dimensional dense array. The array data can further be allocated using cvCreateData or set explicitly to user-allocated data via cvSetData.

Parameters

  dims | Number of array dimensions
  sizes | Array of dimension sizes
  type | Type of array elements, see cvCreateMat

## § cvCreateMemStorage()

CvMemStorage* cvCreateMemStorage | ( | int | block_size = `0` | ) |

`#include <opencv2/core/core_c.h>`

Creates new memory storage. block_size == 0 means that default, somewhat optimal size, is used (currently, it is 64K)

## § cvCreateSeq()

CvSeq* cvCreateSeq | ( | int | seq_flags,
|  | size_t | header_size,
|  | size_t | elem_size,
|  | CvMemStorage * | storage
| ) |  |

`#include <opencv2/core/core_c.h>`

Creates new empty sequence that will reside in the specified storage

## § cvCreateSeqBlock()

void cvCreateSeqBlock | ( | CvSeqWriter * | writer | ) |

`#include <opencv2/core/core_c.h>`

## § cvCreateSet()

CvSet* cvCreateSet | ( | int | set_flags,
|  | int | header_size,
|  | int | elem_size,
|  | CvMemStorage * | storage
| ) |  |

`#include <opencv2/core/core_c.h>`

Creates a new set

## § cvCreateSparseMat() [1/2]

CvSparseMat* cvCreateSparseMat | ( | int | dims,
|  | const int * | sizes,
|  | int | type
| ) |  |

`#include <opencv2/core/core_c.h>`

Creates sparse array.

The function allocates a multi-dimensional sparse array. Initially the array contain no elements, that is PtrND and other related functions will return 0 for every index.

Parameters

  dims | Number of array dimensions. In contrast to the dense matrix, the number of dimensions is practically unlimited (up to \(2^{16}\) ).
  sizes | Array of dimension sizes
  type | Type of array elements. The same as for CvMat

## § cvCreateSparseMat() [2/2]

CvSparseMat* cvCreateSparseMat | ( | const cv::SparseMat & | m | ) |

`#include <opencv2/core/types_c.h>`

## § cvCrossProduct()

void cvCrossProduct | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

Calculates the cross product of two 3D vectors.

The function calculates the cross product of two 3D vectors:

\[\texttt{dst} = \texttt{src1} \times \texttt{src2}\]

or:

\[\begin{array}{l} \texttt{dst} _1 = \texttt{src1} _2 \texttt{src2} _3 - \texttt{src1} _3 \texttt{src2} _2 \\ \texttt{dst} _2 = \texttt{src1} _3 \texttt{src2} _1 - \texttt{src1} _1 \texttt{src2} _3 \\ \texttt{dst} _3 = \texttt{src1} _1 \texttt{src2} _2 - \texttt{src1} _2 \texttt{src2} _1 \end{array}\]

Parameters

  src1 | The first source vector
  src2 | The second source vector
  dst | The destination vector

## § cvCvtSeqToArray()

void* cvCvtSeqToArray | ( | const CvSeq * | seq,
|  | void * | elements,
|  | CvSlice | slice = `CV_WHOLE_SEQ`
| ) |  |

`#include <opencv2/core/core_c.h>`

Copies sequence content to a continuous piece of memory

## § cvDCT()

void cvDCT | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | int | flags
| ) |  |

`#include <opencv2/core/core_c.h>`

Discrete Cosine Transform

See also
  core_c_DftFlags "flags"

## § cvDecRefData()

void cvDecRefData | ( | CvArr * | arr | ) |

`#include <opencv2/core/core_c.h>`

Decrements an array data reference counter.

The function decrements the data reference counter in a CvMat or CvMatND if the reference counter

pointer is not NULL. If the counter reaches zero, the data is deallocated. In the current implementation the reference counter is not NULL only if the data was allocated using the cvCreateData function. The counter will be NULL in other cases such as: external data was assigned to the header using cvSetData, header is part of a larger matrix or image, or the header was converted from an image or n-dimensional matrix header.

Parameters

  arr | Pointer to an array header

## § cvDet()

double cvDet | ( | const CvArr * | mat | ) |

`#include <opencv2/core/core_c.h>`

Calculates determinant of input matrix

## § cvDFT()

void cvDFT | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | int | flags,
|  | int | nonzero_rows = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Discrete Fourier Transform: complex->complex, real->ccs (forward), ccs->real (inverse)

See also
  core_c_DftFlags "flags"

## § cvDiv()

void cvDiv | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | CvArr * | dst,
|  | double | scale = `1`
| ) |  |

`#include <opencv2/core/core_c.h>`

element-wise division/inversion with scaling: dst(idx) = src1(idx) * scale / src2(idx) or dst(idx) = scale / src2(idx) if src1 == 0

## § cvDotProduct()

double cvDotProduct | ( | const CvArr * | src1,
|  | const CvArr * | src2
| ) |  |

`#include <opencv2/core/core_c.h>`

Calculates the dot product of two arrays in Euclidean metrics.

The function calculates and returns the Euclidean dot product of two arrays.

\[src1 \bullet src2 = \sum _I ( \texttt{src1} (I) \texttt{src2} (I))\]

In the case of multiple channel arrays, the results for all channels are accumulated. In particular, cvDotProduct(a,a) where a is a complex vector, will return \(||\texttt{a}||^2\). The function can process multi-dimensional arrays, row by row, layer by layer, and so on.

Parameters

  src1 | The first source array
  src2 | The second source array

## § cvEigenVV()

void cvEigenVV | ( | CvArr * | mat,
|  | CvArr * | evects,
|  | CvArr * | evals,
|  | double | eps = `0`,
|  | int | lowindex = `-1`,
|  | int | highindex = `-1`
| ) |  |

`#include <opencv2/core/core_c.h>`

Finds eigen values and vectors of a symmetric matrix

## § cvEndWriteSeq()

CvSeq* cvEndWriteSeq | ( | CvSeqWriter * | writer | ) |

`#include <opencv2/core/core_c.h>`

Closes sequence writer, updates sequence header and returns pointer to the resultant sequence (which may be useful if the sequence was created using cvStartWriteSeq))

## § cvEndWriteStruct()

void cvEndWriteStruct | ( | CvFileStorage * | fs | ) |

`#include <opencv2/core/core_c.h>`

Finishes writing to a file node collection.

Parameters

  fs | File storage

See also
  cvStartWriteStruct.

## § cvError()

void cvError | ( | int | status,
|  | const char * | func_name,
|  | const char * | err_msg,
|  | const char * | file_name,
|  | int | line
| ) |  |

`#include <opencv2/core/core_c.h>`

Sets error status and performs some additional actions (displaying message box, writing message to stderr, terminating application etc.) depending on the current error mode

## § cvErrorFromIppStatus()

int cvErrorFromIppStatus | ( | int | ipp_status | ) |

`#include <opencv2/core/core_c.h>`

Maps IPP error codes to the counterparts from OpenCV

## § cvErrorStr()

const char* cvErrorStr | ( | int | status | ) |

`#include <opencv2/core/core_c.h>`

Retrieves textual description of the error given its code

## § cvExp()

void cvExp | ( | const CvArr * | src,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

Does exponention: dst(idx) = exp(src(idx)). Overflow is not handled yet. Underflow is handled. Maximal relative error is ~7e-6 for single-precision input

## § cvFastArctan()

float cvFastArctan | ( | float | y,
|  | float | x
| ) |  |

`#include <opencv2/core/core_c.h>`

Fast arctangent calculation

## § cvFindGraphEdge()

CvGraphEdge* cvFindGraphEdge | ( | const CvGraph * | graph,
|  | int | start_idx,
|  | int | end_idx
| ) |  |

`#include <opencv2/core/core_c.h>`

Find edge connecting two vertices

## § cvFindGraphEdgeByPtr()

CvGraphEdge* cvFindGraphEdgeByPtr | ( | const CvGraph * | graph,
|  | const CvGraphVtx * | start_vtx,
|  | const CvGraphVtx * | end_vtx
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvFindType()

CvTypeInfo* cvFindType | ( | const char * | type_name | ) |

`#include <opencv2/core/core_c.h>`

Finds a type by its name.

The function finds a registered type by its name. It returns NULL if there is no type with the specified name.

Parameters

  type_name | Type name

## § cvFirstType()

CvTypeInfo* cvFirstType | ( | void |  | ) |

`#include <opencv2/core/core_c.h>`

Returns the beginning of a type list.

The function returns the first type in the list of registered types. Navigation through the list can be done via the prev and next fields of the CvTypeInfo structure.

## § cvFlip()

void cvFlip | ( | const CvArr * | src,
|  | CvArr * | dst = `NULL`,
|  | int | flip_mode = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Mirror array data around horizontal (flip=0), vertical (flip=1) or both(flip=-1) axises: cvFlip(src) flips images vertically and sequences horizontally (inplace)

## § cvFlushSeqWriter()

void cvFlushSeqWriter | ( | CvSeqWriter * | writer | ) |

`#include <opencv2/core/core_c.h>`

Updates sequence header. May be useful to get access to some of previously written elements via cvGetSeqElem or sequence reader

## § cvFree_()

void cvFree_ | ( | void * | ptr | ) |

`#include <opencv2/core/core_c.h>`

`free` wrapper. Here and further all the memory releasing functions (that all call cvFree) take double pointer in order to to clear pointer to the data after releasing it. Passing pointer to NULL pointer is Ok: nothing happens in this case

## § cvGEMM()

void cvGEMM | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | double | alpha,
|  | const CvArr * | src3,
|  | double | beta,
|  | CvArr * | dst,
|  | int | tABC = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Extended matrix transform: dst = alpha*op(A)*op(B) + beta*op(C), where op(X) is X or X^T

## § cvGet1D()

CvScalar cvGet1D | ( | const CvArr * | arr,
|  | int | idx0
| ) |  |

`#include <opencv2/core/core_c.h>`

Return a specific array element.

The functions return a specific array element. In the case of a sparse array the functions return 0 if the requested node does not exist (no new node is created by the functions).

Parameters

  arr | Input array
  idx0 | The first zero-based component of the element index

## § cvGet2D()

CvScalar cvGet2D | ( | const CvArr * | arr,
|  | int | idx0,
|  | int | idx1
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## § cvGet3D()

CvScalar cvGet3D | ( | const CvArr * | arr,
|  | int | idx0,
|  | int | idx1,
|  | int | idx2
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## § cvGetCol()

CvMat* cvGetCol | ( | const CvArr * | arr,
|  | CvMat * | submat,
|  | int | col
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters

  arr | Input array
  submat | Pointer to the resulting sub-array header
  col | Zero-based index of the selected column

## § cvGetCols()

CvMat* cvGetCols | ( | const CvArr * | arr,
|  | CvMat * | submat,
|  | int | start_col,
|  | int | end_col
| ) |  |

`#include <opencv2/core/core_c.h>`

Returns one of more array columns.

The function returns the header, corresponding to a specified column span of the input array. That

is, no data is copied. Therefore, any modifications of the submatrix will affect the original array. If you need to copy the columns, use cvCloneMat. cvGetCol(arr, submat, col) is a shortcut for cvGetCols(arr, submat, col, col+1).

Parameters

  arr | Input array
  submat | Pointer to the resulting sub-array header
  start_col | Zero-based index of the starting column (inclusive) of the span
  end_col | Zero-based index of the ending column (exclusive) of the span

## § cvGetDiag()

CvMat* cvGetDiag | ( | const CvArr * | arr,
|  | CvMat * | submat,
|  | int | diag = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Returns one of array diagonals.

The function returns the header, corresponding to a specified diagonal of the input array.

Parameters

  arr | Input array
  submat | Pointer to the resulting sub-array header
  diag | Index of the array diagonal. Zero value corresponds to the main diagonal, -1 corresponds to the diagonal above the main, 1 corresponds to the diagonal below the main, and so forth.

## § cvGetDims()

int cvGetDims | ( | const CvArr * | arr,
|  | int * | sizes = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Return number of array dimensions.

The function returns the array dimensionality and the array of dimension sizes. In the case of IplImage or CvMat it always returns 2 regardless of number of image/matrix rows. For example, the following code calculates total number of array elements:

int sizes[CV_MAX_DIM];
int i, total = 1;
int dims = cvGetDims(arr, size);
for(i = 0; i < dims; i++ )
total *= sizes[i];

Parameters

  arr | Input array
  sizes | Optional output vector of the array dimension sizes. For 2d arrays the number of rows (height) goes first, number of columns (width) next.

## § cvGetDimSize()

int cvGetDimSize | ( | const CvArr * | arr,
|  | int | index
| ) |  |

`#include <opencv2/core/core_c.h>`

Returns array size along the specified dimension.

Parameters

  arr | Input array
  index | Zero-based dimension index (for matrices 0 means number of rows, 1 means number of columns; for images 0 means height, 1 means width)

## § cvGetElemType()

int cvGetElemType | ( | const CvArr * | arr | ) |

`#include <opencv2/core/core_c.h>`

Returns type of array elements.

The function returns type of the array elements. In the case of IplImage the type is converted to CvMat-like representation. For example, if the image has been created as:

IplImage* img = cvCreateImage(cvSize(640, 480), IPL_DEPTH_8U, 3);

The code cvGetElemType(img) will return CV_8UC3.

Parameters

  arr | Input array

## § cvGetErrInfo()

int cvGetErrInfo | ( | const char ** | errcode_desc,
|  | const char ** | description,
|  | const char ** | filename,
|  | int * | line
| ) |  |

`#include <opencv2/core/core_c.h>`

Retrieves detailed information about the last error occurred

## § cvGetErrMode()

int cvGetErrMode | ( | void |  | ) |

`#include <opencv2/core/core_c.h>`

Retrieves current error processing mode

## § cvGetErrStatus()

int cvGetErrStatus | ( | void |  | ) |

`#include <opencv2/core/core_c.h>`

Get current OpenCV error status

## § cvGetFileNode()

CvFileNode* cvGetFileNode | ( | CvFileStorage * | fs,
|  | CvFileNode * | map,
|  | const CvStringHashNode * | key,
|  | int | create_missing = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Finds a node in a map or file storage.

The function finds a file node. It is a faster version of cvGetFileNodeByName (see cvGetHashedKey discussion). Also, the function can insert a new node, if it is not in the map yet.

Parameters

  fs | File storage
  map | The parent map. If it is NULL, the function searches a top-level node. If both map and key are NULLs, the function returns the root file node - a map that contains top-level nodes.
  key | Unique pointer to the node name, retrieved with cvGetHashedKey
  create_missing | Flag that specifies whether an absent node should be added to the map

## § cvGetFileNodeByName()

CvFileNode* cvGetFileNodeByName | ( | const CvFileStorage * | fs,
|  | const CvFileNode * | map,
|  | const char * | name
| ) |  |

`#include <opencv2/core/core_c.h>`

Finds a node in a map or file storage.

The function finds a file node by name. The node is searched either in map or, if the pointer is NULL, among the top-level file storage nodes. Using this function for maps and cvGetSeqElem (or sequence reader) for sequences, it is possible to navigate through the file storage. To speed up multiple queries for a certain key (e.g., in the case of an array of structures) one may use a combination of cvGetHashedKey and cvGetFileNode.

Parameters

  fs | File storage
  map | The parent map. If it is NULL, the function searches in all the top-level nodes (streams), starting with the first one.
  name | The file node name

## § cvGetFileNodeName()

const char* cvGetFileNodeName | ( | const CvFileNode * | node | ) |

`#include <opencv2/core/core_c.h>`

Returns the name of a file node.

The function returns the name of a file node or NULL, if the file node does not have a name or if node is NULL.

Parameters

  node | File node

## § cvGetHashedKey()

CvStringHashNode* cvGetHashedKey | ( | CvFileStorage * | fs,
|  | const char * | name,
|  | int | len = `-1`,
|  | int | create_missing = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Returns a unique pointer for a given name.

The function returns a unique pointer for each particular file node name. This pointer can be then passed to the cvGetFileNode function that is faster than cvGetFileNodeByName because it compares text strings by comparing pointers rather than the strings' content.

Consider the following example where an array of points is encoded as a sequence of 2-entry maps:

points:
- { x: 10, y: 10 }
- { x: 20, y: 20 }
- { x: 30, y: 30 }
# ...

Then, it is possible to get hashed "x" and "y" pointers to speed up decoding of the points. :

#include "cxcore.h"
int main( int argc, char** argv )
{
CvFileStorage* fs = cvOpenFileStorage( "points.yml", 0, CV_STORAGE_READ );
CvStringHashNode* x_key = cvGetHashedNode( fs, "x", -1, 1 );
CvStringHashNode* y_key = cvGetHashedNode( fs, "y", -1, 1 );
CvFileNode* points = cvGetFileNodeByName( fs, 0, "points" );
if( CV_NODE_IS_SEQ(points->tag) )
{
CvSeq* seq = points->data.seq;
int i, total = seq->total;
CvSeqReader reader;
cvStartReadSeq( seq, &reader, 0 );
for( i = 0; i < total; i++ )
{
CvFileNode* pt = (CvFileNode*)reader.ptr;
#if 1 // faster variant
CvFileNode* xnode = cvGetFileNode( fs, pt, x_key, 0 );
CvFileNode* ynode = cvGetFileNode( fs, pt, y_key, 0 );
assert( xnode && CV_NODE_IS_INT(xnode->tag) &&
ynode && CV_NODE_IS_INT(ynode->tag));
int x = xnode->data.i; // or x = cvReadInt( xnode, 0 );
int y = ynode->data.i; // or y = cvReadInt( ynode, 0 );
#elif 1 // slower variant; does not use x_key & y_key
CvFileNode* xnode = cvGetFileNodeByName( fs, pt, "x" );
CvFileNode* ynode = cvGetFileNodeByName( fs, pt, "y" );
assert( xnode && CV_NODE_IS_INT(xnode->tag) &&
ynode && CV_NODE_IS_INT(ynode->tag));
int x = xnode->data.i; // or x = cvReadInt( xnode, 0 );
int y = ynode->data.i; // or y = cvReadInt( ynode, 0 );
#else // the slowest yet the easiest to use variant
int x = cvReadIntByName( fs, pt, "x", 0 );
int y = cvReadIntByName( fs, pt, "y", 0 );
#endif
CV_NEXT_SEQ_ELEM( seq->elem_size, reader );
printf("
}
}
cvReleaseFileStorage( &fs );
return 0;
}

Please note that whatever method of accessing a map you are using, it is still much slower than using plain sequences; for example, in the above example, it is more efficient to encode the points as pairs of integers in a single numeric sequence.

Parameters

  fs | File storage
  name | Literal node name
  len | Length of the name (if it is known apriori), or -1 if it needs to be calculated
  create_missing | Flag that specifies, whether an absent key should be added into the hash table

## § cvGetImage()

IplImage* cvGetImage | ( | const CvArr * | arr,
|  | IplImage * | image_header
| ) |  |

`#include <opencv2/core/core_c.h>`

Returns image header for arbitrary array.

The function returns the image header for the input array that can be a matrix (CvMat) or image (IplImage). In the case of an image the function simply returns the input pointer. In the case of CvMat it initializes an image_header structure with the parameters of the input matrix. Note that if we transform IplImage to CvMat using cvGetMat and then transform CvMat back to IplImage using this function, we will get different headers if the ROI is set in the original image.

Parameters

  arr | Input array
  image_header | Pointer to IplImage structure used as a temporary buffer

## § cvGetImageCOI()

int cvGetImageCOI | ( | const IplImage * | image | ) |

`#include <opencv2/core/core_c.h>`

Returns the index of the channel of interest.

Returns the channel of interest of in an IplImage. Returned values correspond to the coi in cvSetImageCOI.

Parameters

  image | A pointer to the image header

## § cvGetImageROI()

CvRect cvGetImageROI | ( | const IplImage * | image | ) |

`#include <opencv2/core/core_c.h>`

Returns the image ROI.

If there is no ROI set, cvRect(0,0,image->width,image->height) is returned.

Parameters

  image | A pointer to the image header

## § cvGetMat()

CvMat* cvGetMat | ( | const CvArr * | arr,
|  | CvMat * | header,
|  | int * | coi = `NULL`,
|  | int | allowND = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Returns matrix header for arbitrary array.

The function returns a matrix header for the input array that can be a matrix - CvMat, an image - IplImage, or a multi-dimensional dense array - CvMatND (the third option is allowed only if allowND != 0) . In the case of matrix the function simply returns the input pointer. In the case of IplImage* or CvMatND it initializes the header structure with parameters of the current image ROI and returns &header. Because COI is not supported by CvMat, it is returned separately.

The function provides an easy way to handle both types of arrays - IplImage and CvMat using the same code. Input array must have non-zero data pointer, otherwise the function will report an error.

Note
  If the input array is IplImage with planar data layout and COI set, the function returns the pointer to the selected plane and COI == 0. This feature allows user to process IplImage structures with planar data layout, even though OpenCV does not support such images.

Parameters

  arr | Input array
  header | Pointer to CvMat structure used as a temporary buffer
  coi | Optional output parameter for storing COI
  allowND | If non-zero, the function accepts multi-dimensional dense arrays (CvMatND*) and returns 2D matrix (if CvMatND has two dimensions) or 1D matrix (when CvMatND has 1 dimension or more than 2 dimensions). The CvMatND array must be continuous.

See also
  cvGetImage, cvarrToMat.

## § cvGetND()

CvScalar cvGetND | ( | const CvArr * | arr,
|  | const int * | idx
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters

  arr | Input array
  idx | Array of the element indices

## § cvGetNextSparseNode()

CvSparseNode* cvGetNextSparseNode | ( | CvSparseMatIterator * | mat_iterator | ) |

`#include <opencv2/core/core_c.h>`

Returns the next sparse matrix element.

The function moves iterator to the next sparse matrix element and returns pointer to it. In the current version there is no any particular order of the elements, because they are stored in the hash table. The sample below demonstrates how to iterate through the sparse matrix:

// print all the non-zero sparse matrix elements and compute their sum
double sum = 0;
int i, dims = cvGetDims(sparsemat);
CvSparseMatIterator it;
CvSparseNode* node = cvInitSparseMatIterator(sparsemat, &it);
for(; node != 0; node = cvGetNextSparseNode(&it))
{
int* idx = CV_NODE_IDX(array, node);
float val = *(float*)CV_NODE_VAL(array, node);
printf("M");
for(i = 0; i < dims; i++ )
printf("[%d]", idx[i]);
printf("=%g\n", val);
sum += val;
}
printf("nTotal sum = %g\n", sum);

Parameters

  mat_iterator | Sparse array iterator

## § cvGetNumThreads()

int cvGetNumThreads | ( | void |  | ) |

`#include <opencv2/core/core_c.h>`

retrieve/set the number of threads used in OpenMP implementations

## § cvGetOptimalDFTSize()

int cvGetOptimalDFTSize | ( | int | size0 | ) |

`#include <opencv2/core/core_c.h>`

Finds optimal DFT vector size >= size0

## § cvGetRawData()

void cvGetRawData | ( | const CvArr * | arr,
|  | uchar ** | data,
|  | int * | step = `NULL`,
|  | CvSize * | roi_size = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Retrieves low-level information about the array.

The function fills output variables with low-level information about the array data. All output

parameters are optional, so some of the pointers may be set to NULL. If the array is IplImage with ROI set, the parameters of ROI are returned.

The following example shows how to get access to array elements. It computes absolute values of the array elements :

float* data;
int step;
CvSize size;
cvGetRawData(array, (uchar**)&data, &step, &size);
step /= sizeof(data[0]);
for(int y = 0; y < size.height; y++, data += step )
for(int x = 0; x < size.width; x++ )
data[x] = (float)fabs(data[x]);

Parameters

  arr | Array header
  data | Output pointer to the whole image origin or ROI origin if ROI is set
  step | Output full row length in bytes
  roi_size | Output ROI size

## § cvGetReal1D()

double cvGetReal1D | ( | const CvArr * | arr,
|  | int | idx0
| ) |  |

`#include <opencv2/core/core_c.h>`

Return a specific element of single-channel 1D, 2D, 3D or nD array.

Returns a specific element of a single-channel array. If the array has multiple channels, a runtime error is raised. Note that Get?D functions can be used safely for both single-channel and multiple-channel arrays though they are a bit slower.

In the case of a sparse array the functions return 0 if the requested node does not exist (no new node is created by the functions).

Parameters

  arr | Input array. Must have a single channel.
  idx0 | The first zero-based component of the element index

## § cvGetReal2D()

double cvGetReal2D | ( | const CvArr * | arr,
|  | int | idx0,
|  | int | idx1
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## § cvGetReal3D()

double cvGetReal3D | ( | const CvArr * | arr,
|  | int | idx0,
|  | int | idx1,
|  | int | idx2
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## § cvGetRealND()

double cvGetRealND | ( | const CvArr * | arr,
|  | const int * | idx
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters

  arr | Input array. Must have a single channel.
  idx | Array of the element indices

## § cvGetRootFileNode()

CvFileNode* cvGetRootFileNode | ( | const CvFileStorage * | fs,
|  | int | stream_index = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Retrieves one of the top-level nodes of the file storage.

The function returns one of the top-level file nodes. The top-level nodes do not have a name, they correspond to the streams that are stored one after another in the file storage. If the index is out of range, the function returns a NULL pointer, so all the top-level nodes can be iterated by subsequent calls to the function with stream_index=0,1,..., until the NULL pointer is returned. This function can be used as a base for recursive traversal of the file storage.

Parameters

  fs | File storage
  stream_index | Zero-based index of the stream. See cvStartNextStream . In most cases, there is only one stream in the file; however, there can be several.

## § cvGetRow()

CvMat* cvGetRow | ( | const CvArr * | arr,
|  | CvMat * | submat,
|  | int | row
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters

  arr | Input array
  submat | Pointer to the resulting sub-array header
  row | Zero-based index of the selected row

## § cvGetRows()

CvMat* cvGetRows | ( | const CvArr * | arr,
|  | CvMat * | submat,
|  | int | start_row,
|  | int | end_row,
|  | int | delta_row = `1`
| ) |  |

`#include <opencv2/core/core_c.h>`

Returns array row or row span.

The function returns the header, corresponding to a specified row/row span of the input array. cvGetRow(arr, submat, row) is a shortcut for cvGetRows(arr, submat, row, row+1).

Parameters

  arr | Input array
  submat | Pointer to the resulting sub-array header
  start_row | Zero-based index of the starting row (inclusive) of the span
  end_row | Zero-based index of the ending row (exclusive) of the span
  delta_row | Index step in the row span. That is, the function extracts every delta_row -th row from start_row and up to (but not including) end_row .

## § cvGetSeqElem()

schar* cvGetSeqElem | ( | const CvSeq * | seq,
|  | int | index
| ) |  |

`#include <opencv2/core/core_c.h>`

Retrieves pointer to specified sequence element. Negative indices are supported and mean counting from the end (e.g -1 means the last sequence element)

## § cvGetSeqReaderPos()

int cvGetSeqReaderPos | ( | CvSeqReader * | reader | ) |

`#include <opencv2/core/core_c.h>`

Returns current sequence reader position (currently observed sequence element)

## § cvGetSetElem()

CvSetElem* cvGetSetElem | ( | const CvSet * | set_header,
|  | int | idx
| ) |  |

`#include <opencv2/core/core_c.h>`

Returns a set element by index. If the element doesn't belong to the set, NULL is returned

## § cvGetSize()

CvSize cvGetSize | ( | const CvArr * | arr | ) |

`#include <opencv2/core/core_c.h>`

Returns size of matrix or image ROI.

The function returns number of rows (CvSize::height) and number of columns (CvSize::width) of the input matrix or image. In the case of image the size of ROI is returned.

Parameters

  arr | array header

## § cvGetSubRect()

CvMat* cvGetSubRect | ( | const CvArr * | arr,
|  | CvMat * | submat,
|  | CvRect | rect
| ) |  |

`#include <opencv2/core/core_c.h>`

Returns matrix header corresponding to the rectangular sub-array of input image or matrix.

The function returns header, corresponding to a specified rectangle of the input array. In other

words, it allows the user to treat a rectangular part of input array as a stand-alone array. ROI is taken into account by the function so the sub-array of ROI is actually extracted.

Parameters

  arr | Input array
  submat | Pointer to the resultant sub-array header
  rect | Zero-based coordinates of the rectangle of interest

## § cvGetThreadNum()

int cvGetThreadNum | ( | void |  | ) |

`#include <opencv2/core/core_c.h>`

get index of the thread being executed

## § cvGetTickCount()

int64 cvGetTickCount | ( | void |  | ) |

`#include <opencv2/core/core_c.h>`

helper functions for RNG initialization and accurate time measurement: uses internal clock counter on x86

## § cvGetTickFrequency()

double cvGetTickFrequency | ( | void |  | ) |

`#include <opencv2/core/core_c.h>`

## § cvGraphAddEdge()

int cvGraphAddEdge | ( | CvGraph * | graph,
|  | int | start_idx,
|  | int | end_idx,
|  | const CvGraphEdge * | edge = `NULL`,
|  | CvGraphEdge ** | inserted_edge = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Link two vertices specified by indices or pointers if they are not connected or return pointer to already existing edge connecting the vertices. Functions return 1 if a new edge was created, 0 otherwise

## § cvGraphAddEdgeByPtr()

int cvGraphAddEdgeByPtr | ( | CvGraph * | graph,
|  | CvGraphVtx * | start_vtx,
|  | CvGraphVtx * | end_vtx,
|  | const CvGraphEdge * | edge = `NULL`,
|  | CvGraphEdge ** | inserted_edge = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvGraphAddVtx()

int cvGraphAddVtx | ( | CvGraph * | graph,
|  | const CvGraphVtx * | vtx = `NULL`,
|  | CvGraphVtx ** | inserted_vtx = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Adds new vertex to the graph

## § cvGraphRemoveEdge()

void cvGraphRemoveEdge | ( | CvGraph * | graph,
|  | int | start_idx,
|  | int | end_idx
| ) |  |

`#include <opencv2/core/core_c.h>`

Remove edge connecting two vertices

## § cvGraphRemoveEdgeByPtr()

void cvGraphRemoveEdgeByPtr | ( | CvGraph * | graph,
|  | CvGraphVtx * | start_vtx,
|  | CvGraphVtx * | end_vtx
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvGraphRemoveVtx()

int cvGraphRemoveVtx | ( | CvGraph * | graph,
|  | int | index
| ) |  |

`#include <opencv2/core/core_c.h>`

Removes vertex from the graph together with all incident edges

## § cvGraphRemoveVtxByPtr()

int cvGraphRemoveVtxByPtr | ( | CvGraph * | graph,
|  | CvGraphVtx * | vtx
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvGraphVtxDegree()

int cvGraphVtxDegree | ( | const CvGraph * | graph,
|  | int | vtx_idx
| ) |  |

`#include <opencv2/core/core_c.h>`

Count number of edges incident to the vertex

## § cvGraphVtxDegreeByPtr()

int cvGraphVtxDegreeByPtr | ( | const CvGraph * | graph,
|  | const CvGraphVtx * | vtx
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvGuiBoxReport()

int cvGuiBoxReport | ( | int | status,
|  | const char * | func_name,
|  | const char * | err_msg,
|  | const char * | file_name,
|  | int | line,
|  | void * | userdata
| ) |  |

`#include <opencv2/core/core_c.h>`

Output to MessageBox(WIN32)

## § cvIncRefData()

int cvIncRefData | ( | CvArr * | arr | ) |

`#include <opencv2/core/core_c.h>`

Increments array data reference counter.

The function increments CvMat or CvMatND data reference counter and returns the new counter value if the reference counter pointer is not NULL, otherwise it returns zero.

Parameters

  arr | Array header

## § cvInitImageHeader()

IplImage* cvInitImageHeader | ( | IplImage * | image,
|  | CvSize | size,
|  | int | depth,
|  | int | channels,
|  | int | origin = `0`,
|  | int | align = `4`
| ) |  |

`#include <opencv2/core/core_c.h>`

Initializes an image header that was previously allocated.

The returned IplImage* points to the initialized header.

Parameters

  image | Image header to initialize
  size | Image width and height
  depth | Image depth (see cvCreateImage )
  channels | Number of channels (see cvCreateImage )
  origin | Top-left IPL_ORIGIN_TL or bottom-left IPL_ORIGIN_BL
  align | Alignment for image rows, typically 4 or 8 bytes

## § cvInitMatHeader()

CvMat* cvInitMatHeader | ( | CvMat * | mat,
|  | int | rows,
|  | int | cols,
|  | int | type,
|  | void * | data = `NULL`,
|  | int | step = `0x7fffffff`
| ) |  |

`#include <opencv2/core/core_c.h>`

Initializes a pre-allocated matrix header.

This function is often used to process raw data with OpenCV matrix functions. For example, the following code computes the matrix product of two matrices, stored as ordinary arrays:

double a[] = { 1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12 };
double b[] = { 1, 5, 9,
2, 6, 10,
3, 7, 11,
4, 8, 12 };
double c[9];
CvMat Ma, Mb, Mc ;
cvInitMatHeader(&Ma, 3, 4, CV_64FC1, a);
cvInitMatHeader(&Mb, 4, 3, CV_64FC1, b);
cvInitMatHeader(&Mc, 3, 3, CV_64FC1, c);
cvMatMulAdd(&Ma, &Mb, 0, &Mc);
// the c array now contains the product of a (3x4) and b (4x3)

Parameters

  mat | A pointer to the matrix header to be initialized
  rows | Number of rows in the matrix
  cols | Number of columns in the matrix
  type | Type of the matrix elements, see cvCreateMat .
  data | Optional: data pointer assigned to the matrix header
  step | Optional: full row width in bytes of the assigned data. By default, the minimal possible step is used which assumes there are no gaps between subsequent rows of the matrix.

## § cvInitMatNDHeader()

CvMatND* cvInitMatNDHeader | ( | CvMatND * | mat,
|  | int | dims,
|  | const int * | sizes,
|  | int | type,
|  | void * | data = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Initializes a pre-allocated multi-dimensional array header.

Parameters

  mat | A pointer to the array header to be initialized
  dims | The number of array dimensions
  sizes | An array of dimension sizes
  type | Type of array elements, see cvCreateMat
  data | Optional data pointer assigned to the matrix header

## § cvInitNArrayIterator()

int cvInitNArrayIterator | ( | int | count,
|  | CvArr ** | arrs,
|  | const CvArr * | mask,
|  | CvMatND * | stubs,
|  | CvNArrayIterator * | array_iterator,
|  | int | flags = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

initializes iterator that traverses through several arrays simultaneously (the function together with cvNextArraySlice is used for N-ari element-wise operations)

## § cvInitSparseMatIterator()

CvSparseNode* cvInitSparseMatIterator | ( | const CvSparseMat * | mat,
|  | CvSparseMatIterator * | mat_iterator
| ) |  |

`#include <opencv2/core/core_c.h>`

Initializes sparse array elements iterator.

The function initializes iterator of sparse array elements and returns pointer to the first element, or NULL if the array is empty.

Parameters

  mat | Input array
  mat_iterator | Initialized iterator

## § cvInitTreeNodeIterator()

void cvInitTreeNodeIterator | ( | CvTreeNodeIterator * | tree_iterator,
|  | const void * | first,
|  | int | max_level
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvInRange()

void cvInRange | ( | const CvArr * | src,
|  | const CvArr * | lower,
|  | const CvArr * | upper,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = lower(idx) <= src(idx) < upper(idx)

## § cvInRangeS()

void cvInRangeS | ( | const CvArr * | src,
|  | CvScalar | lower,
|  | CvScalar | upper,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = lower <= src(idx) < upper

## § cvInsertNodeIntoTree()

void cvInsertNodeIntoTree | ( | void * | node,
|  | void * | parent,
|  | void * | frame
| ) |  |

`#include <opencv2/core/core_c.h>`

Inserts sequence into tree with specified "parent" sequence. If parent is equal to frame (e.g. the most external contour), then added contour will have null pointer to parent.

## § cvInvert()

double cvInvert | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | int | method = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Inverts matrix

## § cvIplDepth()

int cvIplDepth | ( | int | type | ) |

`#include <opencv2/core/types_c.h>`

## § cvIplImage() [1/2]

_IplImage cvIplImage | ( | const cv::Mat & | m | ) |

`#include <opencv2/core/types_c.h>`

## § cvIplImage() [2/2]

IplImage cvIplImage | ( |  | ) |

`#include <opencv2/core/types_c.h>`

## § cvKMeans2()

int cvKMeans2 | ( | const CvArr * | samples,
|  | int | cluster_count,
|  | CvArr * | labels,
|  | CvTermCriteria | termcrit,
|  | int | attempts = `1`,
|  | CvRNG * | rng = `0`,
|  | int | flags = `0`,
|  | CvArr * | _centers = `0`,
|  | double * | compactness = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvLoad()

void* cvLoad | ( | const char * | filename,
|  | CvMemStorage * | memstorage = `NULL`,
|  | const char * | name = `NULL`,
|  | const char ** | real_name = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Loads an object from a file.

The function loads an object from a file. It basically reads the specified file, find the first top-level node and calls cvRead for that node. If the file node does not have type information or the type information can not be found by the type name, the function returns NULL. After the object is loaded, the file storage is closed and all the temporary buffers are deleted. Thus, to load a dynamic structure, such as a sequence, contour, or graph, one should pass a valid memory storage destination to the function.

Parameters

  filename | File name
  memstorage | Memory storage for dynamic structures, such as CvSeq or CvGraph . It is not used for matrices or images.
  name | Optional object name. If it is NULL, the first top-level object in the storage will be loaded.
  real_name | Optional output parameter that will contain the name of the loaded object (useful if name=NULL )

## § cvLog()

void cvLog | ( | const CvArr * | src,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

Calculates natural logarithms: dst(idx) = log(abs(src(idx))). Logarithm of 0 gives large negative number(~-700) Maximal relative error is ~3e-7 for single-precision output

## § cvLUT()

void cvLUT | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | const CvArr * | lut
| ) |  |

`#include <opencv2/core/core_c.h>`

Does look-up transformation. Elements of the source array (that should be 8uC1 or 8sC1) are used as indexes in lutarr 256-element table

## § cvMahalanobis()

double cvMahalanobis | ( | const CvArr * | vec1,
|  | const CvArr * | vec2,
|  | const CvArr * | mat
| ) |  |

`#include <opencv2/core/core_c.h>`

Calculates Mahalanobis(weighted) distance

## § cvMakeSeqHeaderForArray()

CvSeq* cvMakeSeqHeaderForArray | ( | int | seq_type,
|  | int | header_size,
|  | int | elem_size,
|  | void * | elements,
|  | int | total,
|  | CvSeq * | seq,
|  | CvSeqBlock * | block
| ) |  |

`#include <opencv2/core/core_c.h>`

Creates sequence header for array. After that all the operations on sequences that do not alter the content can be applied to the resultant sequence

## § cvMat() [1/4]

CvMat cvMat | ( | const cv::Mat & | m | ) |

`#include <opencv2/core/types_c.h>`

## § cvMat() [2/4]

CvMat cvMat | ( | int | rows,
|  | int | cols,
|  | int | type,
|  | void * | data = `NULL`
| ) |  |

`#include <opencv2/core/types_c.h>`

Inline constructor. No data is allocated internally!!! (Use together with cvCreateData, or use cvCreateMat instead to get a matrix with allocated data):

## § cvMat() [3/4]

CvMat cvMat | ( |  | ) |

`#include <opencv2/core/types_c.h>`

## § cvMat() [4/4]

CvMat cvMat | ( | const CvMat & | m | ) |

`#include <opencv2/core/types_c.h>`

## § cvMatND() [1/2]

CvMatND cvMatND | ( | const cv::Mat & | m | ) |

`#include <opencv2/core/types_c.h>`

## § cvMatND() [2/2]

CvMatND cvMatND | ( |  | ) |

`#include <opencv2/core/types_c.h>`

## § cvMax()

void cvMax | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = max(src1(idx),src2(idx))

## § cvMaxS()

void cvMaxS | ( | const CvArr * | src,
|  | double | value,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = max(src(idx),value)

## § cvMemStorageAlloc()

void* cvMemStorageAlloc | ( | CvMemStorage * | storage,
|  | size_t | size
| ) |  |

`#include <opencv2/core/core_c.h>`

Allocates continuous buffer of the specified size in the storage

## § cvMemStorageAllocString()

CvString cvMemStorageAllocString | ( | CvMemStorage * | storage,
|  | const char * | ptr,
|  | int | len = `-1`
| ) |  |

`#include <opencv2/core/core_c.h>`

Allocates string in memory storage

## § cvMerge()

void cvMerge | ( | const CvArr * | src0,
|  | const CvArr * | src1,
|  | const CvArr * | src2,
|  | const CvArr * | src3,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

Merges a set of single-channel arrays into the single multi-channel array or inserts one particular [color] plane to the array

## § cvmGet()

double cvmGet | ( | const CvMat * | mat,
|  | int | row,
|  | int | col
| ) |  |

`#include <opencv2/core/types_c.h>`

Returns the particular element of single-channel floating-point matrix.

The function is a fast replacement for cvGetReal2D in the case of single-channel floating-point matrices. It is faster because it is inline, it does fewer checks for array type and array element type, and it checks for the row and column ranges only in debug mode.

Parameters

  mat | Input matrix
  row | The zero-based index of row
  col | The zero-based index of column

## § cvMin()

void cvMin | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = min(src1(idx),src2(idx))

## § cvMinMaxLoc()

void cvMinMaxLoc | ( | const CvArr * | arr,
|  | double * | min_val,
|  | double * | max_val,
|  | CvPoint * | min_loc = `NULL`,
|  | CvPoint * | max_loc = `NULL`,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Finds global minimum, maximum and their positions

## § cvMinS()

void cvMinS | ( | const CvArr * | src,
|  | double | value,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = min(src(idx),value)

## § cvMixChannels()

void cvMixChannels | ( | const CvArr ** | src,
|  | int | src_count,
|  | CvArr ** | dst,
|  | int | dst_count,
|  | const int * | from_to,
|  | int | pair_count
| ) |  |

`#include <opencv2/core/core_c.h>`

Copies several channels from input arrays to certain channels of output arrays

## § cvmSet()

void cvmSet | ( | CvMat * | mat,
|  | int | row,
|  | int | col,
|  | double | value
| ) |  |

`#include <opencv2/core/types_c.h>`

Sets a specific element of a single-channel floating-point matrix.

The function is a fast replacement for cvSetReal2D in the case of single-channel floating-point matrices. It is faster because it is inline, it does fewer checks for array type and array element type, and it checks for the row and column ranges only in debug mode.

Parameters

  mat | The matrix
  row | The zero-based index of row
  col | The zero-based index of column
  value | The new value of the matrix element

## § cvMul()

void cvMul | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | CvArr * | dst,
|  | double | scale = `1`
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = src1(idx) * src2(idx) * scale (scaled element-wise multiplication of 2 arrays)

## § cvMulSpectrums()

void cvMulSpectrums | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | CvArr * | dst,
|  | int | flags
| ) |  |

`#include <opencv2/core/core_c.h>`

Multiply results of DFTs: DFT(X)*DFT(Y) or DFT(X)*conj(DFT(Y))

See also
  core_c_DftFlags "flags"

## § cvMulTransposed()

void cvMulTransposed | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | int | order,
|  | const CvArr * | delta = `NULL`,
|  | double | scale = `1.`
| ) |  |

`#include <opencv2/core/core_c.h>`

Calculates (A-delta)*(A-delta)^T (order=0) or (A-delta)^T*(A-delta) (order=1)

## § cvNextGraphItem()

int cvNextGraphItem | ( | CvGraphScanner * | scanner | ) |

`#include <opencv2/core/core_c.h>`

Get next graph element

## § cvNextNArraySlice()

int cvNextNArraySlice | ( | CvNArrayIterator * | array_iterator | ) |

`#include <opencv2/core/core_c.h>`

returns zero value if iteration is finished, non-zero (slice length) otherwise

## § cvNextTreeNode()

void* cvNextTreeNode | ( | CvTreeNodeIterator * | tree_iterator | ) |

`#include <opencv2/core/core_c.h>`

## § cvNorm()

double cvNorm | ( | const CvArr * | arr1,
|  | const CvArr * | arr2 = `NULL`,
|  | int | norm_type = `4`,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Finds norm, difference norm or relative difference norm for an array (or two arrays)

See also
  ref core_c_NormFlags "flags"

## § cvNormalize()

void cvNormalize | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | double | a = `1.`,
|  | double | b = `0.`,
|  | int | norm_type = `4`,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

See also
  ref core_c_NormFlags "flags"

## § cvNot()

void cvNot | ( | const CvArr * | src,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = ~src(idx)

## § cvNulDevReport()

int cvNulDevReport | ( | int | status,
|  | const char * | func_name,
|  | const char * | err_msg,
|  | const char * | file_name,
|  | int | line,
|  | void * | userdata
| ) |  |

`#include <opencv2/core/core_c.h>`

Output nothing

## § cvOpenFileStorage()

CvFileStorage* cvOpenFileStorage | ( | const char * | filename,
|  | CvMemStorage * | memstorage,
|  | int | flags,
|  | const char * | encoding = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Opens file storage for reading or writing data.

The function opens file storage for reading or writing data. In the latter case, a new file is created or an existing file is rewritten. The type of the read or written file is determined by the filename extension: .xml for XML, .yml or .yaml for YAML and .json for JSON.

At the same time, it also supports adding parameters like "example.xml?base64".

The function returns a pointer to the CvFileStorage structure. If the file cannot be opened then the function returns NULL.

Parameters

  filename | Name of the file associated with the storage
  memstorage | Memory storage used for temporary data and for : storing dynamic structures, such as CvSeq or CvGraph . If it is NULL, a temporary memory storage is created and used.
  flags | Can be one of the following: CV_STORAGE_READ the storage is open for reading CV_STORAGE_WRITE the storage is open for writing (use CV_STORAGE_WRITE | CV_STORAGE_WRITE_BASE64 to write rawdata in Base64)
  encoding |

## § cvOr()

void cvOr | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | CvArr * | dst,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = src1(idx) | src2(idx)

## § cvOrS()

void cvOrS | ( | const CvArr * | src,
|  | CvScalar | value,
|  | CvArr * | dst,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = src(idx) | value

## § cvPerspectiveTransform()

void cvPerspectiveTransform | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | const CvMat * | mat
| ) |  |

`#include <opencv2/core/core_c.h>`

Does perspective transform on every element of input array

## § cvPoint() [1/2]

CvPoint cvPoint | ( | int | x,
|  | int | y
| ) |  |

`#include <opencv2/core/types_c.h>`

constructs CvPoint structure.

## § cvPoint() [2/2]

CvPoint cvPoint | ( | const cv::Point & | pt | ) |

`#include <opencv2/core/types_c.h>`

## § cvPoint2D32f() [1/2]

CvPoint2D32f cvPoint2D32f | ( | double | x,
|  | double | y
| ) |  |

`#include <opencv2/core/types_c.h>`

constructs CvPoint2D32f structure.

## § cvPoint2D32f() [2/2]

template<typename _Tp >

CvPoint2D32f cvPoint2D32f | ( | const cv::Point_< _Tp > & | pt | ) |

`#include <opencv2/core/types_c.h>`

## § cvPoint2D64f()

CvPoint2D64f cvPoint2D64f | ( | double | x,
|  | double | y
| ) |  |

`#include <opencv2/core/types_c.h>`

constructs CvPoint2D64f structure.

## § cvPoint3D32f() [1/2]

CvPoint3D32f cvPoint3D32f | ( | double | x,
|  | double | y,
|  | double | z
| ) |  |

`#include <opencv2/core/types_c.h>`

constructs CvPoint3D32f structure.

## § cvPoint3D32f() [2/2]

template<typename _Tp >

CvPoint3D32f cvPoint3D32f | ( | const cv::Point3_< _Tp > & | pt | ) |

`#include <opencv2/core/types_c.h>`

## § cvPoint3D64f()

CvPoint3D64f cvPoint3D64f | ( | double | x,
|  | double | y,
|  | double | z
| ) |  |

`#include <opencv2/core/types_c.h>`

constructs CvPoint3D64f structure.

## § cvPointFrom32f()

CvPoint cvPointFrom32f | ( | CvPoint2D32f | point | ) |

`#include <opencv2/core/types_c.h>`

converts CvPoint2D32f to CvPoint.

## § cvPointTo32f()

CvPoint2D32f cvPointTo32f | ( | CvPoint | point | ) |

`#include <opencv2/core/types_c.h>`

converts CvPoint to CvPoint2D32f.

## § cvPolarToCart()

void cvPolarToCart | ( | const CvArr * | magnitude,
|  | const CvArr * | angle,
|  | CvArr * | x,
|  | CvArr * | y,
|  | int | angle_in_degrees = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Does polar->cartesian coordinates conversion. Either of output components (magnitude or angle) is optional. If magnitude is missing it is assumed to be all 1's

## § cvPow()

void cvPow | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | double | power
| ) |  |

`#include <opencv2/core/core_c.h>`

Does powering: dst(idx) = src(idx)^power

## § cvPrevTreeNode()

void* cvPrevTreeNode | ( | CvTreeNodeIterator * | tree_iterator | ) |

`#include <opencv2/core/core_c.h>`

## § cvProjectPCA()

void cvProjectPCA | ( | const CvArr * | data,
|  | const CvArr * | mean,
|  | const CvArr * | eigenvects,
|  | CvArr * | result
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvPtr1D()

uchar* cvPtr1D | ( | const CvArr * | arr,
|  | int | idx0,
|  | int * | type = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Return pointer to a particular array element.

The functions return a pointer to a specific array element. Number of array dimension should match to the number of indices passed to the function except for cvPtr1D function that can be used for sequential access to 1D, 2D or nD dense arrays.

The functions can be used for sparse arrays as well - if the requested node does not exist they create it and set it to zero.

All these as well as other functions accessing array elements ( cvGetND , cvGetRealND , cvSet , cvSetND , cvSetRealND ) raise an error in case if the element index is out of range.

Parameters

  arr | Input array
  idx0 | The first zero-based component of the element index
  type | Optional output parameter: type of matrix elements

## § cvPtr2D()

uchar* cvPtr2D | ( | const CvArr * | arr,
|  | int | idx0,
|  | int | idx1,
|  | int * | type = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## § cvPtr3D()

uchar* cvPtr3D | ( | const CvArr * | arr,
|  | int | idx0,
|  | int | idx1,
|  | int | idx2,
|  | int * | type = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## § cvPtrND()

uchar* cvPtrND | ( | const CvArr * | arr,
|  | const int * | idx,
|  | int * | type = `NULL`,
|  | int | create_node = `1`,
|  | unsigned * | precalc_hashval = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters

  arr | Input array
  idx | Array of the element indices
  type | Optional output parameter: type of matrix elements
  create_node | Optional input parameter for sparse matrices. Non-zero value of the parameter means that the requested element is created if it does not exist already.
  precalc_hashval | Optional input parameter for sparse matrices. If the pointer is not NULL, the function does not recalculate the node hash value, but takes it from the specified location. It is useful for speeding up pair-wise operations (TODO: provide an example)

## § cvRandArr()

void cvRandArr | ( | CvRNG * | rng,
|  | CvArr * | arr,
|  | int | dist_type,
|  | CvScalar | param1,
|  | CvScalar | param2
| ) |  |

`#include <opencv2/core/core_c.h>`

Fills an array with random numbers and updates the RNG state.

The function fills the destination array with uniformly or normally distributed random numbers.

Parameters

  rng | CvRNG state initialized by cvRNG
  arr | The destination array
  dist_type | Distribution type CV_RAND_UNI uniform distribution CV_RAND_NORMAL normal or Gaussian distribution
  param1 | The first parameter of the distribution. In the case of a uniform distribution it is the inclusive lower boundary of the random numbers range. In the case of a normal distribution it is the mean value of the random numbers.
  param2 | The second parameter of the distribution. In the case of a uniform distribution it is the exclusive upper boundary of the random numbers range. In the case of a normal distribution it is the standard deviation of the random numbers.

See also
  randu, randn, RNG::fill.

## § cvRandInt()

unsigned cvRandInt | ( | CvRNG * | rng | ) |

`#include <opencv2/core/types_c.h>`

Returns a 32-bit unsigned integer and updates RNG.

The function returns a uniformly-distributed random 32-bit unsigned integer and updates the RNG state. It is similar to the rand() function from the C runtime library, except that OpenCV functions always generates a 32-bit random number, regardless of the platform.

Parameters

  rng | CvRNG state initialized by cvRNG.

## § cvRandReal()

double cvRandReal | ( | CvRNG * | rng | ) |

`#include <opencv2/core/types_c.h>`

Returns a floating-point random number and updates RNG.

The function returns a uniformly-distributed random floating-point number between 0 and 1 (1 is not included).

Parameters

  rng | RNG state initialized by cvRNG

## § cvRandShuffle()

void cvRandShuffle | ( | CvArr * | mat,
|  | CvRNG * | rng,
|  | double | iter_factor = `1.`
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvRange()

CvArr* cvRange | ( | CvArr * | mat,
|  | double | start,
|  | double | end
| ) |  |

`#include <opencv2/core/core_c.h>`

Fills matrix with given range of numbers

## § cvRawDataToScalar()

void cvRawDataToScalar | ( | const void * | data,
|  | int | type,
|  | CvScalar * | scalar
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvRead()

void* cvRead | ( | CvFileStorage * | fs,
|  | CvFileNode * | node,
|  | CvAttrList * | attributes = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Decodes an object and returns a pointer to it.

The function decodes a user object (creates an object in a native representation from the file storage subtree) and returns it. The object to be decoded must be an instance of a registered type that supports the read method (see CvTypeInfo). The type of the object is determined by the type name that is encoded in the file. If the object is a dynamic structure, it is created either in memory storage and passed to cvOpenFileStorage or, if a NULL pointer was passed, in temporary memory storage, which is released when cvReleaseFileStorage is called. Otherwise, if the object is not a dynamic structure, it is created in a heap and should be released with a specialized function or by using the generic cvRelease.

Parameters

  fs | File storage
  node | The root object node
  attributes | Unused parameter

## § cvReadByName()

void* cvReadByName | ( | CvFileStorage * | fs,
|  | const CvFileNode * | map,
|  | const char * | name,
|  | CvAttrList * | attributes = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Finds an object by name and decodes it.

The function is a simple superposition of cvGetFileNodeByName and cvRead.

Parameters

  fs | File storage
  map | The parent map. If it is NULL, the function searches a top-level node.
  name | The node name
  attributes | Unused parameter

## § cvReadInt()

int cvReadInt | ( | const CvFileNode * | node,
|  | int | default_value = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Retrieves an integer value from a file node.

The function returns an integer that is represented by the file node. If the file node is NULL, the default_value is returned (thus, it is convenient to call the function right after cvGetFileNode without checking for a NULL pointer). If the file node has type CV_NODE_INT, then node->data.i is returned. If the file node has type CV_NODE_REAL, then node->data.f is converted to an integer and returned. Otherwise the error is reported.

Parameters

  node | File node
  default_value | The value that is returned if node is NULL

## § cvReadIntByName()

int cvReadIntByName | ( | const CvFileStorage * | fs,
|  | const CvFileNode * | map,
|  | const char * | name,
|  | int | default_value = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Finds a file node and returns its value.

The function is a simple superposition of cvGetFileNodeByName and cvReadInt.

Parameters

  fs | File storage
  map | The parent map. If it is NULL, the function searches a top-level node.
  name | The node name
  default_value | The value that is returned if the file node is not found

## § cvReadRawData()

void cvReadRawData | ( | const CvFileStorage * | fs,
|  | const CvFileNode * | src,
|  | void * | dst,
|  | const char * | dt
| ) |  |

`#include <opencv2/core/core_c.h>`

Reads multiple numbers.

The function reads elements from a file node that represents a sequence of scalars.

Parameters

  fs | File storage
  src | The file node (a sequence) to read numbers from
  dst | Pointer to the destination array
  dt | Specification of each array element. It has the same format as in cvWriteRawData .

## § cvReadRawDataSlice()

void cvReadRawDataSlice | ( | const CvFileStorage * | fs,
|  | CvSeqReader * | reader,
|  | int | count,
|  | void * | dst,
|  | const char * | dt
| ) |  |

`#include <opencv2/core/core_c.h>`

Initializes file node sequence reader.

The function reads one or more elements from the file node, representing a sequence, to a user-specified array. The total number of read sequence elements is a product of total and the number of components in each array element. For example, if dt=2if, the function will read total*3 sequence elements. As with any sequence, some parts of the file node sequence can be skipped or read repeatedly by repositioning the reader using cvSetSeqReaderPos.

Parameters

  fs | File storage
  reader | The sequence reader. Initialize it with cvStartReadRawData .
  count | The number of elements to read
  dst | Pointer to the destination array
  dt | Specification of each array element. It has the same format as in cvWriteRawData .

## § cvReadReal()

double cvReadReal | ( | const CvFileNode * | node,
|  | double | default_value = `0.`
| ) |  |

`#include <opencv2/core/core_c.h>`

Retrieves a floating-point value from a file node.

The function returns a floating-point value that is represented by the file node. If the file node is NULL, the default_value is returned (thus, it is convenient to call the function right after cvGetFileNode without checking for a NULL pointer). If the file node has type CV_NODE_REAL , then node->data.f is returned. If the file node has type CV_NODE_INT , then node-:math:>data.f is converted to floating-point and returned. Otherwise the result is not determined.

Parameters

  node | File node
  default_value | The value that is returned if node is NULL

## § cvReadRealByName()

double cvReadRealByName | ( | const CvFileStorage * | fs,
|  | const CvFileNode * | map,
|  | const char * | name,
|  | double | default_value = `0.`
| ) |  |

`#include <opencv2/core/core_c.h>`

Finds a file node and returns its value.

The function is a simple superposition of cvGetFileNodeByName and cvReadReal .

Parameters

  fs | File storage
  map | The parent map. If it is NULL, the function searches a top-level node.
  name | The node name
  default_value | The value that is returned if the file node is not found

## § cvReadString()

const char* cvReadString | ( | const CvFileNode * | node,
|  | const char * | default_value = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Retrieves a text string from a file node.

The function returns a text string that is represented by the file node. If the file node is NULL, the default_value is returned (thus, it is convenient to call the function right after cvGetFileNode without checking for a NULL pointer). If the file node has type CV_NODE_STR , then node-:math:>data.str.ptr is returned. Otherwise the result is not determined.

Parameters

  node | File node
  default_value | The value that is returned if node is NULL

## § cvReadStringByName()

const char* cvReadStringByName | ( | const CvFileStorage * | fs,
|  | const CvFileNode * | map,
|  | const char * | name,
|  | const char * | default_value = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Finds a file node by its name and returns its value.

The function is a simple superposition of cvGetFileNodeByName and cvReadString .

Parameters

  fs | File storage
  map | The parent map. If it is NULL, the function searches a top-level node.
  name | The node name
  default_value | The value that is returned if the file node is not found

## § cvRealScalar()

CvScalar cvRealScalar | ( | double | val0 | ) |

`#include <opencv2/core/types_c.h>`

## § cvRect() [1/2]

CvRect cvRect | ( | int | x,
|  | int | y,
|  | int | width,
|  | int | height
| ) |  |

`#include <opencv2/core/types_c.h>`

constructs CvRect structure.

## § cvRect() [2/2]

CvRect cvRect | ( | const cv::Rect & | rc | ) |

`#include <opencv2/core/types_c.h>`

## § cvRectToROI()

IplROI cvRectToROI | ( | CvRect | rect,
|  | int | coi
| ) |  |

`#include <opencv2/core/types_c.h>`

## § cvRedirectError()

CvErrorCallback cvRedirectError | ( | CvErrorCallback | error_handler,
|  | void * | userdata = `NULL`,
|  | void ** | prev_userdata = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Assigns a new error-handling function

## § cvReduce()

void cvReduce | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | int | dim = `-1`,
|  | int | op = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

See also
  flags

## § cvRegisterType()

void cvRegisterType | ( | const CvTypeInfo * | info | ) |

`#include <opencv2/core/core_c.h>`

Registers a new type.

The function registers a new type, which is described by info . The function creates a copy of the structure, so the user should delete it after calling the function.

Parameters

  info | Type info structure

## § cvRelease()

void cvRelease | ( | void ** | struct_ptr | ) |

`#include <opencv2/core/core_c.h>`

Releases an object.

The function finds the type of a given object and calls release with the double pointer.

Parameters

  struct_ptr | Double pointer to the object

## § cvReleaseData()

void cvReleaseData | ( | CvArr * | arr | ) |

`#include <opencv2/core/core_c.h>`

Releases array data.

The function releases the array data. In the case of CvMat or CvMatND it simply calls cvDecRefData(), that is the function can not deallocate external data. See also the note to cvCreateData .

Parameters

  arr | Array header

## § cvReleaseFileStorage()

void cvReleaseFileStorage | ( | CvFileStorage ** | fs | ) |

`#include <opencv2/core/core_c.h>`

Releases file storage.

The function closes the file associated with the storage and releases all the temporary structures. It must be called after all I/O operations with the storage are finished.

Parameters

  fs | Double pointer to the released file storage

## § cvReleaseGraphScanner()

void cvReleaseGraphScanner | ( | CvGraphScanner ** | scanner | ) |

`#include <opencv2/core/core_c.h>`

Releases graph scanner.

## § cvReleaseImage()

void cvReleaseImage | ( | IplImage ** | image | ) |

`#include <opencv2/core/core_c.h>`

Deallocates the image header and the image data.

This call is a shortened form of :

if(*image )
{
cvReleaseData(*image);
cvReleaseImageHeader(image);
}

Parameters

  image | Double pointer to the image header

## § cvReleaseImageHeader()

void cvReleaseImageHeader | ( | IplImage ** | image | ) |

`#include <opencv2/core/core_c.h>`

Deallocates an image header.

This call is an analogue of :

if(image )
{
iplDeallocate(*image, IPL_IMAGE_HEADER | IPL_IMAGE_ROI);
*image = 0;
}

but it does not use IPL functions by default (see the CV_TURN_ON_IPL_COMPATIBILITY macro).

Parameters

  image | Double pointer to the image header

## § cvReleaseMat()

void cvReleaseMat | ( | CvMat ** | mat | ) |

`#include <opencv2/core/core_c.h>`

Deallocates a matrix.

The function decrements the matrix data reference counter and deallocates matrix header. If the data reference counter is 0, it also deallocates the data. :

if(*mat )
cvDecRefData(*mat);
cvFree((void**)mat);

Parameters

  mat | Double pointer to the matrix

## § cvReleaseMatND()

void cvReleaseMatND | ( | CvMatND ** | mat | ) |

`#include <opencv2/core/core_c.h>`

Deallocates a multi-dimensional array.

The function decrements the array data reference counter and releases the array header. If the reference counter reaches 0, it also deallocates the data. :

if(*mat )
cvDecRefData(*mat);
cvFree((void**)mat);

Parameters

  mat | Double pointer to the array

## § cvReleaseMemStorage()

void cvReleaseMemStorage | ( | CvMemStorage ** | storage | ) |

`#include <opencv2/core/core_c.h>`

Releases memory storage. All the children of a parent must be released before the parent. A child storage returns all the blocks to parent when it is released

## § cvReleaseSparseMat()

void cvReleaseSparseMat | ( | CvSparseMat ** | mat | ) |

`#include <opencv2/core/core_c.h>`

Deallocates sparse array.

The function releases the sparse array and clears the array pointer upon exit.

Parameters

  mat | Double pointer to the array

## § cvRemoveNodeFromTree()

void cvRemoveNodeFromTree | ( | void * | node,
|  | void * | frame
| ) |  |

`#include <opencv2/core/core_c.h>`

Removes contour from tree (together with the contour children).

## § cvRepeat()

void cvRepeat | ( | const CvArr * | src,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

Repeats source 2d array several times in both horizontal and vertical direction to fill destination array

## § cvResetImageROI()

void cvResetImageROI | ( | IplImage * | image | ) |

`#include <opencv2/core/core_c.h>`

Resets the image ROI to include the entire image and releases the ROI structure.

This produces a similar result to the following, but in addition it releases the ROI structure. :

cvSetImageROI(image, cvRect(0, 0, image->width, image->height ));
cvSetImageCOI(image, 0);

Parameters

  image | A pointer to the image header

## § cvReshape()

CvMat* cvReshape | ( | const CvArr * | arr,
|  | CvMat * | header,
|  | int | new_cn,
|  | int | new_rows = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Changes shape of matrix/image without copying data.

The function initializes the CvMat header so that it points to the same data as the original array but has a different shape - different number of channels, different number of rows, or both.

The following example code creates one image buffer and two image headers, the first is for a 320x240x3 image and the second is for a 960x240x1 image:

IplImage* color_img = cvCreateImage(cvSize(320,240), IPL_DEPTH_8U, 3);
CvMat gray_mat_hdr;
IplImage gray_img_hdr, *gray_img;
cvReshape(color_img, &gray_mat_hdr, 1);
gray_img = cvGetImage(&gray_mat_hdr, &gray_img_hdr);

And the next example converts a 3x3 matrix to a single 1x9 vector:

CvMat* mat = cvCreateMat(3, 3, CV_32F);
CvMat row_header, *row;
row = cvReshape(mat, &row_header, 0, 1);

Parameters

  arr | Input array
  header | Output header to be filled
  new_cn | New number of channels. 'new_cn = 0' means that the number of channels remains unchanged.
  new_rows | New number of rows. 'new_rows = 0' means that the number of rows remains unchanged unless it needs to be changed according to new_cn value.

## § cvReshapeMatND()

CvArr* cvReshapeMatND | ( | const CvArr * | arr,
|  | int | sizeof_header,
|  | CvArr * | header,
|  | int | new_cn,
|  | int | new_dims,
|  | int * | new_sizes
| ) |  |

`#include <opencv2/core/core_c.h>`

Changes the shape of a multi-dimensional array without copying the data.

The function is an advanced version of cvReshape that can work with multi-dimensional arrays as well (though it can work with ordinary images and matrices) and change the number of dimensions.

Below are the two samples from the cvReshape description rewritten using cvReshapeMatND:

IplImage* color_img = cvCreateImage(cvSize(320,240), IPL_DEPTH_8U, 3);
IplImage gray_img_hdr, *gray_img;
gray_img = (IplImage*)cvReshapeMatND(color_img, sizeof(gray_img_hdr), &gray_img_hdr, 1, 0, 0);
...
int size[] = { 2, 2, 2 };
CvMatND* mat = cvCreateMatND(3, size, CV_32F);
CvMat row_header, *row;
row = (CvMat*)cvReshapeMatND(mat, sizeof(row_header), &row_header, 0, 1, 0);

In C, the header file for this function includes a convenient macro cvReshapeND that does away with the sizeof_header parameter. So, the lines containing the call to cvReshapeMatND in the examples may be replaced as follow:

gray_img = (IplImage*)cvReshapeND(color_img, &gray_img_hdr, 1, 0, 0);
...
row = (CvMat*)cvReshapeND(mat, &row_header, 0, 1, 0);

Parameters

  arr | Input array
  sizeof_header | Size of output header to distinguish between IplImage, CvMat and CvMatND output headers
  header | Output header to be filled
  new_cn | New number of channels. new_cn = 0 means that the number of channels remains unchanged.
  new_dims | New number of dimensions. new_dims = 0 means that the number of dimensions remains the same.
  new_sizes | Array of new dimension sizes. Only new_dims-1 values are used, because the total number of elements must remain the same. Thus, if new_dims = 1, new_sizes array is not used.

## § cvRestoreMemStoragePos()

void cvRestoreMemStoragePos | ( | CvMemStorage * | storage,
|  | CvMemStoragePos * | pos
| ) |  |

`#include <opencv2/core/core_c.h>`

Restore a storage "free memory" position

## § cvRNG()

CvRNG cvRNG | ( | int64 | seed = `-1` | ) |

`#include <opencv2/core/types_c.h>`

Initializes a random number generator state.

The function initializes a random number generator and returns the state. The pointer to the state can be then passed to the cvRandInt, cvRandReal and cvRandArr functions. In the current implementation a multiply-with-carry generator is used.

Parameters

  seed | 64-bit value used to initiate a random sequence

See also
  the C++ class RNG replaced CvRNG.

## § cvROIToRect()

CvRect cvROIToRect | ( | IplROI | roi | ) |

`#include <opencv2/core/types_c.h>`

## § cvSave()

void cvSave | ( | const char * | filename,
|  | const void * | struct_ptr,
|  | const char * | name = `NULL`,
|  | const char * | comment = `NULL`,
|  | CvAttrList | attributes = `cvAttrList()`
| ) |  |

`#include <opencv2/core/core_c.h>`

Saves an object to a file.

The function saves an object to a file. It provides a simple interface to cvWrite .

Parameters

  filename | File name
  struct_ptr | Object to save
  name | Optional object name. If it is NULL, the name will be formed from filename .
  comment | Optional comment to put in the beginning of the file
  attributes | Optional attributes passed to cvWrite

## § cvSaveMemStoragePos()

void cvSaveMemStoragePos | ( | const CvMemStorage * | storage,
|  | CvMemStoragePos * | pos
| ) |  |

`#include <opencv2/core/core_c.h>`

Remember a storage "free memory" position

## § cvScalar() [1/3]

CvScalar cvScalar | ( | double | val0,
|  | double | val1 = `0`,
|  | double | val2 = `0`,
|  | double | val3 = `0`
| ) |  |

`#include <opencv2/core/types_c.h>`

## § cvScalar() [2/3]

CvScalar cvScalar | ( |  | ) |

`#include <opencv2/core/types_c.h>`

## § cvScalar() [3/3]

CvScalar cvScalar | ( | const cv::Scalar & | s | ) |

`#include <opencv2/core/types_c.h>`

## § cvScalarAll()

CvScalar cvScalarAll | ( | double | val0123 | ) |

`#include <opencv2/core/types_c.h>`

## § cvScalarToRawData()

void cvScalarToRawData | ( | const CvScalar * | scalar,
|  | void * | data,
|  | int | type,
|  | int | extend_to_12 = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

low-level scalar <-> raw data conversion functions

## § cvScaleAdd()

void cvScaleAdd | ( | const CvArr * | src1,
|  | CvScalar | scale,
|  | const CvArr * | src2,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

dst = src1 * scale + src2

## § cvSeqElemIdx()

int cvSeqElemIdx | ( | const CvSeq * | seq,
|  | const void * | element,
|  | CvSeqBlock ** | block = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Calculates index of the specified sequence element. Returns -1 if element does not belong to the sequence

## § cvSeqInsert()

schar* cvSeqInsert | ( | CvSeq * | seq,
|  | int | before_index,
|  | const void * | element = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Inserts a new element in the middle of sequence. cvSeqInsert(seq,0,elem) == cvSeqPushFront(seq,elem)

## § cvSeqInsertSlice()

void cvSeqInsertSlice | ( | CvSeq * | seq,
|  | int | before_index,
|  | const CvArr * | from_arr
| ) |  |

`#include <opencv2/core/core_c.h>`

Inserts a sequence or array into another sequence

## § cvSeqInvert()

void cvSeqInvert | ( | CvSeq * | seq | ) |

`#include <opencv2/core/core_c.h>`

Reverses order of sequence elements in-place

## § cvSeqPartition()

int cvSeqPartition | ( | const CvSeq * | seq,
|  | CvMemStorage * | storage,
|  | CvSeq ** | labels,
|  | CvCmpFunc | is_equal,
|  | void * | userdata
| ) |  |

`#include <opencv2/core/core_c.h>`

Splits sequence into one or more equivalence classes using the specified criteria

## § cvSeqPop()

void cvSeqPop | ( | CvSeq * | seq,
|  | void * | element = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Removes the last element from sequence and optionally saves it

## § cvSeqPopFront()

void cvSeqPopFront | ( | CvSeq * | seq,
|  | void * | element = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Removes the first element from sequence and optioanally saves it

## § cvSeqPopMulti()

void cvSeqPopMulti | ( | CvSeq * | seq,
|  | void * | elements,
|  | int | count,
|  | int | in_front = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Removes several elements from the end of sequence and optionally saves them

## § cvSeqPush()

schar* cvSeqPush | ( | CvSeq * | seq,
|  | const void * | element = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Adds new element to the end of sequence. Returns pointer to the element

## § cvSeqPushFront()

schar* cvSeqPushFront | ( | CvSeq * | seq,
|  | const void * | element = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Adds new element to the beginning of sequence. Returns pointer to it

## § cvSeqPushMulti()

void cvSeqPushMulti | ( | CvSeq * | seq,
|  | const void * | elements,
|  | int | count,
|  | int | in_front = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Adds several new elements to the end of sequence

## § cvSeqRemove()

void cvSeqRemove | ( | CvSeq * | seq,
|  | int | index
| ) |  |

`#include <opencv2/core/core_c.h>`

Removes specified sequence element

## § cvSeqRemoveSlice()

void cvSeqRemoveSlice | ( | CvSeq * | seq,
|  | CvSlice | slice
| ) |  |

`#include <opencv2/core/core_c.h>`

Removes sequence slice

## § cvSeqSearch()

schar* cvSeqSearch | ( | CvSeq * | seq,
|  | const void * | elem,
|  | CvCmpFunc | func,
|  | int | is_sorted,
|  | int * | elem_idx,
|  | void * | userdata = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Finds element in a [sorted] sequence

## § cvSeqSlice()

CvSeq* cvSeqSlice | ( | const CvSeq * | seq,
|  | CvSlice | slice,
|  | CvMemStorage * | storage = `NULL`,
|  | int | copy_data = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Extracts sequence slice (with or without copying sequence elements)

## § cvSeqSort()

void cvSeqSort | ( | CvSeq * | seq,
|  | CvCmpFunc | func,
|  | void * | userdata = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Sorts sequence in-place given element comparison function

## § cvSet()

void cvSet | ( | CvArr * | arr,
|  | CvScalar | value,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Sets every element of an array to a given value.

The function copies the scalar value to every selected element of the destination array:

\[\texttt{arr} (I)= \texttt{value} \quad \text{if} \quad \texttt{mask} (I) \ne 0\]

If array arr is of IplImage type, then is ROI used, but COI must not be set.

Parameters

  arr | The destination array
  value | Fill value
  mask | Operation mask, 8-bit single channel array; specifies elements of the destination array to be changed

## § cvSet1D()

void cvSet1D | ( | CvArr * | arr,
|  | int | idx0,
|  | CvScalar | value
| ) |  |

`#include <opencv2/core/core_c.h>`

Change the particular array element.

The functions assign the new value to a particular array element. In the case of a sparse array the functions create the node if it does not exist yet.

Parameters

  arr | Input array
  idx0 | The first zero-based component of the element index
  value | The assigned value

## § cvSet2D()

void cvSet2D | ( | CvArr * | arr,
|  | int | idx0,
|  | int | idx1,
|  | CvScalar | value
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## § cvSet3D()

void cvSet3D | ( | CvArr * | arr,
|  | int | idx0,
|  | int | idx1,
|  | int | idx2,
|  | CvScalar | value
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## § cvSetAdd()

int cvSetAdd | ( | CvSet * | set_header,
|  | CvSetElem * | elem = `NULL`,
|  | CvSetElem ** | inserted_elem = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Adds new element to the set and returns pointer to it

## § cvSetData()

void cvSetData | ( | CvArr * | arr,
|  | void * | data,
|  | int | step
| ) |  |

`#include <opencv2/core/core_c.h>`

Assigns user data to the array header.

The function assigns user data to the array header. Header should be initialized before using cvCreateMatHeader, cvCreateImageHeader, cvCreateMatNDHeader, cvInitMatHeader, cvInitImageHeader or cvInitMatNDHeader.

Parameters

  arr | Array header
  data | User data
  step | Full row length in bytes

## § cvSetErrMode()

int cvSetErrMode | ( | int | mode | ) |

`#include <opencv2/core/core_c.h>`

Sets error processing mode, returns previously used mode

## § cvSetErrStatus()

void cvSetErrStatus | ( | int | status | ) |

`#include <opencv2/core/core_c.h>`

Sets error status silently

## § cvSetIdentity()

void cvSetIdentity | ( | CvArr * | mat,
|  | CvScalar | value = `cvRealScalar(1)`
| ) |  |

`#include <opencv2/core/core_c.h>`

- Finds selected eigen values and vectors of a symmetric matrix */ Makes an identity matrix (mat_ij = i == j)

## § cvSetImageCOI()

void cvSetImageCOI | ( | IplImage * | image,
|  | int | coi
| ) |  |

`#include <opencv2/core/core_c.h>`

Sets the channel of interest in an IplImage.

If the ROI is set to NULL and the coi is not 0, the ROI is allocated. Most OpenCV functions do not* support the COI setting, so to process an individual image/matrix channel one may copy (via cvCopy or cvSplit) the channel to a separate image/matrix, process it and then copy the result back (via cvCopy or cvMerge) if needed.

Parameters

  image | A pointer to the image header
  coi | The channel of interest. 0 - all channels are selected, 1 - first channel is selected, etc. Note that the channel indices become 1-based.

## § cvSetImageROI()

void cvSetImageROI | ( | IplImage * | image,
|  | CvRect | rect
| ) |  |

`#include <opencv2/core/core_c.h>`

Sets an image Region Of Interest (ROI) for a given rectangle.

If the original image ROI was NULL and the rect is not the whole image, the ROI structure is allocated.

Most OpenCV functions support the use of ROI and treat the image rectangle as a separate image. For example, all of the pixel coordinates are counted from the top-left (or bottom-left) corner of the ROI, not the original image.

Parameters

  image | A pointer to the image header
  rect | The ROI rectangle

## § cvSetIPLAllocators()

void cvSetIPLAllocators | ( | Cv_iplCreateImageHeader | create_header,
|  | Cv_iplAllocateImageData | allocate_data,
|  | Cv_iplDeallocate | deallocate,
|  | Cv_iplCreateROI | create_roi,
|  | Cv_iplCloneImage | clone_image
| ) |  |

`#include <opencv2/core/core_c.h>`

Makes OpenCV use IPL functions for allocating IplImage and IplROI structures.

Normally, the function is not called directly. Instead, a simple macro CV_TURN_ON_IPL_COMPATIBILITY() is used that calls cvSetIPLAllocators and passes there pointers to IPL allocation functions. :

...
CV_TURN_ON_IPL_COMPATIBILITY()
...

Parameters

  create_header | pointer to a function, creating IPL image header.
  allocate_data | pointer to a function, allocating IPL image data.
  deallocate | pointer to a function, deallocating IPL image.
  create_roi | pointer to a function, creating IPL image ROI (i.e. Region of Interest).
  clone_image | pointer to a function, cloning an IPL image.

## § cvSetND()

void cvSetND | ( | CvArr * | arr,
|  | const int * | idx,
|  | CvScalar | value
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters

  arr | Input array
  idx | Array of the element indices
  value | The assigned value

## § cvSetNew()

CvSetElem* cvSetNew | ( | CvSet * | set_header | ) |

`#include <opencv2/core/core_c.h>`

Fast variant of cvSetAdd

## § cvSetNumThreads()

void cvSetNumThreads | ( | int | threads = `0` | ) |

`#include <opencv2/core/core_c.h>`

## § cvSetReal1D()

void cvSetReal1D | ( | CvArr * | arr,
|  | int | idx0,
|  | double | value
| ) |  |

`#include <opencv2/core/core_c.h>`

Change a specific array element.

The functions assign a new value to a specific element of a single-channel array. If the array has multiple channels, a runtime error is raised. Note that the Set*D function can be used safely for both single-channel and multiple-channel arrays, though they are a bit slower.

In the case of a sparse array the functions create the node if it does not yet exist.

Parameters

  arr | Input array
  idx0 | The first zero-based component of the element index
  value | The assigned value

## § cvSetReal2D()

void cvSetReal2D | ( | CvArr * | arr,
|  | int | idx0,
|  | int | idx1,
|  | double | value
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## § cvSetReal3D()

void cvSetReal3D | ( | CvArr * | arr,
|  | int | idx0,
|  | int | idx1,
|  | int | idx2,
|  | double | value
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## § cvSetRealND()

void cvSetRealND | ( | CvArr * | arr,
|  | const int * | idx,
|  | double | value
| ) |  |

`#include <opencv2/core/core_c.h>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters

  arr | Input array
  idx | Array of the element indices
  value | The assigned value

## § cvSetRemove()

void cvSetRemove | ( | CvSet * | set_header,
|  | int | index
| ) |  |

`#include <opencv2/core/core_c.h>`

Removes element from the set by its index

## § cvSetRemoveByPtr()

void cvSetRemoveByPtr | ( | CvSet * | set_header,
|  | void * | elem
| ) |  |

`#include <opencv2/core/core_c.h>`

Removes set element given its pointer

## § cvSetSeqBlockSize()

void cvSetSeqBlockSize | ( | CvSeq * | seq,
|  | int | delta_elems
| ) |  |

`#include <opencv2/core/core_c.h>`

Changes default size (granularity) of sequence blocks. The default size is ~1Kbyte

## § cvSetSeqReaderPos()

void cvSetSeqReaderPos | ( | CvSeqReader * | reader,
|  | int | index,
|  | int | is_relative = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Changes sequence reader position. It may seek to an absolute or to relative to the current position

## § cvSetZero()

void cvSetZero | ( | CvArr * | arr | ) |

`#include <opencv2/core/core_c.h>`

Clears the array.

The function clears the array. In the case of dense arrays (CvMat, CvMatND or IplImage), cvZero(array) is equivalent to cvSet(array,cvScalarAll(0),0). In the case of sparse arrays all the elements are removed.

Parameters

  arr | Array to be cleared

## § cvSize() [1/2]

CvSize cvSize | ( | int | width,
|  | int | height
| ) |  |

`#include <opencv2/core/types_c.h>`

constructs CvSize structure.

## § cvSize() [2/2]

CvSize cvSize | ( | const cv::Size & | sz | ) |

`#include <opencv2/core/types_c.h>`

## § cvSize2D32f() [1/2]

CvSize2D32f cvSize2D32f | ( | double | width,
|  | double | height
| ) |  |

`#include <opencv2/core/types_c.h>`

constructs CvSize2D32f structure.

## § cvSize2D32f() [2/2]

template<typename _Tp >

CvSize2D32f cvSize2D32f | ( | const cv::Size_< _Tp > & | sz | ) |

`#include <opencv2/core/types_c.h>`

## § cvSlice() [1/2]

CvSlice cvSlice | ( | int | start,
|  | int | end
| ) |  |

`#include <opencv2/core/types_c.h>`

## § cvSlice() [2/2]

CvSlice cvSlice | ( | const cv::Range & | r | ) |

`#include <opencv2/core/types_c.h>`

## § cvSliceLength()

int cvSliceLength | ( | CvSlice | slice,
|  | const CvSeq * | seq
| ) |  |

`#include <opencv2/core/core_c.h>`

Calculates length of sequence slice (with support of negative indices).

## § cvSolve()

int cvSolve | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | CvArr * | dst,
|  | int | method = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Solves linear system (src1)*(dst) = (src2) (returns 0 if src1 is a singular and CV_LU method is used)

## § cvSolveCubic()

int cvSolveCubic | ( | const CvMat * | coeffs,
|  | CvMat * | roots
| ) |  |

`#include <opencv2/core/core_c.h>`

Finds real roots of a cubic equation

## § cvSolvePoly()

void cvSolvePoly | ( | const CvMat * | coeffs,
|  | CvMat * | roots2,
|  | int | maxiter = `20`,
|  | int | fig = `100`
| ) |  |

`#include <opencv2/core/core_c.h>`

Finds all real and complex roots of a polynomial equation

## § cvSort()

void cvSort | ( | const CvArr * | src,
|  | CvArr * | dst = `NULL`,
|  | CvArr * | idxmat = `NULL`,
|  | int | flags = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

## § cvSplit()

void cvSplit | ( | const CvArr * | src,
|  | CvArr * | dst0,
|  | CvArr * | dst1,
|  | CvArr * | dst2,
|  | CvArr * | dst3
| ) |  |

`#include <opencv2/core/core_c.h>`

Splits a multi-channel array into the set of single-channel arrays or extracts particular [color] plane

## § cvStartAppendToSeq()

void cvStartAppendToSeq | ( | CvSeq * | seq,
|  | CvSeqWriter * | writer
| ) |  |

`#include <opencv2/core/core_c.h>`

Initializes sequence writer. The new elements will be added to the end of sequence

## § cvStartNextStream()

void cvStartNextStream | ( | CvFileStorage * | fs | ) |

`#include <opencv2/core/core_c.h>`

Starts the next stream.

The function finishes the currently written stream and starts the next stream. In the case of XML the file with multiple streams looks like this:

<opencv_storage>
<!-- stream #1 data -->
</opencv_storage>
<opencv_storage>
<!-- stream #2 data -->
</opencv_storage>
...

The YAML file will look like this:

%YAML 1.0
# stream #1 data
...
---
# stream #2 data

This is useful for concatenating files or for resuming the writing process.

Parameters

  fs | File storage

## § cvStartReadRawData()

void cvStartReadRawData | ( | const CvFileStorage * | fs,
|  | const CvFileNode * | src,
|  | CvSeqReader * | reader
| ) |  |

`#include <opencv2/core/core_c.h>`

Initializes the file node sequence reader.

The function initializes the sequence reader to read data from a file node. The initialized reader can be then passed to cvReadRawDataSlice.

Parameters

  fs | File storage
  src | The file node (a sequence) to read numbers from
  reader | Pointer to the sequence reader

## § cvStartReadSeq()

void cvStartReadSeq | ( | const CvSeq * | seq,
|  | CvSeqReader * | reader,
|  | int | reverse = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Initializes sequence reader. The sequence can be read in forward or backward direction

## § cvStartWriteSeq()

void cvStartWriteSeq | ( | int | seq_flags,
|  | int | header_size,
|  | int | elem_size,
|  | CvMemStorage * | storage,
|  | CvSeqWriter * | writer
| ) |  |

`#include <opencv2/core/core_c.h>`

Combination of cvCreateSeq and cvStartAppendToSeq

## § cvStartWriteStruct()

void cvStartWriteStruct | ( | CvFileStorage * | fs,
|  | const char * | name,
|  | int | struct_flags,
|  | const char * | type_name = `NULL`,
|  | CvAttrList | attributes = `cvAttrList()`
| ) |  |

`#include <opencv2/core/core_c.h>`

Starts writing a new structure.

The function starts writing a compound structure (collection) that can be a sequence or a map. After all the structure fields, which can be scalars or structures, are written, cvEndWriteStruct should be called. The function can be used to group some objects or to implement the write function for a some user object (see CvTypeInfo).

Parameters

  fs | File storage
  name | Name of the written structure. The structure can be accessed by this name when the storage is read.
  struct_flags | A combination one of the following values: CV_NODE_SEQ the written structure is a sequence (see discussion of CvFileStorage ), that is, its elements do not have a name. CV_NODE_MAP the written structure is a map (see discussion of CvFileStorage ), that is, all its elements have names. One and only one of the two above flags must be specified CV_NODE_FLOW the optional flag that makes sense only for YAML streams. It means that the structure is written as a flow (not as a block), which is more compact. It is recommended to use this flag for structures or arrays whose elements are all scalars.
  type_name | Optional parameter - the object type name. In case of XML it is written as a type_id attribute of the structure opening tag. In the case of YAML it is written after a colon following the structure name (see the example in CvFileStorage description). In case of JSON it is written as a name/value pair. Mainly it is used with user objects. When the storage is read, the encoded type name is used to determine the object type (see CvTypeInfo and cvFindType ).
  attributes | This parameter is not used in the current implementation

## § cvStdErrReport()

int cvStdErrReport | ( | int | status,
|  | const char * | func_name,
|  | const char * | err_msg,
|  | const char * | file_name,
|  | int | line,
|  | void * | userdata
| ) |  |

`#include <opencv2/core/core_c.h>`

Output to console(fprintf(stderr,...))

## § cvSub()

void cvSub | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | CvArr * | dst,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(mask) = src1(mask) - src2(mask)

## § cvSubRS()

void cvSubRS | ( | const CvArr * | src,
|  | CvScalar | value,
|  | CvArr * | dst,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(mask) = value - src(mask)

## § cvSubS()

void cvSubS | ( | const CvArr * | src,
|  | CvScalar | value,
|  | CvArr * | dst,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(mask) = src(mask) - value = src(mask) + (-value)

## § cvSum()

CvScalar cvSum | ( | const CvArr * | arr | ) |

`#include <opencv2/core/core_c.h>`

Finds sum of array elements

## § cvSVBkSb()

void cvSVBkSb | ( | const CvArr * | W,
|  | const CvArr * | U,
|  | const CvArr * | V,
|  | const CvArr * | B,
|  | CvArr * | X,
|  | int | flags
| ) |  |

`#include <opencv2/core/core_c.h>`

Performs Singular Value Back Substitution (solves A*X = B): flags must be the same as in cvSVD

## § cvSVD()

void cvSVD | ( | CvArr * | A,
|  | CvArr * | W,
|  | CvArr * | U = `NULL`,
|  | CvArr * | V = `NULL`,
|  | int | flags = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Performs Singular Value Decomposition of a matrix

## § cvTermCriteria() [1/2]

CvTermCriteria cvTermCriteria | ( | int | type,
|  | int | max_iter,
|  | double | epsilon
| ) |  |

`#include <opencv2/core/types_c.h>`

## § cvTermCriteria() [2/2]

CvTermCriteria cvTermCriteria | ( | const cv::TermCriteria & | t | ) |

`#include <opencv2/core/types_c.h>`

## § cvTrace()

CvScalar cvTrace | ( | const CvArr * | mat | ) |

`#include <opencv2/core/core_c.h>`

Calculates trace of the matrix (sum of elements on the main diagonal)

## § cvTransform()

void cvTransform | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | const CvMat * | transmat,
|  | const CvMat * | shiftvec = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

Transforms each element of source array and stores resultant vectors in destination array

## § cvTranspose()

void cvTranspose | ( | const CvArr * | src,
|  | CvArr * | dst
| ) |  |

`#include <opencv2/core/core_c.h>`

Tranposes matrix. Square matrices can be transposed in-place

## § cvTreeToNodeSeq()

CvSeq* cvTreeToNodeSeq | ( | const void * | first,
|  | int | header_size,
|  | CvMemStorage * | storage
| ) |  |

`#include <opencv2/core/core_c.h>`

Gathers pointers to all the sequences, accessible from the `first`, to the single sequence

## § cvTypeOf()

CvTypeInfo* cvTypeOf | ( | const void * | struct_ptr | ) |

`#include <opencv2/core/core_c.h>`

Returns the type of an object.

The function finds the type of a given object. It iterates through the list of registered types and calls the is_instance function/method for every type info structure with that object until one of them returns non-zero or until the whole list has been traversed. In the latter case, the function returns NULL.

Parameters

  struct_ptr | The object pointer

## § cvUnregisterType()

void cvUnregisterType | ( | const char * | type_name | ) |

`#include <opencv2/core/core_c.h>`

Unregisters the type.

The function unregisters a type with a specified name. If the name is unknown, it is possible to locate the type info by an instance of the type using cvTypeOf or by iterating the type list, starting from cvFirstType, and then calling cvUnregisterType(info->typeName).

Parameters

  type_name | Name of an unregistered type

## § cvUseOptimized()

int cvUseOptimized | ( | int | on_off | ) |

`#include <opencv2/core/core_c.h>`

Loads optimized functions from IPP, MKL etc. or switches back to pure C code

## § cvWrite()

void cvWrite | ( | CvFileStorage * | fs,
|  | const char * | name,
|  | const void * | ptr,
|  | CvAttrList | attributes = `cvAttrList()`
| ) |  |

`#include <opencv2/core/core_c.h>`

Writes an object to file storage.

The function writes an object to file storage. First, the appropriate type info is found using cvTypeOf. Then, the write method associated with the type info is called.

Attributes are used to customize the writing procedure. The standard types support the following attributes (all the dt attributes have the same format as in cvWriteRawData):

1. CvSeq
   - header_dt description of user fields of the sequence header that follow CvSeq, or CvChain (if the sequence is a Freeman chain) or CvContour (if the sequence is a contour or point sequence)
   - dt description of the sequence elements.
   - recursive if the attribute is present and is not equal to "0" or "false", the whole tree of sequences (contours) is stored.
2. CvGraph
   - header_dt description of user fields of the graph header that follows CvGraph;
   - vertex_dt description of user fields of graph vertices
   - edge_dt description of user fields of graph edges (note that the edge weight is always written, so there is no need to specify it explicitly)

Below is the code that creates the YAML file shown in the CvFileStorage description:

#include "cxcore.h"
int main( int argc, char** argv )
{
CvMat* mat = cvCreateMat( 3, 3, CV_32F );
CvFileStorage* fs = cvOpenFileStorage( "example.yml", 0, CV_STORAGE_WRITE );
cvSetIdentity( mat );
cvWrite( fs, "A", mat, cvAttrList(0,0) );
cvReleaseFileStorage( &fs );
cvReleaseMat( &mat );
return 0;
}

Parameters

  fs | File storage
  name | Name of the written object. Should be NULL if and only if the parent structure is a sequence.
  ptr | Pointer to the object
  attributes | The attributes of the object. They are specific for each particular type (see the discussion below).

## § cvWriteComment()

void cvWriteComment | ( | CvFileStorage * | fs,
|  | const char * | comment,
|  | int | eol_comment
| ) |  |

`#include <opencv2/core/core_c.h>`

Writes a comment.

The function writes a comment into file storage. The comments are skipped when the storage is read.

Parameters

  fs | File storage
  comment | The written comment, single-line or multi-line
  eol_comment | If non-zero, the function tries to put the comment at the end of current line. If the flag is zero, if the comment is multi-line, or if it does not fit at the end of the current line, the comment starts a new line.

## § cvWriteFileNode()

void cvWriteFileNode | ( | CvFileStorage * | fs,
|  | const char * | new_node_name,
|  | const CvFileNode * | node,
|  | int | embed
| ) |  |

`#include <opencv2/core/core_c.h>`

Writes a file node to another file storage.

The function writes a copy of a file node to file storage. Possible applications of the function are merging several file storages into one and conversion between XML, YAML and JSON formats.

Parameters

  fs | Destination file storage
  new_node_name | New name of the file node in the destination file storage. To keep the existing name, use cvcvGetFileNodeName
  node | The written node
  embed | If the written node is a collection and this parameter is not zero, no extra level of hierarchy is created. Instead, all the elements of node are written into the currently written structure. Of course, map elements can only be embedded into another map, and sequence elements can only be embedded into another sequence.

## § cvWriteInt()

void cvWriteInt | ( | CvFileStorage * | fs,
|  | const char * | name,
|  | int | value
| ) |  |

`#include <opencv2/core/core_c.h>`

Writes an integer value.

The function writes a single integer value (with or without a name) to the file storage.

Parameters

  fs | File storage
  name | Name of the written value. Should be NULL if and only if the parent structure is a sequence.
  value | The written value

## § cvWriteRawData()

void cvWriteRawData | ( | CvFileStorage * | fs,
|  | const void * | src,
|  | int | len,
|  | const char * | dt
| ) |  |

`#include <opencv2/core/core_c.h>`

Writes multiple numbers.

The function writes an array, whose elements consist of single or multiple numbers. The function call can be replaced with a loop containing a few cvWriteInt and cvWriteReal calls, but a single call is more efficient. Note that because none of the elements have a name, they should be written to a sequence rather than a map.

Parameters

  fs | File storage
  src | Pointer to the written array
  len | Number of the array elements to write
  dt | Specification of each array element, see format specification

## § cvWriteRawDataBase64()

void cvWriteRawDataBase64 | ( | CvFileStorage * | fs,
|  | const void * | src,
|  | int | len,
|  | const char * | dt
| ) |  |

`#include <opencv2/core/core_c.h>`

Writes multiple numbers in Base64.

If either CV_STORAGE_WRITE_BASE64 or cv::FileStorage::WRITE_BASE64 is used, this function will be the same as cvWriteRawData. If neither, the main difference is that it outputs a sequence in Base64 encoding rather than in plain text.

This function can only be used to write a sequence with a type "binary".

Parameters

  fs | File storage
  src | Pointer to the written array
  len | Number of the array elements to write
  dt | Specification of each array element, see format specification

## § cvWriteReal()

void cvWriteReal | ( | CvFileStorage * | fs,
|  | const char * | name,
|  | double | value
| ) |  |

`#include <opencv2/core/core_c.h>`

Writes a floating-point value.

The function writes a single floating-point value (with or without a name) to file storage. Special values are encoded as follows: NaN (Not A Number) as .NaN, infinity as +.Inf or -.Inf.

The following example shows how to use the low-level writing functions to store custom structures, such as termination criteria, without registering a new type. :

void write_termcriteria( CvFileStorage* fs, const char* struct_name,
CvTermCriteria* termcrit )
{
cvStartWriteStruct( fs, struct_name, CV_NODE_MAP, NULL, cvAttrList(0,0));
cvWriteComment( fs, "termination criteria", 1 ); // just a description
if( termcrit->type & CV_TERMCRIT_ITER )
cvWriteInteger( fs, "max_iterations", termcrit->max_iter );
if( termcrit->type & CV_TERMCRIT_EPS )
cvWriteReal( fs, "accuracy", termcrit->epsilon );
cvEndWriteStruct( fs );
}

Parameters

  fs | File storage
  name | Name of the written value. Should be NULL if and only if the parent structure is a sequence.
  value | The written value

## § cvWriteString()

void cvWriteString | ( | CvFileStorage * | fs,
|  | const char * | name,
|  | const char * | str,
|  | int | quote = `0`
| ) |  |

`#include <opencv2/core/core_c.h>`

Writes a text string.

The function writes a text string to file storage.

Parameters

  fs | File storage
  name | Name of the written string . Should be NULL if and only if the parent structure is a sequence.
  str | The written text string
  quote | If non-zero, the written string is put in quotes, regardless of whether they are required. Otherwise, if the flag is zero, quotes are used only when they are required (e.g. when the string starts with a digit or contains spaces).

## § cvXor()

void cvXor | ( | const CvArr * | src1,
|  | const CvArr * | src2,
|  | CvArr * | dst,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = src1(idx) ^ src2(idx)

## § cvXorS()

void cvXorS | ( | const CvArr * | src,
|  | CvScalar | value,
|  | CvArr * | dst,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/core/core_c.h>`

dst(idx) = src(idx) ^ value