| OpenCV 3.4.8 Open Source Computer Vision

Classes | Macros | Typedefs | Enumerations | Functions
C API
Image Processing

## Classes
struct | CvChainPtReader
struct | CvConnectedComp
struct | CvConvexityDefect
struct | CvFont
struct | CvHuMoments
struct | CvMoments

## Macros
#define | CV_AA 16
#define | CV_FILLED -1
#define | CV_FONT_HERSHEY_COMPLEX 3
#define | CV_FONT_HERSHEY_COMPLEX_SMALL 5
#define | CV_FONT_HERSHEY_DUPLEX 2
#define | CV_FONT_HERSHEY_PLAIN 1
#define | CV_FONT_HERSHEY_SCRIPT_COMPLEX 7
#define | CV_FONT_HERSHEY_SCRIPT_SIMPLEX 6
#define | CV_FONT_HERSHEY_SIMPLEX 0
#define | CV_FONT_HERSHEY_TRIPLEX 4
#define | CV_FONT_ITALIC 16
#define | CV_FONT_VECTOR0 CV_FONT_HERSHEY_SIMPLEX
#define | CV_INIT_3X3_DELTAS(deltas, step, nch)
#define | CV_NEXT_LINE_POINT(line_iterator)
#define | cvCalcBackProject(image, dst, hist) cvCalcArrBackProject((CvArr**)image, dst, hist)
#define | cvCalcBackProjectPatch(image, dst, range, hist, method, factor) cvCalcArrBackProjectPatch( (CvArr**)image, dst, range, hist, method, factor )
#define | cvDrawCircle cvCircle
#define | cvDrawEllipse cvEllipse
#define | cvDrawLine cvLine
#define | cvDrawPolyLine cvPolyLine
#define | cvDrawRect cvRectangle

## Typedefs
typedef struct _CvContourScanner * | CvContourScanner
typedef float(* | CvDistanceFunction) (const float *a, const float *b, void *user_param)

## Enumerations
enum | { CV_GAUSSIAN_5x5 = 7 }
enum | { CV_SCHARR =-1, CV_MAX_SOBEL_KSIZE =7 }
enum | { CV_BGR2BGRA =0, CV_RGB2RGBA =CV_BGR2BGRA, CV_BGRA2BGR =1, CV_RGBA2RGB =CV_BGRA2BGR, CV_BGR2RGBA =2, CV_RGB2BGRA =CV_BGR2RGBA, CV_RGBA2BGR =3, CV_BGRA2RGB =CV_RGBA2BGR, CV_BGR2RGB =4, CV_RGB2BGR =CV_BGR2RGB, CV_BGRA2RGBA =5, CV_RGBA2BGRA =CV_BGRA2RGBA, CV_BGR2GRAY =6, CV_RGB2GRAY =7, CV_GRAY2BGR =8, CV_GRAY2RGB =CV_GRAY2BGR, CV_GRAY2BGRA =9, CV_GRAY2RGBA =CV_GRAY2BGRA, CV_BGRA2GRAY =10, CV_RGBA2GRAY =11, CV_BGR2BGR565 =12, CV_RGB2BGR565 =13, CV_BGR5652BGR =14, CV_BGR5652RGB =15, CV_BGRA2BGR565 =16, CV_RGBA2BGR565 =17, CV_BGR5652BGRA =18, CV_BGR5652RGBA =19, CV_GRAY2BGR565 =20, CV_BGR5652GRAY =21, CV_BGR2BGR555 =22, CV_RGB2BGR555 =23, CV_BGR5552BGR =24, CV_BGR5552RGB =25, CV_BGRA2BGR555 =26, CV_RGBA2BGR555 =27, CV_BGR5552BGRA =28, CV_BGR5552RGBA =29, CV_GRAY2BGR555 =30, CV_BGR5552GRAY =31, CV_BGR2XYZ =32, CV_RGB2XYZ =33, CV_XYZ2BGR =34, CV_XYZ2RGB =35, CV_BGR2YCrCb =36, CV_RGB2YCrCb =37, CV_YCrCb2BGR =38, CV_YCrCb2RGB =39, CV_BGR2HSV =40, CV_RGB2HSV =41, CV_BGR2Lab =44, CV_RGB2Lab =45, CV_BayerBG2BGR =46, CV_BayerGB2BGR =47, CV_BayerRG2BGR =48, CV_BayerGR2BGR =49, CV_BayerBG2RGB =CV_BayerRG2BGR, CV_BayerGB2RGB =CV_BayerGR2BGR, CV_BayerRG2RGB =CV_BayerBG2BGR, CV_BayerGR2RGB =CV_BayerGB2BGR, CV_BGR2Luv =50, CV_RGB2Luv =51, CV_BGR2HLS =52, CV_RGB2HLS =53, CV_HSV2BGR =54, CV_HSV2RGB =55, CV_Lab2BGR =56, CV_Lab2RGB =57, CV_Luv2BGR =58, CV_Luv2RGB =59, CV_HLS2BGR =60, CV_HLS2RGB =61, CV_BayerBG2BGR_VNG =62, CV_BayerGB2BGR_VNG =63, CV_BayerRG2BGR_VNG =64, CV_BayerGR2BGR_VNG =65, CV_BayerBG2RGB_VNG =CV_BayerRG2BGR_VNG, CV_BayerGB2RGB_VNG =CV_BayerGR2BGR_VNG, CV_BayerRG2RGB_VNG =CV_BayerBG2BGR_VNG, CV_BayerGR2RGB_VNG =CV_BayerGB2BGR_VNG, CV_BGR2HSV_FULL = 66, CV_RGB2HSV_FULL = 67, CV_BGR2HLS_FULL = 68, CV_RGB2HLS_FULL = 69, CV_HSV2BGR_FULL = 70, CV_HSV2RGB_FULL = 71, CV_HLS2BGR_FULL = 72, CV_HLS2RGB_FULL = 73, CV_LBGR2Lab = 74, CV_LRGB2Lab = 75, CV_LBGR2Luv = 76, CV_LRGB2Luv = 77, CV_Lab2LBGR = 78, CV_Lab2LRGB = 79, CV_Luv2LBGR = 80, CV_Luv2LRGB = 81, CV_BGR2YUV = 82, CV_RGB2YUV = 83, CV_YUV2BGR = 84, CV_YUV2RGB = 85, CV_BayerBG2GRAY = 86, CV_BayerGB2GRAY = 87, CV_BayerRG2GRAY = 88, CV_BayerGR2GRAY = 89, CV_YUV2RGB_NV12 = 90, CV_YUV2BGR_NV12 = 91, CV_YUV2RGB_NV21 = 92, CV_YUV2BGR_NV21 = 93, CV_YUV420sp2RGB = CV_YUV2RGB_NV21, CV_YUV420sp2BGR = CV_YUV2BGR_NV21, CV_YUV2RGBA_NV12 = 94, CV_YUV2BGRA_NV12 = 95, CV_YUV2RGBA_NV21 = 96, CV_YUV2BGRA_NV21 = 97, CV_YUV420sp2RGBA = CV_YUV2RGBA_NV21, CV_YUV420sp2BGRA = CV_YUV2BGRA_NV21, CV_YUV2RGB_YV12 = 98, CV_YUV2BGR_YV12 = 99, CV_YUV2RGB_IYUV = 100, CV_YUV2BGR_IYUV = 101, CV_YUV2RGB_I420 = CV_YUV2RGB_IYUV, CV_YUV2BGR_I420 = CV_YUV2BGR_IYUV, CV_YUV420p2RGB = CV_YUV2RGB_YV12, CV_YUV420p2BGR = CV_YUV2BGR_YV12, CV_YUV2RGBA_YV12 = 102, CV_YUV2BGRA_YV12 = 103, CV_YUV2RGBA_IYUV = 104, CV_YUV2BGRA_IYUV = 105, CV_YUV2RGBA_I420 = CV_YUV2RGBA_IYUV, CV_YUV2BGRA_I420 = CV_YUV2BGRA_IYUV, CV_YUV420p2RGBA = CV_YUV2RGBA_YV12, CV_YUV420p2BGRA = CV_YUV2BGRA_YV12, CV_YUV2GRAY_420 = 106, CV_YUV2GRAY_NV21 = CV_YUV2GRAY_420, CV_YUV2GRAY_NV12 = CV_YUV2GRAY_420, CV_YUV2GRAY_YV12 = CV_YUV2GRAY_420, CV_YUV2GRAY_IYUV = CV_YUV2GRAY_420, CV_YUV2GRAY_I420 = CV_YUV2GRAY_420, CV_YUV420sp2GRAY = CV_YUV2GRAY_420, CV_YUV420p2GRAY = CV_YUV2GRAY_420, CV_YUV2RGB_UYVY = 107, CV_YUV2BGR_UYVY = 108, CV_YUV2RGB_Y422 = CV_YUV2RGB_UYVY, CV_YUV2BGR_Y422 = CV_YUV2BGR_UYVY, CV_YUV2RGB_UYNV = CV_YUV2RGB_UYVY, CV_YUV2BGR_UYNV = CV_YUV2BGR_UYVY, CV_YUV2RGBA_UYVY = 111, CV_YUV2BGRA_UYVY = 112, CV_YUV2RGBA_Y422 = CV_YUV2RGBA_UYVY, CV_YUV2BGRA_Y422 = CV_YUV2BGRA_UYVY, CV_YUV2RGBA_UYNV = CV_YUV2RGBA_UYVY, CV_YUV2BGRA_UYNV = CV_YUV2BGRA_UYVY, CV_YUV2RGB_YUY2 = 115, CV_YUV2BGR_YUY2 = 116, CV_YUV2RGB_YVYU = 117, CV_YUV2BGR_YVYU = 118, CV_YUV2RGB_YUYV = CV_YUV2RGB_YUY2, CV_YUV2BGR_YUYV = CV_YUV2BGR_YUY2, CV_YUV2RGB_YUNV = CV_YUV2RGB_YUY2, CV_YUV2BGR_YUNV = CV_YUV2BGR_YUY2, CV_YUV2RGBA_YUY2 = 119, CV_YUV2BGRA_YUY2 = 120, CV_YUV2RGBA_YVYU = 121, CV_YUV2BGRA_YVYU = 122, CV_YUV2RGBA_YUYV = CV_YUV2RGBA_YUY2, CV_YUV2BGRA_YUYV = CV_YUV2BGRA_YUY2, CV_YUV2RGBA_YUNV = CV_YUV2RGBA_YUY2, CV_YUV2BGRA_YUNV = CV_YUV2BGRA_YUY2, CV_YUV2GRAY_UYVY = 123, CV_YUV2GRAY_YUY2 = 124, CV_YUV2GRAY_Y422 = CV_YUV2GRAY_UYVY, CV_YUV2GRAY_UYNV = CV_YUV2GRAY_UYVY, CV_YUV2GRAY_YVYU = CV_YUV2GRAY_YUY2, CV_YUV2GRAY_YUYV = CV_YUV2GRAY_YUY2, CV_YUV2GRAY_YUNV = CV_YUV2GRAY_YUY2, CV_RGBA2mRGBA = 125, CV_mRGBA2RGBA = 126, CV_RGB2YUV_I420 = 127, CV_BGR2YUV_I420 = 128, CV_RGB2YUV_IYUV = CV_RGB2YUV_I420, CV_BGR2YUV_IYUV = CV_BGR2YUV_I420, CV_RGBA2YUV_I420 = 129, CV_BGRA2YUV_I420 = 130, CV_RGBA2YUV_IYUV = CV_RGBA2YUV_I420, CV_BGRA2YUV_IYUV = CV_BGRA2YUV_I420, CV_RGB2YUV_YV12 = 131, CV_BGR2YUV_YV12 = 132, CV_RGBA2YUV_YV12 = 133, CV_BGRA2YUV_YV12 = 134, CV_BayerBG2BGR_EA = 135, CV_BayerGB2BGR_EA = 136, CV_BayerRG2BGR_EA = 137, CV_BayerGR2BGR_EA = 138, CV_BayerBG2RGB_EA = CV_BayerRG2BGR_EA, CV_BayerGB2RGB_EA = CV_BayerGR2BGR_EA, CV_BayerRG2RGB_EA = CV_BayerBG2BGR_EA, CV_BayerGR2RGB_EA = CV_BayerGB2BGR_EA, CV_BayerBG2BGRA =139, CV_BayerGB2BGRA =140, CV_BayerRG2BGRA =141, CV_BayerGR2BGRA =142, CV_BayerBG2RGBA =CV_BayerRG2BGRA, CV_BayerGB2RGBA =CV_BayerGR2BGRA, CV_BayerRG2RGBA =CV_BayerBG2BGRA, CV_BayerGR2RGBA =CV_BayerGB2BGRA, CV_COLORCVT_MAX = 143 }
enum | { CV_INTER_NN =0, CV_INTER_LINEAR =1, CV_INTER_CUBIC =2, CV_INTER_AREA =3, CV_INTER_LANCZOS4 =4 }
enum | { CV_WARP_FILL_OUTLIERS =8, CV_WARP_INVERSE_MAP =16 }
enum | { CV_MOP_ERODE =0, CV_MOP_DILATE =1, CV_MOP_OPEN =2, CV_MOP_CLOSE =3, CV_MOP_GRADIENT =4, CV_MOP_TOPHAT =5, CV_MOP_BLACKHAT =6 }
enum | { CV_TM_SQDIFF =0, CV_TM_SQDIFF_NORMED =1, CV_TM_CCORR =2, CV_TM_CCORR_NORMED =3, CV_TM_CCOEFF =4, CV_TM_CCOEFF_NORMED =5 }
enum | { CV_RETR_EXTERNAL =0, CV_RETR_LIST =1, CV_RETR_CCOMP =2, CV_RETR_TREE =3, CV_RETR_FLOODFILL =4 }
enum | { CV_CHAIN_CODE =0, CV_CHAIN_APPROX_NONE =1, CV_CHAIN_APPROX_SIMPLE =2, CV_CHAIN_APPROX_TC89_L1 =3, CV_CHAIN_APPROX_TC89_KCOS =4, CV_LINK_RUNS =5 }
enum | { CV_POLY_APPROX_DP = 0 }
enum | { CV_CONTOURS_MATCH_I1 =1, CV_CONTOURS_MATCH_I2 =2, CV_CONTOURS_MATCH_I3 =3 }
enum | { CV_CLOCKWISE =1, CV_COUNTER_CLOCKWISE =2 }
enum | { CV_COMP_CORREL =0, CV_COMP_CHISQR =1, CV_COMP_INTERSECT =2, CV_COMP_BHATTACHARYYA =3, CV_COMP_HELLINGER =CV_COMP_BHATTACHARYYA, CV_COMP_CHISQR_ALT =4, CV_COMP_KL_DIV =5 }
enum | { CV_DIST_MASK_3 =3, CV_DIST_MASK_5 =5, CV_DIST_MASK_PRECISE =0 }
enum | { CV_DIST_LABEL_CCOMP = 0, CV_DIST_LABEL_PIXEL = 1 }
enum | { CV_DIST_USER =-1, CV_DIST_L1 =1, CV_DIST_L2 =2, CV_DIST_C =3, CV_DIST_L12 =4, CV_DIST_FAIR =5, CV_DIST_WELSCH =6, CV_DIST_HUBER =7 }
enum | { CV_THRESH_BINARY =0, CV_THRESH_BINARY_INV =1, CV_THRESH_TRUNC =2, CV_THRESH_TOZERO =3, CV_THRESH_TOZERO_INV =4, CV_THRESH_MASK =7, CV_THRESH_OTSU =8, CV_THRESH_TRIANGLE =16 }
enum | { CV_ADAPTIVE_THRESH_MEAN_C =0, CV_ADAPTIVE_THRESH_GAUSSIAN_C =1 }
enum | { CV_FLOODFILL_FIXED_RANGE =(1 << 16), CV_FLOODFILL_MASK_ONLY =(1 << 17) }
enum | { CV_CANNY_L2_GRADIENT =(1 << 31) }
enum | { CV_HOUGH_STANDARD =0, CV_HOUGH_PROBABILISTIC =1, CV_HOUGH_MULTI_SCALE =2, CV_HOUGH_GRADIENT =3 }
enum | MorphShapes_c { CV_SHAPE_RECT =0, CV_SHAPE_CROSS =1, CV_SHAPE_ELLIPSE =2, CV_SHAPE_CUSTOM =100 }
enum | SmoothMethod_c { CV_BLUR_NO_SCALE =0, CV_BLUR =1, CV_GAUSSIAN =2, CV_MEDIAN =3, CV_BILATERAL =4 }

