EstervQrCode 1.1.1
Library for qr code manipulation
Classes | Macros | Typedefs | Enumerations | Functions | Variables
Core_c

Classes

struct  CvNArrayIterator
 
struct  CvGraphScanner
 
struct  CvTreeNodeIterator
 
struct  _IplImage
 
struct  _IplROI
 
struct  _IplConvKernel
 
struct  _IplConvKernelFP
 
struct  CvMat
 
struct  CvMatND
 
struct  CvSparseMat
 
struct  CvSparseNode
 
struct  CvSparseMatIterator
 
struct  CvHistogram
 
struct  CvRect
 
struct  CvTermCriteria
 
struct  CvPoint
 
struct  CvPoint2D32f
 
struct  CvPoint3D32f
 
struct  CvPoint2D64f
 
struct  CvPoint3D64f
 
struct  CvSize
 
struct  CvSize2D32f
 
struct  CvBox2D
 
struct  CvLineIterator
 
struct  CvSlice
 
struct  CvScalar
 
struct  CvMemBlock
 
struct  CvMemStorage
 
struct  CvMemStoragePos
 
struct  CvSeqBlock
 
struct  CvSeq
 
struct  CvSetElem
 
struct  CvSet
 
struct  CvGraphEdge
 
struct  CvGraphVtx
 
struct  CvGraphVtx2D
 
struct  CvGraph
 
struct  CvChain
 
struct  CvContour
 
struct  CvSeqWriter
 
struct  CvSeqReader
 

Macros

#define cvFree(ptr)   (cvFree_(*(ptr)), *(ptr)=0)
 
#define CV_AUTOSTEP   0x7fffffff
 
#define cvGetSubArr   cvGetSubRect
 
#define CV_MAX_ARR   10
 
#define CV_NO_DEPTH_CHECK   1
 
#define CV_NO_CN_CHECK   2
 
#define CV_NO_SIZE_CHECK   4
 
#define cvReshapeND(arr, header, new_cn, new_dims, new_sizes)
 
#define cvZero   cvSetZero
 
#define cvCvtScale   cvConvertScale
 
#define cvScale   cvConvertScale
 
#define cvConvert(src, dst)   cvConvertScale( (src), (dst), 1, 0 )
 
#define cvCvtScaleAbs   cvConvertScaleAbs
 
#define cvAXPY(A, real_scalar, B, C)   cvScaleAdd(A, cvRealScalar(real_scalar), B, C)
 
#define CV_CMP_EQ   0
 
#define CV_CMP_GT   1
 
#define CV_CMP_GE   2
 
#define CV_CMP_LT   3
 
#define CV_CMP_LE   4
 
#define CV_CMP_NE   5
 
#define cvAbs(src, dst)   cvAbsDiffS( (src), (dst), cvScalarAll(0))
 
#define CV_CHECK_RANGE   1
 
#define CV_CHECK_QUIET   2
 
#define cvCheckArray   cvCheckArr
 
#define CV_RAND_UNI   0
 
#define CV_RAND_NORMAL   1
 
#define CV_SORT_EVERY_ROW   0
 
#define CV_SORT_EVERY_COLUMN   1
 
#define CV_SORT_ASCENDING   0
 
#define CV_SORT_DESCENDING   16
 
#define cvMatMulAdd(src1, src2, src3, dst)   cvGEMM( (src1), (src2), 1., (src3), 1., (dst), 0 )
 
#define cvMatMul(src1, src2, dst)   cvMatMulAdd( (src1), (src2), NULL, (dst))
 
#define CV_GEMM_A_T   1
 
#define CV_GEMM_B_T   2
 
#define CV_GEMM_C_T   4
 
#define cvMatMulAddEx   cvGEMM
 
#define cvMatMulAddS   cvTransform
 
#define cvT   cvTranspose
 
#define cvMirror   cvFlip
 
#define CV_SVD_MODIFY_A   1
 
#define CV_SVD_U_T   2
 
#define CV_SVD_V_T   4
 
#define CV_LU   0
 
#define CV_SVD   1
 
#define CV_SVD_SYM   2
 
#define CV_CHOLESKY   3
 
#define CV_QR   4
 
#define CV_NORMAL   16
 
#define cvInv   cvInvert
 
#define CV_PCA_DATA_AS_ROW   0
 
#define CV_PCA_DATA_AS_COL   1
 
#define CV_PCA_USE_AVG   2
 
#define cvMahalonobis   cvMahalanobis
 
#define cvFFT   cvDFT
 
#define CV_FRONT   1
 
#define CV_BACK   0
 
#define cvGraphFindEdge   cvFindGraphEdge
 
#define cvGraphFindEdgeByPtr   cvFindGraphEdgeByPtr
 
#define cvGetGraphVtx(graph, idx)   (CvGraphVtx*)cvGetSetElem((CvSet*)(graph), (idx))
 
#define cvGraphVtxIdx(graph, vtx)   ((vtx)->flags & CV_SET_ELEM_IDX_MASK)
 
#define cvGraphEdgeIdx(graph, edge)   ((edge)->flags & CV_SET_ELEM_IDX_MASK)
 
#define cvGraphGetVtxCount(graph)   ((graph)->active_count)
 
#define cvGraphGetEdgeCount(graph)   ((graph)->edges->active_count)
 
#define CV_GRAPH_VERTEX   1
 
#define CV_GRAPH_TREE_EDGE   2
 
#define CV_GRAPH_BACK_EDGE   4
 
#define CV_GRAPH_FORWARD_EDGE   8
 
#define CV_GRAPH_CROSS_EDGE   16
 
#define CV_GRAPH_ANY_EDGE   30
 
#define CV_GRAPH_NEW_TREE   32
 
#define CV_GRAPH_BACKTRACKING   64
 
#define CV_GRAPH_OVER   -1
 
#define CV_GRAPH_ALL_ITEMS   -1
 
#define CV_GRAPH_ITEM_VISITED_FLAG   (1 << 30)
 
#define CV_IS_GRAPH_VERTEX_VISITED(vtx)    (((CvGraphVtx*)(vtx))->flags & CV_GRAPH_ITEM_VISITED_FLAG)
 
#define CV_IS_GRAPH_EDGE_VISITED(edge)    (((CvGraphEdge*)(edge))->flags & CV_GRAPH_ITEM_VISITED_FLAG)
 
#define CV_GRAPH_SEARCH_TREE_NODE_FLAG   (1 << 29)
 
#define CV_GRAPH_FORWARD_EDGE_FLAG   (1 << 28)
 
#define CV_KMEANS_USE_INITIAL_LABELS   1
 
#define CV_TURN_ON_IPL_COMPATIBILITY()
 
#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 OPENCV_ERROR(status, func, context)   cvError((status),(func),(context),__FILE__,__LINE__)
 
#define OPENCV_ASSERT(expr, func, context)
 
#define OPENCV_CALL(Func)
 
#define CV_FUNCNAME(Name)   static char cvFuncName[] = Name
 
#define CV_ERROR(Code, Msg)
 
#define CV_CHECK()
 
#define CV_CALL(Func)
 
#define CV_ASSERT(Condition)
 
#define __CV_BEGIN__   {
 
#define __CV_END__   goto exit; exit: ; }
 
#define __CV_EXIT__   goto exit
 
#define CV_IABS(a)   (((a) ^ ((a) < 0 ? -1 : 0)) - ((a) < 0 ? -1 : 0))
 
#define cvInvSqrt(value)   ((float)(1./sqrt(value)))
 
#define cvSqrt(value)   ((float)sqrt(value))
 
#define CV_RNG_COEFF   4164903690U
 
#define IPL_DEPTH_SIGN   0x80000000
 
#define IPL_DEPTH_1U   1
 
#define IPL_DEPTH_8U   8
 
#define IPL_DEPTH_16U   16
 
#define IPL_DEPTH_32F   32
 
#define IPL_DEPTH_8S   (IPL_DEPTH_SIGN| 8)
 
#define IPL_DEPTH_16S   (IPL_DEPTH_SIGN|16)
 
#define IPL_DEPTH_32S   (IPL_DEPTH_SIGN|32)
 
#define IPL_DATA_ORDER_PIXEL   0
 
#define IPL_DATA_ORDER_PLANE   1
 
#define IPL_ORIGIN_TL   0
 
#define IPL_ORIGIN_BL   1
 
#define IPL_ALIGN_4BYTES   4
 
#define IPL_ALIGN_8BYTES   8
 
#define IPL_ALIGN_16BYTES   16
 
#define IPL_ALIGN_32BYTES   32
 
#define IPL_ALIGN_DWORD   IPL_ALIGN_4BYTES
 
#define IPL_ALIGN_QWORD   IPL_ALIGN_8BYTES
 
#define IPL_BORDER_CONSTANT   0
 
#define IPL_BORDER_REPLICATE   1
 
#define IPL_BORDER_REFLECT   2
 
#define IPL_BORDER_WRAP   3
 
#define IPL_IMAGE_HEADER   1
 
#define IPL_IMAGE_DATA   2
 
#define IPL_IMAGE_ROI   4
 
#define IPL_BORDER_REFLECT_101   4
 
#define IPL_BORDER_TRANSPARENT   5
 
#define IPL_IMAGE_MAGIC_VAL   ((int)sizeof(IplImage))
 
#define CV_TYPE_NAME_IMAGE   "opencv-image"
 
#define CV_IS_IMAGE_HDR(img)    ((img) != NULL && ((const IplImage*)(img))->nSize == sizeof(IplImage))
 
#define CV_IS_IMAGE(img)    (CV_IS_IMAGE_HDR(img) && ((IplImage*)img)->imageData != NULL)
 
#define IPL_DEPTH_64F   64
 
#define CV_IMAGE_ELEM(image, elemtype, row, col)    (((elemtype*)((image)->imageData + (image)->widthStep*(row)))[(col)])
 
#define CV_AUTO_STEP   0x7fffffff
 
#define CV_WHOLE_ARR   cvSlice( 0, 0x3fffffff )
 
#define CV_MAGIC_MASK   0xFFFF0000
 
#define CV_MAT_MAGIC_VAL   0x42420000
 
#define CV_TYPE_NAME_MAT   "opencv-matrix"
 
#define CV_IS_MAT_HDR(mat)
 
#define CV_IS_MAT_HDR_Z(mat)
 
#define CV_IS_MAT(mat)    (CV_IS_MAT_HDR(mat) && ((const CvMat*)(mat))->data.ptr != NULL)
 
#define CV_IS_MASK_ARR(mat)    (((mat)->type & (CV_MAT_TYPE_MASK & ~CV_8SC1)) == 0)
 
#define CV_ARE_TYPES_EQ(mat1, mat2)    ((((mat1)->type ^ (mat2)->type) & CV_MAT_TYPE_MASK) == 0)
 
#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_IS_MAT_CONST(mat)    (((mat)->rows|(mat)->cols) == 1)
 
#define IPL2CV_DEPTH(depth)
 
#define CV_MAT_ELEM_PTR_FAST(mat, row, col, pix_size)
 
#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(mat, elemtype, row, col)    (*(elemtype*)CV_MAT_ELEM_PTR_FAST( mat, row, col, sizeof(elemtype)))
 
#define CV_MATND_MAGIC_VAL   0x42430000
 
#define CV_TYPE_NAME_MATND   "opencv-nd-matrix"
 
#define CV_IS_MATND_HDR(mat)    ((mat) != NULL && (((const CvMatND*)(mat))->type & CV_MAGIC_MASK) == CV_MATND_MAGIC_VAL)
 
#define CV_IS_MATND(mat)    (CV_IS_MATND_HDR(mat) && ((const CvMatND*)(mat))->data.ptr != NULL)
 
#define CV_SPARSE_MAT_MAGIC_VAL   0x42440000
 
#define CV_TYPE_NAME_SPARSE_MAT   "opencv-sparse-matrix"
 
#define CV_IS_SPARSE_MAT_HDR(mat)
 
#define CV_IS_SPARSE_MAT(mat)    CV_IS_SPARSE_MAT_HDR(mat)
 
#define CV_NODE_VAL(mat, node)   ((void*)((uchar*)(node) + (mat)->valoffset))
 
#define CV_NODE_IDX(mat, node)   ((int*)((uchar*)(node) + (mat)->idxoffset))
 
#define CV_HIST_MAGIC_VAL   0x42450000
 
#define CV_HIST_UNIFORM_FLAG   (1 << 10)
 
#define CV_HIST_RANGES_FLAG   (1 << 11)
 
#define CV_HIST_ARRAY   0
 
#define CV_HIST_SPARSE   1
 
#define CV_HIST_TREE   CV_HIST_SPARSE
 
#define CV_HIST_UNIFORM   1
 
#define CV_IS_HIST(hist)
 
#define CV_IS_UNIFORM_HIST(hist)    (((hist)->type & CV_HIST_UNIFORM_FLAG) != 0)
 
#define CV_IS_SPARSE_HIST(hist)    CV_IS_SPARSE_MAT((hist)->bins)
 
#define CV_HIST_HAS_RANGES(hist)    (((hist)->type & CV_HIST_RANGES_FLAG) != 0)
 
#define CV_TERMCRIT_ITER   1
 
#define CV_TERMCRIT_NUMBER   CV_TERMCRIT_ITER
 
#define CV_TERMCRIT_EPS   2
 
#define CV_WHOLE_SEQ_END_INDEX   0x3fffffff
 
#define CV_WHOLE_SEQ   cvSlice(0, CV_WHOLE_SEQ_END_INDEX)
 
#define CV_STORAGE_MAGIC_VAL   0x42890000
 
#define CV_IS_STORAGE(storage)
 
#define CV_TREE_NODE_FIELDS(node_type)
 
#define CV_SEQUENCE_FIELDS()
 
#define CV_TYPE_NAME_SEQ   "opencv-sequence"
 
#define CV_TYPE_NAME_SEQ_TREE   "opencv-sequence-tree"
 
#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_FIELDS()
 
#define CV_SET_ELEM_IDX_MASK   ((1 << 26) - 1)
 
#define CV_SET_ELEM_FREE_FLAG   (1 << (sizeof(int)*8-1))
 
#define CV_IS_SET_ELEM(ptr)   (((CvSetElem*)(ptr))->flags >= 0)
 
#define CV_CONTOUR_FIELDS()
 
#define CV_SEQ_MAGIC_VAL   0x42990000
 
#define CV_IS_SEQ(seq)    ((seq) != NULL && (((CvSeq*)(seq))->flags & CV_MAGIC_MASK) == CV_SEQ_MAGIC_VAL)
 
#define CV_SET_MAGIC_VAL   0x42980000
 
#define CV_IS_SET(set)    ((set) != NULL && (((CvSeq*)(set))->flags & CV_MAGIC_MASK) == CV_SET_MAGIC_VAL)
 
#define CV_SEQ_ELTYPE_BITS   12
 
#define CV_SEQ_ELTYPE_MASK   ((1 << CV_SEQ_ELTYPE_BITS) - 1)
 
#define CV_SEQ_ELTYPE_POINT   CV_32SC2
 
#define CV_SEQ_ELTYPE_CODE   CV_8UC1
 
#define CV_SEQ_ELTYPE_GENERIC   0
 
#define CV_SEQ_ELTYPE_PTR   CV_MAKE_TYPE(CV_8U, 8 /*sizeof(void*)*/)
 
#define CV_SEQ_ELTYPE_PPOINT   CV_SEQ_ELTYPE_PTR
 
#define CV_SEQ_ELTYPE_INDEX   CV_32SC1
 
#define CV_SEQ_ELTYPE_GRAPH_EDGE   0
 
