Classes | |
struct | CvFont |
struct | CvConnectedComp |
struct | CvMoments |
struct | CvHuMoments |
struct | CvChainPtReader |
struct | CvConvexityDefect |
Macros | |
#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 | CV_FILLED -1 |
#define | CV_AA 16 |
#define | cvDrawRect cvRectangle |
#define | cvDrawLine cvLine |
#define | cvDrawCircle cvCircle |
#define | cvDrawEllipse cvEllipse |
#define | cvDrawPolyLine cvPolyLine |
#define | CV_NEXT_LINE_POINT(line_iterator) |
#define | CV_FONT_HERSHEY_SIMPLEX 0 |
#define | CV_FONT_HERSHEY_PLAIN 1 |
#define | CV_FONT_HERSHEY_DUPLEX 2 |
#define | CV_FONT_HERSHEY_COMPLEX 3 |
#define | CV_FONT_HERSHEY_TRIPLEX 4 |
#define | CV_FONT_HERSHEY_COMPLEX_SMALL 5 |
#define | CV_FONT_HERSHEY_SCRIPT_SIMPLEX 6 |
#define | CV_FONT_HERSHEY_SCRIPT_COMPLEX 7 |
#define | CV_FONT_ITALIC 16 |
#define | CV_FONT_VECTOR0 CV_FONT_HERSHEY_SIMPLEX |
#define | CV_INIT_3X3_DELTAS(deltas, step, nch) |
Typedefs | |
typedef struct CvFont | CvFont |
typedef struct CvConnectedComp | CvConnectedComp |
typedef struct CvMoments | CvMoments |
typedef struct CvHuMoments | CvHuMoments |
typedef float(CV_CDECL * | CvDistanceFunction) (const float *a, const float *b, void *user_param) |
typedef struct _CvContourScanner * | CvContourScanner |
typedef struct CvChainPtReader | CvChainPtReader |
typedef struct CvConvexityDefect | CvConvexityDefect |
Functions | |
CVAPI (void) cvAcc(const CvArr *image | |
Adds image to accumulator. More... | |
CvArr const CvArr *mask | CV_DEFAULT (NULL)) |
CvArr CvPoint int CvScalar value | CV_DEFAULT (cvScalarAll(0))) |
CvArr int smoothtype | CV_DEFAULT (CV_GAUSSIAN) |
CvArr int smoothtype int size1 | CV_DEFAULT (3) |
CvArr int smoothtype int size1 int size2 | CV_DEFAULT (0) |
CvArr const CvMat CvPoint anchor | CV_DEFAULT (cvPoint(-1,-1))) |
CvArr int filter | CV_DEFAULT (CV_GAUSSIAN_5x5)) |
CVAPI (CvMat **) cvCreatePyramid(const CvArr *img | |
Builds pyramid for an image. More... | |
int double const CvSize *layer_sizes CvArr *bufarr int calc | CV_DEFAULT (1) |
CvArr double double int max_level CvTermCriteria termcrit | CV_DEFAULT (cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 5, 1))) |
CvArr int interpolation | CV_DEFAULT (CV_INTER_LINEAR)) |
CvArr const CvMat int flags | CV_DEFAULT (CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS) |
CVAPI (CvMat *) cvGetAffineTransform(const CvPoint2D32f *src | |
Computes affine transform matrix for mapping src[i] to dst[i] (i=0,1,2) More... | |
CVAPI (IplConvKernel *) cvCreateStructuringElementEx(int cols | |
Returns a structuring element of the specified size and shape for morphological operations. More... | |
CVAPI (double) cvGetSpatialMoment(CvMoments *moments | |
Retrieve spatial moments. More... | |
CVAPI (int) cvSampleLine(const CvArr *image | |
Fetches pixels that belong to the specified line segment and stores them to the buffer. More... | |
CvPoint CvPoint void int connectivity | CV_DEFAULT (8)) |
CVAPI (float) cvCalcEMD2(const CvArr *signature1 | |
Computes earth mover distance between two weighted point sets (called signatures) More... | |
CvMemStorage CvSeq int header_size | CV_DEFAULT (sizeof(CvContour)) |
CvMemStorage CvSeq int header_size int mode | CV_DEFAULT (CV_RETR_LIST) |
CvMemStorage CvSeq int header_size int mode int method | CV_DEFAULT (CV_CHAIN_APPROX_SIMPLE) |
CvMemStorage CvSeq int header_size int mode int method CvPoint offset | CV_DEFAULT (cvPoint(0, 0))) |
CVAPI (CvContourScanner) cvStartFindContours(CvArr *image | |
Initializes contour retrieving process. More... | |
CVAPI (CvSeq *) cvFindNextContour(CvContourScanner scanner) | |
Retrieves next contour. More... | |
CVAPI (CvPoint) cvReadChainPoint(CvChainPtReader *reader) | |
Retrieves the next chain point. More... | |
CvSlice slice | CV_DEFAULT (CV_WHOLE_SEQ) |
CvSlice slice int is_closed | CV_DEFAULT (-1)) |
CV_INLINE double | cvContourPerimeter (const void *contour) |
CVAPI (CvRect) cvBoundingRect(CvArr *points | |
Calculates contour bounding rectangle (update=1) or just retrieves pre-calculated rectangle (update=0) More... | |
CVAPI (CvBox2D) cvMinAreaRect2(const CvArr *points | |
Finds minimum area rotated rectangle bounding a set of points. More... | |
void *hull_storage int orientation | CV_DEFAULT (CV_CLOCKWISE) |
CVAPI (CvHistogram *) cvCreateHist(int dims | |
Creates a histogram. More... | |
CV_INLINE void | cvCalcHist (IplImage **image, CvHistogram *hist, int accumulate CV_DEFAULT(0), const CvArr *mask CV_DEFAULT(NULL)) |
const CvHistogram CvHistogram double scale | CV_DEFAULT (255)) |
CvArr int distance_type | CV_DEFAULT (CV_DIST_L2) |
CvArr int distance_type int mask_size const float *mask CvArr *labels int labelType | CV_DEFAULT (CV_DIST_LABEL_CCOMP)) |
CvArr double int adaptive_method | CV_DEFAULT (CV_ADAPTIVE_THRESH_MEAN_C) |
CvArr double int adaptive_method int threshold_type | CV_DEFAULT (CV_THRESH_BINARY) |
CvArr double int adaptive_method int threshold_type int block_size double param1 | CV_DEFAULT (5)) |
CvPoint CvScalar CvScalar lo_diff CvScalar up_diff CvConnectedComp *comp int flags | CV_DEFAULT (4) |
CvArr int int aperture_size double k | CV_DEFAULT (0.04)) |
void int double double int double param1 double param2 double min_theta double max_theta | CV_DEFAULT (CV_PI)) |
void int double double double param1 | CV_DEFAULT (100) |
CV_INLINE void | cvEllipseBox (CvArr *img, CvBox2D box, CvScalar color, int thickness CV_DEFAULT(1), int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0)) |
CV_INLINE CvFont | cvFont (double scale, int thickness CV_DEFAULT(1)) |
CVAPI (CvScalar) cvColorToScalar(double packed_color | |
Unpacks color value. More... | |
#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 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 |
typedef struct CvChainPtReader CvChainPtReader |
Freeman chain reader state
typedef struct CvConnectedComp CvConnectedComp |
Connected component structure
typedef struct _CvContourScanner* CvContourScanner |
typedef struct CvConvexityDefect CvConvexityDefect |
Convexity defect
typedef float(CV_CDECL * CvDistanceFunction) (const float *a, const float *b, void *user_param) |
typedef struct CvHuMoments CvHuMoments |
Hu invariants
anonymous enum |
anonymous enum |
anonymous enum |
Constants for color conversion
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
Distance types for Distance Transform and M-estimators
anonymous enum |
Threshold types
enum MorphShapes_c |
Shapes of a structuring element for morphological operations
Enumerator | |
---|---|
CV_SHAPE_RECT | |
CV_SHAPE_CROSS | |
CV_SHAPE_ELLIPSE | |
CV_SHAPE_CUSTOM | custom structuring element |
enum SmoothMethod_c |
Image smooth methods
Enumerator | |
---|---|
CV_BLUR_NO_SCALE | linear convolution with 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 box kernel (all 1's) with subsequent scaling by |
CV_GAUSSIAN | linear convolution with a Gaussian kernel |
CV_MEDIAN | median filter with a square aperture |
CV_BILATERAL | bilateral filter with a 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 |
CvArr int smoothtype int size1 int size2 CV_DEFAULT | ( | 0 | ) |
CvArr int int aperture_size double k CV_DEFAULT | ( | 0. | 04 | ) |
void int double double double param1 CV_DEFAULT | ( | 100 | ) |
const CvHistogram CvHistogram double scale CV_DEFAULT | ( | 255 | ) |
CvArr CvArr CvPoint2D32f int double double const CvArr *mask int block_size CV_DEFAULT | ( | 3 | ) |
CvArr double int adaptive_method int threshold_type int block_size double param1 CV_DEFAULT | ( | 5 | ) |
CvArr double int adaptive_method CV_DEFAULT | ( | CV_ADAPTIVE_THRESH_MEAN_C | ) |
CvMemStorage int method CV_DEFAULT | ( | CV_CHAIN_APPROX_SIMPLE | ) |
void* hull_storage int orientation CV_DEFAULT | ( | CV_CLOCKWISE | ) |
CvArr int distance_type CV_DEFAULT | ( | CV_DIST_L2 | ) |
CvArr int distance_type int mask_size const float* mask CvArr* labels int labelType CV_DEFAULT | ( | CV_DIST_LABEL_CCOMP | ) |
CvArr int smoothtype CV_DEFAULT | ( | CV_GAUSSIAN | ) |
int double const CvSize *layer_sizes CvArr *bufarr int calc int filter CV_DEFAULT | ( | CV_GAUSSIAN_5x5 | ) |
CvArr int interpolation CV_DEFAULT | ( | CV_INTER_LINEAR | ) |
CvArr CvPoint2D32f double int flags CV_DEFAULT | ( | CV_INTER_LINEAR+ | CV_WARP_FILL_OUTLIERS | ) |
void int double double int double param1 double param2 double min_theta double max_theta CV_DEFAULT | ( | CV_PI | ) |
CvMemStorage int header_size int mode CV_DEFAULT | ( | CV_RETR_LIST | ) |
CvArr double int adaptive_method int threshold_type CV_DEFAULT | ( | CV_THRESH_BINARY | ) |
CvSlice slice CV_DEFAULT | ( | CV_WHOLE_SEQ | ) |
CvPoint CvScalar CvScalar lo_diff CvScalar up_diff CV_DEFAULT | ( | cvScalarAll(0) | ) |
CvArr double double int max_level CvTermCriteria termcrit CV_DEFAULT | ( | cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 5, 1) | ) |
CvMemStorage int header_size CV_DEFAULT | ( | sizeof(CvContour) | ) |
CVAPI | ( | CvBox2D | ) | const |
Finds minimum area rotated rectangle bounding a set of points.
Fits ellipse into a set of 2d points.
CVAPI | ( | CvContourScanner | ) |
Initializes contour retrieving process.
Calls cvStartFindContours. Calls cvFindNextContour until null pointer is returned or some other condition becomes true. Calls cvEndFindContours at the end.
CVAPI | ( | CvHistogram * | ) |
Creates a histogram.
Makes a histogram out of an array.
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.
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 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: where and 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. |
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.
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. |
CVAPI | ( | CvMat * | ) | const |
Computes affine transform matrix for mapping src[i] to dst[i] (i=0,1,2)
Computes perspective transform matrix for mapping src[i] to dst[i] (i=0,1,2,3)
Computes rotation_matrix matrix.
CVAPI | ( | CvMat ** | ) | const |
Builds pyramid for an image.
CVAPI | ( | CvPoint | ) |
Retrieves the next chain point.
CVAPI | ( | CvRect | ) |
Calculates contour bounding rectangle (update=1) or just retrieves pre-calculated rectangle (update=0)
Finds minimum rectangle containing two given rectangles.
CVAPI | ( | CvScalar | ) |
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
CVAPI | ( | CvSeq * | ) |
Retrieves next 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.
Releases contour scanner and returns pointer to the first outer contour.
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.
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. |
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
CVAPI | ( | double | ) |
Retrieve spatial moments.
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.
Returns positive, negative or zero value, correspondingly. Optionally, measures a signed distance between the point and the nearest polygon edge (measure_dist=1)
Compares two histogram
This is a basic operation applied before retrieving contours
CVAPI | ( | float | ) | const |
Computes earth mover distance between two weighted point sets (called signatures)
CVAPI | ( | int | ) | const |
Fetches pixels that belong to the specified line segment and stores them to the buffer.
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 the number of retrieved points.
(0<=x<img_size.width, 0<=y<img_size.height).
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.
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.
CVAPI | ( | IplConvKernel * | ) |
Returns a structuring element of the specified size and shape for morphological operations.
cvReleaseStructuringElement(&element)
.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. |
CVAPI | ( | void | ) | const |
Adds image to accumulator.
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.
Copies source 2D array inside of the larger destination array and makes a border of the specified type (IPL_BORDER_*) around the copied area.
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 (standard deviation). If it is zero, it is calculated from the kernel size: Using standard sigma for small kernels ( to ) 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 |
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. |
dst_width = floor(src_width/2)[+1], dst_height = floor(src_height/2)[+1]
dst_width = src_width*2, dst_height = src_height*2
(aperture_size = 1,3,5,7) or Scharr (aperture_size = -1) operator. Scharr can be used only for the first dx or dy derivative
Performs forward or inverse linear-polar image transform
If element pointer is NULL, 3x3 rectangular element is used
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
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)
(if the substitutor is null, the last retrieved contour is removed from the tree)
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
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.
hist | Histogram. |
ranges | Array of bin ranges arrays. See :ocvCreateHist for details. |
uniform | Uniformity 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.
hist | Double 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.
hist | Histogram. |
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.
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. |
The function normalizes the histogram bins by scaling them so that the sum of the bins becomes equal to factor.
hist | Pointer to the histogram. |
factor | Normalization factor. |
The function clears histogram bins that are below the specified threshold.
hist | Pointer to the histogram. |
threshold | Threshold 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.
src | Source histogram. |
dst | Pointer to the destination histogram. |
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 | 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. |
The function calculates the object probability density from two histograms as:
hist1 | First histogram (the divisor). |
hist2 | Second histogram. |
dst_hist | Destination histogram. |
scale | Scale factor for the destination histogram. |
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,...)
Dx^2 * Dyy + Dxx * Dy^2 - 2 * Dx * Dy * Dxy. Applying threshold to the result gives coordinates of corners
Calculates det(M) - k*(trace(M)^2), where M is 2x2 gradient covariation matrix for each pixel
if thickness<0 (e.g. thickness == CV_FILLED), the filled box is drawn
Thickness works in the same way as with cvRectangle
depending on thickness, start_angle and end_angle parameters. The resultant figure is rotated by angle. All the angles are in degrees
The function initializes the font structure that can be passed to text rendering functions.
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 |
CV_INLINE void cvCalcHist | ( | IplImage ** | image, |
CvHistogram * | hist, | ||
int accumulate | CV_DEFAULT0, | ||
const CvArr *mask | CV_DEFAULTNULL | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
CV_INLINE double cvContourPerimeter | ( | const void * | contour | ) |
same as cvArcLength for closed contour
CV_INLINE void cvEllipseBox | ( | CvArr * | img, |
CvBox2D | box, | ||
CvScalar | color, | ||
int thickness | CV_DEFAULT1, | ||
int line_type | CV_DEFAULT8, | ||
int shift | CV_DEFAULT0 | ||
) |
CvArr * acc |
int double double double aeps |
CvArr double alpha |
int int anchor_x |
int int int anchor_y |
CvSize int angle |
CvSize int int int arc_end |
CvSize int int arc_start |
int arrtype |
CvSize axes |
const CvArr CvContour CvSeqBlock* block |
CvArr int block_size |
CvPoint center |
void* circle_storage |
CvArr int code |
CvSeq* contour |
CvPoint const int int contours |
const CvArr* convexhull |
CvArr CvArr CvPoint2D32f int* corner_count |
CvArr CvArr CvPoint2D32f * corners |
CvPoint2D32f int count |
CvPoint2D32f int CvSize CvSize CvTermCriteria criteria |
int CvHistogram float* data |
int dist_type |
const CvArr int distance_type |
void int double dp |
CvArr* dst |
const CvHistogram CvHistogram* dst_hist |
CvArr* edges |
CvArr* eig_image |
CvArr* eigenval |
CvArr* eigenvv |
CvArr CvArr IplConvKernel* element |
int CvMemStorage int double eps |
int extra_layers |
CvArr CvSize CvHistogram int double factor |
CvMemStorage CvSeq** first_contour |
const CvFont * font |
int font_face |
CvArr* harris_response |
int header_size |
CvArr CvSize CvHistogram * hist |
const CvHistogram * hist2 |
int double hscale |
CvHuMoments* hu_moments |
const CvArr* image2 |
CvPoint const int int int is_closed |
int double double double float* line |
CvPoint CvPoint CvLineIterator* line_iterator |
void* line_storage |
CvArr CvPoint2D32f double M |
const CvArr * mapy |
CvArr* markers |
const CvArr* mat |
CvArr double max_value |
CvArr CvPoint2D32f double maxRadius |
CvPoint2D32f int measure_dist |
void int method |
void int double double min_dist |
CvArr CvArr CvPoint2D32f int double double min_distance |
float* min_value |
CvMoments* moments |
CvSeq* new_contour |
CvPoint const int * npts |
int number |
const void* object2 |
CvArr CvArr IplConvKernel int operation |
const char CvPoint org |
int double param |
CvPoint2D32f pt |
CvPoint pt1 |
CvArr CvArr CvPoint2D32f int double quality_level |
CvRect r |
CvPoint int radius |
float** ranges |
int double rate |
CvChainPtReader* reader |
const CvRect* rect2 |
int double double reps |
void int double rho |
int rows |
double double scale |
CvPoint seed_point |
int int int int shape |
const CvArr* signature2 |
int* sizes |
CvArr double sp |
CvArr* sqsum |
CvArr double double sr |
int CvMemStorage* storage |
CvArr * sum |
const CvArr* templ |
const char* text |
void int double double theta |
void int double double int threshold |
CvArr double threshold1 |
CvArr double double threshold2 |
CvArr double double int threshold_type |
int int type |
int double double vscale |
CvPoint2D32f int CvSize win |
int x_order |
CvArr int xorder |
int int y_order |
CvArr int int yorder |
CvPoint2D32f int CvSize CvSize zero_zone |