## Functions
CvMat * | cv2DRotationMatrix (CvPoint2D32f center, double angle, double scale, CvMat *map_matrix)
| Computes rotation_matrix matrix. More...
void | cvAcc (const CvArr *image, CvArr *sum, const CvArr *mask=NULL)
| Adds image to accumulator. More...
void | cvAdaptiveThreshold (const CvArr *src, CvArr *dst, double max_value, int adaptive_method=CV_ADAPTIVE_THRESH_MEAN_C, int threshold_type=CV_THRESH_BINARY, int block_size=3, double param1=5)
| Applies adaptive threshold to grayscale image. More...
CvSeq * | cvApproxChains (CvSeq *src_seq, CvMemStorage *storage, int method=CV_CHAIN_APPROX_SIMPLE, double parameter=0, int minimal_perimeter=0, int recursive=0)
| Approximates Freeman chain(s) with a polygonal curve. More...
CvSeq * | cvApproxPoly (const void *src_seq, int header_size, CvMemStorage *storage, int method, double eps, int recursive=0)
| Approximates a single polygonal curve (contour) or a tree of polygonal curves (contours) More...
double | cvArcLength (const void *curve, CvSlice slice=CV_WHOLE_SEQ, int is_closed=-1)
| Calculates perimeter of a contour or length of a part of contour. More...
CvRect | cvBoundingRect (CvArr *points, int update=0)
| Calculates contour bounding rectangle (update=1) or just retrieves pre-calculated rectangle (update=0) More...
void | cvBoxPoints (CvBox2D box, CvPoint2D32f pt[4])
| Finds coordinates of the box vertices. More...
void | cvCalcArrBackProject (CvArr **image, CvArr *dst, const CvHistogram *hist)
| Calculates back project. More...
void | cvCalcArrBackProjectPatch (CvArr **image, CvArr *dst, CvSize range, CvHistogram *hist, int method, double factor)
| Locates a template within an image by using a histogram comparison. More...
void | cvCalcArrHist (CvArr **arr, CvHistogram *hist, int accumulate=0, const CvArr *mask=NULL)
| Calculates array histogram. More...
void | cvCalcBayesianProb (CvHistogram **src, int number, CvHistogram **dst)
| Calculates bayesian probabilistic histograms (each or src and dst is an array of number histograms. More...
float | cvCalcEMD2 (const CvArr *signature1, const CvArr *signature2, int distance_type, CvDistanceFunction distance_func=NULL, const CvArr *cost_matrix=NULL, CvArr *flow=NULL, float *lower_bound=NULL, void *userdata=NULL)
| Computes earth mover distance between two weighted point sets (called signatures) More...
void | cvCalcHist (IplImage **image, CvHistogram *hist, int accumulate=0, const CvArr *mask=NULL)
void | cvCalcProbDensity (const CvHistogram *hist1, const CvHistogram *hist2, CvHistogram *dst_hist, double scale=255)
| Divides one histogram by another. More...
void | cvCanny (const CvArr *image, CvArr *edges, double threshold1, double threshold2, int aperture_size=3)
| Runs canny edge detector. More...
int | cvCheckContourConvexity (const CvArr *contour)
| Checks whether the contour is convex or not (returns 1 if convex, 0 if not) More...
void | cvCircle (CvArr *img, CvPoint center, int radius, CvScalar color, int thickness=1, int line_type=8, int shift=0)
| Draws a circle with specified center and radius. More...
void | cvClearHist (CvHistogram *hist)
| Clears the histogram. More...
int | cvClipLine (CvSize img_size, CvPoint *pt1, CvPoint *pt2)
| Clips the line segment connecting *pt1 and *pt2 by the rectangular window. More...
CvScalar | cvColorToScalar (double packed_color, int arrtype)
| Unpacks color value. More...
double | cvCompareHist (const CvHistogram *hist1, const CvHistogram *hist2, int method)
double | cvContourArea (const CvArr *contour, CvSlice slice=CV_WHOLE_SEQ, int oriented=0)
| Calculates area of a contour or contour segment. More...
double | cvContourPerimeter (const void *contour)
void | cvConvertMaps (const CvArr *mapx, const CvArr *mapy, CvArr *mapxy, CvArr *mapalpha)
| Converts mapx & mapy from floating-point to integer formats for cvRemap. More...
CvSeq * | cvConvexHull2 (const CvArr *input, void *hull_storage=NULL, int orientation=CV_CLOCKWISE, int return_points=0)
| Calculates exact convex hull of 2d point set. More...
CvSeq * | cvConvexityDefects (const CvArr *contour, const CvArr *convexhull, CvMemStorage *storage=NULL)
| Finds convexity defects for the contour. More...
void | cvCopyHist (const CvHistogram *src, CvHistogram **dst)
| Copies a histogram. More...
void | cvCopyMakeBorder (const CvArr *src, CvArr *dst, CvPoint offset, int bordertype, CvScalar value=cvScalarAll(0))
void | cvCornerEigenValsAndVecs (const CvArr *image, CvArr *eigenvv, int block_size, int aperture_size=3)
| Calculates eigen values and vectors of 2x2 gradient covariation matrix at every image pixel. More...
void | cvCornerHarris (const CvArr *image, CvArr *harris_response, int block_size, int aperture_size=3, double k=0.04)
| Harris corner detector: More...
void | cvCornerMinEigenVal (const CvArr *image, CvArr *eigenval, int block_size, int aperture_size=3)
| Calculates minimal eigenvalue for 2x2 gradient covariation matrix at every image pixel. More...
CvHistogram * | cvCreateHist (int dims, int *sizes, int type, float **ranges=NULL, int uniform=1)
| Creates a histogram. More...
CvMat ** | cvCreatePyramid (const CvArr *img, int extra_layers, double rate, const CvSize *layer_sizes=0, CvArr *bufarr=0, int calc=1, int filter=CV_GAUSSIAN_5x5)
| Builds pyramid for an image. More...
IplConvKernel * | cvCreateStructuringElementEx (int cols, int rows, int anchor_x, int anchor_y, int shape, int *values=NULL)
| Returns a structuring element of the specified size and shape for morphological operations. More...
void | cvCvtColor (const CvArr *src, CvArr *dst, int code)
| Converts input array pixels from one color space to another. More...
void | cvDilate (const CvArr *src, CvArr *dst, IplConvKernel *element=NULL, int iterations=1)
| dilates input image (applies maximum filter) one or more times. More...
void | cvDistTransform (const CvArr *src, CvArr *dst, int distance_type=CV_DIST_L2, int mask_size=3, const float *mask=NULL, CvArr *labels=NULL, int labelType=CV_DIST_LABEL_CCOMP)
| Applies distance transform to binary image. More...
void | cvDrawContours (CvArr *img, CvSeq *contour, CvScalar external_color, CvScalar hole_color, int max_level, int thickness=1, int line_type=8, CvPoint offset=cvPoint(0, 0))
| Draws contour outlines or filled interiors on the image. More...
void | cvEllipse (CvArr *img, CvPoint center, CvSize axes, double angle, double start_angle, double end_angle, CvScalar color, int thickness=1, int line_type=8, int shift=0)
| Draws ellipse outline, filled ellipse, elliptic arc or filled elliptic sector. More...
int | cvEllipse2Poly (CvPoint center, CvSize axes, int angle, int arc_start, int arc_end, CvPoint *pts, int delta)
| Returns the polygon points which make up the given ellipse. More...
void | cvEllipseBox (CvArr *img, CvBox2D box, CvScalar color, int thickness=1, int line_type=8, int shift=0)
CvSeq * | cvEndFindContours (CvContourScanner *scanner)
| Releases contour scanner and returns pointer to the first outer contour. More...
void | cvEqualizeHist (const CvArr *src, CvArr *dst)
| equalizes histogram of 8-bit single-channel image More...
void | cvErode (const CvArr *src, CvArr *dst, IplConvKernel *element=NULL, int iterations=1)
| erodes input image (applies minimum filter) one or more times. If element pointer is NULL, 3x3 rectangular element is used More...
void | cvFillConvexPoly (CvArr *img, const CvPoint *pts, int npts, CvScalar color, int line_type=8, int shift=0)
| Fills convex or monotonous polygon. More...
void | cvFillPoly (CvArr *img, CvPoint **pts, const int *npts, int contours, CvScalar color, int line_type=8, int shift=0)
| Fills an area bounded by one or more arbitrary polygons. More...
void | cvFilter2D (const CvArr *src, CvArr *dst, const CvMat *kernel, CvPoint anchor=cvPoint(-1,-1))
| Convolves an image with the kernel. More...
int | cvFindContours (CvArr *image, CvMemStorage *storage, CvSeq **first_contour, int header_size=sizeof(CvContour), int mode=CV_RETR_LIST, int method=CV_CHAIN_APPROX_SIMPLE, CvPoint offset=cvPoint(0, 0))
| Retrieves outer and optionally inner boundaries of white (non-zero) connected components in the black (zero) background. More...
void | cvFindCornerSubPix (const CvArr *image, CvPoint2D32f *corners, int count, CvSize win, CvSize zero_zone, CvTermCriteria criteria)
| Adjust corner position using some sort of gradient search. More...
CvSeq * | cvFindNextContour (CvContourScanner scanner)
| Retrieves next contour. More...
CvBox2D | cvFitEllipse2 (const CvArr *points)
| Fits ellipse into a set of 2d points. More...
void | cvFitLine (const CvArr *points, int dist_type, double param, double reps, double aeps, float *line)
| Fits a line into set of 2d or 3d points in a robust way (M-estimator technique) More...
void | cvFloodFill (CvArr *image, CvPoint seed_point, CvScalar new_val, CvScalar lo_diff=cvScalarAll(0), CvScalar up_diff=cvScalarAll(0), CvConnectedComp *comp=NULL, int flags=4, CvArr *mask=NULL)
| Fills the connected component until the color difference gets large enough. More...
CvFont | cvFont (double scale, int thickness=1)
CvMat * | cvGetAffineTransform (const CvPoint2D32f *src, const CvPoint2D32f *dst, CvMat *map_matrix)
| Computes affine transform matrix for mapping src[i] to dst[i] (i=0,1,2) More...
double | cvGetCentralMoment (CvMoments *moments, int x_order, int y_order)
| Retrieve central moments. More...
void | cvGetHuMoments (CvMoments *moments, CvHuMoments *hu_moments)
| Calculates 7 Hu's invariants from precalculated spatial and central moments. More...
void | cvGetMinMaxHistValue (const CvHistogram *hist, float *min_value, float *max_value, int *min_idx=NULL, int *max_idx=NULL)
| Finds the minimum and maximum histogram bins. More...
double | cvGetNormalizedCentralMoment (CvMoments *moments, int x_order, int y_order)
| Retrieve normalized central moments. More...
CvMat * | cvGetPerspectiveTransform (const CvPoint2D32f *src, const CvPoint2D32f *dst, CvMat *map_matrix)
| Computes perspective transform matrix for mapping src[i] to dst[i] (i=0,1,2,3) More...
void | cvGetQuadrangleSubPix (const CvArr *src, CvArr *dst, const CvMat *map_matrix)
| Retrieves quadrangle from the input array. More...
void | cvGetRectSubPix (const CvArr *src, CvArr *dst, CvPoint2D32f center)
| Retrieves the rectangular image region with specified center from the input array. More...
double | cvGetSpatialMoment (CvMoments *moments, int x_order, int y_order)
| Retrieve spatial moments. More...
void | cvGetTextSize (const char *text_string, const CvFont *font, CvSize *text_size, int *baseline)
| Calculates bounding box of text stroke (useful for alignment) More...
void | cvGoodFeaturesToTrack (const CvArr *image, CvArr *eig_image, CvArr *temp_image, CvPoint2D32f *corners, int *corner_count, double quality_level, double min_distance, const CvArr *mask=NULL, int block_size=3, int use_harris=0, double k=0.04)
| Finds a sparse set of points within the selected region that seem to be easy to track. More...
CvSeq * | cvHoughCircles (CvArr *image, void *circle_storage, int method, double dp, double min_dist, double param1=100, double param2=100, int min_radius=0, int max_radius=0)
| Finds circles in the image. More...
CvSeq * | cvHoughLines2 (CvArr *image, void *line_storage, int method, double rho, double theta, int threshold, double param1=0, double param2=0, double min_theta=0, double max_theta=CV_PI)
| Finds lines on binary image using one of several methods. More...
void | cvInitFont (CvFont *font, int font_face, double hscale, double vscale, double shear=0, int thickness=1, int line_type=8)
| Initializes font structure (OpenCV 1.x API). More...
int | cvInitLineIterator (const CvArr *image, CvPoint pt1, CvPoint pt2, CvLineIterator *line_iterator, int connectivity=8, int left_to_right=0)
| Initializes line iterator. More...
void | cvInitUndistortMap (const CvMat *camera_matrix, const CvMat *distortion_coeffs, CvArr *mapx, CvArr *mapy)
| Computes transformation map from intrinsic camera parameters that can used by cvRemap. More...
void | cvInitUndistortRectifyMap (const CvMat *camera_matrix, const CvMat *dist_coeffs, const CvMat *R, const CvMat *new_camera_matrix, CvArr *mapx, CvArr *mapy)
| Computes undistortion+rectification map for a head of stereo camera. More...
void | cvIntegral (const CvArr *image, CvArr *sum, CvArr *sqsum=NULL, CvArr *tilted_sum=NULL)
| Finds integral image: SUM(X,Y) = sum(x<X,y<Y)I(x,y) More...
void | cvLaplace (const CvArr *src, CvArr *dst, int aperture_size=3)
| Calculates the image Laplacian: (d2/dx + d2/dy)I. More...
void | cvLine (CvArr *img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int line_type=8, int shift=0)
| Draws 4-connected, 8-connected or antialiased line segment connecting two points. More...
void | cvLinearPolar (const CvArr *src, CvArr *dst, CvPoint2D32f center, double maxRadius, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS)
void | cvLogPolar (const CvArr *src, CvArr *dst, CvPoint2D32f center, double M, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS)
| Performs forward or inverse log-polar image transform. More...
CvHistogram * | cvMakeHistHeaderForArray (int dims, int *sizes, CvHistogram *hist, float *data, float **ranges=NULL, int uniform=1)
| Makes a histogram out of an array. More...
double | cvMatchShapes (const void *object1, const void *object2, int method, double parameter=0)
| Compares two contours by matching their moments. More...
void | cvMatchTemplate (const CvArr *image, const CvArr *templ, CvArr *result, int method)
| Measures similarity between template and overlapped windows in the source image and fills the resultant image with the measurements. More...
CvRect | cvMaxRect (const CvRect *rect1, const CvRect *rect2)
| Finds minimum rectangle containing two given rectangles. More...
CvBox2D | cvMinAreaRect2 (const CvArr *points, CvMemStorage *storage=NULL)
| Finds minimum area rotated rectangle bounding a set of points. More...
int | cvMinEnclosingCircle (const CvArr *points, CvPoint2D32f *center, float *radius)
| Finds minimum enclosing circle for a set of points. More...
void | cvMoments (const CvArr *arr, CvMoments *moments, int binary=0)
| Calculates all spatial and central moments up to the 3rd order. More...
CvMoments | cvMoments ()
CvMoments | cvMoments (const cv::Moments &m)
void | cvMorphologyEx (const CvArr *src, CvArr *dst, CvArr *temp, IplConvKernel *element, int operation, int iterations=1)
| Performs complex morphological transformation. More...
void | cvMultiplyAcc (const CvArr *image1, const CvArr *image2, CvArr *acc, const CvArr *mask=NULL)
| Adds a product of two images to accumulator. More...
void | cvNormalizeHist (CvHistogram *hist, double factor)
| Normalizes the histogram. More...
double | cvPointPolygonTest (const CvArr *contour, CvPoint2D32f pt, int measure_dist)
| Checks whether the point is inside polygon, outside, on an edge (at a vertex). More...
CvSeq * | cvPointSeqFromMat (int seq_kind, const CvArr *mat, CvContour *contour_header, CvSeqBlock *block)
| Initializes sequence header for a matrix (column or row vector) of points. More...
void | cvPolyLine (CvArr *img, CvPoint **pts, const int *npts, int contours, int is_closed, CvScalar color, int thickness=1, int line_type=8, int shift=0)
| Draws one or more polygonal curves. More...
void | cvPreCornerDetect (const CvArr *image, CvArr *corners, int aperture_size=3)
| Calculates constraint image for corner detection. More...
void | cvPutText (CvArr *img, const char *text, CvPoint org, const CvFont *font, CvScalar color)
| Renders text stroke with specified font and color at specified location. CvFont should be initialized with cvInitFont. More...
void | cvPyrDown (const CvArr *src, CvArr *dst, int filter=CV_GAUSSIAN_5x5)
| Smoothes the input image with gaussian kernel and then down-samples it. More...
void | cvPyrMeanShiftFiltering (const CvArr *src, CvArr *dst, double sp, double sr, int max_level=1, CvTermCriteria termcrit=cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 5, 1))
| Filters image using meanshift algorithm. More...
void | cvPyrUp (const CvArr *src, CvArr *dst, int filter=CV_GAUSSIAN_5x5)
| Up-samples image and smoothes the result with gaussian kernel. More...
CvPoint | cvReadChainPoint (CvChainPtReader *reader)
| Retrieves the next chain point. More...
void | cvRectangle (CvArr *img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int line_type=8, int shift=0)
| Draws a rectangle given two opposite corners of the rectangle (pt1 & pt2) More...
void | cvRectangleR (CvArr *img, CvRect r, CvScalar color, int thickness=1, int line_type=8, int shift=0)
| Draws a rectangle specified by a CvRect structure. More...
void | cvReleaseHist (CvHistogram **hist)
| Releases the histogram. More...
void | cvReleasePyramid (CvMat ***pyramid, int extra_layers)
| Releases pyramid. More...
void | cvReleaseStructuringElement (IplConvKernel **element)
| releases structuring element More...
void | cvRemap (const CvArr *src, CvArr *dst, const CvArr *mapx, const CvArr *mapy, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, CvScalar fillval=cvScalarAll(0))
| Performs generic geometric transformation using the specified coordinate maps. More...
void | cvResize (const CvArr *src, CvArr *dst, int interpolation=CV_INTER_LINEAR)
| Resizes image (input array is resized to fit the destination array) More...
void | cvRunningAvg (const CvArr *image, CvArr *acc, double alpha, const CvArr *mask=NULL)
| Adds image to accumulator with weights: acc = acc*(1-alpha) + image*alpha. More...
int | cvSampleLine (const CvArr *image, CvPoint pt1, CvPoint pt2, void *buffer, int connectivity=8)
| Fetches pixels that belong to the specified line segment and stores them to the buffer. More...
void | cvSetHistBinRanges (CvHistogram *hist, float **ranges, int uniform=1)
| Sets the bounds of the histogram bins. More...
void | cvSmooth (const CvArr *src, CvArr *dst, int smoothtype=CV_GAUSSIAN, int size1=3, int size2=0, double sigma1=0, double sigma2=0)
| Smooths the image in one of several ways. More...
void | cvSobel (const CvArr *src, CvArr *dst, int xorder, int yorder, int aperture_size=3)
| Calculates an image derivative using generalized Sobel. More...
void | cvSquareAcc (const CvArr *image, CvArr *sqsum, const CvArr *mask=NULL)
| Adds squared image to accumulator. More...
CvContourScanner | cvStartFindContours (CvArr *image, CvMemStorage *storage, int header_size=sizeof(CvContour), int mode=CV_RETR_LIST, int method=CV_CHAIN_APPROX_SIMPLE, CvPoint offset=cvPoint(0, 0))
| Initializes contour retrieving process. More...
void | cvStartReadChainPoints (CvChain *chain, CvChainPtReader *reader)
| Initializes Freeman chain reader. More...
void | cvSubstituteContour (CvContourScanner scanner, CvSeq *new_contour)
| Substitutes the last retrieved contour with the new one. More...
void | cvThreshHist (CvHistogram *hist, double threshold)
| Thresholds the histogram. More...
double | cvThreshold (const CvArr *src, CvArr *dst, double threshold, double max_value, int threshold_type)
| Applies fixed-level threshold to grayscale image. More...
void | cvUndistort2 (const CvArr *src, CvArr *dst, const CvMat *camera_matrix, const CvMat *distortion_coeffs, const CvMat *new_camera_matrix=0)
| Transforms the input image to compensate lens distortion. More...
void | cvUndistortPoints (const CvMat *src, CvMat *dst, const CvMat *camera_matrix, const CvMat *dist_coeffs, const CvMat *R=0, const CvMat *P=0)
| Computes the original (undistorted) feature coordinates from the observed (distorted) coordinates. More...
void | cvWarpAffine (const CvArr *src, CvArr *dst, const CvMat *map_matrix, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, CvScalar fillval=cvScalarAll(0))
| Warps image with affine transform. More...
void | cvWarpPerspective (const CvArr *src, CvArr *dst, const CvMat *map_matrix, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, CvScalar fillval=cvScalarAll(0))
| Warps image with perspective (projective) transform. More...
void | cvWatershed (const CvArr *image, CvArr *markers)
| Segments image using seed "markers". More...