#define CV_SEQ_ELTYPE_GRAPH_VERTEX   0
 
#define CV_SEQ_ELTYPE_TRIAN_ATR   0
 
#define CV_SEQ_ELTYPE_CONNECTED_COMP   0
 
#define CV_SEQ_ELTYPE_POINT3D   CV_32FC3
 
#define CV_SEQ_KIND_BITS   2
 
#define CV_SEQ_KIND_MASK   (((1 << CV_SEQ_KIND_BITS) - 1)<<CV_SEQ_ELTYPE_BITS)
 
#define CV_SEQ_KIND_GENERIC   (0 << CV_SEQ_ELTYPE_BITS)
 
#define CV_SEQ_KIND_CURVE   (1 << CV_SEQ_ELTYPE_BITS)
 
#define CV_SEQ_KIND_BIN_TREE   (2 << CV_SEQ_ELTYPE_BITS)
 
#define CV_SEQ_KIND_GRAPH   (1 << CV_SEQ_ELTYPE_BITS)
 
#define CV_SEQ_KIND_SUBDIV2D   (2 << CV_SEQ_ELTYPE_BITS)
 
#define CV_SEQ_FLAG_SHIFT   (CV_SEQ_KIND_BITS + CV_SEQ_ELTYPE_BITS)
 
#define CV_SEQ_FLAG_CLOSED   (1 << CV_SEQ_FLAG_SHIFT)
 
#define CV_SEQ_FLAG_SIMPLE   (0 << 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_GRAPH_FLAG_ORIENTED   (1 << CV_SEQ_FLAG_SHIFT)
 
#define CV_GRAPH   CV_SEQ_KIND_GRAPH
 
#define CV_ORIENTED_GRAPH   (CV_SEQ_KIND_GRAPH|CV_GRAPH_FLAG_ORIENTED)
 
#define CV_SEQ_POINT_SET   (CV_SEQ_KIND_GENERIC| CV_SEQ_ELTYPE_POINT)
 
#define CV_SEQ_POINT3D_SET   (CV_SEQ_KIND_GENERIC| CV_SEQ_ELTYPE_POINT3D)
 
#define CV_SEQ_POLYLINE   (CV_SEQ_KIND_CURVE | CV_SEQ_ELTYPE_POINT)
 
#define CV_SEQ_POLYGON   (CV_SEQ_FLAG_CLOSED | CV_SEQ_POLYLINE )
 
#define CV_SEQ_CONTOUR   CV_SEQ_POLYGON
 
#define CV_SEQ_SIMPLE_POLYGON   (CV_SEQ_FLAG_SIMPLE | CV_SEQ_POLYGON )
 
#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_POLYGON_TREE   (CV_SEQ_KIND_BIN_TREE | CV_SEQ_ELTYPE_TRIAN_ATR)
 
#define CV_SEQ_CONNECTED_COMP   (CV_SEQ_KIND_GENERIC | CV_SEQ_ELTYPE_CONNECTED_COMP)
 
#define CV_SEQ_INDEX   (CV_SEQ_KIND_GENERIC | CV_SEQ_ELTYPE_INDEX)
 
#define CV_SEQ_ELTYPE(seq)   ((seq)->flags & CV_SEQ_ELTYPE_MASK)
 
#define CV_SEQ_KIND(seq)   ((seq)->flags & CV_SEQ_KIND_MASK )
 
#define CV_IS_SEQ_INDEX(seq)
 
#define CV_IS_SEQ_CURVE(seq)   (CV_SEQ_KIND(seq) == CV_SEQ_KIND_CURVE)
 
#define CV_IS_SEQ_CLOSED(seq)   (((seq)->flags & CV_SEQ_FLAG_CLOSED) != 0)
 
#define CV_IS_SEQ_CONVEX(seq)   0
 
#define CV_IS_SEQ_HOLE(seq)   (((seq)->flags & CV_SEQ_FLAG_HOLE) != 0)
 
#define CV_IS_SEQ_SIMPLE(seq)   1
 
#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_POLYLINE(seq)    (CV_SEQ_KIND(seq) == CV_SEQ_KIND_CURVE && CV_IS_SEQ_POINT_SET(seq))
 
#define CV_IS_SEQ_POLYGON(seq)    (CV_IS_SEQ_POLYLINE(seq) && CV_IS_SEQ_CLOSED(seq))
 
#define CV_IS_SEQ_CHAIN(seq)    (CV_SEQ_KIND(seq) == CV_SEQ_KIND_CURVE && (seq)->elem_size == 1)
 
#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_CHAIN_CONTOUR(seq)    (CV_IS_SEQ_CHAIN( seq ) && CV_IS_SEQ_CLOSED( seq ))
 
#define CV_IS_SEQ_POLYGON_TREE(seq)
 
#define CV_IS_GRAPH(seq)    (CV_IS_SET(seq) && CV_SEQ_KIND((CvSet*)(seq)) == CV_SEQ_KIND_GRAPH)
 
#define CV_IS_GRAPH_ORIENTED(seq)    (((seq)->flags & CV_GRAPH_FLAG_ORIENTED) != 0)
 
#define CV_IS_SUBDIV2D(seq)    (CV_IS_SET(seq) && CV_SEQ_KIND((CvSet*)(seq)) == CV_SEQ_KIND_SUBDIV2D)
 
#define CV_SEQ_WRITER_FIELDS()
 
#define CV_SEQ_READER_FIELDS()
 
#define CV_SEQ_ELEM(seq, elem_type, index)
 
#define CV_GET_SEQ_ELEM(elem_type, seq, index)   CV_SEQ_ELEM( (seq), elem_type, (index) )
 
#define CV_WRITE_SEQ_ELEM_VAR(elem_ptr, writer)
 
#define CV_WRITE_SEQ_ELEM(elem, writer)
 
#define CV_NEXT_SEQ_ELEM(elem_size, reader)
 
#define CV_PREV_SEQ_ELEM(elem_size, reader)
 
#define CV_READ_SEQ_ELEM(elem, reader)
 
#define CV_REV_READ_SEQ_ELEM(elem, reader)
 
#define CV_READ_CHAIN_POINT(_pt, reader)
 
#define CV_CURRENT_POINT(reader)   (*((CvPoint*)((reader).ptr)))
 
#define CV_PREV_POINT(reader)   (*((CvPoint*)((reader).prev_elem)))
 
#define CV_READ_EDGE(pt1, pt2, reader)
 
#define CV_NEXT_GRAPH_EDGE(edge, vertex)
 

Typedefs

typedef struct CvNArrayIterator CvNArrayIterator
 
typedef int(CV_CDECLCvCmpFunc) (const void *a, const void *b, void *userdata)
 
typedef struct CvGraphScanner CvGraphScanner
 
typedef struct CvTreeNodeIterator CvTreeNodeIterator
 
typedef IplImage *(CV_STDCALLCv_iplCreateImageHeader) (int, int, int, char *, char *, int, int, int, int, int, IplROI *, IplImage *, void *, IplTileInfo *)
 
typedef void(CV_STDCALLCv_iplAllocateImageData) (IplImage *, int, int)
 
typedef void(CV_STDCALLCv_iplDeallocate) (IplImage *, int)
 
typedef IplROI *(CV_STDCALLCv_iplCreateROI) (int, int, int, int, int)
 
typedef IplImage *(CV_STDCALLCv_iplCloneImage) (const IplImage *)
 
typedef int(CV_CDECLCvErrorCallback) (int status, const char *func_name, const char *err_msg, const char *file_name, int line, void *userdata)
 
typedef void CvArr
 This is the "metatype" used only as a function parameter. More...
 
typedef int CVStatus
 
typedef uint64 CvRNG
 
typedef struct _IplImage IplImage
 
typedef struct _IplTileInfo IplTileInfo
 
typedef struct _IplROI IplROI
 
typedef struct _IplConvKernel IplConvKernel
 
typedef struct _IplConvKernelFP IplConvKernelFP
 
typedef struct CvMat CvMat
 
typedef struct CvMatND CvMatND
 
typedef struct CvSparseMat CvSparseMat
 
typedef struct CvSparseNode CvSparseNode
 
typedef struct CvSparseMatIterator CvSparseMatIterator
 
typedef int CvHistType
 
typedef struct CvHistogram CvHistogram
 
typedef struct CvRect CvRect
 
typedef struct CvTermCriteria CvTermCriteria
 
typedef struct CvPoint CvPoint
 
typedef struct CvPoint2D32f CvPoint2D32f
 
typedef struct CvPoint3D32f CvPoint3D32f
 
typedef struct CvPoint2D64f CvPoint2D64f
 
typedef struct CvPoint3D64f CvPoint3D64f
 
typedef struct CvSize CvSize
 
typedef struct CvSize2D32f CvSize2D32f
 
typedef struct CvBox2D CvBox2D
 
typedef struct CvLineIterator CvLineIterator
 
typedef struct CvSlice CvSlice
 
typedef struct CvScalar CvScalar
 
typedef struct CvMemBlock CvMemBlock
 
typedef struct CvMemStorage CvMemStorage
 
typedef struct CvMemStoragePos CvMemStoragePos
 
typedef struct CvSeqBlock CvSeqBlock
 
typedef struct CvSeq CvSeq
 
typedef struct CvSetElem CvSetElem
 
typedef struct CvSet CvSet
 
typedef struct CvChain CvChain
 
typedef struct CvContour CvContour
 
typedef CvContour CvPoint2DSeq
 
typedef struct CvSeqWriter CvSeqWriter
 
typedef struct CvSeqReader CvSeqReader
 

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

 CVAPI (CvArr *) cvReshapeMatND(const CvArr *arr
 Changes the shape of a multi-dimensional array without copying the data. More...
 
 CVAPI (void) cvReleaseImageHeader(IplImage **image)
 Deallocates an image header. More...
 
 CVAPI (IplImage *) cvCreateImageHeader(CvSize size
 Creates an image header but does not allocate the image data. More...
 
CvSize int int int origin CV_DEFAULT (0)
 
CvSize int int int origin int align CV_DEFAULT (4))
 
 CVAPI (int) cvGetImageCOI(const IplImage *image)
 Returns the index of the channel of interest. More...
 
 CVAPI (CvRect) cvGetImageROI(const IplImage *image)
 Returns the image ROI. More...
 
 CVAPI (CvMat *) cvCreateMatHeader(int rows
 Creates a matrix header but does not allocate the matrix data. More...
 
int int int void *data CV_DEFAULT (NULL)
 
int int int void *data int step CV_DEFAULT (CV_AUTOSTEP))
 
CV_INLINE void cvDecRefData (CvArr *arr)
 Decrements an array data reference counter. More...
 
CV_INLINE int cvIncRefData (CvArr *arr)
 Increments array data reference counter. More...
 
CvMat int int int delta_row CV_DEFAULT (1))
 
CV_INLINE CvMatcvGetRow (const CvArr *arr, CvMat *submat, int row)
 
CV_INLINE CvMatcvGetCol (const CvArr *arr, CvMat *submat, int col)
 
 CVAPI (CvMatND *) cvCreateMatNDHeader(int dims
 Creates a new matrix header but does not allocate the matrix data. More...
 
CV_INLINE void cvReleaseMatND (CvMatND **mat)
 Deallocates a multi-dimensional array. More...
 
 CVAPI (CvSparseMat *) cvCreateSparseMat(int dims
 Creates sparse array. More...
 
 CVAPI (CvSparseNode *) cvInitSparseMatIterator(const CvSparseMat *mat
 Initializes sparse array elements iterator. More...
 
CV_INLINE CvSparseNodecvGetNextSparseNode (CvSparseMatIterator *mat_iterator)
 Returns the next sparse matrix element. More...
 
 CVAPI (uchar *) cvPtr1D(const CvArr *arr
 Return pointer to a particular array element. More...
 
 CVAPI (CvScalar) cvGet1D(const CvArr *arr
 Return a specific array element. More...
 
 CVAPI (double) cvGetReal1D(const CvArr *arr
 Return a specific element of single-channel 1D, 2D, 3D or nD array. More...
 
 CVAPI (CvSize) cvGetSize(const CvArr *arr)
 Returns size of matrix or image ROI. More...
 
 CVAPI (CvTermCriteria) cvCheckTermCriteria(CvTermCriteria criteria
 
CV_INLINE void cvSubS (const CvArr *src, CvScalar value, CvArr *dst, const CvArr *mask CV_DEFAULT(NULL))
 
 CVAPI (float) cvFastArctan(float y
 
CvRNG double iter_factor CV_DEFAULT (1.))
 
CvMat int maxiter CV_DEFAULT (20)
 
CvMat int maxiter int fig CV_DEFAULT (100))
 
CvArr int method CV_DEFAULT (CV_LU))
 
CvArr CvArr double eps int lowindex CV_DEFAULT (-1)
 
CvScalar value CV_DEFAULT (cvRealScalar(1)))
 
const CvArr *arr2 int norm_type CV_DEFAULT (CV_L2)
 
CvArr double a double b CV_DEFAULT (0.)
 
CvArr int dim int op CV_DEFAULT (CV_REDUCE_SUM))
 
 CVAPI (CvMemStorage *) cvCreateMemStorage(int block_size CV_DEFAULT(0))
 
 CVAPI (CvSeq *) cvCreateSeq(int seq_flags
 Releases contour scanner and returns pointer to the first outer contour. More...
 
 CVAPI (schar *) cvSeqPush(CvSeq *seq
 
void CvSlice slice CV_DEFAULT (CV_WHOLE_SEQ))
 
CV_INLINE CvSeqcvCloneSeq (const CvSeq *seq, CvMemStorage *storage CV_DEFAULT(NULL))
 
 CVAPI (CvSet *) cvCreateSet(int set_flags
 
CV_INLINE CvSetElemcvSetNew (CvSet *set_header)
 
CV_INLINE void cvSetRemoveByPtr (CvSet *set_header, void *elem)
 
CV_INLINE CvSetElemcvGetSetElem (const CvSet *set_header, int idx)
 
 CVAPI (CvGraph *) cvCreateGraph(int graph_flags
 
 CVAPI (CvGraphEdge *) cvFindGraphEdge(const CvGraph *graph
 
 CVAPI (CvGraphScanner *) cvCreateGraphScanner(CvGraph *graph
 
CvGraphVtx *vtx int mask CV_DEFAULT (CV_GRAPH_ALL_ITEMS))
 
 CVAPI (int64) cvGetTickCount(void)
 
 CVAPI (const char *) cvErrorStr(int status)
 
 CVAPI (CvErrorCallback) cvRedirectError(CvErrorCallback error_handler
 
CV_INLINE CvRNG cvRNG (int64 seed CV_DEFAULT(-1))
 Initializes a random number generator state. More...
 
CV_INLINE unsigned cvRandInt (CvRNG *rng)
 Returns a 32-bit unsigned integer and updates RNG. More...
 
CV_INLINE double cvRandReal (CvRNG *rng)
 Returns a floating-point random number and updates RNG. More...
 
CV_INLINE IplImage cvIplImage ()
 
CV_INLINE CvMat cvMat (int rows, int cols, int type, void *data CV_DEFAULT(NULL))
 
CV_INLINE double cvmGet (const CvMat *mat, int row, int col)
 Returns the particular element of single-channel floating-point matrix. More...
 
CV_INLINE void cvmSet (CvMat *mat, int row, int col, double value)
 Sets a specific element of a single-channel floating-point matrix. More...
 
CV_INLINE int cvIplDepth (int type)
 
CV_INLINE CvMatND cvMatND ()
 
CV_INLINE CvRect cvRect (int x, int y, int width, int height)
 
CV_INLINE IplROI cvRectToROI (CvRect rect, int coi)
 
CV_INLINE CvRect cvROIToRect (IplROI roi)
 
CV_INLINE CvTermCriteria cvTermCriteria (int type, int max_iter, double epsilon)
 
CV_INLINE CvPoint cvPoint (int x, int y)
 
CV_INLINE CvPoint2D32f cvPoint2D32f (double x, double y)
 
CV_INLINE CvPoint2D32f cvPointTo32f (CvPoint point)
 
CV_INLINE CvPoint cvPointFrom32f (CvPoint2D32f point)
 
CV_INLINE CvPoint3D32f cvPoint3D32f (double x, double y, double z)
 
CV_INLINE CvPoint2D64f cvPoint2D64f (double x, double y)
 
CV_INLINE CvPoint3D64f cvPoint3D64f (double x, double y, double z)
 
CV_INLINE CvSize cvSize (int width, int height)
 
CV_INLINE CvSize2D32f cvSize2D32f (double width, double height)
 
CV_INLINE CvSlice cvSlice (int start, int end)
 
CV_INLINE CvScalar cvScalar (double val0, double val1 CV_DEFAULT(0), double val2 CV_DEFAULT(0), double val3 CV_DEFAULT(0))
 
CV_INLINE CvScalar cvRealScalar (double val0)
 
CV_INLINE CvScalar cvScalarAll (double val0123)
 

Variables

int depth
 
int int channels
 
CvSize size
 
int coi
 
CvRect rect
 
int cols
 
int int type
 
int rows
 
CvMatsubmat
 
CvMat int start_row
 
CvMat int int end_row
 
CvMat int start_col
 
CvMat int int end_col
 
void * data
 
int CvScalarscalar
 
const int * sizes
 
int dims
 
CvSparseMatIteratormat_iterator
 
CvArr ** arrs
 
CvArr const CvArrmask
 
CvArr const CvArr CvMatNDstubs
 
CvArr const CvArr CvMatND CvNArrayIteratorarray_iterator
 
int index
 
int idx0
 
int int idx1
 
int int int idx2
 
const int * idx
 
int CvScalar value
 
CvMatheader
 
IplImageimage_header
 
int sizeof_header
 
int CvArr int new_cn
 
int CvArr int int new_dims
 
int CvArr int int int * new_sizes
 
CvArrdst
 
void int step
 
CvArrdst0
 
CvArr CvArrdst1
 
CvArr CvArr CvArrdst2
 
CvArr CvArr CvArr CvArrdst3
 
const CvArrsrc1
 
const CvArr const CvArrsrc2
 
const CvArr const CvArr const CvArrsrc3
 
int src_count
 
int CvArr int dst_count
 
int CvArr int const int * from_to
 
int CvArr int const int int pair_count
 
double default_eps
 
double int default_max_iters
 
CvScalar scale
 
double alpha
 
double const CvArr double beta
 
double const CvArr double double gamma
 
const CvArrlower
 
const CvArr const CvArrupper
 
const CvArr CvArr int cmp_op
 
const CvArry
 
const CvArr CvArrmagnitude
 
const CvArrangle
 
const CvArr CvArrx
 
CvArr double power
 
CvArrarr
 
CvArr int dist_type
 
CvArr int CvScalar param1
 
CvArr int CvScalar CvScalar param2
 
CvRNGrng
 
CvMatroots
 
CvMatroots2
 
CvArr const CvMattransmat
 
CvArr const CvMatmat
 
CvArr int order
 
CvArrW
 
const CvArrU
 
const CvArr const CvArrV
 
const CvArr const CvArr const CvArrB
 
const CvArr const CvArr const CvArr CvArrX
 
const CvArr const CvArr const CvArr CvArr int flags
 
CvArrevects
 
CvArr CvArrevals
 
double start
 
double double end
 
int count
 
int CvArrcov_mat
 
int CvArr CvArravg
 
CvArrmean
 
CvArr CvArreigenvals
 
CvArr CvArr CvArreigenvects
 
const CvArr const CvArr CvArrresult
 
const CvArrvec2
 
CvScalar CvScalarstd_dev
 
double * min_val
 
double double * max_val
 
const CvSeqseq
 
CvMemStoragePospos
 
size_t header_size
 
size_t size_t elem_size
 
size_t size_t CvMemStoragestorage
 
int delta_elems
 
const void * elements
 
int before_index
 
const void * element
 
CvSeqWriterwriter
 
CvSeqReaderreader
 
int int void int total
 
int int void int CvSeq CvSeqBlockblock
 
CvSlice slice
 
int const CvArrfrom_arr
 
CvCmpFunc func
 
const void * elem
 
const void CvCmpFunc int is_sorted
 
const void CvCmpFunc int int * elem_idx
 
CvMemStorage CvSeq ** labels
 
CvMemStorage CvSeq CvCmpFunc is_equal
 
CvMemStorage CvSeq CvCmpFunc void * userdata
 
int direction
 
int int vtx_size
 
int int int edge_size
 
CvGraphVtxvtx
 
int start_idx
 
int int end_idx
 
CvGraphVtxstart_vtx
 
CvGraphVtx CvGraphVtxend_vtx
 
int vtx_idx
 
CvArr const CvArrlut
 
const void * first
 
const void int max_level
 
void * parent
 
void void * frame
 
int cluster_count
 
int CvArr CvTermCriteria termcrit
 
Cv_iplAllocateImageData allocate_data
 
Cv_iplAllocateImageData Cv_iplDeallocate deallocate
 
Cv_iplAllocateImageData Cv_iplDeallocate Cv_iplCreateROI create_roi
 
Cv_iplAllocateImageData Cv_iplDeallocate Cv_iplCreateROI Cv_iplCloneImage clone_image
 
const char * func_name
 
const char const char * err_msg
 
const char const char const char * file_name
 
const char const char const char int line
 
const char ** description
 
const char const char ** filename
 

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
typedef struct CvGraphEdge CvGraphEdge
 
typedef struct CvGraphVtx CvGraphVtx
 
typedef struct CvGraphVtx2D CvGraphVtx2D
 
typedef struct CvGraph CvGraph
 
#define CV_GRAPH_EDGE_FIELDS()
 
#define CV_GRAPH_VERTEX_FIELDS()
 
#define CV_GRAPH_FIELDS()
 
#define CV_TYPE_NAME_GRAPH   "opencv-graph"
 

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
 

Detailed Description

Macro Definition Documentation

◆ __CV_BEGIN__

#define __CV_BEGIN__   {

◆ __CV_END__

#define __CV_END__   goto exit; exit: ; }

◆ __CV_EXIT__

#define __CV_EXIT__   goto exit

◆ CV_ARE_CNS_EQ

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

◆ CV_ARE_DEPTHS_EQ

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

◆ CV_ARE_SIZES_EQ

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

◆ CV_ARE_TYPES_EQ

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

◆ CV_ASSERT

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

Runtime assertion macro

◆ CV_AUTO_STEP

#define CV_AUTO_STEP   0x7fffffff

◆ CV_AUTOSTEP

#define CV_AUTOSTEP   0x7fffffff

◆ CV_BACK

#define CV_BACK   0

◆ CV_C

#define CV_C   1

◆ CV_CALL

#define CV_CALL (   Func)
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 ( )
Value:
{ \
if( cvGetErrStatus() < 0 ) \
CV_ERROR( CV_StsBackTrace, "Inner function failed." ); \
}
@ CV_StsBackTrace
Definition: types_c.h:140

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

◆ CV_CHECK_RANGE

#define CV_CHECK_RANGE   1

◆ CV_CHOLESKY

#define CV_CHOLESKY   3

◆ CV_CMP_EQ

#define CV_CMP_EQ   0

◆ CV_CMP_GE

#define CV_CMP_GE   2

◆ CV_CMP_GT

#define CV_CMP_GT   1

◆ CV_CMP_LE

#define CV_CMP_LE   4

◆ CV_CMP_LT

#define CV_CMP_LT   3

◆ CV_CMP_NE

#define CV_CMP_NE   5

◆ CV_CONTOUR_FIELDS

#define CV_CONTOUR_FIELDS ( )
Value:
CvRect rect; \
int color; \
int reserved[3];
#define CV_SEQUENCE_FIELDS()
Definition: types_c.h:1537
CvRect rect
Definition: core_c.h:193
CvPoint CvPoint CvScalar color
Definition: imgproc_c.h:968

◆ CV_COVAR_COLS

#define CV_COVAR_COLS   16

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

◆ CV_COVAR_NORMAL

#define CV_COVAR_NORMAL   1

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

◆ CV_COVAR_ROWS

#define CV_COVAR_ROWS   8

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

◆ CV_COVAR_SCALE

#define CV_COVAR_SCALE   4

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

◆ CV_COVAR_SCRAMBLED

#define CV_COVAR_SCRAMBLED   0

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

◆ CV_COVAR_USE_AVG

#define CV_COVAR_USE_AVG   2

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)))

◆ CV_DIFF

#define CV_DIFF   16

◆ CV_DIFF_C

#define CV_DIFF_C   (CV_DIFF | CV_C)

◆ CV_DIFF_L1

#define CV_DIFF_L1   (CV_DIFF | CV_L1)

◆ CV_DIFF_L2

#define CV_DIFF_L2   (CV_DIFF | CV_L2)

◆ CV_DXT_FORWARD

#define CV_DXT_FORWARD   0

◆ CV_DXT_INV_SCALE

#define CV_DXT_INV_SCALE   (CV_DXT_INVERSE + CV_DXT_SCALE)

◆ CV_DXT_INVERSE

#define CV_DXT_INVERSE   1

◆ CV_DXT_INVERSE_SCALE

#define CV_DXT_INVERSE_SCALE   CV_DXT_INV_SCALE

◆ CV_DXT_MUL_CONJ

#define CV_DXT_MUL_CONJ   8

conjugate the second argument of cvMulSpectrums

◆ CV_DXT_ROWS

#define CV_DXT_ROWS   4

transform each row individually

◆ CV_DXT_SCALE

#define CV_DXT_SCALE   2

divide result by size of array

◆ CV_ErrModeLeaf

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

◆ CV_ErrModeParent

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

◆ CV_ErrModeSilent

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

◆ CV_ERROR

#define CV_ERROR (   Code,
  Msg 
)
Value:
{ \
cvError( (Code), cvFuncName, Msg, __FILE__, __LINE__ ); \
__CV_EXIT__; \
}

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

◆ CV_FUNCNAME

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

CV_FUNCNAME macro defines icvFuncName constant which is used by CV_ERROR macro

◆ CV_GEMM_A_T

#define CV_GEMM_A_T   1

◆ CV_GEMM_B_T

#define CV_GEMM_B_T   2

◆ CV_GEMM_C_T

#define CV_GEMM_C_T   4

◆ CV_GET_SEQ_ELEM

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

◆ CV_GRAPH

#define CV_GRAPH   CV_SEQ_KIND_GRAPH

◆ CV_GRAPH_ALL_ITEMS

#define CV_GRAPH_ALL_ITEMS   -1

◆ CV_GRAPH_ANY_EDGE

#define CV_GRAPH_ANY_EDGE   30

◆ CV_GRAPH_BACK_EDGE

#define CV_GRAPH_BACK_EDGE   4

◆ CV_GRAPH_BACKTRACKING

#define CV_GRAPH_BACKTRACKING   64

◆ CV_GRAPH_CROSS_EDGE

#define CV_GRAPH_CROSS_EDGE   16

◆ CV_GRAPH_EDGE_FIELDS

#define CV_GRAPH_EDGE_FIELDS ( )
Value:
int flags; \
float weight; \
struct CvGraphEdge* next[2]; \
struct CvGraphVtx* vtx[2];
CvGraphVtx * vtx
Definition: core_c.h:1791
const CvArr const CvArr const CvArr CvArr int flags
Definition: core_c.h:1342
T next(T... args)
Definition: types_c.h:1635
Definition: types_c.h:1641

◆ CV_GRAPH_FIELDS

#define CV_GRAPH_FIELDS ( )
Value:
CvSet* edges;
#define CV_SET_FIELDS()
Definition: types_c.h:1582
CvArr * edges
Definition: imgproc_c.h:860

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)

flags for graphs

◆ CV_GRAPH_FORWARD_EDGE

#define CV_GRAPH_FORWARD_EDGE   8

◆ CV_GRAPH_FORWARD_EDGE_FLAG

#define CV_GRAPH_FORWARD_EDGE_FLAG   (1 << 28)

◆ CV_GRAPH_ITEM_VISITED_FLAG

#define CV_GRAPH_ITEM_VISITED_FLAG   (1 << 30)

flags for graph vertices and edges

◆ CV_GRAPH_NEW_TREE

#define CV_GRAPH_NEW_TREE   32

◆ CV_GRAPH_OVER

#define CV_GRAPH_OVER   -1

◆ CV_GRAPH_SEARCH_TREE_NODE_FLAG

#define CV_GRAPH_SEARCH_TREE_NODE_FLAG   (1 << 29)

◆ CV_GRAPH_TREE_EDGE

#define CV_GRAPH_TREE_EDGE   2

◆ CV_GRAPH_VERTEX

#define CV_GRAPH_VERTEX   1

◆ CV_GRAPH_VERTEX_FIELDS

#define CV_GRAPH_VERTEX_FIELDS ( )
Value:
int flags; \
struct CvGraphEdge* first;
const void * first
Definition: core_c.h:1906

◆ CV_HIST_ARRAY

#define CV_HIST_ARRAY   0

◆ CV_HIST_HAS_RANGES

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

◆ CV_HIST_MAGIC_VAL

#define CV_HIST_MAGIC_VAL   0x42450000

◆ CV_HIST_RANGES_FLAG

#define CV_HIST_RANGES_FLAG   (1 << 11)

indicates whether bin ranges are set already or not

◆ CV_HIST_SPARSE

#define CV_HIST_SPARSE   1

◆ CV_HIST_TREE

#define CV_HIST_TREE   CV_HIST_SPARSE

◆ CV_HIST_UNIFORM

#define CV_HIST_UNIFORM   1

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)

◆ CV_IABS

#define CV_IABS (   a)    (((a) ^ ((a) < 0 ? -1 : 0)) - ((a) < 0 ? -1 : 0))

absolute value without jumps

◆ CV_IMAGE_ELEM

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

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

◆ CV_IS_GRAPH

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

◆ CV_IS_GRAPH_EDGE_VISITED

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

◆ CV_IS_GRAPH_ORIENTED

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

◆ CV_IS_GRAPH_VERTEX_VISITED

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

◆ CV_IS_HIST

#define CV_IS_HIST (   hist)
Value:
((hist) != NULL && \
(hist)->bins != NULL)
#define CV_HIST_MAGIC_VAL
Definition: types_c.h:787
#define CV_MAGIC_MASK
Definition: types_c.h:434
int CvHistogram * hist
Definition: imgproc_c.h:653
Definition: types_c.h:802

◆ CV_IS_IMAGE

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

◆ CV_IS_IMAGE_HDR

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

◆ CV_IS_MASK_ARR

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

◆ CV_IS_MAT

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

◆ CV_IS_MAT_CONST

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

◆ CV_IS_MAT_HDR

#define CV_IS_MAT_HDR (   mat)
Value:
((mat) != NULL && \
(((const CvMat*)(mat))->type & CV_MAGIC_MASK) == CV_MAT_MAGIC_VAL && \
((const CvMat*)(mat))->cols > 0 && ((const CvMat*)(mat))->rows > 0)
int rows
Definition: core_c.h:257
CvArr const CvMat * mat
Definition: core_c.h:1308
#define CV_MAT_MAGIC_VAL
Definition: types_c.h:435
Definition: types_c.h:455

◆ CV_IS_MAT_HDR_Z

#define CV_IS_MAT_HDR_Z (   mat)
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_IS_MATND

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

◆ CV_IS_MATND_HDR

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

◆ CV_IS_SEQ

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

◆ CV_IS_SEQ_CHAIN

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

◆ CV_IS_SEQ_CHAIN_CONTOUR

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

◆ CV_IS_SEQ_CLOSED

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

◆ 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)))