## Detailed Description

## Macro Definition Documentation

## § CV_AA

#define CV_AA 16

`#include <opencv2/imgproc/imgproc_c.h>`

## § CV_FILLED

#define CV_FILLED -1

`#include <opencv2/imgproc/imgproc_c.h>`

## § CV_FONT_HERSHEY_COMPLEX

#define CV_FONT_HERSHEY_COMPLEX 3

`#include <opencv2/imgproc/imgproc_c.h>`

## § CV_FONT_HERSHEY_COMPLEX_SMALL

#define CV_FONT_HERSHEY_COMPLEX_SMALL 5

`#include <opencv2/imgproc/imgproc_c.h>`

## § CV_FONT_HERSHEY_DUPLEX

#define CV_FONT_HERSHEY_DUPLEX 2

`#include <opencv2/imgproc/imgproc_c.h>`

## § CV_FONT_HERSHEY_PLAIN

#define CV_FONT_HERSHEY_PLAIN 1

`#include <opencv2/imgproc/imgproc_c.h>`

## § CV_FONT_HERSHEY_SCRIPT_COMPLEX

#define CV_FONT_HERSHEY_SCRIPT_COMPLEX 7

`#include <opencv2/imgproc/imgproc_c.h>`

## § CV_FONT_HERSHEY_SCRIPT_SIMPLEX