◆ CV_IS_SEQ_CONVEX

#define CV_IS_SEQ_CONVEX (   seq)    0

◆ CV_IS_SEQ_CURVE

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

◆ CV_IS_SEQ_HOLE

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

◆ CV_IS_SEQ_INDEX

#define CV_IS_SEQ_INDEX (   seq)
Value:
#define CV_SEQ_KIND_GENERIC
Definition: types_c.h:1726
#define CV_SEQ_KIND(seq)
Definition: types_c.h:1770
const CvSeq * seq
Definition: core_c.h:1548
#define CV_SEQ_ELTYPE(seq)
Definition: types_c.h:1769
#define CV_SEQ_ELTYPE_INDEX
Definition: types_c.h:1715

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))

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)

◆ CV_IS_SEQ_POLYGON

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

◆ CV_IS_SEQ_POLYGON_TREE

#define CV_IS_SEQ_POLYGON_TREE (   seq)
Value:
CV_SEQ_KIND( seq ) == CV_SEQ_KIND_BIN_TREE )
#define CV_SEQ_KIND_BIN_TREE
Definition: types_c.h:1728
#define CV_SEQ_ELTYPE_TRIAN_ATR
Definition: types_c.h:1718

◆ CV_IS_SEQ_POLYLINE

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

◆ CV_IS_SEQ_SIMPLE

#define CV_IS_SEQ_SIMPLE (   seq)    1

◆ CV_IS_SET

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

◆ CV_IS_SET_ELEM

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

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)

◆ CV_IS_SPARSE_MAT

#define CV_IS_SPARSE_MAT (   mat)     CV_IS_SPARSE_MAT_HDR(mat)

◆ CV_IS_SPARSE_MAT_HDR

#define CV_IS_SPARSE_MAT_HDR (   mat)
Value:
((mat) != NULL && \
#define CV_SPARSE_MAT_MAGIC_VAL
Definition: types_c.h:725
Definition: types_c.h:731

◆ CV_IS_STORAGE

#define CV_IS_STORAGE (   storage)
Value:
((storage) != NULL && \
size_t size_t CvMemStorage * storage
Definition: core_c.h:1587
#define CV_STORAGE_MAGIC_VAL
Definition: types_c.h:1479
Definition: types_c.h:1482

◆ CV_IS_SUBDIV2D

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

◆ CV_IS_UNIFORM_HIST

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

◆ CV_KMEANS_USE_INITIAL_LABELS

#define CV_KMEANS_USE_INITIAL_LABELS   1

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

◆ CV_L2

#define CV_L2   4

◆ CV_LU

#define CV_LU   0

◆ CV_MAGIC_MASK

#define CV_MAGIC_MASK   0xFFFF0000

◆ CV_MAT_ELEM

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

◆ 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) )

◆ CV_MAT_ELEM_PTR_FAST

#define CV_MAT_ELEM_PTR_FAST (   mat,
  row,
  col,
  pix_size 
)
Value:
(assert( (unsigned)(row) < (unsigned)(mat).rows && \
(unsigned)(col) < (unsigned)(mat).cols ), \
(mat).data.ptr + (size_t)(mat).step*(row) + (pix_size)*(col))
int cols
Definition: core_c.h:221
void int step
Definition: core_c.h:905
void * data
Definition: core_c.h:427

◆ CV_MAT_MAGIC_VAL

#define CV_MAT_MAGIC_VAL   0x42420000

◆ CV_MATND_MAGIC_VAL

#define CV_MATND_MAGIC_VAL   0x42430000

◆ CV_MAX_ARR

#define CV_MAX_ARR   10

◆ CV_MINMAX

#define CV_MINMAX   32

◆ CV_NEXT_GRAPH_EDGE

#define CV_NEXT_GRAPH_EDGE (   edge,
  vertex 
)
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 
)
Value:
{ \
if( ((reader).ptr += (elem_size)) >= (reader).block_max ) \
{ \
cvChangeSeqBlock( &(reader), 1 ); \
} \
}
CvSeqReader * reader
Definition: core_c.h:1668
size_t size_t elem_size
Definition: core_c.h:1587

Move reader position forward:

◆ CV_NO_CN_CHECK

#define CV_NO_CN_CHECK   2

◆ CV_NO_DEPTH_CHECK

#define CV_NO_DEPTH_CHECK   1

◆ CV_NO_SIZE_CHECK

#define CV_NO_SIZE_CHECK   4

◆ CV_NODE_IDX

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

◆ CV_NODE_VAL

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

◆ CV_NORM_MASK

#define CV_NORM_MASK   7

◆ CV_NORMAL

#define CV_NORMAL   16

◆ CV_ORIENTED_GRAPH

#define CV_ORIENTED_GRAPH   (CV_SEQ_KIND_GRAPH|CV_GRAPH_FLAG_ORIENTED)

◆ CV_PCA_DATA_AS_COL

#define CV_PCA_DATA_AS_COL   1

◆ CV_PCA_DATA_AS_ROW

#define CV_PCA_DATA_AS_ROW   0

◆ CV_PCA_USE_AVG

#define CV_PCA_USE_AVG   2

◆ CV_PREV_POINT

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

◆ CV_PREV_SEQ_ELEM

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

Move reader position backward:

◆ CV_QR

#define CV_QR   4

◆ CV_RAND_NORMAL

#define CV_RAND_NORMAL   1

◆ CV_RAND_UNI

#define CV_RAND_UNI   0

◆ CV_READ_CHAIN_POINT

#define CV_READ_CHAIN_POINT (   _pt,
  reader 
)
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]; \
} \
}
CvPoint2D32f pt[4]
Definition: imgproc_c.h:571
CvArr int code
Definition: imgproc_c.h:203
float x
Definition: types_c.h:978
float y
Definition: types_c.h:979

◆ CV_READ_EDGE

#define CV_READ_EDGE (   pt1,
  pt2,
  reader 
)
Value:
{ \
assert( sizeof(pt1) == sizeof(CvPoint) && \
sizeof(pt2) == sizeof(CvPoint) && \
reader.seq->elem_size == sizeof(CvPoint)); \
(reader).prev_elem = (reader).ptr; \
CV_NEXT_SEQ_ELEM( sizeof(CvPoint), (reader)); \
}
#define CV_PREV_POINT(reader)
Definition: types_c.h:1953
#define CV_CURRENT_POINT(reader)
Definition: types_c.h:1952
CvPoint pt1
Definition: imgproc_c.h:357
CvPoint CvPoint pt2
Definition: imgproc_c.h:357
Definition: types_c.h:935

◆ CV_READ_SEQ_ELEM

#define CV_READ_SEQ_ELEM (   elem,
  reader 
)
Value:
{ \
assert( (reader).seq->elem_size == sizeof(elem)); \
memcpy( &(elem), (reader).ptr, sizeof((elem))); \
CV_NEXT_SEQ_ELEM( sizeof(elem), reader ) \
}
const void * elem
Definition: core_c.h:1715

Read element and move read position forward:

◆ CV_REDUCE_AVG

#define CV_REDUCE_AVG   1

◆ CV_REDUCE_MAX

#define CV_REDUCE_MAX   2

◆ CV_REDUCE_MIN

#define CV_REDUCE_MIN   3

◆ CV_REDUCE_SUM

#define CV_REDUCE_SUM   0

◆ CV_RELATIVE

#define CV_RELATIVE   8

◆ CV_RELATIVE_C

#define CV_RELATIVE_C   (CV_RELATIVE | CV_C)

◆ CV_RELATIVE_L1

#define CV_RELATIVE_L1   (CV_RELATIVE | CV_L1)

◆ CV_RELATIVE_L2

#define CV_RELATIVE_L2   (CV_RELATIVE | CV_L2)

◆ CV_REV_READ_SEQ_ELEM

#define CV_REV_READ_SEQ_ELEM (   elem,
  reader 
)
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

◆ CV_SEQ_CHAIN

#define CV_SEQ_CHAIN   (CV_SEQ_KIND_CURVE | CV_SEQ_ELTYPE_CODE)

chain-coded curves

◆ CV_SEQ_CHAIN_CONTOUR

#define CV_SEQ_CHAIN_CONTOUR   (CV_SEQ_FLAG_CLOSED | CV_SEQ_CHAIN)

◆ CV_SEQ_CONNECTED_COMP

#define CV_SEQ_CONNECTED_COMP   (CV_SEQ_KIND_GENERIC | CV_SEQ_ELTYPE_CONNECTED_COMP)

sequence of the connected components

◆ CV_SEQ_CONTOUR

#define CV_SEQ_CONTOUR   CV_SEQ_POLYGON

◆ CV_SEQ_ELEM

#define CV_SEQ_ELEM (   seq,
  elem_type,
  index 
)
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) )))
int index
Definition: core_c.h:634
Definition: types_c.h:1508
Definition: types_c.h:1558

◆ CV_SEQ_ELTYPE

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

◆ CV_SEQ_ELTYPE_BITS

#define CV_SEQ_ELTYPE_BITS   12

◆ CV_SEQ_ELTYPE_CODE

#define CV_SEQ_ELTYPE_CODE   CV_8UC1

freeman code: 0..7

◆ CV_SEQ_ELTYPE_CONNECTED_COMP

#define CV_SEQ_ELTYPE_CONNECTED_COMP   0

connected component

◆ CV_SEQ_ELTYPE_GENERIC

#define CV_SEQ_ELTYPE_GENERIC   0

◆ CV_SEQ_ELTYPE_GRAPH_EDGE

#define CV_SEQ_ELTYPE_GRAPH_EDGE   0

&next_o, &next_d, &vtx_o, &vtx_d

◆ CV_SEQ_ELTYPE_GRAPH_VERTEX

#define CV_SEQ_ELTYPE_GRAPH_VERTEX   0

first_edge, &(x,y)

◆ CV_SEQ_ELTYPE_INDEX

#define CV_SEQ_ELTYPE_INDEX   CV_32SC1

#(x,y)

◆ CV_SEQ_ELTYPE_MASK

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

◆ CV_SEQ_ELTYPE_POINT

#define CV_SEQ_ELTYPE_POINT   CV_32SC2

(x,y)

◆ CV_SEQ_ELTYPE_POINT3D

#define CV_SEQ_ELTYPE_POINT3D   CV_32FC3

(x,y,z)

◆ CV_SEQ_ELTYPE_PPOINT

#define CV_SEQ_ELTYPE_PPOINT   CV_SEQ_ELTYPE_PTR

&(x,y)

◆ CV_SEQ_ELTYPE_PTR

#define CV_SEQ_ELTYPE_PTR   CV_MAKE_TYPE(CV_8U, 8 /*sizeof(void*)*/)

◆ CV_SEQ_ELTYPE_TRIAN_ATR

#define CV_SEQ_ELTYPE_TRIAN_ATR   0

vertex of the binary tree

◆ CV_SEQ_FLAG_CLOSED

#define CV_SEQ_FLAG_CLOSED   (1 << CV_SEQ_FLAG_SHIFT)

flags for curves

◆ CV_SEQ_FLAG_CONVEX

#define CV_SEQ_FLAG_CONVEX   (0 << CV_SEQ_FLAG_SHIFT)

◆ CV_SEQ_FLAG_HOLE

#define CV_SEQ_FLAG_HOLE   (2 << CV_SEQ_FLAG_SHIFT)

◆ CV_SEQ_FLAG_SHIFT

#define CV_SEQ_FLAG_SHIFT   (CV_SEQ_KIND_BITS + CV_SEQ_ELTYPE_BITS)

◆ CV_SEQ_FLAG_SIMPLE

#define CV_SEQ_FLAG_SIMPLE   (0 << CV_SEQ_FLAG_SHIFT)

◆ CV_SEQ_INDEX

#define CV_SEQ_INDEX   (CV_SEQ_KIND_GENERIC | CV_SEQ_ELTYPE_INDEX)

sequence of the integer numbers

◆ CV_SEQ_KIND

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

◆ CV_SEQ_KIND_BIN_TREE

#define CV_SEQ_KIND_BIN_TREE   (2 << CV_SEQ_ELTYPE_BITS)

◆ CV_SEQ_KIND_BITS

#define CV_SEQ_KIND_BITS   2

◆ CV_SEQ_KIND_CURVE

#define CV_SEQ_KIND_CURVE   (1 << CV_SEQ_ELTYPE_BITS)

◆ CV_SEQ_KIND_GENERIC

#define CV_SEQ_KIND_GENERIC   (0 << CV_SEQ_ELTYPE_BITS)

types of sequences

◆ CV_SEQ_KIND_GRAPH

#define CV_SEQ_KIND_GRAPH   (1 << CV_SEQ_ELTYPE_BITS)

types of sparse sequences (sets)

◆ CV_SEQ_KIND_MASK

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

◆ CV_SEQ_KIND_SUBDIV2D

#define CV_SEQ_KIND_SUBDIV2D   (2 << CV_SEQ_ELTYPE_BITS)

◆ CV_SEQ_MAGIC_VAL

#define CV_SEQ_MAGIC_VAL   0x42990000

◆ CV_SEQ_POINT3D_SET

#define CV_SEQ_POINT3D_SET   (CV_SEQ_KIND_GENERIC| CV_SEQ_ELTYPE_POINT3D)

◆ CV_SEQ_POINT_SET

#define CV_SEQ_POINT_SET   (CV_SEQ_KIND_GENERIC| CV_SEQ_ELTYPE_POINT)

point sets

◆ CV_SEQ_POLYGON

#define CV_SEQ_POLYGON   (CV_SEQ_FLAG_CLOSED | CV_SEQ_POLYLINE )

◆ CV_SEQ_POLYGON_TREE

#define CV_SEQ_POLYGON_TREE   (CV_SEQ_KIND_BIN_TREE | CV_SEQ_ELTYPE_TRIAN_ATR)

binary tree for the contour

◆ CV_SEQ_POLYLINE

#define CV_SEQ_POLYLINE   (CV_SEQ_KIND_CURVE | CV_SEQ_ELTYPE_POINT)

◆ CV_SEQ_READER_FIELDS

#define CV_SEQ_READER_FIELDS ( )
Value:
int header_size; \
CvSeq* seq; \
CvSeqBlock* block; \
schar* ptr; \
schar* block_min; \
schar* block_max; \
int delta_index; \
schar* prev_elem;
int int void int CvSeq CvSeqBlock * block
Definition: core_c.h:1690
size_t header_size
Definition: core_c.h:1586

pointer to previous element

◆ CV_SEQ_SIMPLE_POLYGON

#define CV_SEQ_SIMPLE_POLYGON   (CV_SEQ_FLAG_SIMPLE | CV_SEQ_POLYGON )

◆ CV_SEQ_WRITER_FIELDS

#define CV_SEQ_WRITER_FIELDS ( )
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 ( )
Value:
int total; \
int elem_size; \
schar* block_max; \
schar* ptr; \
int delta_elems; \
CvMemStorage* storage; \
CvSeqBlock* free_blocks; \
CvSeqBlock* first;
int int void int total
Definition: core_c.h:1689
int delta_elems
Definition: core_c.h:1591
#define CV_TREE_NODE_FIELDS(node_type)
Definition: types_c.h:1519

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)
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))

◆ CV_SET_ELEM_IDX_MASK

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

◆ CV_SET_FIELDS

#define CV_SET_FIELDS ( )
Value:
CvSetElem* free_elems; \
int active_count;

◆ CV_SET_MAGIC_VAL

#define CV_SET_MAGIC_VAL   0x42980000

◆ CV_SORT_ASCENDING

#define CV_SORT_ASCENDING   0

◆ CV_SORT_DESCENDING

#define CV_SORT_DESCENDING   16

◆ CV_SORT_EVERY_COLUMN

#define CV_SORT_EVERY_COLUMN   1

◆ CV_SORT_EVERY_ROW

#define CV_SORT_EVERY_ROW   0

◆ CV_SPARSE_MAT_MAGIC_VAL

#define CV_SPARSE_MAT_MAGIC_VAL   0x42440000

◆ CV_STORAGE_MAGIC_VAL

#define CV_STORAGE_MAGIC_VAL   0x42890000

◆ CV_SVD

#define CV_SVD   1

◆ CV_SVD_MODIFY_A

#define CV_SVD_MODIFY_A   1

◆ CV_SVD_SYM

#define CV_SVD_SYM   2

◆ CV_SVD_U_T

#define CV_SVD_U_T   2

◆ CV_SVD_V_T

#define CV_SVD_V_T   4

◆ CV_TERMCRIT_EPS

#define CV_TERMCRIT_EPS   2

◆ CV_TERMCRIT_ITER

#define CV_TERMCRIT_ITER   1

◆ CV_TERMCRIT_NUMBER

#define CV_TERMCRIT_NUMBER   CV_TERMCRIT_ITER

◆ CV_TREE_NODE_FIELDS

#define CV_TREE_NODE_FIELDS (   node_type)
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 ( )
Value:
cvSetIPLAllocators( iplCreateImageHeader, iplAllocateImage, \
iplDeallocate, iplCreateROI, iplCloneImage )

◆ CV_TYPE_NAME_GRAPH

#define CV_TYPE_NAME_GRAPH   "opencv-graph"

◆ CV_TYPE_NAME_IMAGE

#define CV_TYPE_NAME_IMAGE   "opencv-image"

◆ CV_TYPE_NAME_MAT

#define CV_TYPE_NAME_MAT   "opencv-matrix"

◆ CV_TYPE_NAME_MATND

#define CV_TYPE_NAME_MATND   "opencv-nd-matrix"

◆ CV_TYPE_NAME_SEQ

#define CV_TYPE_NAME_SEQ   "opencv-sequence"

◆ CV_TYPE_NAME_SEQ_TREE

#define CV_TYPE_NAME_SEQ_TREE   "opencv-sequence-tree"

◆ CV_TYPE_NAME_SPARSE_MAT

#define CV_TYPE_NAME_SPARSE_MAT   "opencv-sparse-matrix"

◆ CV_WHOLE_ARR

#define CV_WHOLE_ARR   cvSlice( 0, 0x3fffffff )

◆ CV_WHOLE_SEQ

#define CV_WHOLE_SEQ   cvSlice(0, CV_WHOLE_SEQ_END_INDEX)

◆ CV_WHOLE_SEQ_END_INDEX

#define CV_WHOLE_SEQ_END_INDEX   0x3fffffff

◆ CV_WRITE_SEQ_ELEM

#define CV_WRITE_SEQ_ELEM (   elem,
  writer 
)
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); \
}
CvSeqWriter * writer
Definition: core_c.h:1646

◆ CV_WRITE_SEQ_ELEM_VAR

#define CV_WRITE_SEQ_ELEM_VAR (   elem_ptr,
  writer 
)
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))

◆ cvAXPY

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

◆ cvCheckArray

#define cvCheckArray   cvCheckArr

◆ cvConvert

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

◆ cvCvtScale

#define cvCvtScale   cvConvertScale

◆ cvCvtScaleAbs

#define cvCvtScaleAbs   cvConvertScaleAbs

◆ cvFFT

#define cvFFT   cvDFT

◆ cvFree

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

◆ cvGetGraphVtx

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

Retrieves graph vertex by given index

◆ cvGetSubArr

#define cvGetSubArr   cvGetSubRect

◆ cvGraphEdgeIdx

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

Retrieves index of a graph edge given its pointer

◆ cvGraphFindEdge

#define cvGraphFindEdge   cvFindGraphEdge

◆ cvGraphFindEdgeByPtr

#define cvGraphFindEdgeByPtr   cvFindGraphEdgeByPtr

◆ cvGraphGetEdgeCount

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

◆ cvGraphGetVtxCount

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

◆ cvGraphVtxIdx

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

Retrieves index of a graph vertex given its pointer

◆ cvInv

#define cvInv   cvInvert

◆ cvInvSqrt

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

◆ cvMahalonobis

#define cvMahalonobis   cvMahalanobis

◆ cvMatMul

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

◆ cvMatMulAdd

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

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

◆ cvMatMulAddEx

#define cvMatMulAddEx   cvGEMM

◆ cvMatMulAddS

#define cvMatMulAddS   cvTransform

◆ cvMirror

#define cvMirror   cvFlip

◆ cvReshapeND

#define cvReshapeND (   arr,
  header,
  new_cn,
  new_dims,
  new_sizes 
)
Value:
cvReshapeMatND( (arr), sizeof(*(header)), (header), \
int CvArr int int int * new_sizes
Definition: core_c.h:837
CvMat * header
Definition: core_c.h:782
int CvArr int int new_dims
Definition: core_c.h:837
CvArr * arr
Definition: core_c.h:1247
int CvArr int new_cn
Definition: core_c.h:837

◆ cvScale

#define cvScale   cvConvertScale

◆ cvSqrt

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

◆ cvT

#define cvT   cvTranspose

◆ cvZero

#define cvZero   cvSetZero

◆ IPL2CV_DEPTH

#define IPL2CV_DEPTH (   depth)
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)
#define IPL_DEPTH_SIGN
Definition: types_c.h:269
int depth
Definition: core_c.h:100
#define CV_8S
Definition: interface.h:74
#define CV_64F
Definition: interface.h:79
#define CV_8U
Definition: interface.h:73
#define CV_32F
Definition: interface.h:78
#define CV_16S
Definition: interface.h:76
#define CV_16U
Definition: interface.h:75

◆ IPL_ALIGN_16BYTES

#define IPL_ALIGN_16BYTES   16

◆ IPL_ALIGN_32BYTES

#define IPL_ALIGN_32BYTES   32

◆ IPL_ALIGN_4BYTES

#define IPL_ALIGN_4BYTES   4

◆ IPL_ALIGN_8BYTES

#define IPL_ALIGN_8BYTES   8

◆ IPL_ALIGN_DWORD

#define IPL_ALIGN_DWORD   IPL_ALIGN_4BYTES

◆ IPL_ALIGN_QWORD

#define IPL_ALIGN_QWORD   IPL_ALIGN_8BYTES

◆ IPL_BORDER_CONSTANT

#define IPL_BORDER_CONSTANT   0

◆ IPL_BORDER_REFLECT

#define IPL_BORDER_REFLECT   2

◆ IPL_BORDER_REFLECT_101

#define IPL_BORDER_REFLECT_101   4

extra border mode

◆ IPL_BORDER_REPLICATE

#define IPL_BORDER_REPLICATE   1

◆ IPL_BORDER_TRANSPARENT

#define IPL_BORDER_TRANSPARENT   5

◆ IPL_BORDER_WRAP

#define IPL_BORDER_WRAP   3

◆ IPL_DATA_ORDER_PIXEL

#define IPL_DATA_ORDER_PIXEL   0

◆ IPL_DATA_ORDER_PLANE

#define IPL_DATA_ORDER_PLANE   1

◆ IPL_DEPTH_16S

#define IPL_DEPTH_16S   (IPL_DEPTH_SIGN|16)

◆ IPL_DEPTH_16U

#define IPL_DEPTH_16U   16

◆ IPL_DEPTH_1U

#define IPL_DEPTH_1U   1

◆ IPL_DEPTH_32F

#define IPL_DEPTH_32F   32

◆ IPL_DEPTH_32S

#define IPL_DEPTH_32S   (IPL_DEPTH_SIGN|32)

◆ IPL_DEPTH_64F

#define IPL_DEPTH_64F   64

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

◆ IPL_DEPTH_8S

#define IPL_DEPTH_8S   (IPL_DEPTH_SIGN| 8)

◆ IPL_DEPTH_8U

#define IPL_DEPTH_8U   8

◆ IPL_DEPTH_SIGN

#define IPL_DEPTH_SIGN   0x80000000

◆ IPL_IMAGE_DATA

#define IPL_IMAGE_DATA   2

◆ IPL_IMAGE_HEADER

#define IPL_IMAGE_HEADER   1

◆ IPL_IMAGE_MAGIC_VAL

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

◆ IPL_IMAGE_ROI

#define IPL_IMAGE_ROI   4

◆ IPL_ORIGIN_BL

#define IPL_ORIGIN_BL   1

◆ IPL_ORIGIN_TL

#define IPL_ORIGIN_TL   0

◆ OPENCV_ASSERT

#define OPENCV_ASSERT (   expr,
  func,
  context 
)
Value:
{if (! (expr)) \
CvCmpFunc func
Definition: core_c.h:1712
#define OPENCV_ERROR(status, func, context)
Definition: core_c.h:2655

◆ OPENCV_CALL

#define OPENCV_CALL (   Func)
Value:
{ \
Func; \
}

◆ OPENCV_ERROR

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

Typedef Documentation

◆ Cv_iplAllocateImageData

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

◆ Cv_iplCloneImage

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

◆ Cv_iplCreateImageHeader

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

◆ Cv_iplCreateROI

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

◆ Cv_iplDeallocate

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

◆ CvArr

typedef void CvArr

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.

◆ CvBox2D

typedef struct CvBox2D CvBox2D
See also
RotatedRect

◆ CvChain

typedef struct CvChain CvChain

◆ CvCmpFunc

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

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

◆ CvContour

typedef struct CvContour CvContour

◆ CvErrorCallback

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

◆ CvGraph

typedef struct CvGraph CvGraph

◆ CvGraphEdge

typedef struct CvGraphEdge CvGraphEdge

◆ CvGraphScanner

◆ CvGraphVtx

typedef struct CvGraphVtx CvGraphVtx

◆ CvGraphVtx2D

typedef struct CvGraphVtx2D CvGraphVtx2D

◆ CvHistogram

typedef struct CvHistogram CvHistogram

◆ CvHistType

typedef int CvHistType

◆ CvLineIterator

Line iterator state:

◆ CvMat

typedef struct CvMat CvMat

Matrix elements are stored row by row. Element (i, j) (i - 0-based row index, j - 0-based column index) of a matrix can be retrieved or modified using CV_MAT_ELEM macro:

uchar pixval = CV_MAT_ELEM(grayimg, uchar, i, j)
CV_MAT_ELEM(cameraMatrix, float, 0, 2) = image.width*0.5f;

To access multiple-channel matrices, you can use CV_MAT_ELEM(matrix, type, i, j*nchannels + channel_idx).

Deprecated:
CvMat is now obsolete; consider using Mat instead.

◆ CvMatND

typedef struct CvMatND CvMatND
Deprecated:
consider using cv::Mat instead

◆ CvMemBlock

typedef struct CvMemBlock CvMemBlock

◆ CvMemStorage

typedef struct CvMemStorage CvMemStorage

◆ CvMemStoragePos

◆ CvNArrayIterator

matrix iterator: used for n-ary operations on dense arrays

◆ CvPoint

typedef struct CvPoint CvPoint

◆ CvPoint2D32f

typedef struct CvPoint2D32f CvPoint2D32f

◆ CvPoint2D64f

typedef struct CvPoint2D64f CvPoint2D64f

◆ CvPoint2DSeq

◆ CvPoint3D32f

typedef struct CvPoint3D32f CvPoint3D32f

◆ CvPoint3D64f

typedef struct CvPoint3D64f CvPoint3D64f

◆ CvRect

typedef struct CvRect CvRect
See also
Rect_

◆ CvRNG

typedef uint64 CvRNG

◆ CvScalar

typedef struct CvScalar CvScalar
See also
Scalar_

◆ CvSeq

typedef struct CvSeq CvSeq

◆ CvSeqBlock

typedef struct CvSeqBlock CvSeqBlock

◆ CvSeqReader

typedef struct CvSeqReader CvSeqReader

◆ CvSeqWriter

typedef struct CvSeqWriter CvSeqWriter

◆ CvSet

typedef struct CvSet CvSet

◆ CvSetElem

typedef struct CvSetElem CvSetElem

◆ CvSize

typedef struct CvSize CvSize

◆ CvSize2D32f

typedef struct CvSize2D32f CvSize2D32f

◆ CvSlice

typedef struct CvSlice CvSlice

◆ CvSparseMat

typedef struct CvSparseMat CvSparseMat

◆ CvSparseMatIterator

◆ CvSparseNode

typedef struct CvSparseNode CvSparseNode

◆ CVStatus

typedef int CVStatus

◆ CvTermCriteria

See also
TermCriteria

◆ CvTreeNodeIterator

◆ IplConvKernel

typedef struct _IplConvKernel IplConvKernel

◆ IplConvKernelFP

◆ IplImage

typedef struct _IplImage IplImage

The IplImage is taken from the Intel Image Processing Library, in which the format is native. OpenCV only supports a subset of possible IplImage formats, as outlined in the parameter list above.

In addition to the above restrictions, OpenCV handles ROIs differently. OpenCV functions require that the image size or ROI size of all source and destination images match exactly. On the other hand, the Intel Image Processing Library processes the area of intersection between the source and destination images (or ROIs), allowing them to vary independently.

◆ IplROI

typedef struct _IplROI IplROI

◆ IplTileInfo

typedef struct _IplTileInfo IplTileInfo

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
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

◆ CV_DEFAULT() [1/16]

CvArr int dim CV_DEFAULT ( 1)

◆ CV_DEFAULT() [2/16]

int double double double shear CV_DEFAULT ( )

◆ CV_DEFAULT() [3/16]

CvArr CvArr CvPoint2D32f int double double const CvArr *mask int block_size int use_harris double k CV_DEFAULT ( 0.  )

◆ CV_DEFAULT() [4/16]

CvSeq CvScalar CvScalar int int thickness CV_DEFAULT ( )

◆ CV_DEFAULT() [5/16]

CvArr double a CV_DEFAULT ( 1.  )

◆ CV_DEFAULT() [6/16]

void int double double double param1 double param2 CV_DEFAULT ( 100  )

◆ CV_DEFAULT() [7/16]

CvMat int maxiter CV_DEFAULT ( 20  )

◆ CV_DEFAULT() [8/16]

CvSize int int int origin int align CV_DEFAULT ( )

◆ CV_DEFAULT() [9/16]

int int int void* data int step CV_DEFAULT ( CV_AUTOSTEP  )

◆ CV_DEFAULT() [10/16]

CvGraphVtx* vtx int mask CV_DEFAULT ( CV_GRAPH_ALL_ITEMS  )

◆ CV_DEFAULT() [11/16]

CvArr double a double b int norm_type CV_DEFAULT ( CV_L2  )

◆ CV_DEFAULT() [12/16]

const CvArr CvArr int method CV_DEFAULT ( CV_LU  )

◆ CV_DEFAULT() [13/16]

CvArr int dim int op CV_DEFAULT ( CV_REDUCE_SUM  )

◆ CV_DEFAULT() [14/16]

CvSlice slice CV_DEFAULT ( CV_WHOLE_SEQ  )

◆ CV_DEFAULT() [15/16]

CvScalar value CV_DEFAULT ( cvRealScalar(1)  )

◆ CV_DEFAULT() [16/16]

CvArr CvArr CvPoint2D32f int double double const CvArr *mask CV_DEFAULT ( NULL  )

◆ CVAPI() [1/25]

CVAPI ( const char *  )

Retrieves textual description of the error given its code

◆ CVAPI() [2/25]

CVAPI ( void *  )

Changes the shape of a multi-dimensional array without copying the data.

Makes a clone of an object.

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

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);
CvSize size
Definition: core_c.h:112
#define IPL_DEPTH_8U
Definition: types_c.h:272
CV_INLINE CvSize cvSize(int width, int height)
Definition: types_c.h:1186
Definition: types_c.h:674
Definition: types_c.h:314

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);
#define cvReshapeND(arr, header, new_cn, new_dims, new_sizes)
Definition: core_c.h:839
Parameters
arrInput array
sizeof_headerSize of output header to distinguish between IplImage, CvMat and CvMatND output headers
headerOutput header to be filled
new_cnNew number of channels. new_cn = 0 means that the number of channels remains unchanged.
new_dimsNew number of dimensions. new_dims = 0 means that the number of dimensions remains the same.
new_sizesArray 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.