#define CV_FONT_HERSHEY_SCRIPT_SIMPLEX 6

`#include <opencv2/imgproc/imgproc_c.h>`

## § CV_FONT_HERSHEY_SIMPLEX

#define CV_FONT_HERSHEY_SIMPLEX 0

`#include <opencv2/imgproc/imgproc_c.h>`

## § CV_FONT_HERSHEY_TRIPLEX

#define CV_FONT_HERSHEY_TRIPLEX 4

`#include <opencv2/imgproc/imgproc_c.h>`

## § CV_FONT_ITALIC

#define CV_FONT_ITALIC 16

`#include <opencv2/imgproc/imgproc_c.h>`

## § CV_FONT_VECTOR0

#define CV_FONT_VECTOR0 CV_FONT_HERSHEY_SIMPLEX

`#include <opencv2/imgproc/imgproc_c.h>`

## § CV_INIT_3X3_DELTAS

#define CV_INIT_3X3_DELTAS | ( |  | deltas,
|  |  | step,
|  |  | nch
| ) |  |

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

Value:
((deltas)[0] = (nch), (deltas)[1] = -(step) + (nch), \
(deltas)[2] = -(step), (deltas)[3] = -(step) - (nch), \
(deltas)[4] = -(nch), (deltas)[5] = (step) - (nch), \
(deltas)[6] = (step), (deltas)[7] = (step) + (nch))

initializes 8-element array for fast access to 3x3 neighborhood of a pixel

## § CV_NEXT_LINE_POINT

#define CV_NEXT_LINE_POINT | ( |  | line_iterator | ) |

`#include <opencv2/imgproc/imgproc_c.h>`

Value:
{ \
int _line_iterator_mask = (line_iterator).err < 0 ? -1 : 0; \
(line_iterator).err += (line_iterator).minus_delta + \
((line_iterator).plus_delta & _line_iterator_mask); \
(line_iterator).ptr += (line_iterator).minus_step + \
((line_iterator).plus_step & _line_iterator_mask); \
}

## § cvCalcBackProject

#define cvCalcBackProject | ( |  | image,
|  |  | dst,
|  |  | hist
| ) |  | cvCalcArrBackProject((CvArr**)image, dst, hist)

`#include <opencv2/imgproc/imgproc_c.h>`

## § cvCalcBackProjectPatch

#define cvCalcBackProjectPatch | ( |  | image,
|  |  | dst,
|  |  | range,
|  |  | hist,
|  |  | method,
|  |  | factor
| ) |  | cvCalcArrBackProjectPatch( (CvArr**)image, dst, range, hist, method, factor )

`#include <opencv2/imgproc/imgproc_c.h>`

## § cvDrawCircle

#define cvDrawCircle cvCircle

`#include <opencv2/imgproc/imgproc_c.h>`

## § cvDrawEllipse

#define cvDrawEllipse cvEllipse

`#include <opencv2/imgproc/imgproc_c.h>`

## § cvDrawLine

#define cvDrawLine cvLine

`#include <opencv2/imgproc/imgproc_c.h>`

## § cvDrawPolyLine

#define cvDrawPolyLine cvPolyLine

`#include <opencv2/imgproc/imgproc_c.h>`

## § cvDrawRect

#define cvDrawRect cvRectangle

`#include <opencv2/imgproc/imgproc_c.h>`

## Typedef Documentation

## § CvContourScanner

typedef struct _CvContourScanner* CvContourScanner

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

## § CvDistanceFunction

typedef float( * CvDistanceFunction) (const float *a, const float *b, void *user_param)

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

## Enumeration Type Documentation

## § anonymous enum

anonymous enum

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

Filters used in pyramid decomposition

Enumerator
CV_GAUSSIAN_5x5 |

## § anonymous enum

anonymous enum

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

Special filters

Enumerator
CV_SCHARR |
CV_MAX_SOBEL_KSIZE |

## § anonymous enum

anonymous enum

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

Constants for color conversion

Enumerator
CV_BGR2BGRA |
CV_RGB2RGBA |
CV_BGRA2BGR |
CV_RGBA2RGB |
CV_BGR2RGBA |
CV_RGB2BGRA |
CV_RGBA2BGR |
CV_BGRA2RGB |
CV_BGR2RGB |
CV_RGB2BGR |
CV_BGRA2RGBA |
CV_RGBA2BGRA |
CV_BGR2GRAY |
CV_RGB2GRAY |
CV_GRAY2BGR |
CV_GRAY2RGB |
CV_GRAY2BGRA |
CV_GRAY2RGBA |
CV_BGRA2GRAY |
CV_RGBA2GRAY |
CV_BGR2BGR565 |
CV_RGB2BGR565 |
CV_BGR5652BGR |
CV_BGR5652RGB |
CV_BGRA2BGR565 |
CV_RGBA2BGR565 |
CV_BGR5652BGRA |
CV_BGR5652RGBA |
CV_GRAY2BGR565 |
CV_BGR5652GRAY |
CV_BGR2BGR555 |
CV_RGB2BGR555 |
CV_BGR5552BGR |
CV_BGR5552RGB |
CV_BGRA2BGR555 |
CV_RGBA2BGR555 |
CV_BGR5552BGRA |
CV_BGR5552RGBA |
CV_GRAY2BGR555 |
CV_BGR5552GRAY |
CV_BGR2XYZ |
CV_RGB2XYZ |
CV_XYZ2BGR |
CV_XYZ2RGB |
CV_BGR2YCrCb |
CV_RGB2YCrCb |
CV_YCrCb2BGR |
CV_YCrCb2RGB |
CV_BGR2HSV |
CV_RGB2HSV |
CV_BGR2Lab |
CV_RGB2Lab |
CV_BayerBG2BGR |
CV_BayerGB2BGR |
CV_BayerRG2BGR |
CV_BayerGR2BGR |
CV_BayerBG2RGB |
CV_BayerGB2RGB |
CV_BayerRG2RGB |
CV_BayerGR2RGB |
CV_BGR2Luv |
CV_RGB2Luv |
CV_BGR2HLS |
CV_RGB2HLS |
CV_HSV2BGR |
CV_HSV2RGB |
CV_Lab2BGR |
CV_Lab2RGB |
CV_Luv2BGR |
CV_Luv2RGB |
CV_HLS2BGR |
CV_HLS2RGB |
CV_BayerBG2BGR_VNG |
CV_BayerGB2BGR_VNG |
CV_BayerRG2BGR_VNG |
CV_BayerGR2BGR_VNG |
CV_BayerBG2RGB_VNG |
CV_BayerGB2RGB_VNG |
CV_BayerRG2RGB_VNG |
CV_BayerGR2RGB_VNG |
CV_BGR2HSV_FULL |
CV_RGB2HSV_FULL |
CV_BGR2HLS_FULL |
CV_RGB2HLS_FULL |
CV_HSV2BGR_FULL |
CV_HSV2RGB_FULL |
CV_HLS2BGR_FULL |
CV_HLS2RGB_FULL |
CV_LBGR2Lab |
CV_LRGB2Lab |
CV_LBGR2Luv |
CV_LRGB2Luv |
CV_Lab2LBGR |
CV_Lab2LRGB |
CV_Luv2LBGR |
CV_Luv2LRGB |
CV_BGR2YUV |
CV_RGB2YUV |
CV_YUV2BGR |
CV_YUV2RGB |
CV_BayerBG2GRAY |
CV_BayerGB2GRAY |
CV_BayerRG2GRAY |
CV_BayerGR2GRAY |
CV_YUV2RGB_NV12 |
CV_YUV2BGR_NV12 |
CV_YUV2RGB_NV21 |
CV_YUV2BGR_NV21 |
CV_YUV420sp2RGB |
CV_YUV420sp2BGR |
CV_YUV2RGBA_NV12 |
CV_YUV2BGRA_NV12 |
CV_YUV2RGBA_NV21 |
CV_YUV2BGRA_NV21 |
CV_YUV420sp2RGBA |
CV_YUV420sp2BGRA |
CV_YUV2RGB_YV12 |
CV_YUV2BGR_YV12 |
CV_YUV2RGB_IYUV |
CV_YUV2BGR_IYUV |
CV_YUV2RGB_I420 |
CV_YUV2BGR_I420 |
CV_YUV420p2RGB |
CV_YUV420p2BGR |
CV_YUV2RGBA_YV12 |
CV_YUV2BGRA_YV12 |
CV_YUV2RGBA_IYUV |
CV_YUV2BGRA_IYUV |
CV_YUV2RGBA_I420 |
CV_YUV2BGRA_I420 |
CV_YUV420p2RGBA |
CV_YUV420p2BGRA |
CV_YUV2GRAY_420 |
CV_YUV2GRAY_NV21 |
CV_YUV2GRAY_NV12 |
CV_YUV2GRAY_YV12 |
CV_YUV2GRAY_IYUV |
CV_YUV2GRAY_I420 |
CV_YUV420sp2GRAY |
CV_YUV420p2GRAY |
CV_YUV2RGB_UYVY |
CV_YUV2BGR_UYVY |
CV_YUV2RGB_Y422 |
CV_YUV2BGR_Y422 |
CV_YUV2RGB_UYNV |
CV_YUV2BGR_UYNV |
CV_YUV2RGBA_UYVY |
CV_YUV2BGRA_UYVY |
CV_YUV2RGBA_Y422 |
CV_YUV2BGRA_Y422 |
CV_YUV2RGBA_UYNV |
CV_YUV2BGRA_UYNV |
CV_YUV2RGB_YUY2 |
CV_YUV2BGR_YUY2 |
CV_YUV2RGB_YVYU |
CV_YUV2BGR_YVYU |
CV_YUV2RGB_YUYV |
CV_YUV2BGR_YUYV |
CV_YUV2RGB_YUNV |
CV_YUV2BGR_YUNV |
CV_YUV2RGBA_YUY2 |
CV_YUV2BGRA_YUY2 |
CV_YUV2RGBA_YVYU |
CV_YUV2BGRA_YVYU |
CV_YUV2RGBA_YUYV |
CV_YUV2BGRA_YUYV |
CV_YUV2RGBA_YUNV |
CV_YUV2BGRA_YUNV |
CV_YUV2GRAY_UYVY |
CV_YUV2GRAY_YUY2 |
CV_YUV2GRAY_Y422 |
CV_YUV2GRAY_UYNV |
CV_YUV2GRAY_YVYU |
CV_YUV2GRAY_YUYV |
CV_YUV2GRAY_YUNV |
CV_RGBA2mRGBA |
CV_mRGBA2RGBA |
CV_RGB2YUV_I420 |
CV_BGR2YUV_I420 |
CV_RGB2YUV_IYUV |
CV_BGR2YUV_IYUV |
CV_RGBA2YUV_I420 |
CV_BGRA2YUV_I420 |
CV_RGBA2YUV_IYUV |
CV_BGRA2YUV_IYUV |
CV_RGB2YUV_YV12 |
CV_BGR2YUV_YV12 |
CV_RGBA2YUV_YV12 |
CV_BGRA2YUV_YV12 |
CV_BayerBG2BGR_EA |
CV_BayerGB2BGR_EA |
CV_BayerRG2BGR_EA |
CV_BayerGR2BGR_EA |
CV_BayerBG2RGB_EA |
CV_BayerGB2RGB_EA |
CV_BayerRG2RGB_EA |
CV_BayerGR2RGB_EA |
CV_BayerBG2BGRA |
CV_BayerGB2BGRA |
CV_BayerRG2BGRA |
CV_BayerGR2BGRA |
CV_BayerBG2RGBA |
CV_BayerGB2RGBA |
CV_BayerRG2RGBA |
CV_BayerGR2RGBA |
CV_COLORCVT_MAX |

## § anonymous enum

anonymous enum

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

Sub-pixel interpolation methods

Enumerator
CV_INTER_NN |
CV_INTER_LINEAR |
CV_INTER_CUBIC |
CV_INTER_AREA |
CV_INTER_LANCZOS4 |

## § anonymous enum

anonymous enum

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

... and other image warping flags

Enumerator
CV_WARP_FILL_OUTLIERS |
CV_WARP_INVERSE_MAP |

## § anonymous enum

anonymous enum

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

Morphological operations

Enumerator
CV_MOP_ERODE |
CV_MOP_DILATE |
CV_MOP_OPEN |
CV_MOP_CLOSE |
CV_MOP_GRADIENT |
CV_MOP_TOPHAT |
CV_MOP_BLACKHAT |

## § anonymous enum

anonymous enum

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

Template matching methods

Enumerator
CV_TM_SQDIFF |
CV_TM_SQDIFF_NORMED |
CV_TM_CCORR |
CV_TM_CCORR_NORMED |
CV_TM_CCOEFF |
CV_TM_CCOEFF_NORMED |

## § anonymous enum

anonymous enum

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

Contour retrieval modes

Enumerator
CV_RETR_EXTERNAL |
CV_RETR_LIST |
CV_RETR_CCOMP |
CV_RETR_TREE |
CV_RETR_FLOODFILL |

## § anonymous enum

anonymous enum

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

Contour approximation methods

Enumerator
CV_CHAIN_CODE |
CV_CHAIN_APPROX_NONE |
CV_CHAIN_APPROX_SIMPLE |
CV_CHAIN_APPROX_TC89_L1 |
CV_CHAIN_APPROX_TC89_KCOS |
CV_LINK_RUNS |

## § anonymous enum

anonymous enum

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

Contour approximation algorithms

Enumerator
CV_POLY_APPROX_DP |

## § anonymous enum

anonymous enum

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

Shape matching methods

Enumerator
CV_CONTOURS_MATCH_I1 | \[I_1(A,B) = \sum _{i=1...7} \left | \frac{1}{m^A_i} - \frac{1}{m^B_i} \right |\]
CV_CONTOURS_MATCH_I2 | \[I_2(A,B) = \sum _{i=1...7} \left | m^A_i - m^B_i \right |\]
CV_CONTOURS_MATCH_I3 | \[I_3(A,B) = \max _{i=1...7} \frac{ \left| m^A_i - m^B_i \right| }{ \left| m^A_i \right| }\]

## § anonymous enum

anonymous enum

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

Shape orientation

Enumerator
CV_CLOCKWISE |
CV_COUNTER_CLOCKWISE |

## § anonymous enum

anonymous enum

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

Histogram comparison methods

Enumerator
CV_COMP_CORREL |
CV_COMP_CHISQR |
CV_COMP_INTERSECT |
CV_COMP_BHATTACHARYYA |
CV_COMP_HELLINGER |
CV_COMP_CHISQR_ALT |
CV_COMP_KL_DIV |

## § anonymous enum

anonymous enum

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

Mask size for distance transform

Enumerator
CV_DIST_MASK_3 |
CV_DIST_MASK_5 |
CV_DIST_MASK_PRECISE |

## § anonymous enum

anonymous enum

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

Content of output label array: connected components or pixels

Enumerator
CV_DIST_LABEL_CCOMP |
CV_DIST_LABEL_PIXEL |

## § anonymous enum

anonymous enum

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

Distance types for Distance Transform and M-estimators

Enumerator
CV_DIST_USER | User defined distance
CV_DIST_L1 | distance = |x1-x2| + |y1-y2|
CV_DIST_L2 | the simple euclidean distance
CV_DIST_C | distance = max(|x1-x2|,|y1-y2|)
CV_DIST_L12 | L1-L2 metric: distance = 2(sqrt(1+x*x/2) - 1))
CV_DIST_FAIR | distance = c^2(|x|/c-log(1+|x|/c)), c = 1.3998
CV_DIST_WELSCH | distance = c^2/2(1-exp(-(x/c)^2)), c = 2.9846
CV_DIST_HUBER | distance = |x|<c ? x^2/2 : c(|x|-c/2), c=1.345

## § anonymous enum

anonymous enum

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

Threshold types

Enumerator
CV_THRESH_BINARY | value = value > threshold ? max_value : 0
CV_THRESH_BINARY_INV | value = value > threshold ? 0 : max_value
CV_THRESH_TRUNC | value = value > threshold ? threshold : value
CV_THRESH_TOZERO | value = value > threshold ? value : 0
CV_THRESH_TOZERO_INV | value = value > threshold ? 0 : value
CV_THRESH_MASK |
CV_THRESH_OTSU | use Otsu algorithm to choose the optimal threshold value; combine the flag with one of the above CV_THRESH_* values
CV_THRESH_TRIANGLE | use Triangle algorithm to choose the optimal threshold value; combine the flag with one of the above CV_THRESH_* values, but not with CV_THRESH_OTSU

## § anonymous enum

anonymous enum

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

Adaptive threshold methods

Enumerator
CV_ADAPTIVE_THRESH_MEAN_C |
CV_ADAPTIVE_THRESH_GAUSSIAN_C |

## § anonymous enum

anonymous enum

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

FloodFill flags

Enumerator
CV_FLOODFILL_FIXED_RANGE |
CV_FLOODFILL_MASK_ONLY |

## § anonymous enum

anonymous enum

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

Canny edge detector flags

Enumerator
CV_CANNY_L2_GRADIENT |

## § anonymous enum

anonymous enum

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

Variants of a Hough transform

Enumerator
CV_HOUGH_STANDARD |
CV_HOUGH_PROBABILISTIC |
CV_HOUGH_MULTI_SCALE |
CV_HOUGH_GRADIENT |

## § MorphShapes_c

enum MorphShapes_c

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

Shapes of a structuring element for morphological operations

See also
  cv::MorphShapes, cv::getStructuringElement

Enumerator
CV_SHAPE_RECT |
CV_SHAPE_CROSS |
CV_SHAPE_ELLIPSE |
CV_SHAPE_CUSTOM | custom structuring element

## § SmoothMethod_c

enum SmoothMethod_c

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

Image smooth methods