Fills matrix with given range of numbers

Allocates continuous buffer of the specified size in the storage

Copies sequence content to a continuous piece of memory

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_ptrThe object to clone

◆ CVAPI() [3/25]

CVAPI ( CvErrorCallback  )

Assigns a new error-handling function

◆ CVAPI() [4/25]

CVAPI ( CvGraph )

Creates new graph

Creates a copy of graph

◆ CVAPI() [5/25]

CVAPI ( CvGraphEdge ) const

Find edge connecting two vertices

◆ CVAPI() [6/25]

CVAPI ( CvGraphScanner )

Creates new graph scanner.

◆ CVAPI() [7/25]

CVAPI ( CvMat )

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

Computes perspective transform matrix for mapping src[i] to dst[i] (i=0,1,2,3)

Computes rotation_matrix matrix.

Changes shape of matrix/image without copying data.

Returns matrix header for arbitrary array.

Returns one of array diagonals.

Returns one of more array columns.

Returns array row or row span.

Returns matrix header corresponding to the rectangular sub-array of input image or matrix.

Creates a matrix header and allocates the matrix data.

Initializes a pre-allocated matrix header.

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
rowsNumber of rows in the matrix
colsNumber of columns in the matrix
typeType of the matrix elements, see cvCreateMat

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)
#define cvMatMulAdd(src1, src2, src3, dst)
Definition: core_c.h:1286
#define CV_64FC1
Definition: interface.h:124
Parameters
matA pointer to the matrix header to be initialized
rowsNumber of rows in the matrix
colsNumber of columns in the matrix
typeType of the matrix elements, see cvCreateMat .
dataOptional: data pointer assigned to the matrix header
stepOptional: 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.

The function call is equivalent to the following code:

CvMat* mat = cvCreateMatHeader(rows, cols, type);
cvCreateData(mat);
int int type
Definition: core_c.h:221
Parameters
rowsNumber of rows in the matrix
colsNumber of columns in the matrix
typeThe 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.

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

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
arrInput array
submatPointer to the resultant sub-array header
rectZero-based coordinates of the rectangle of interest

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
arrInput array
submatPointer to the resulting sub-array header
start_rowZero-based index of the starting row (inclusive) of the span
end_rowZero-based index of the ending row (exclusive) of the span
delta_rowIndex 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 .

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
arrInput array
submatPointer to the resulting sub-array header
start_colZero-based index of the starting column (inclusive) of the span
end_colZero-based index of the ending column (exclusive) of the span

The function returns the header, corresponding to a specified diagonal of the input array.

Parameters
arrInput array
submatPointer to the resulting sub-array header
diagIndex 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.

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
arrInput array
headerPointer to CvMat structure used as a temporary buffer
coiOptional output parameter for storing COI
allowNDIf 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.

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
arrInput array
headerOutput header to be filled
new_cnNew number of channels. 'new_cn = 0' means that the number of channels remains unchanged.
new_rowsNew 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.
See also
cv::getRotationMatrix2D
cv::getPerspectiveTransform

◆ CVAPI() [8/25]

CVAPI ( CvMatND )

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

Initializes a pre-allocated multi-dimensional array header.

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

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
dimsNumber of array dimensions
sizesArray of dimension sizes
typeType of array elements, see cvCreateMat

This function call is equivalent to the following code:

CvMatND* mat = cvCreateMatNDHeader(dims, sizes, type);
cvCreateData(mat);
int dims
Definition: core_c.h:464
const int * sizes
Definition: core_c.h:440
Parameters
dimsNumber of array dimensions. This must not exceed CV_MAX_DIM (32 by default, but can be changed at build time).
sizesArray of dimension sizes.
typeType of array elements, see cvCreateMat .
matA pointer to the array header to be initialized
dimsThe number of array dimensions
sizesAn array of dimension sizes
typeType of array elements, see cvCreateMat
dataOptional data pointer assigned to the matrix header

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

◆ CVAPI() [9/25]

CVAPI ( CvMemStorage )

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

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

◆ CVAPI() [10/25]

CVAPI ( CvRect  ) const

Returns the image ROI.

Finds minimum rectangle containing two given rectangles.

If there is no ROI set, cvRect(0,0,image->width,image->height) is returned.

Parameters
imageA pointer to the image header

◆ CVAPI() [11/25]

CVAPI ( CvScalar  ) const

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
arrInput array
idx0The first zero-based component of the element index

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

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

Parameters
arrInput array
idxArray of the element indices

Calculates trace of the matrix (sum of elements on the main diagonal)

Finds sum of array elements

Calculates mean value of array elements

◆ CVAPI() [12/25]

CVAPI ( CvSeq )

Releases contour scanner and returns pointer to the first outer contour.

Finds circles in the image.

Finds lines on binary image using one of several methods.

Initializes sequence header for a matrix (column or row vector) of points.

Finds convexity defects for the contour.

Calculates exact convex hull of 2d point set.

Approximates a single polygonal curve (contour) or a tree of polygonal curves (contours)

Approximates Freeman chain(s) with a polygonal curve.

Allocates string in memory storage Creates new empty sequence that will reside in the specified storage

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

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

Extracts sequence slice (with or without copying sequence elements)

Gathers pointers to all the sequences, accessible from the first, to the single sequence

See also
cvFindContours

This is a standalone contour approximation routine, not represented in the new interface. When cvFindContours retrieves contours as Freeman chains, it calls the function to get approximated contours, represented as polygons.

Parameters
src_seqPointer to the approximated Freeman chain that can refer to other chains.
storageStorage location for the resulting polylines.
methodApproximation method (see the description of the function :ocvFindContours ).
parameterMethod parameter (not used now).
minimal_perimeterApproximates only those contours whose perimeters are not less than minimal_perimeter . Other chains are removed from the resulting structure.
recursiveRecursion flag. If it is non-zero, the function approximates all chains that can be obtained from chain by using the h_next or v_next links. Otherwise, the single input chain is approximated.
See also
cvStartReadChainPoints, cvReadChainPoint
cv::approxPolyDP
cv::convexHull
cv::convexityDefects

a wrapper for cvMakeSeqHeaderForArray (it does not initialize bounding rectangle!!!)

line_storage is either memory storage or 1 x max number of lines CvMat, its number of columns is changed by the function. method is one of CV_HOUGH_*; rho, theta and threshold are used for each of those methods; param1 ~ line length, param2 ~ line gap - for probabilistic, param1 ~ srn, param2 ~ stn - for multi-scale

See also
cv::HoughLines
cv::HoughCircles

◆ CVAPI() [13/25]

CVAPI ( CvSet )

Creates a new set

◆ CVAPI() [14/25]

CVAPI ( CvSize  ) const

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
arrarray header

◆ CVAPI() [15/25]

CVAPI ( CvSparseMat )

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
dimsNumber of array dimensions. In contrast to the dense matrix, the number of dimensions is practically unlimited (up to $2^{16}$ ).
sizesArray of dimension sizes
typeType of array elements. The same as for CvMat

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

◆ CVAPI() [16/25]

CVAPI ( CvSparseNode ) const

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
matInput array
mat_iteratorInitialized iterator

◆ CVAPI() [17/25]

CVAPI ( CvTermCriteria  )

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)

◆ CVAPI() [18/25]

CVAPI ( double  ) const

Return a specific element of single-channel 1D, 2D, 3D or nD array.

Applies fixed-level threshold to grayscale image.

Checks whether the point is inside polygon, outside, on an edge (at a vertex).

Compares two contours by matching their moments.

Calculates area of a contour or contour segment.

Calculates perimeter of a contour or length of a part of contour.

Retrieve normalized central moments.

Retrieve central moments.

Calculates the dot product of two arrays in Euclidean metrics.

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
arrInput array. Must have a single channel.
idx0The first zero-based component of the element index

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

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

Parameters
arrInput array. Must have a single channel.
idxArray of the element indices

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
src1The first source array
src2The second source array

Inverts matrix

Calculates determinant of input matrix

Calculates Mahalanobis(weighted) distance

Finds norm, difference norm or relative difference norm for an array (or two arrays)

See also
ref core_c_NormFlags "flags"
cv::arcLength
cv::contourArea
cv::matchShapes

Returns positive, negative or zero value, correspondingly. Optionally, measures a signed distance between the point and the nearest polygon edge (measure_dist=1)

See also
cv::pointPolygonTest

Compares two histogram

This is a basic operation applied before retrieving contours

See also
cv::threshold

◆ CVAPI() [19/25]

CVAPI ( float  )

Fast arctangent calculation

Fast cubic root calculation

◆ CVAPI() [20/25]

CVAPI ( int  ) const

Returns the index of the channel of interest.

Returns the polygon points which make up the given ellipse.

Initializes line iterator.

Clips the line segment connecting *pt1 and *pt2 by the rectangular window.

Checks whether the contour is convex or not (returns 1 if convex, 0 if not)

Finds minimum enclosing circle for a set of points.

Retrieves outer and optionally inner boundaries of white (non-zero) connected components in the black (zero) background.

Returns array size along the specified dimension.

Return number of array dimensions.

Returns type of array elements.

Returns the channel of interest of in an IplImage. Returned values correspond to the coi in cvSetImageCOI.

Parameters
imageA pointer to the image header

initializes iterator that traverses through several arrays simultaneously (the function together with cvNextArraySlice is used for N-ari element-wise operations)

returns zero value if iteration is finished, non-zero (slice length) otherwise

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
arrInput array

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 i, total = 1;
int dims = cvGetDims(arr, size);
for(i = 0; i < dims; i++ )
total *= sizes[i];
#define CV_MAX_DIM
Definition: cvdef.h:493
Parameters
arrInput array
sizesOptional output vector of the array dimension sizes. For 2d arrays the number of rows (height) goes first, number of columns (width) next.
arrInput array
indexZero-based dimension index (for matrices 0 means number of rows, 1 means number of columns; for images 0 means height, 1 means width)

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

Finds real roots of a cubic equation

Solves linear system (src1)*(dst) = (src2) (returns 0 if src1 is a singular and CV_LU method is used)

Calculates number of non-zero pixels

Finds optimal DFT vector size >= size0

Calculates length of sequence slice (with support of negative indices).

Calculates index of the specified sequence element. Returns -1 if element does not belong to the sequence

Returns current sequence reader position (currently observed sequence element)

Splits sequence into one or more equivalence classes using the specified criteria

Adds new element to the set and returns pointer to it

Adds new vertex to the graph

Removes vertex from the graph together with all incident edges

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

Count number of edges incident to the vertex

Get next graph element

Loads optimized functions from IPP, MKL etc. or switches back to pure C code

retrieve/set the number of threads used in OpenMP implementations

get index of the thread being executed

Get current OpenCV error status

Retrieves current error processing mode

Sets error processing mode, returns previously used mode

Retrieves detailed information about the last error occurred

Maps IPP error codes to the counterparts from OpenCV

Output nothing

Output to console(fprintf(stderr,...))

Output to MessageBox(WIN32)

See also
cv::findContours, cvStartFindContours, cvFindNextContour, cvSubstituteContour, cvEndFindContours
cv::minEnclosingCircle
cv::isContourConvex

(0<=x<img_size.width, 0<=y<img_size.height).

See also
cv::clipLine

Initially, line_iterator->ptr will point to pt1 (or pt2, see left_to_right description) location in the image. Returns the number of pixels on the line between the ending points.

See also
cv::LineIterator

The ellipse is define by the box of size 'axes' rotated 'angle' around the 'center'. A partial sweep of the ellipse arc can be done by specifying arc_start and arc_end to be something other than 0 and 360, respectively. The input array 'pts' must be large enough to hold the result. The total number of points stored into 'pts' is returned by this function.

See also
cv::ellipse2Poly

◆ CVAPI() [21/25]

CVAPI ( int64  )

helper functions for RNG initialization and accurate time measurement: uses internal clock counter on x86

◆ CVAPI() [22/25]

CVAPI ( IplImage )

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

Returns image header for arbitrary array.

Creates an image header and allocates the image data.

Initializes an image header that was previously allocated.

Parameters
sizeImage width and height
depthImage depth (see cvCreateImage )
channelsNumber of channels (see cvCreateImage )

The returned IplImage* points to the initialized header.

Parameters
imageImage header to initialize
sizeImage width and height
depthImage depth (see cvCreateImage )
channelsNumber of channels (see cvCreateImage )
originTop-left IPL_ORIGIN_TL or bottom-left IPL_ORIGIN_BL
alignAlignment for image rows, typically 4 or 8 bytes

This function call is equivalent to the following code:

header = cvCreateImageHeader(size, depth, channels);
cvCreateData(header);
int int channels
Definition: core_c.h:100
Parameters
sizeImage width and height
depthBit depth of image elements. See IplImage for valid depths.
channelsNumber of channels per pixel. See IplImage for details. This function only creates images with interleaved channels.

Creates a copy of IPL image (widthStep may differ)

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
arrInput array
image_headerPointer to IplImage structure used as a temporary buffer

◆ CVAPI() [23/25]

CVAPI ( schar )

Adds new element to the end of sequence. Returns pointer to the element

Adds new element to the beginning of sequence. Returns pointer to it

Inserts a new element in the middle of sequence. cvSeqInsert(seq,0,elem) == cvSeqPushFront(seq,elem)

Retrieves pointer to specified sequence element. Negative indices are supported and mean counting from the end (e.g -1 means the last sequence element)

Finds element in a [sorted] sequence

◆ CVAPI() [24/25]

CVAPI ( uchar ) const

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
arrInput array
idx0The first zero-based component of the element index
typeOptional output parameter: type of matrix elements

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

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

Parameters
arrInput array
idxArray of the element indices
typeOptional output parameter: type of matrix elements
create_nodeOptional 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_hashvalOptional 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)

◆ CVAPI() [25/25]

CVAPI ( void  )

Deallocates an image header.

Draws contour outlines or filled interiors on the image.

Calculates bounding box of text stroke (useful for alignment)

Renders text stroke with specified font and color at specified location. CvFont should be initialized with cvInitFont.

Initializes font structure (OpenCV 1.x API).

Draws one or more polygonal curves.

Fills an area bounded by one or more arbitrary polygons.

Fills convex or monotonous polygon.

Draws ellipse outline, filled ellipse, elliptic arc or filled elliptic sector.

Draws a circle with specified center and radius.

Draws a rectangle specified by a CvRect structure.

Draws a rectangle given two opposite corners of the rectangle (pt1 & pt2)

Draws 4-connected, 8-connected or antialiased line segment connecting two points.

Fits a line into set of 2d or 3d points in a robust way (M-estimator technique)

Finds a sparse set of points within the selected region that seem to be easy to track.

Adjust corner position using some sort of gradient search.

Harris corner detector:

Calculates minimal eigenvalue for 2x2 gradient covariation matrix at every image pixel.

Calculates eigen values and vectors of 2x2 gradient covariation matrix at every image pixel.

Calculates constraint image for corner detection.

Runs canny edge detector.

Fills the connected component until the color difference gets large enough.

Applies adaptive threshold to grayscale image.

Applies distance transform to binary image.

equalizes histogram of 8-bit single-channel image

Divides one histogram by another.

Locates a template within an image by using a histogram comparison.

Calculates back project.

Calculates array histogram.

Calculates bayesian probabilistic histograms (each or src and dst is an array of number histograms.

Copies a histogram.

Thresholds the histogram.

Normalizes the histogram.

Finds the minimum and maximum histogram bins.

Clears the histogram.

Releases the histogram.

Sets the bounds of the histogram bins.

Finds coordinates of the box vertices.

Initializes Freeman chain reader.

Substitutes the last retrieved contour with the new one.

Measures similarity between template and overlapped windows in the source image and fills the resultant image with the measurements.

Retrieves quadrangle from the input array.

Retrieves the rectangular image region with specified center from the input array.

Calculates 7 Hu's invariants from precalculated spatial and central moments.

Calculates all spatial and central moments up to the 3rd order.

Performs complex morphological transformation.

dilates input image (applies maximum filter) one or more times.

erodes input image (applies minimum filter) one or more times. If element pointer is NULL, 3x3 rectangular element is used

releases structuring element

Performs forward or inverse log-polar image transform.

Converts mapx & mapy from floating-point to integer formats for cvRemap.

Performs generic geometric transformation using the specified coordinate maps.

Warps image with perspective (projective) transform.

Warps image with affine transform.

Resizes image (input array is resized to fit the destination array)

Converts input array pixels from one color space to another.

Calculates the image Laplacian: (d2/dx + d2/dy)I.

Calculates an image derivative using generalized Sobel.

Segments image using seed "markers".

Filters image using meanshift algorithm.

Releases pyramid.

Up-samples image and smoothes the result with gaussian kernel.

Smoothes the input image with gaussian kernel and then down-samples it.

Finds integral image: SUM(X,Y) = sum(x<X,y<Y)I(x,y)

Convolves an image with the kernel.

Smooths the image in one of several ways.

Adds image to accumulator with weights: acc = acc*(1-alpha) + image*alpha.

Adds a product of two images to accumulator.

Adds squared image to accumulator.

Releases an object.

Makes OpenCV use IPL functions for allocating IplImage and IplROI structures.

Calculates the cross product of two 3D vectors.

Fills an array with random numbers and updates the RNG state.

Converts one array to another with optional linear transformation.

Clears the array.

Sets every element of an array to a given value.

Copies one array to another.

Retrieves low-level information about the array.

Assigns user data to the array header.

Releases array data.

Allocates array data.

Change a specific array element.

Change the particular array element.

Deallocates sparse array.

Deallocates a matrix.

Resets the image ROI to include the entire image and releases the ROI structure.

Sets an image Region Of Interest (ROI) for a given rectangle.

Sets the channel of interest in an IplImage.

Deallocates the image header and the image data.

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

This call is an analogue of :

if(image )
{
iplDeallocate(*image, IPL_IMAGE_HEADER | IPL_IMAGE_ROI);
*image = 0;
}
#define IPL_IMAGE_ROI
Definition: types_c.h:401
#define IPL_IMAGE_HEADER
Definition: types_c.h:399

but it does not use IPL functions by default (see the CV_TURN_ON_IPL_COMPATIBILITY macro).

Parameters
imageDouble pointer to the image header

This call is a shortened form of :

if(*image )
{
cvReleaseData(*image);
cvReleaseImageHeader(image);
}
Parameters
imageDouble pointer to the image header

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
imageA pointer to the image header
coiThe channel of interest. 0 - all channels are selected, 1 - first channel is selected, etc. Note that the channel indices become 1-based.

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
imageA pointer to the image header
rectThe ROI rectangle

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);
CV_INLINE CvRect cvRect(int x, int y, int width, int height)
Definition: types_c.h:862
Parameters
imageA pointer to the image header

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 )
cvFree((void**)mat);
#define cvFree(ptr)
Definition: core_c.h:92
CV_INLINE void cvDecRefData(CvArr *arr)
Decrements an array data reference counter.
Definition: core_c.h:301
Parameters
matDouble pointer to the matrix

low-level scalar <-> raw data conversion functions

The function releases the sparse array and clears the array pointer upon exit.

Parameters
matDouble pointer to the array

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
arrInput array
idx0The first zero-based component of the element index
valueThe assigned value

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

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

Parameters
arrInput array
idxArray of the element indices
valueThe assigned value

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
arrInput array
idx0The first zero-based component of the element index
valueThe assigned value

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

Repeats source 2d array several times in both horizontal and vertical direction to fill destination array

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
arrArray header

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
arrArray header

The function assigns user data to the array header. Header should be initialized before using cvCreateMatHeader, cvCreateImageHeader, cvCreateMatNDHeader, cvInitMatHeader, cvInitImageHeader or cvInitMatNDHeader.

Parameters
arrArray header
dataUser data
stepFull row length in bytes

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;
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]);
T fabs(T... args)
const CvArr CvArr * x
Definition: core_c.h:1195
const CvArr * y
Definition: core_c.h:1187
unsigned char uchar
Definition: interface.h:51
Definition: types_c.h:1158
int width
Definition: types_c.h:1159
int height
Definition: types_c.h:1160
Parameters
arrArray header
dataOutput pointer to the whole image origin or ROI origin if ROI is set
stepOutput full row length in bytes
roi_sizeOutput ROI size

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
srcThe source array
dstThe destination array
maskOperation mask, 8-bit single channel array; specifies elements of the destination array to be changed

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
arrThe destination array
valueFill value
maskOperation mask, 8-bit single channel array; specifies elements of the destination array to be changed

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
arrArray to be cleared

Splits a multi-channel array into the set of single-channel arrays or extracts particular [color] plane

Merges a set of single-channel arrays into the single multi-channel array or inserts one particular [color] plane to the array

Copies several channels from input arrays to certain channels of output arrays

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
srcSource array
dstDestination array
scaleScale factor
shiftValue added to the scaled source array elements

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

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

dst(mask) = src(mask) + value

dst(mask) = src1(mask) - src2(mask)

dst(mask) = value - src(mask)

dst(idx) = src1(idx) * src2(idx) * scale (scaled element-wise multiplication of 2 arrays)

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

dst = src1 * scale + src2

dst = src1 * alpha + src2 * beta + gamma

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

dst(idx) = src(idx) & value

dst(idx) = src1(idx) | src2(idx)

dst(idx) = src(idx) | value

dst(idx) = src1(idx) ^ src2(idx)

dst(idx) = src(idx) ^ value

dst(idx) = ~src(idx)

dst(idx) = lower(idx) <= src(idx) < upper(idx)

dst(idx) = lower <= src(idx) < upper

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

dst(idx) = src1(idx) cmp_op value

dst(idx) = min(src1(idx),src2(idx))

dst(idx) = max(src1(idx),src2(idx))

dst(idx) = min(src(idx),value)

dst(idx) = max(src(idx),value)

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

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

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

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

Does powering: dst(idx) = src(idx)^power

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

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

The function fills the destination array with uniformly or normally distributed random numbers.

Parameters
rngCvRNG state initialized by cvRNG
arrThe destination array
dist_typeDistribution type

- CV_RAND_UNI uniform distribution

  • CV_RAND_NORMAL normal or Gaussian distribution
param1The 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.
param2The 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.

Finds all real and complex roots of a polynomial equation

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
src1The first source vector
src2The second source vector
dstThe destination vector

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

Transforms each element of source array and stores resultant vectors in destination array

Does perspective transform on every element of input array

Calculates (A-delta)*(A-delta)^T (order=0) or (A-delta)^T*(A-delta) (order=1)

Transposes matrix. Square matrices can be transposed in-place

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

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

Performs Singular Value Decomposition of a matrix

Performs Singular Value Back Substitution (solves A*X = B): flags must be the same as in cvSVD

Finds eigen values and vectors of a symmetric matrix

  • Finds selected eigen values and vectors of a symmetric matrix *‍/ Makes an identity matrix (mat_ij = i == j)

Calculates covariation matrix for a set of vectors

See also
flags

Calculates mean and standard deviation of pixel values

Finds global minimum, maximum and their positions

See also
ref core_c_NormFlags "flags"
flags

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

See also
core_c_DftFlags "flags"

Multiply results of DFTs: DFT(X)*DFT(Y) or DFT(X)*conj(DFT(Y))

See also
core_c_DftFlags "flags"

Discrete Cosine Transform

See also
core_c_DftFlags "flags"

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

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

Remember a storage "free memory" position

Restore a storage "free memory" position

Changes default size (granularity) of sequence blocks. The default size is ~1Kbyte

Removes the last element from sequence and optionally saves it

Removes the first element from sequence and optioanally saves it

Adds several new elements to the end of sequence

Removes several elements from the end of sequence and optionally saves them

Removes specified sequence element

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

Initializes sequence writer. The new elements will be added to the end of sequence

Combination of cvCreateSeq and cvStartAppendToSeq

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

Initializes sequence reader. The sequence can be read in forward or backward direction

Changes sequence reader position. It may seek to an absolute or to relative to the current position

Removes sequence slice

Inserts a sequence or array into another sequence

Sorts sequence in-place given element comparison function

Reverses order of sequence elements in-place

Removes element from the set by its index

Removes all the elements from the set

Remove edge connecting two vertices

Remove all vertices and edges from the graph

Releases graph scanner.

Does look-up transformation. Elements of the source array (that should be 8uC1 or 8sC1) are used as indexes in lutarr 256-element table

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.

Removes contour from tree (together with the contour children).

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_headerpointer to a function, creating IPL image header.
allocate_datapointer to a function, allocating IPL image data.
deallocatepointer to a function, deallocating IPL image.
create_roipointer to a function, creating IPL image ROI (i.e. Region of Interest).
clone_imagepointer to a function, cloning an IPL image.

The function finds the type of a given object and calls release with the double pointer.

Parameters
struct_ptrDouble pointer to the object

Sets error status silently

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

See also
cv::accumulateSquare
cv::accumulateProduct
cv::accumulateWeighted

Copies source 2D array inside of the larger destination array and makes a border of the specified type (IPL_BORDER_*) around the copied area.

Parameters
srcThe source image
dstThe destination image
smoothtypeType of the smoothing, see SmoothMethod_c
size1The first parameter of the smoothing operation, the aperture width. Must be a positive odd number (1, 3, 5, ...)
size2The second parameter of the smoothing operation, the aperture height. Ignored by CV_MEDIAN and CV_BILATERAL methods. In the case of simple scaled/non-scaled and Gaussian blur if size2 is zero, it is set to size1. Otherwise it must be a positive odd number.
sigma1In the case of a Gaussian parameter this parameter may specify Gaussian $\sigma$ (standard deviation). If it is zero, it is calculated from the kernel size:

\[\sigma = 0.3 (n/2 - 1) + 0.8 \quad \text{where} \quad n= \begin{array}{l l} \mbox{\texttt{size1} for horizontal kernel} \\ \mbox{\texttt{size2} for vertical kernel} \end{array}\]

Using standard sigma for small kernels ( $3\times 3$ to $7\times 7$ ) gives better speed. If sigma1 is not zero, while size1 and size2 are zeros, the kernel size is calculated from the sigma (to provide accurate enough operation).
sigma2additional parameter for bilateral filtering
See also
cv::GaussianBlur, cv::blur, cv::medianBlur, cv::bilateralFilter.
Parameters
srcinput image.
dstoutput image of the same size and the same number of channels as src.
kernelconvolution kernel (or rather a correlation kernel), a single-channel floating point matrix; if you want to apply different kernels to different channels, split the image into separate color planes using split and process them individually.
anchoranchor of the kernel that indicates the relative position of a filtered point within the kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor is at the kernel center.
See also
cv::filter2D
cv::integral

dst_width = floor(src_width/2)[+1], dst_height = floor(src_height/2)[+1]

See also
cv::pyrDown

dst_width = src_width*2, dst_height = src_height*2

See also
cv::pyrUp
cv::pyrMeanShiftFiltering
cv::watershed

(aperture_size = 1,3,5,7) or Scharr (aperture_size = -1) operator. Scharr can be used only for the first dx or dy derivative

See also
cv::Sobel
cv::Laplacian
cv::cvtColor
cv::resize
Note
::cvGetQuadrangleSubPix is similar to ::cvWarpAffine, but the outliers are extrapolated using replication border mode.
See also
cv::warpAffine
cv::warpPerspective
cv::remap
cv::convertMaps
cv::warpPolar

Performs forward or inverse linear-polar image transform

See also
cv::warpPolar
cvCreateStructuringElementEx
cv::erode

If element pointer is NULL, 3x3 rectangular element is used

See also
cv::dilate
cv::morphologyEx
cv::moments
cv::HuMoments

dst(x,y) <- src(x + center.x - dst_width/2, y + center.y - dst_height/2). Values of pixels with fractional coordinates are retrieved using bilinear interpolation

See also
cv::getRectSubPix