Enumerator
CV_BLUR_NO_SCALE | linear convolution with \(\texttt{size1}\times\texttt{size2}\) box kernel (all 1's). If you want to smooth different pixels with different-size box kernels, you can use the integral image that is computed using integral
CV_BLUR | linear convolution with \(\texttt{size1}\times\texttt{size2}\) box kernel (all 1's) with subsequent scaling by \(1/(\texttt{size1}\cdot\texttt{size2})\)
CV_GAUSSIAN | linear convolution with a \(\texttt{size1}\times\texttt{size2}\) Gaussian kernel
CV_MEDIAN | median filter with a \(\texttt{size1}\times\texttt{size1}\) square aperture
CV_BILATERAL | bilateral filter with a \(\texttt{size1}\times\texttt{size1}\) square aperture, color sigma= sigma1 and spatial sigma= sigma2. If size1=0, the aperture square side is set to cvRound(sigma2*1.5)*2+1. See cv::bilateralFilter

## Function Documentation

## § cv2DRotationMatrix()

CvMat* cv2DRotationMatrix | ( | CvPoint2D32f | center,
|  | double | angle,
|  | double | scale,
|  | CvMat * | map_matrix
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Computes rotation_matrix matrix.

See also
  cv::getRotationMatrix2D

## § cvAcc()

void cvAcc | ( | const CvArr * | image,
|  | CvArr * | sum,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Adds image to accumulator.

See also
  cv::accumulate

## § cvAdaptiveThreshold()

void cvAdaptiveThreshold | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | double | max_value,
|  | int | adaptive_method = `CV_ADAPTIVE_THRESH_MEAN_C`,
|  | int | threshold_type = `CV_THRESH_BINARY`,
|  | int | block_size = `3`,
|  | double | param1 = `5`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Applies adaptive threshold to grayscale image.

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

## § cvApproxChains()

CvSeq* cvApproxChains | ( | CvSeq * | src_seq,
|  | CvMemStorage * | storage,
|  | int | method = `CV_CHAIN_APPROX_SIMPLE`,
|  | double | parameter = `0`,
|  | int | minimal_perimeter = `0`,
|  | int | recursive = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Approximates Freeman chain(s) with a polygonal curve.

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_seq | Pointer to the approximated Freeman chain that can refer to other chains.
  storage | Storage location for the resulting polylines.
  method | Approximation method (see the description of the function :ocvFindContours ).
  parameter | Method parameter (not used now).
  minimal_perimeter | Approximates only those contours whose perimeters are not less than minimal_perimeter . Other chains are removed from the resulting structure.
  recursive | Recursion 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

## § cvApproxPoly()

CvSeq* cvApproxPoly | ( | const void * | src_seq,
|  | int | header_size,
|  | CvMemStorage * | storage,
|  | int | method,
|  | double | eps,
|  | int | recursive = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::approxPolyDP

## § cvArcLength()

double cvArcLength | ( | const void * | curve,
|  | CvSlice | slice = `CV_WHOLE_SEQ`,
|  | int | is_closed = `-1`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::arcLength

## § cvBoundingRect()

CvRect cvBoundingRect | ( | CvArr * | points,
|  | int | update = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Calculates contour bounding rectangle (update=1) or just retrieves pre-calculated rectangle (update=0)

See also
  cv::boundingRect

## § cvBoxPoints()

void cvBoxPoints | ( | CvBox2D | box,
|  | CvPoint2D32f | pt[4]
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Finds coordinates of the box vertices.

## § cvCalcArrBackProject()

void cvCalcArrBackProject | ( | CvArr ** | image,
|  | CvArr * | dst,
|  | const CvHistogram * | hist
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Calculates back project.

See also
  cvCalcBackProject, cv::calcBackProject

## § cvCalcArrBackProjectPatch()

void cvCalcArrBackProjectPatch | ( | CvArr ** | image,
|  | CvArr * | dst,
|  | CvSize | range,
|  | CvHistogram * | hist,
|  | int | method,
|  | double | factor
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

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

  image | Source images (though, you may pass CvMat** as well).
  dst | Destination image.
  range |
  hist | Histogram.
  method | Comparison method passed to cvCompareHist (see the function description).
  factor | Normalization factor for histograms that affects the normalization scale of the destination image. Pass 1 if not sure.

See also
  cvCalcBackProjectPatch

## § cvCalcArrHist()

void cvCalcArrHist | ( | CvArr ** | arr,
|  | CvHistogram * | hist,
|  | int | accumulate = `0`,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Calculates array histogram.

See also
  cv::calcHist

## § cvCalcBayesianProb()

void cvCalcBayesianProb | ( | CvHistogram ** | src,
|  | int | number,
|  | CvHistogram ** | dst
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

## § cvCalcEMD2()

float cvCalcEMD2 | ( | const CvArr * | signature1,
|  | const CvArr * | signature2,
|  | int | distance_type,
|  | CvDistanceFunction | distance_func = `NULL`,
|  | const CvArr * | cost_matrix = `NULL`,
|  | CvArr * | flow = `NULL`,
|  | float * | lower_bound = `NULL`,
|  | void * | userdata = `NULL`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Computes earth mover distance between two weighted point sets (called signatures)

See also
  cv::EMD

## § cvCalcHist()

void cvCalcHist | ( | IplImage ** | image,
|  | CvHistogram * | hist,
|  | int | accumulate = `0`,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

## § cvCalcProbDensity()

void cvCalcProbDensity | ( | const CvHistogram * | hist1,
|  | const CvHistogram * | hist2,
|  | CvHistogram * | dst_hist,
|  | double | scale = `255`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Divides one histogram by another.

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

  hist1 | First histogram (the divisor).
  hist2 | Second histogram.
  dst_hist | Destination histogram.
  scale | Scale factor for the destination histogram.

## § cvCanny()

void cvCanny | ( | const CvArr * | image,
|  | CvArr * | edges,
|  | double | threshold1,
|  | double | threshold2,
|  | int | aperture_size = `3`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Runs canny edge detector.

See also
  cv::Canny

## § cvCheckContourConvexity()

int cvCheckContourConvexity | ( | const CvArr * | contour | ) |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::isContourConvex

## § cvCircle()

void cvCircle | ( | CvArr * | img,
|  | CvPoint | center,
|  | int | radius,
|  | CvScalar | color,
|  | int | thickness = `1`,
|  | int | line_type = `8`,
|  | int | shift = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Draws a circle with specified center and radius.

Thickness works in the same way as with cvRectangle

See also
  cv::circle

## § cvClearHist()

void cvClearHist | ( | CvHistogram * | hist | ) |

`#include <opencv2/imgproc/imgproc_c.h>`

Clears the 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

  hist | Histogram.

## § cvClipLine()

int cvClipLine | ( | CvSize | img_size,
|  | CvPoint * | pt1,
|  | CvPoint * | pt2
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

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

See also
  cv::clipLine

## § cvColorToScalar()

CvScalar cvColorToScalar | ( | double | packed_color,
|  | int | arrtype
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Unpacks color value.

if arrtype is CV_8UC?, color is treated as packed color value, otherwise the first channels (depending on arrtype) of destination scalar are set to the same value = color

## § cvCompareHist()

double cvCompareHist | ( | const CvHistogram * | hist1,
|  | const CvHistogram * | hist2,
|  | int | method
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Compares two histogram

## § cvContourArea()

double cvContourArea | ( | const CvArr * | contour,
|  | CvSlice | slice = `CV_WHOLE_SEQ`,
|  | int | oriented = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Calculates area of a contour or contour segment.

See also
  cv::contourArea

## § cvContourPerimeter()

double cvContourPerimeter | ( | const void * | contour | ) |

`#include <opencv2/imgproc/imgproc_c.h>`

same as cvArcLength for closed contour

## § cvConvertMaps()

void cvConvertMaps | ( | const CvArr * | mapx,
|  | const CvArr * | mapy,
|  | CvArr * | mapxy,
|  | CvArr * | mapalpha
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::convertMaps

## § cvConvexHull2()

CvSeq* cvConvexHull2 | ( | const CvArr * | input,
|  | void * | hull_storage = `NULL`,
|  | int | orientation = `CV_CLOCKWISE`,
|  | int | return_points = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Calculates exact convex hull of 2d point set.

See also
  cv::convexHull

## § cvConvexityDefects()

CvSeq* cvConvexityDefects | ( | const CvArr * | contour,
|  | const CvArr * | convexhull,
|  | CvMemStorage * | storage = `NULL`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Finds convexity defects for the contour.

See also
  cv::convexityDefects

## § cvCopyHist()

void cvCopyHist | ( | const CvHistogram * | src,
|  | CvHistogram ** | dst
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Copies a histogram.

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

  src | Source histogram.
  dst | Pointer to the destination histogram.

## § cvCopyMakeBorder()

void cvCopyMakeBorder | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | CvPoint | offset,
|  | int | bordertype,
|  | CvScalar | value = `cvScalarAll(0)`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

## § cvCornerEigenValsAndVecs()

void cvCornerEigenValsAndVecs | ( | const CvArr * | image,
|  | CvArr * | eigenvv,
|  | int | block_size,
|  | int | aperture_size = `3`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::cornerEigenValsAndVecs

## § cvCornerHarris()

void cvCornerHarris | ( | const CvArr * | image,
|  | CvArr * | harris_response,
|  | int | block_size,
|  | int | aperture_size = `3`,
|  | double | k = `0.04`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Harris corner detector:

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

See also
  cv::cornerHarris

## § cvCornerMinEigenVal()

void cvCornerMinEigenVal | ( | const CvArr * | image,
|  | CvArr * | eigenval,
|  | int | block_size,
|  | int | aperture_size = `3`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::cornerMinEigenVal

## § cvCreateHist()

CvHistogram* cvCreateHist | ( | int | dims,
|  | int * | sizes,
|  | int | type,
|  | float ** | ranges = `NULL`,
|  | int | uniform = `1`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Creates a histogram.

The function creates a histogram of the specified size and returns a pointer to the created histogram. If the array ranges is 0, the histogram bin ranges must be specified later via the function cvSetHistBinRanges. Though cvCalcHist and cvCalcBackProject may process 8-bit images without setting bin ranges, they assume they are equally spaced in 0 to 255 bins.

Parameters

  dims | Number of histogram dimensions.
  sizes | Array of the histogram dimension sizes.
  type | Histogram representation format. CV_HIST_ARRAY means that the histogram data is represented as a multi-dimensional dense array CvMatND. CV_HIST_SPARSE means that histogram data is represented as a multi-dimensional sparse array CvSparseMat.
  ranges | Array of ranges for the histogram bins. Its meaning depends on the uniform parameter value. The ranges are used when the histogram is calculated or backprojected to determine which histogram bin corresponds to which value/tuple of values from the input image(s).
  uniform | Uniformity flag. If not zero, the histogram has evenly spaced bins and for every \(0<=i<cDims\) ranges[i] is an array of two numbers: lower and upper boundaries for the i-th histogram dimension. The whole range [lower,upper] is then split into dims[i] equal parts to determine the i-th input tuple value ranges for every histogram bin. And if uniform=0 , then the i-th element of the ranges array contains dims[i]+1 elements: \(\texttt{lower}_0, \texttt{upper}_0, \texttt{lower}_1, \texttt{upper}_1 = \texttt{lower}_2, ... \texttt{upper}_{dims[i]-1}\) where \(\texttt{lower}_j\) and \(\texttt{upper}_j\) are lower and upper boundaries of the i-th input tuple value for the j-th bin, respectively. In either case, the input values that are beyond the specified range for a histogram bin are not counted by cvCalcHist and filled with 0 by cvCalcBackProject.

## § cvCreatePyramid()

CvMat** cvCreatePyramid | ( | const CvArr * | img,
|  | int | extra_layers,
|  | double | rate,
|  | const CvSize * | layer_sizes = `0`,
|  | CvArr * | bufarr = `0`,
|  | int | calc = `1`,
|  | int | filter = `CV_GAUSSIAN_5x5`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Builds pyramid for an image.

See also
  buildPyramid

## § cvCreateStructuringElementEx()

IplConvKernel* cvCreateStructuringElementEx | ( | int | cols,
|  | int | rows,
|  | int | anchor_x,
|  | int | anchor_y,
|  | int | shape,
|  | int * | values = `NULL`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Returns a structuring element of the specified size and shape for morphological operations.

Note
  the created structuring element IplConvKernel* element must be released in the end using `cvReleaseStructuringElement(&element)`.

Parameters

  cols | Width of the structuring element
  rows | Height of the structuring element
  anchor_x | x-coordinate of the anchor
  anchor_y | y-coordinate of the anchor
  shape | element shape that could be one of the cv::MorphShapes_c
  values | integer array of cols*rows elements that specifies the custom shape of the structuring element, when shape=CV_SHAPE_CUSTOM.

See also
  cv::getStructuringElement

## § cvCvtColor()

void cvCvtColor | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | int | code
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Converts input array pixels from one color space to another.

See also
  cv::cvtColor

## § cvDilate()

void cvDilate | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | IplConvKernel * | element = `NULL`,
|  | int | iterations = `1`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

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

See also
  cv::dilate

## § cvDistTransform()

void cvDistTransform | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | int | distance_type = `CV_DIST_L2`,
|  | int | mask_size = `3`,
|  | const float * | mask = `NULL`,
|  | CvArr * | labels = `NULL`,
|  | int | labelType = `CV_DIST_LABEL_CCOMP`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Applies distance transform to binary image.

See also
  cv::distanceTransform

## § cvDrawContours()

void cvDrawContours | ( | CvArr * | img,
|  | CvSeq * | contour,
|  | CvScalar | external_color,
|  | CvScalar | hole_color,
|  | int | max_level,
|  | int | thickness = `1`,
|  | int | line_type = `8`,
|  | CvPoint | offset = `cvPoint(0, 0)`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Draws contour outlines or filled interiors on the image.

See also
  cv::drawContours

## § cvEllipse()

void cvEllipse | ( | CvArr * | img,
|  | CvPoint | center,
|  | CvSize | axes,
|  | double | angle,
|  | double | start_angle,
|  | double | end_angle,
|  | CvScalar | color,
|  | int | thickness = `1`,
|  | int | line_type = `8`,
|  | int | shift = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

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

## § cvEllipse2Poly()

int cvEllipse2Poly | ( | CvPoint | center,
|  | CvSize | axes,
|  | int | angle,
|  | int | arc_start,
|  | int | arc_end,
|  | CvPoint * | pts,
|  | int | delta
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Returns the polygon points which make up the given ellipse.

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

## § cvEllipseBox()

void cvEllipseBox | ( | CvArr * | img,
|  | CvBox2D | box,
|  | CvScalar | color,
|  | int | thickness = `1`,
|  | int | line_type = `8`,
|  | int | shift = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

## § cvEndFindContours()

CvSeq* cvEndFindContours | ( | CvContourScanner * | scanner | ) |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cvFindContours

## § cvEqualizeHist()

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

`#include <opencv2/imgproc/imgproc_c.h>`

equalizes histogram of 8-bit single-channel image

See also
  cv::equalizeHist

## § cvErode()

void cvErode | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | IplConvKernel * | element = `NULL`,
|  | int | iterations = `1`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::erode

## § cvFillConvexPoly()

void cvFillConvexPoly | ( | CvArr * | img,
|  | const CvPoint * | pts,
|  | int | npts,
|  | CvScalar | color,
|  | int | line_type = `8`,
|  | int | shift = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Fills convex or monotonous polygon.

See also
  cv::fillConvexPoly

## § cvFillPoly()

void cvFillPoly | ( | CvArr * | img,
|  | CvPoint ** | pts,
|  | const int * | npts,
|  | int | contours,
|  | CvScalar | color,
|  | int | line_type = `8`,
|  | int | shift = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Fills an area bounded by one or more arbitrary polygons.

See also
  cv::fillPoly

## § cvFilter2D()

void cvFilter2D | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | const CvMat * | kernel,
|  | CvPoint | anchor = `cvPoint(-1,-1)`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Convolves an image with the kernel.

Parameters

  src | input image.
  dst | output image of the same size and the same number of channels as src.
  kernel | convolution 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.
  anchor | anchor 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

## § cvFindContours()

int cvFindContours | ( | CvArr * | image,
|  | CvMemStorage * | storage,
|  | CvSeq ** | first_contour,
|  | int | header_size = `sizeof(CvContour)`,
|  | int | mode = `CV_RETR_LIST`,
|  | int | method = `CV_CHAIN_APPROX_SIMPLE`,
|  | CvPoint | offset = `cvPoint(0, 0)`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

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

## § cvFindCornerSubPix()

void cvFindCornerSubPix | ( | const CvArr * | image,
|  | CvPoint2D32f * | corners,
|  | int | count,
|  | CvSize | win,
|  | CvSize | zero_zone,
|  | CvTermCriteria | criteria
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Adjust corner position using some sort of gradient search.

See also
  cv::cornerSubPix

## § cvFindNextContour()

CvSeq* cvFindNextContour | ( | CvContourScanner | scanner | ) |

`#include <opencv2/imgproc/imgproc_c.h>`

Retrieves next contour.

See also
  cvFindContours

## § cvFitEllipse2()

CvBox2D cvFitEllipse2 | ( | const CvArr * | points | ) |

`#include <opencv2/imgproc/imgproc_c.h>`

Fits ellipse into a set of 2d points.

See also
  cv::fitEllipse

## § cvFitLine()

void cvFitLine | ( | const CvArr * | points,
|  | int | dist_type,
|  | double | param,
|  | double | reps,
|  | double | aeps,
|  | float * | line
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::fitLine

## § cvFloodFill()

void cvFloodFill | ( | CvArr * | image,
|  | CvPoint | seed_point,
|  | CvScalar | new_val,
|  | CvScalar | lo_diff = `cvScalarAll(0)`,
|  | CvScalar | up_diff = `cvScalarAll(0)`,
|  | CvConnectedComp * | comp = `NULL`,
|  | int | flags = `4`,
|  | CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::floodFill

## § cvFont()

CvFont cvFont | ( | double | scale,
|  | int | thickness = `1`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

## § cvGetAffineTransform()

CvMat* cvGetAffineTransform | ( | const CvPoint2D32f * | src,
|  | const CvPoint2D32f * | dst,
|  | CvMat * | map_matrix
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::getAffineTransform

## § cvGetCentralMoment()

double cvGetCentralMoment | ( | CvMoments * | moments,
|  | int | x_order,
|  | int | y_order
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Retrieve central moments.

## § cvGetHuMoments()

void cvGetHuMoments | ( | CvMoments * | moments,
|  | CvHuMoments * | hu_moments
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::HuMoments

## § cvGetMinMaxHistValue()

void cvGetMinMaxHistValue | ( | const CvHistogram * | hist,
|  | float * | min_value,
|  | float * | max_value,
|  | int * | min_idx = `NULL`,
|  | int * | max_idx = `NULL`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Finds the minimum and maximum histogram bins.

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

  hist | Histogram.
  min_value | Pointer to the minimum value of the histogram.
  max_value | Pointer to the maximum value of the histogram.
  min_idx | Pointer to the array of coordinates for the minimum.
  max_idx | Pointer to the array of coordinates for the maximum.

## § cvGetNormalizedCentralMoment()

double cvGetNormalizedCentralMoment | ( | CvMoments * | moments,
|  | int | x_order,
|  | int | y_order
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Retrieve normalized central moments.

## § cvGetPerspectiveTransform()

CvMat* cvGetPerspectiveTransform | ( | const CvPoint2D32f * | src,
|  | const CvPoint2D32f * | dst,
|  | CvMat * | map_matrix
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::getPerspectiveTransform

## § cvGetQuadrangleSubPix()

void cvGetQuadrangleSubPix | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | const CvMat * | map_matrix
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Retrieves quadrangle from the input array.

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

## § cvGetRectSubPix()

void cvGetRectSubPix | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | CvPoint2D32f | center
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

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

## § cvGetSpatialMoment()

double cvGetSpatialMoment | ( | CvMoments * | moments,
|  | int | x_order,
|  | int | y_order
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Retrieve spatial moments.

## § cvGetTextSize()

void cvGetTextSize | ( | const char * | text_string,
|  | const CvFont * | font,
|  | CvSize * | text_size,
|  | int * | baseline
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Calculates bounding box of text stroke (useful for alignment)

See also
  cv::getTextSize

## § cvGoodFeaturesToTrack()

void cvGoodFeaturesToTrack | ( | const CvArr * | image,
|  | CvArr * | eig_image,
|  | CvArr * | temp_image,
|  | CvPoint2D32f * | corners,
|  | int * | corner_count,
|  | double | quality_level,
|  | double | min_distance,
|  | const CvArr * | mask = `NULL`,
|  | int | block_size = `3`,
|  | int | use_harris = `0`,
|  | double | k = `0.04`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::goodFeaturesToTrack

## § cvHoughCircles()

CvSeq* cvHoughCircles | ( | CvArr * | image,
|  | void * | circle_storage,
|  | int | method,
|  | double | dp,
|  | double | min_dist,
|  | double | param1 = `100`,
|  | double | param2 = `100`,
|  | int | min_radius = `0`,
|  | int | max_radius = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Finds circles in the image.

See also
  cv::HoughCircles

## § cvHoughLines2()

CvSeq* cvHoughLines2 | ( | CvArr * | image,
|  | void * | line_storage,
|  | int | method,
|  | double | rho,
|  | double | theta,
|  | int | threshold,
|  | double | param1 = `0`,
|  | double | param2 = `0`,
|  | double | min_theta = `0`,
|  | double | max_theta = `CV_PI`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Finds lines on binary image using one of several methods.

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

## § cvInitFont()

void cvInitFont | ( | CvFont * | font,
|  | int | font_face,
|  | double | hscale,
|  | double | vscale,
|  | double | shear = `0`,
|  | int | thickness = `1`,
|  | int | line_type = `8`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Initializes font structure (OpenCV 1.x API).

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

Parameters

  font | Pointer to the font structure initialized by the function
  font_face | Font name identifier. See cv::HersheyFonts and corresponding old CV_* identifiers.
  hscale | Horizontal 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.
  vscale | Vertical 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.
  shear | Approximate 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.
  thickness | Thickness of the text strokes
  line_type | Type of the strokes, see line description

See also
  cvPutText

## § cvInitLineIterator()

int cvInitLineIterator | ( | const CvArr * | image,
|  | CvPoint | pt1,
|  | CvPoint | pt2,
|  | CvLineIterator * | line_iterator,
|  | int | connectivity = `8`,
|  | int | left_to_right = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Initializes line iterator.

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

## § cvInitUndistortMap()

void cvInitUndistortMap | ( | const CvMat * | camera_matrix,
|  | const CvMat * | distortion_coeffs,
|  | CvArr * | mapx,
|  | CvArr * | mapy
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Computes transformation map from intrinsic camera parameters that can used by cvRemap.

## § cvInitUndistortRectifyMap()

void cvInitUndistortRectifyMap | ( | const CvMat * | camera_matrix,
|  | const CvMat * | dist_coeffs,
|  | const CvMat * | R,
|  | const CvMat * | new_camera_matrix,
|  | CvArr * | mapx,
|  | CvArr * | mapy
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Computes undistortion+rectification map for a head of stereo camera.

See also
  cv::initUndistortRectifyMap

## § cvIntegral()

void cvIntegral | ( | const CvArr * | image,
|  | CvArr * | sum,
|  | CvArr * | sqsum = `NULL`,
|  | CvArr * | tilted_sum = `NULL`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::integral

## § cvLaplace()

void cvLaplace | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | int | aperture_size = `3`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::Laplacian

## § cvLine()

void cvLine | ( | CvArr * | img,
|  | CvPoint | pt1,
|  | CvPoint | pt2,
|  | CvScalar | color,
|  | int | thickness = `1`,
|  | int | line_type = `8`,
|  | int | shift = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::line

## § cvLinearPolar()

void cvLinearPolar | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | CvPoint2D32f | center,
|  | double | maxRadius,
|  | int | flags = `CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Performs forward or inverse linear-polar image transform

See also
  cv::warpPolar

## § cvLogPolar()

void cvLogPolar | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | CvPoint2D32f | center,
|  | double | M,
|  | int | flags = `CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Performs forward or inverse log-polar image transform.

See also
  cv::warpPolar

## § cvMakeHistHeaderForArray()

CvHistogram* cvMakeHistHeaderForArray | ( | int | dims,
|  | int * | sizes,
|  | CvHistogram * | hist,
|  | float * | data,
|  | float ** | ranges = `NULL`,
|  | int | uniform = `1`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Makes a histogram out of an array.

The function initializes the histogram, whose header and bins are allocated by the user. cvReleaseHist does not need to be called afterwards. Only dense histograms can be initialized this way. The function returns hist.

Parameters

  dims | Number of the histogram dimensions.
  sizes | Array of the histogram dimension sizes.
  hist | Histogram header initialized by the function.
  data | Array used to store histogram bins.
  ranges | Histogram bin ranges. See cvCreateHist for details.
  uniform | Uniformity flag. See cvCreateHist for details.

## § cvMatchShapes()

double cvMatchShapes | ( | const void * | object1,
|  | const void * | object2,
|  | int | method,
|  | double | parameter = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Compares two contours by matching their moments.

See also
  cv::matchShapes

## § cvMatchTemplate()

void cvMatchTemplate | ( | const CvArr * | image,
|  | const CvArr * | templ,
|  | CvArr * | result,
|  | int | method
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::matchTemplate

## § cvMaxRect()

CvRect cvMaxRect | ( | const CvRect * | rect1,
|  | const CvRect * | rect2
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Finds minimum rectangle containing two given rectangles.

## § cvMinAreaRect2()

CvBox2D cvMinAreaRect2 | ( | const CvArr * | points,
|  | CvMemStorage * | storage = `NULL`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Finds minimum area rotated rectangle bounding a set of points.

See also
  cv::minAreaRect

## § cvMinEnclosingCircle()

int cvMinEnclosingCircle | ( | const CvArr * | points,
|  | CvPoint2D32f * | center,
|  | float * | radius
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Finds minimum enclosing circle for a set of points.

See also
  cv::minEnclosingCircle

## § cvMoments() [1/3]

void cvMoments | ( | const CvArr * | arr,
|  | CvMoments * | moments,
|  | int | binary = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::moments

## § cvMoments() [2/3]

CvMoments cvMoments | ( |  | ) |

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

## § cvMoments() [3/3]

CvMoments cvMoments | ( | const cv::Moments & | m | ) |

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

## § cvMorphologyEx()

void cvMorphologyEx | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | CvArr * | temp,
|  | IplConvKernel * | element,
|  | int | operation,
|  | int | iterations = `1`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Performs complex morphological transformation.

See also
  cv::morphologyEx

## § cvMultiplyAcc()

void cvMultiplyAcc | ( | const CvArr * | image1,
|  | const CvArr * | image2,
|  | CvArr * | acc,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Adds a product of two images to accumulator.

See also
  cv::accumulateProduct

## § cvNormalizeHist()

void cvNormalizeHist | ( | CvHistogram * | hist,
|  | double | factor
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Normalizes the histogram.

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

Parameters

  hist | Pointer to the histogram.
  factor | Normalization factor.

## § cvPointPolygonTest()

double cvPointPolygonTest | ( | const CvArr * | contour,
|  | CvPoint2D32f | pt,
|  | int | measure_dist
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

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

## § cvPointSeqFromMat()

CvSeq* cvPointSeqFromMat | ( | int | seq_kind,
|  | const CvArr * | mat,
|  | CvContour * | contour_header,
|  | CvSeqBlock * | block
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

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

## § cvPolyLine()

void cvPolyLine | ( | CvArr * | img,
|  | CvPoint ** | pts,
|  | const int * | npts,
|  | int | contours,
|  | int | is_closed,
|  | CvScalar | color,
|  | int | thickness = `1`,
|  | int | line_type = `8`,
|  | int | shift = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Draws one or more polygonal curves.

See also
  cv::polylines

## § cvPreCornerDetect()

void cvPreCornerDetect | ( | const CvArr * | image,
|  | CvArr * | corners,
|  | int | aperture_size = `3`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Calculates constraint image for corner detection.

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

See also
  cv::preCornerDetect

## § cvPutText()

void cvPutText | ( | CvArr * | img,
|  | const char * | text,
|  | CvPoint | org,
|  | const CvFont * | font,
|  | CvScalar | color
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cvInitFont, cvGetTextSize, cvFont, cv::putText

## § cvPyrDown()

void cvPyrDown | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | int | filter = `CV_GAUSSIAN_5x5`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

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

See also
  cv::pyrDown

## § cvPyrMeanShiftFiltering()

void cvPyrMeanShiftFiltering | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | double | sp,
|  | double | sr,
|  | int | max_level = `1`,
|  | CvTermCriteria | termcrit = `cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 5, 1)`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Filters image using meanshift algorithm.

See also
  cv::pyrMeanShiftFiltering

## § cvPyrUp()

void cvPyrUp | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | int | filter = `CV_GAUSSIAN_5x5`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

dst_width = src_width*2, dst_height = src_height*2

See also
  cv::pyrUp

## § cvReadChainPoint()

CvPoint cvReadChainPoint | ( | CvChainPtReader * | reader | ) |

`#include <opencv2/imgproc/imgproc_c.h>`

Retrieves the next chain point.

See also
  cvApproxChains

## § cvRectangle()

void cvRectangle | ( | CvArr * | img,
|  | CvPoint | pt1,
|  | CvPoint | pt2,
|  | CvScalar | color,
|  | int | thickness = `1`,
|  | int | line_type = `8`,
|  | int | shift = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

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

See also
  cv::rectangle

## § cvRectangleR()

void cvRectangleR | ( | CvArr * | img,
|  | CvRect | r,
|  | CvScalar | color,
|  | int | thickness = `1`,
|  | int | line_type = `8`,
|  | int | shift = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Draws a rectangle specified by a CvRect structure.

See also
  cv::rectangle

## § cvReleaseHist()

void cvReleaseHist | ( | CvHistogram ** | hist | ) |

`#include <opencv2/imgproc/imgproc_c.h>`

Releases the histogram.

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

  hist | Double pointer to the released histogram.

## § cvReleasePyramid()

void cvReleasePyramid | ( | CvMat *** | pyramid,
|  | int | extra_layers
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Releases pyramid.

## § cvReleaseStructuringElement()

void cvReleaseStructuringElement | ( | IplConvKernel ** | element | ) |

`#include <opencv2/imgproc/imgproc_c.h>`

releases structuring element

See also
  cvCreateStructuringElementEx

## § cvRemap()

void cvRemap | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | const CvArr * | mapx,
|  | const CvArr * | mapy,
|  | int | flags = `CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS`,
|  | CvScalar | fillval = `cvScalarAll(0)`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Performs generic geometric transformation using the specified coordinate maps.

See also
  cv::remap

## § cvResize()

void cvResize | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | int | interpolation = `CV_INTER_LINEAR`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::resize

## § cvRunningAvg()

void cvRunningAvg | ( | const CvArr * | image,
|  | CvArr * | acc,
|  | double | alpha,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

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

See also
  cv::accumulateWeighted

## § cvSampleLine()

int cvSampleLine | ( | const CvArr * | image,
|  | CvPoint | pt1,
|  | CvPoint | pt2,
|  | void * | buffer,
|  | int | connectivity = `8`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Fetches pixels that belong to the specified line segment and stores them to the buffer.

Returns the number of retrieved points.

See also
  cv::LineSegmentDetector

## § cvSetHistBinRanges()

void cvSetHistBinRanges | ( | CvHistogram * | hist,
|  | float ** | ranges,
|  | int | uniform = `1`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Sets the bounds of the histogram bins.

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

  hist | Histogram.
  ranges | Array of bin ranges arrays. See :ocvCreateHist for details.
  uniform | Uniformity flag. See :ocvCreateHist for details.

## § cvSmooth()

void cvSmooth | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | int | smoothtype = `CV_GAUSSIAN`,
|  | int | size1 = `3`,
|  | int | size2 = `0`,
|  | double | sigma1 = `0`,
|  | double | sigma2 = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Smooths the image in one of several ways.

Parameters

  src | The source image
  dst | The destination image
  smoothtype | Type of the smoothing, see SmoothMethod_c
  size1 | The first parameter of the smoothing operation, the aperture width. Must be a positive odd number (1, 3, 5, ...)
  size2 | The 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.
  sigma1 | In 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).
  sigma2 | additional parameter for bilateral filtering

See also
  cv::GaussianBlur, cv::blur, cv::medianBlur, cv::bilateralFilter.

## § cvSobel()

void cvSobel | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | int | xorder,
|  | int | yorder,
|  | int | aperture_size = `3`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Calculates an image derivative using generalized Sobel.

(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

## § cvSquareAcc()

void cvSquareAcc | ( | const CvArr * | image,
|  | CvArr * | sqsum,
|  | const CvArr * | mask = `NULL`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Adds squared image to accumulator.

See also
  cv::accumulateSquare

## § cvStartFindContours()

CvContourScanner cvStartFindContours | ( | CvArr * | image,
|  | CvMemStorage * | storage,
|  | int | header_size = `sizeof(CvContour)`,
|  | int | mode = `CV_RETR_LIST`,
|  | int | method = `CV_CHAIN_APPROX_SIMPLE`,
|  | CvPoint | offset = `cvPoint(0, 0)`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Initializes contour retrieving process.

Calls cvStartFindContours. Calls cvFindNextContour until null pointer is returned or some other condition becomes true. Calls cvEndFindContours at the end.

See also
  cvFindContours

## § cvStartReadChainPoints()

void cvStartReadChainPoints | ( | CvChain * | chain,
|  | CvChainPtReader * | reader
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Initializes Freeman chain reader.

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

## § cvSubstituteContour()

void cvSubstituteContour | ( | CvContourScanner | scanner,
|  | CvSeq * | new_contour
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Substitutes the last retrieved contour with the new one.

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

See also
  cvFindContours

## § cvThreshHist()

void cvThreshHist | ( | CvHistogram * | hist,
|  | double | threshold
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Thresholds the histogram.

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

Parameters

  hist | Pointer to the histogram.
  threshold | Threshold level.

## § cvThreshold()

double cvThreshold | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | double | threshold,
|  | double | max_value,
|  | int | threshold_type
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Applies fixed-level threshold to grayscale image.

This is a basic operation applied before retrieving contours

See also
  cv::threshold

## § cvUndistort2()

void cvUndistort2 | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | const CvMat * | camera_matrix,
|  | const CvMat * | distortion_coeffs,
|  | const CvMat * | new_camera_matrix = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Transforms the input image to compensate lens distortion.

See also
  cv::undistort

## § cvUndistortPoints()

void cvUndistortPoints | ( | const CvMat * | src,
|  | CvMat * | dst,
|  | const CvMat * | camera_matrix,
|  | const CvMat * | dist_coeffs,
|  | const CvMat * | R = `0`,
|  | const CvMat * | P = `0`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Computes the original (undistorted) feature coordinates from the observed (distorted) coordinates.

See also
  cv::undistortPoints

## § cvWarpAffine()

void cvWarpAffine | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | const CvMat * | map_matrix,
|  | int | flags = `CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS`,
|  | CvScalar | fillval = `cvScalarAll(0)`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Warps image with affine transform.

Note
  cvGetQuadrangleSubPix is similar to cvWarpAffine, but the outliers are extrapolated using replication border mode.

See also
  cv::warpAffine

## § cvWarpPerspective()

void cvWarpPerspective | ( | const CvArr * | src,
|  | CvArr * | dst,
|  | const CvMat * | map_matrix,
|  | int | flags = `CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS`,
|  | CvScalar | fillval = `cvScalarAll(0)`
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Warps image with perspective (projective) transform.

See also
  cv::warpPerspective

## § cvWatershed()

void cvWatershed | ( | const CvArr * | image,
|  | CvArr * | markers
| ) |  |

`#include <opencv2/imgproc/imgproc_c.h>`

Segments image using seed "markers".

See also
  cv::watershed