matrixarr = ( a11 a12 | b1 ) dst(x,y) <- src(A[x y]' + b) ( a21 a22 | b2 ) (bilinear interpolation is used to retrieve pixels with fractional coordinates)

See also
cvWarpAffine
cv::matchTemplate

(if the substitutor is null, the last retrieved contour is removed from the tree)

See also
cvFindContours

The reader is used to iteratively get coordinates of all the chain points. If the Freeman codes should be read as is, a simple sequence reader should be used

See also
cvApproxChains

This is a standalone function for setting bin ranges in the histogram. For a more detailed description of the parameters ranges and uniform, see the :ocvCalcHist function that can initialize the ranges as well. Ranges for the histogram bins must be set before the histogram is calculated or the backproject of the histogram is calculated.

Parameters
histHistogram.
rangesArray of bin ranges arrays. See :ocvCreateHist for details.
uniformUniformity flag. See :ocvCreateHist for details.

The function releases the histogram (header and the data). The pointer to the histogram is cleared by the function. If *hist pointer is already NULL, the function does nothing.

Parameters
histDouble pointer to the released histogram.

The function sets all of the histogram bins to 0 in case of a dense histogram and removes all histogram bins in case of a sparse array.

Parameters
histHistogram.

The function finds the minimum and maximum histogram bins and their positions. All of output arguments are optional. Among several extremas with the same value the ones with the minimum index (in the lexicographical order) are returned. In case of several maximums or minimums, the earliest in the lexicographical order (extrema locations) is returned.

Parameters
histHistogram.
min_valuePointer to the minimum value of the histogram.
max_valuePointer to the maximum value of the histogram.
min_idxPointer to the array of coordinates for the minimum.
max_idxPointer to the array of coordinates for the maximum.

The function normalizes the histogram bins by scaling them so that the sum of the bins becomes equal to factor.

Parameters
histPointer to the histogram.
factorNormalization factor.

The function clears histogram bins that are below the specified threshold.

Parameters
histPointer to the histogram.
thresholdThreshold level.

The function makes a copy of the histogram. If the second histogram pointer *dst is NULL, a new histogram of the same size as src is created. Otherwise, both histograms must have equal types and sizes. Then the function copies the bin values of the source histogram to the destination histogram and sets the same bin value ranges as in src.

Parameters
srcSource histogram.
dstPointer to the destination histogram.
See also
cv::calcHist
cvCalcBackProject, cv::calcBackProject

The function calculates the back projection by comparing histograms of the source image patches with the given histogram. The function is similar to matchTemplate, but instead of comparing the raster patch with all its possible positions within the search window, the function CalcBackProjectPatch compares histograms. See the algorithm diagram below:

image

Parameters
imageSource images (though, you may pass CvMat** as well).
dstDestination image.
range
histHistogram.
methodComparison method passed to cvCompareHist (see the function description).
factorNormalization factor for histograms that affects the normalization scale of the destination image. Pass 1 if not sure.
See also
cvCalcBackProjectPatch

The function calculates the object probability density from two histograms as:

\[\texttt{disthist} (I)= \forkthree{0}{if \‍(\texttt{hist1}(I)=0\‍)}{\texttt{scale}}{if \‍(\texttt{hist1}(I) \ne 0\‍) and \‍(\texttt{hist2}(I) > \texttt{hist1}(I)\‍)}{\frac{\texttt{hist2}(I) \cdot \texttt{scale}}{\texttt{hist1}(I)}}{if \‍(\texttt{hist1}(I) \ne 0\‍) and \‍(\texttt{hist2}(I) \le \texttt{hist1}(I)\‍)}\]

Parameters
hist1First histogram (the divisor).
hist2Second histogram.
dst_histDestination histogram.
scaleScale factor for the destination histogram.
See also
cv::equalizeHist
cv::distanceTransform

The two parameters for methods CV_ADAPTIVE_THRESH_MEAN_C and CV_ADAPTIVE_THRESH_GAUSSIAN_C are: neighborhood size (3, 5, 7 etc.), and a constant subtracted from mean (...,-3,-2,-1,0,1,2,3,...)

See also
cv::adaptiveThreshold
cv::floodFill
cv::Canny

Dx^2 * Dyy + Dxx * Dy^2 - 2 * Dx * Dy * Dxy. Applying threshold to the result gives coordinates of corners

See also
cv::preCornerDetect
cv::cornerEigenValsAndVecs
cv::cornerMinEigenVal

Calculates det(M) - k*(trace(M)^2), where M is 2x2 gradient covariation matrix for each pixel

See also
cv::cornerHarris
cv::cornerSubPix
cv::goodFeaturesToTrack
cv::fitLine
cv::line

if thickness<0 (e.g. thickness == CV_FILLED), the filled box is drawn

See also
cv::rectangle
cv::rectangle

Thickness works in the same way as with cvRectangle

See also
cv::circle

depending on thickness, start_angle and end_angle parameters. The resultant figure is rotated by angle. All the angles are in degrees

See also
cv::ellipse
cv::fillConvexPoly
cv::fillPoly
cv::polylines

The function initializes the font structure that can be passed to text rendering functions.

Parameters
fontPointer to the font structure initialized by the function
font_faceFont name identifier. See cv::HersheyFonts and corresponding old CV_* identifiers.
hscaleHorizontal scale. If equal to 1.0f , the characters have the original width depending on the font type. If equal to 0.5f , the characters are of half the original width.
vscaleVertical scale. If equal to 1.0f , the characters have the original height depending on the font type. If equal to 0.5f , the characters are of half the original height.
shearApproximate tangent of the character slope relative to the vertical line. A zero value means a non-italic font, 1.0f means about a 45 degree slope, etc.
thicknessThickness of the text strokes
line_typeType of the strokes, see line description
See also
cvPutText
cvInitFont, cvGetTextSize, cvFont, cv::putText
cv::getTextSize
cv::drawContours

◆ cvCloneSeq()

CV_INLINE CvSeq* cvCloneSeq ( const CvSeq seq,
CvMemStorage *storage   CV_DEFAULTNULL 
)

◆ cvDecRefData()

CV_INLINE void cvDecRefData ( CvArr arr)

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
arrPointer to an array header

◆ cvGetCol()

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

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

Parameters
arrInput array
submatPointer to the resulting sub-array header
colZero-based index of the selected column

◆ cvGetNextSparseNode()

CV_INLINE CvSparseNode* cvGetNextSparseNode ( CvSparseMatIterator mat_iterator)

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);
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);
T printf(T... args)
#define CV_NODE_IDX(mat, node)
Definition: types_c.h:779
#define CV_NODE_VAL(mat, node)
Definition: types_c.h:778
const int * idx
Definition: core_c.h:668
CV_INLINE CvSparseNode * cvGetNextSparseNode(CvSparseMatIterator *mat_iterator)
Returns the next sparse matrix element.
Definition: core_c.h:545
CvArr * sum
Definition: imgproc_c.h:61
Definition: types_c.h:771
Definition: types_c.h:764
Parameters
mat_iteratorSparse array iterator

◆ cvGetRow()

CV_INLINE CvMat* cvGetRow ( const CvArr arr,
CvMat submat,
int  row 
)

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

Parameters
arrInput array
submatPointer to the resulting sub-array header
rowZero-based index of the selected row

◆ cvGetSetElem()

CV_INLINE CvSetElem* cvGetSetElem ( const CvSet set_header,
int  idx 
)

Returns a set element by index. If the element doesn't belong to the set, NULL is returned

◆ cvIncRefData()

CV_INLINE int cvIncRefData ( CvArr arr)

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
arrArray header

◆ cvIplDepth()

CV_INLINE int cvIplDepth ( int  type)

◆ cvIplImage()

CV_INLINE IplImage cvIplImage ( )

◆ cvMat()

CV_INLINE CvMat cvMat ( int  rows,
int  cols,
int  type,
void *data   CV_DEFAULTNULL 
)

Inline constructor. No data is allocated internally!!! (Use together with cvCreateData, or use cvCreateMat instead to get a matrix with allocated data):

◆ cvMatND()

CV_INLINE CvMatND cvMatND ( )

◆ cvmGet()

CV_INLINE double cvmGet ( const CvMat mat,
int  row,
int  col 
)

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
matInput matrix
rowThe zero-based index of row
colThe zero-based index of column

◆ cvmSet()

CV_INLINE void cvmSet ( CvMat mat,
int  row,
int  col,
double  value 
)

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
matThe matrix
rowThe zero-based index of row
colThe zero-based index of column
valueThe new value of the matrix element

◆ cvPoint()

CV_INLINE CvPoint cvPoint ( int  x,
int  y 
)

constructs CvPoint structure.

◆ cvPoint2D32f()

CV_INLINE CvPoint2D32f cvPoint2D32f ( double  x,
double  y 
)

constructs CvPoint2D32f structure.

◆ cvPoint2D64f()

CV_INLINE CvPoint2D64f cvPoint2D64f ( double  x,
double  y 
)

constructs CvPoint2D64f structure.

◆ cvPoint3D32f()

CV_INLINE CvPoint3D32f cvPoint3D32f ( double  x,
double  y,
double  z 
)

constructs CvPoint3D32f structure.

◆ cvPoint3D64f()

CV_INLINE CvPoint3D64f cvPoint3D64f ( double  x,
double  y,
double  z 
)

constructs CvPoint3D64f structure.

◆ cvPointFrom32f()

CV_INLINE CvPoint cvPointFrom32f ( CvPoint2D32f  point)

converts CvPoint2D32f to CvPoint.

◆ cvPointTo32f()

CV_INLINE CvPoint2D32f cvPointTo32f ( CvPoint  point)

converts CvPoint to CvPoint2D32f.

◆ cvRandInt()

CV_INLINE unsigned cvRandInt ( CvRNG rng)

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
rngCvRNG state initialized by cvRNG.

◆ cvRandReal()

CV_INLINE double cvRandReal ( CvRNG rng)

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
rngRNG state initialized by cvRNG

◆ cvRealScalar()

CV_INLINE CvScalar cvRealScalar ( double  val0)

◆ cvRect()

CV_INLINE CvRect cvRect ( int  x,
int  y,
int  width,
int  height 
)

constructs CvRect structure.

◆ cvRectToROI()

CV_INLINE IplROI cvRectToROI ( CvRect  rect,
int  coi 
)

◆ cvReleaseMatND()

CV_INLINE void cvReleaseMatND ( CvMatND **  mat)

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 )
cvFree((void**)mat);
Parameters
matDouble pointer to the array

◆ cvRNG()

CV_INLINE CvRNG cvRNG ( int64 seed   CV_DEFAULT-1)

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
seed64-bit value used to initiate a random sequence
See also
the C++ class RNG replaced CvRNG.

◆ cvROIToRect()

CV_INLINE CvRect cvROIToRect ( IplROI  roi)

◆ cvScalar()

CV_INLINE CvScalar cvScalar ( double  val0,
double val1   CV_DEFAULT0,
double val2   CV_DEFAULT0,
double val3   CV_DEFAULT
)

◆ cvScalarAll()

CV_INLINE CvScalar cvScalarAll ( double  val0123)

◆ cvSetNew()

CV_INLINE CvSetElem* cvSetNew ( CvSet set_header)

Fast variant of cvSetAdd

◆ cvSetRemoveByPtr()

CV_INLINE void cvSetRemoveByPtr ( CvSet set_header,
void *  elem 
)

Removes set element given its pointer

◆ cvSize()

CV_INLINE CvSize cvSize ( int  width,
int  height 
)

constructs CvSize structure.

◆ cvSize2D32f()

CV_INLINE CvSize2D32f cvSize2D32f ( double  width,
double  height 
)

constructs CvSize2D32f structure.

◆ cvSlice()

CV_INLINE CvSlice cvSlice ( int  start,
int  end 
)

◆ cvSubS()

CV_INLINE void cvSubS ( const CvArr src,
CvScalar  value,
CvArr dst,
const CvArr *mask   CV_DEFAULTNULL 
)

dst(mask) = src(mask) - value = src(mask) + (-value)

◆ cvTermCriteria()

CV_INLINE CvTermCriteria cvTermCriteria ( int  type,
int  max_iter,
double  epsilon 
)

Variable Documentation

◆ allocate_data

Cv_iplAllocateImageData allocate_data

◆ alpha

const CvArr double alpha

◆ angle

CvSize int angle

◆ arr

CvArr* arr

◆ array_iterator

CvArr const CvArr CvMatND CvNArrayIterator* array_iterator

◆ arrs

CvArr** arrs

◆ avg

int CvArr CvArr* avg

◆ B

const CvArr const CvArr const CvArr* B

◆ before_index

int before_index

◆ beta

const CvArr double const CvArr double beta

◆ block

int int void int CvSeq CvSeqBlock* block

◆ channels

int int channels

◆ clone_image

◆ cluster_count

int cluster_count

◆ cmp_op

double CvArr int cmp_op

◆ coi

int coi

◆ cols

int cols

◆ count

void int count

◆ cov_mat

int CvArr* cov_mat

◆ create_roi

◆ data

uchar ** data

◆ deallocate

◆ default_eps

double default_eps

◆ default_max_iters

double int default_max_iters

◆ delta_elems

int delta_elems

◆ depth

int depth

◆ description

const char** description

◆ dims

int dims

◆ direction

int direction

◆ dist_type

CvArr int dist_type

◆ dst

CvArr * dst

◆ dst0

CvArr* dst0

◆ dst1

CvArr CvArr* dst1

◆ dst2

CvArr CvArr CvArr* dst2

◆ dst3

◆ dst_count

int CvArr int dst_count

◆ edge_size

int int int edge_size

◆ eigenvals

CvArr CvArr* eigenvals

◆ eigenvects

const CvArr const CvArr * eigenvects

◆ elem

const void* elem

◆ elem_idx

const void CvCmpFunc int int* elem_idx

◆ elem_size

int int elem_size

◆ element

const void* element

◆ elements

int int void * elements

◆ end

double double end

◆ end_col

CvMat int int end_col

◆ end_idx

int int end_idx

◆ end_row

CvMat int int end_row

◆ end_vtx

const CvGraphVtx const CvGraphVtx * end_vtx

◆ err_msg

const char const char * err_msg

◆ evals

CvArr CvArr* evals

◆ evects

CvArr* evects

◆ file_name

const char const char const char * file_name

◆ filename

const char const char** filename

◆ first

const void* first

◆ flags

CvArr int flags

◆ frame

void * frame

◆ from_arr

int const CvArr* from_arr

◆ from_to

int CvArr int const int* from_to

◆ func

const void CvCmpFunc func

◆ func_name

const char * func_name

◆ gamma

double const CvArr double double gamma

◆ header

CvMat * header

◆ header_size

int header_size

◆ idx

const int * idx

◆ idx0

int idx0

◆ idx1

int int idx1

◆ idx2

int int int idx2

◆ image_header

IplImage* image_header

◆ index

int index

◆ is_equal

◆ is_sorted

const void CvCmpFunc int is_sorted

◆ labels

int CvArr * labels

◆ line

const char const char const char int line

◆ lower

CvScalar lower

◆ lut

CvArr const CvArr* lut

◆ magnitude

const CvArr CvArr* magnitude

◆ mask

CvArr const CvArr* mask

◆ mat

const CvArr const CvArr * mat

◆ mat_iterator

CvSparseMatIterator* mat_iterator

◆ max_level

const void int max_level

◆ max_val

double double* max_val

◆ mean

CvScalar * mean

◆ min_val

double* min_val

◆ new_cn

CvMat int new_cn

◆ new_dims

int CvArr int int new_dims

◆ new_sizes

int CvArr int int int* new_sizes

◆ order

CvArr int order

◆ pair_count

int CvArr int const int int pair_count

◆ param1

CvArr int CvScalar param1

◆ param2

CvArr int CvScalar CvScalar param2

◆ parent

void* parent

◆ pos

◆ power

CvArr double power

◆ reader

CvSeqReader* reader

◆ rect

CvMat CvRect rect

◆ result

const CvArr const CvArr CvArr * result

◆ rng

CvRNG* rng

◆ roots

CvMat* roots

◆ roots2

CvMat* roots2

◆ rows

int rows

◆ scalar

int CvScalar* scalar

◆ scale

CvScalar scale

◆ seq

int int void int CvSeq * seq

◆ size

size_t size

◆ sizeof_header

int sizeof_header

◆ sizes

int * sizes

◆ slice

CvSlice slice

◆ src1

const CvArr* src1

◆ src2

const CvArr * src2

◆ src3

const CvArr double const CvArr * src3

◆ src_count

int src_count

◆ start

double start

◆ start_col

CvMat int start_col

◆ start_idx

int start_idx

◆ start_row

CvMat int start_row

◆ start_vtx

const CvGraphVtx * start_vtx

◆ std_dev

CvScalar CvScalar* std_dev

◆ step

void int step

◆ storage

int CvMemStorage * storage

◆ stubs

CvArr const CvArr CvMatND* stubs

◆ submat

CvMat * submat

◆ termcrit

int CvArr CvTermCriteria termcrit

◆ total

int int void int total

◆ transmat

CvArr const CvMat* transmat

◆ type

const int int type

◆ U

const CvArr* U

◆ upper

◆ userdata

const char const char const char int void * userdata

◆ V

const CvArr const CvArr* V

◆ value

CvArr CvScalar value

◆ vec2

const CvArr* vec2

◆ vtx

const CvGraphVtx * vtx

◆ vtx_idx

int vtx_idx

◆ vtx_size

int int vtx_size

◆ W

CvArr* W

◆ writer

int int CvMemStorage CvSeqWriter * writer

◆ x

float x

◆ X

const CvArr const CvArr const CvArr CvArr* X

◆ y

const CvArr CvArr CvArr * y