[][src]Module opencv::imgproc

Image Processing

This module includes image-processing functions.

Image Filtering

Functions and classes described in this section are used to perform various linear or non-linear filtering operations on 2D images (represented as Mat's). It means that for each pixel location (x,y) in the source image (normally, rectangular), its neighborhood is considered and used to compute the response. In case of a linear filter, it is a weighted sum of pixel values. In case of morphological operations, it is the minimum or maximum values, and so on. The computed response is stored in the destination image at the same location (x,y). It means that the output image will be of the same size as the input image. Normally, the functions support multi-channel arrays, in which case every channel is processed independently. Therefore, the output image will also have the same number of channels as the input one.

Another common feature of the functions and classes described in this section is that, unlike simple arithmetic functions, they need to extrapolate values of some non-existing pixels. For example, if you want to smooth an image using a Gaussian 3 \times 3 filter, then, when processing the left-most pixels in each row, you need pixels to the left of them, that is, outside of the image. You can let these pixels be the same as the left-most image pixels ("replicated border" extrapolation method), or assume that all the non-existing pixels are zeros ("constant border" extrapolation method), and so on. OpenCV enables you to specify the extrapolation method. For details, see #BorderTypes

@anchor filter_depths

Depth combinations

Input depth (src.depth()) Output depth (ddepth)
CV_8U -1/CV_16S/CV_32F/CV_64F
CV_16U/CV_16S -1/CV_32F/CV_64F
CV_32F -1/CV_32F/CV_64F
CV_64F -1/CV_64F
Note: when ddepth=-1, the output image will have the same depth as the source.

Geometric Image Transformations

The functions in this section perform various geometrical transformations of 2D images. They do not change the image content but deform the pixel grid and map this deformed grid to the destination image. In fact, to avoid sampling artifacts, the mapping is done in the reverse order, from destination to the source. That is, for each pixel (x, y) of the destination image, the functions compute coordinates of the corresponding "donor" pixel in the source image and copy the pixel value:

\texttt{dst} (x,y)= \texttt{src} (f_x(x,y), f_y(x,y))

In case when you specify the forward mapping \f$\left<g_x, g_y\right>: \texttt{src} \rightarrow \texttt{dst}\f$, the OpenCV functions first compute the corresponding inverse mapping \left<f_x, f_y\right>: \texttt{dst} \rightarrow \texttt{src} and then use the above formula.

The actual implementations of the geometrical transformations, from the most generic remap and to the simplest and the fastest resize, need to solve two main problems with the above formula:

  • Extrapolation of non-existing pixels. Similarly to the filtering functions described in the previous section, for some (x,y), either one of f_x(x,y), or f_y(x,y), or both of them may fall outside of the image. In this case, an extrapolation method needs to be used. OpenCV provides the same selection of extrapolation methods as in the filtering functions. In addition, it provides the method #BORDER_TRANSPARENT. This means that the corresponding pixels in the destination image will not be modified at all.

  • Interpolation of pixel values. Usually f_x(x,y) and f_y(x,y) are floating-point numbers. This means that \left<f_x, f_y\right> can be either an affine or perspective transformation, or radial lens distortion correction, and so on. So, a pixel value at fractional coordinates needs to be retrieved. In the simplest case, the coordinates can be just rounded to the nearest integer coordinates and the corresponding pixel can be used. This is called a nearest-neighbor interpolation. However, a better result can be achieved by using more sophisticated interpolation methods , where a polynomial function is fit into some neighborhood of the computed pixel \f$(f_x(x,y), f_y(x,y)), and then the value of the polynomial at (f_x(x,y), f_y(x,y))\f$ is taken as the interpolated pixel value. In OpenCV, you can choose between several interpolation methods. See resize for details.

Note: The geometrical transformations do not work with CV_8S or CV_32S images.

Miscellaneous Image Transformations

Drawing Functions

Drawing functions work with matrices/images of arbitrary depth. The boundaries of the shapes can be rendered with antialiasing (implemented only for 8-bit images for now). All the functions include the parameter color that uses an RGB value (that may be constructed with the Scalar constructor ) for color images and brightness for grayscale images. For color images, the channel ordering is normally Blue, Green, Red. This is what imshow, imread, and imwrite expect. So, if you form a color using the Scalar constructor, it should look like:

\texttt{Scalar} (blue \_ component, green \_ component, red \_ component[, alpha \_ component])

If you are using your own image rendering and I/O functions, you can use any channel ordering. The drawing functions process each channel independently and do not depend on the channel order or even on the used color space. The whole image can be converted from BGR to RGB or to a different color space using cvtColor .

If a drawn figure is partially or completely outside the image, the drawing functions clip it. Also, many drawing functions can handle pixel coordinates specified with sub-pixel accuracy. This means that the coordinates can be passed as fixed-point numbers encoded as integers. The number of fractional bits is specified by the shift parameter and the real point coordinates are calculated as \texttt{Point}(x,y)\rightarrow\texttt{Point2f}(x2^{-shift},y2^{-shift}) . This feature is especially effective when rendering antialiased shapes.

Note: The functions do not support alpha-transparency when the target image is 4-channel. In this case, the color[3] is simply copied to the repainted pixels. Thus, if you want to paint semi-transparent shapes, you can paint them in a separate buffer and then blend it with the main image.

Color Space Conversions

ColorMaps in OpenCV

The human perception isn't built for observing fine changes in grayscale images. Human eyes are more sensitive to observing changes between colors, so you often need to recolor your grayscale images to get a clue about them. OpenCV now comes with various colormaps to enhance the visualization in your computer vision application.

In OpenCV you only need applyColorMap to apply a colormap on a given image. The following sample code reads the path to an image from command line, applies a Jet colormap on it and shows the result:

@include snippets/imgproc_applyColorMap.cpp

@see #ColormapTypes

Planar Subdivision

The Subdiv2D class described in this section is used to perform various planar subdivision on a set of 2D points (represented as vector of Point2f). OpenCV subdivides a plane into triangles using the Delaunay's algorithm, which corresponds to the dual graph of the Voronoi diagram. In the figure below, the Delaunay's triangulation is marked with black lines and the Voronoi diagram with red lines.

Delaunay triangulation (black) and Voronoi (red)

The subdivisions can be used for the 3D piece-wise transformation of a plane, morphing, fast location of points on the plane, building special graphs (such as NNG,RNG), and so forth.

Histograms

Structural Analysis and Shape Descriptors

Motion Analysis and Object Tracking

Feature Detection

Object Detection

C API

Hardware Acceleration Layer

Functions

Interface

Structs

LineIterator

Line iterator

Subdiv2D

Constants

ADAPTIVE_THRESH_GAUSSIAN_C
ADAPTIVE_THRESH_MEAN_C
CCL_DEFAULT
CCL_GRANA
CCL_WU
CC_STAT_AREA
CC_STAT_HEIGHT
CC_STAT_LEFT
CC_STAT_MAX
CC_STAT_TOP
CC_STAT_WIDTH
CHAIN_APPROX_NONE
CHAIN_APPROX_SIMPLE
CHAIN_APPROX_TC89_KCOS
CHAIN_APPROX_TC89_L1
COLORMAP_AUTUMN
COLORMAP_BONE
COLORMAP_CIVIDIS
COLORMAP_COOL
COLORMAP_HOT
COLORMAP_HSV
COLORMAP_INFERNO
COLORMAP_JET
COLORMAP_MAGMA
COLORMAP_OCEAN
COLORMAP_PARULA
COLORMAP_PINK
COLORMAP_PLASMA
COLORMAP_RAINBOW
COLORMAP_SPRING
COLORMAP_SUMMER
COLORMAP_TWILIGHT
COLORMAP_TWILIGHT_SHIFTED
COLORMAP_VIRIDIS
COLORMAP_WINTER
COLOR_BGR2BGRA
COLOR_BGR2GRAY
COLOR_BGR2HLS
COLOR_BGR2HLS_FULL
COLOR_BGR2HSV
COLOR_BGR2HSV_FULL
COLOR_BGR2Lab
COLOR_BGR2Luv
COLOR_BGR2RGB
COLOR_BGR2RGBA
COLOR_BGR2XYZ
COLOR_BGR2YCrCb
COLOR_BGR2YUV
COLOR_BGR2YUV_IYUV
COLOR_BGR5552BGR
COLOR_BGR5552BGRA
COLOR_BGR5552GRAY
COLOR_BGR5552RGB
COLOR_BGR5552RGBA
COLOR_BGR5652BGR
COLOR_BGR5652BGRA
COLOR_BGR5652GRAY
COLOR_BGR5652RGB
COLOR_BGR5652RGBA
COLOR_BGR2BGR555
COLOR_BGR2BGR565
COLOR_BGR2YUV_I420
COLOR_BGR2YUV_YV12
COLOR_BGRA2BGR
COLOR_BGRA2GRAY
COLOR_BGRA2RGB
COLOR_BGRA2RGBA
COLOR_BGRA2YUV_IYUV
COLOR_BGRA2BGR555
COLOR_BGRA2BGR565
COLOR_BGRA2YUV_I420
COLOR_BGRA2YUV_YV12
COLOR_BayerBG2BGR
COLOR_BayerBG2BGRA
COLOR_BayerBG2BGR_EA
COLOR_BayerBG2BGR_VNG
COLOR_BayerBG2GRAY
COLOR_BayerBG2RGB
COLOR_BayerBG2RGBA
COLOR_BayerBG2RGB_EA
COLOR_BayerBG2RGB_VNG
COLOR_BayerGB2BGR
COLOR_BayerGB2BGRA
COLOR_BayerGB2BGR_EA
COLOR_BayerGB2BGR_VNG
COLOR_BayerGB2GRAY
COLOR_BayerGB2RGB
COLOR_BayerGB2RGBA
COLOR_BayerGB2RGB_EA
COLOR_BayerGB2RGB_VNG
COLOR_BayerGR2BGR
COLOR_BayerGR2BGRA
COLOR_BayerGR2BGR_EA
COLOR_BayerGR2BGR_VNG
COLOR_BayerGR2GRAY
COLOR_BayerGR2RGB
COLOR_BayerGR2RGBA
COLOR_BayerGR2RGB_EA
COLOR_BayerGR2RGB_VNG
COLOR_BayerRG2BGR
COLOR_BayerRG2BGRA
COLOR_BayerRG2BGR_EA
COLOR_BayerRG2BGR_VNG
COLOR_BayerRG2GRAY
COLOR_BayerRG2RGB
COLOR_BayerRG2RGBA
COLOR_BayerRG2RGB_EA
COLOR_BayerRG2RGB_VNG
COLOR_COLORCVT_MAX
COLOR_GRAY2BGR
COLOR_GRAY2BGRA
COLOR_GRAY2RGB
COLOR_GRAY2RGBA
COLOR_GRAY2BGR555
COLOR_GRAY2BGR565
COLOR_HLS2BGR
COLOR_HLS2BGR_FULL
COLOR_HLS2RGB
COLOR_HLS2RGB_FULL
COLOR_HSV2BGR
COLOR_HSV2BGR_FULL
COLOR_HSV2RGB
COLOR_HSV2RGB_FULL
COLOR_LBGR2Lab
COLOR_LBGR2Luv
COLOR_LRGB2Lab
COLOR_LRGB2Luv
COLOR_Lab2BGR
COLOR_Lab2LBGR
COLOR_Lab2LRGB
COLOR_Lab2RGB
COLOR_Luv2BGR
COLOR_Luv2LBGR
COLOR_Luv2LRGB
COLOR_Luv2RGB
COLOR_RGB2BGR
COLOR_RGB2BGRA
COLOR_RGB2GRAY
COLOR_RGB2HLS
COLOR_RGB2HLS_FULL
COLOR_RGB2HSV
COLOR_RGB2HSV_FULL
COLOR_RGB2Lab
COLOR_RGB2Luv
COLOR_RGB2RGBA
COLOR_RGB2XYZ
COLOR_RGB2YCrCb
COLOR_RGB2YUV
COLOR_RGB2YUV_IYUV
COLOR_RGB2BGR555
COLOR_RGB2BGR565
COLOR_RGB2YUV_I420
COLOR_RGB2YUV_YV12
COLOR_RGBA2BGR
COLOR_RGBA2BGRA
COLOR_RGBA2GRAY
COLOR_RGBA2RGB
COLOR_RGBA2YUV_IYUV
COLOR_RGBA2mRGBA
COLOR_RGBA2BGR555
COLOR_RGBA2BGR565
COLOR_RGBA2YUV_I420
COLOR_RGBA2YUV_YV12
COLOR_XYZ2BGR
COLOR_XYZ2R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OR_YUV2RGBA_YUY2
COLOR_YUV2RGBA_YV12
COLOR_YUV2RGB_I420
COLOR_YUV2RGB_NV12
COLOR_YUV2RGB_NV21
COLOR_YUV2RGB_Y422
COLOR_YUV2RGB_YUY2
COLOR_YUV2RGB_YV12
COLOR_YUV420p2BGR
COLOR_YUV420p2BGRA
COLOR_YUV420p2GRAY
COLOR_YUV420p2RGB
COLOR_YUV420p2RGBA
COLOR_YUV420sp2BGR
COLOR_YUV420sp2BGRA
COLOR_YUV420sp2GRAY
COLOR_YUV420sp2RGB
COLOR_YUV420sp2RGBA
COLOR_mRGBA2RGBA
CONTOURS_MATCH_I1
CONTOURS_MATCH_I2
CONTOURS_MATCH_I3
CV_AA
CV_ADAPTIVE_THRESH_GAUSSIAN_C
CV_ADAPTIVE_THRESH_MEAN_C
CV_BGR2BGRA
CV_BGR2GRAY
CV_BGR2HLS
CV_BGR2HLS_FULL
CV_BGR2HSV
CV_BGR2HSV_FULL
CV_BGR2Lab
CV_BGR2Luv
CV_BGR2RGB
CV_BGR2RGBA
CV_BGR2XYZ
CV_BGR2YCrCb
CV_BGR2YUV
CV_BGR2YUV_IYUV
CV_BGR5552BGR
CV_BGR5552BGRA
CV_BGR5552GRAY
CV_BGR5552RGB
CV_BGR5552RGBA
CV_BGR5652BGR
CV_BGR5652BGRA
CV_BGR5652GRAY
CV_BGR5652RGB
CV_BGR5652RGBA
CV_BGR2BGR555
CV_BGR2BGR565
CV_BGR2YUV_I420
CV_BGR2YUV_YV12
CV_BGRA2BGR
CV_BGRA2GRAY
CV_BGRA2RGB
CV_BGRA2RGBA
CV_BGRA2YUV_IYUV
CV_BGRA2BGR555
CV_BGRA2BGR565
CV_BGRA2YUV_I420
CV_BGRA2YUV_YV12
CV_BILATERAL
CV_BLUR
CV_BLUR_NO_SCALE
CV_BayerBG2BGR
CV_BayerBG2BGRA
CV_BayerBG2BGR_EA
CV_BayerBG2BGR_VNG
CV_BayerBG2GRAY
CV_BayerBG2RGB
CV_BayerBG2RGBA
CV_BayerBG2RGB_EA
CV_BayerBG2RGB_VNG
CV_BayerGB2BGR
CV_BayerGB2BGRA
CV_BayerGB2BGR_EA
CV_BayerGB2BGR_VNG
CV_BayerGB2GRAY
CV_BayerGB2RGB
CV_BayerGB2RGBA
CV_BayerGB2RGB_EA
CV_BayerGB2RGB_VNG
CV_BayerGR2BGR
CV_BayerGR2BGRA
CV_BayerGR2BGR_EA
CV_BayerGR2BGR_VNG
CV_BayerGR2GRAY
CV_BayerGR2RGB
CV_BayerGR2RGBA
CV_BayerGR2RGB_EA
CV_BayerGR2RGB_VNG
CV_BayerRG2BGR
CV_BayerRG2BGRA
CV_BayerRG2BGR_EA
CV_BayerRG2BGR_VNG
CV_BayerRG2GRAY
CV_BayerRG2RGB
CV_BayerRG2RGBA
CV_BayerRG2RGB_EA
CV_BayerRG2RGB_VNG
CV_CANNY_L2_GRADIENT
CV_CHAIN_APPROX_NONE
CV_CHAIN_APPROX_SIMPLE
CV_CHAIN_APPROX_TC89_KCOS
CV_CHAIN_APPROX_TC89_L1
CV_CHAIN_CODE
CV_CLOCKWISE
CV_COLORCVT_MAX
CV_COMP_BHATTACHARYYA
CV_COMP_CHISQR
CV_COMP_CHISQR_ALT
CV_COMP_CORREL
CV_COMP_HELLINGER
CV_COMP_INTERSECT
CV_COMP_KL_DIV
CV_CONTOURS_MATCH_I1
CV_CONTOURS_MATCH_I2
CV_CONTOURS_MATCH_I3
CV_COUNTER_CLOCKWISE
CV_DIST_C
CV_DIST_FAIR
CV_DIST_HUBER
CV_DIST_L1
CV_DIST_L2
CV_DIST_L12
CV_DIST_LABEL_CCOMP
CV_DIST_LABEL_PIXEL
CV_DIST_MASK_3
CV_DIST_MASK_5
CV_DIST_MASK_PRECISE
CV_DIST_USER
CV_DIST_WELSCH
CV_FILLED
CV_FLOODFILL_FIXED_RANGE
CV_FLOODFILL_MASK_ONLY
CV_FONT_HERSHEY_COMPLEX
CV_FONT_HERSHEY_COMPLEX_SMALL
CV_FONT_HERS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DIST_HUBER
DIST_L1
DIST_L2
DIST_L12
DIST_LABEL_CCOMP
DIST_LABEL_PIXEL
DIST_MASK_3
DIST_MASK_5
DIST_MASK_PRECISE
DIST_USER
DIST_WELSCH
FLOODFILL_FIXED_RANGE
FLOODFILL_MASK_ONLY
GC_BGD
GC_EVAL
GC_EVAL_FREEZE_MODEL
GC_FGD
GC_INIT_WITH_MASK
GC_INIT_WITH_RECT
GC_PR_BGD
GC_PR_FGD
HISTCMP_BHATTACHARYYA
HISTCMP_CHISQR
HISTCMP_CHISQR_ALT
HISTCMP_CORREL
HISTCMP_HELLINGER
HISTCMP_INTERSECT
HISTCMP_KL_DIV
HOUGH_GRADIENT
HOUGH_MULTI_SCALE
HOUGH_PROBABILISTIC
HOUGH_STANDARD
INTERSECT_FULL
INTERSECT_NONE
INTERSECT_PARTIAL
INTER_AREA
INTER_BITS
INTER_BITS2
INTER_CUBIC
INTER_LANCZOS4
INTER_LINEAR
INTER_LINEAR_EXACT
INTER_MAX
INTER_NEAREST
INTER_TAB_SIZE
INTER_TAB_SIZE2
LSD_REFINE_ADV
LSD_REFINE_NONE
LSD_REFINE_STD
MARKER_CROSS
MARKER_DIAMOND
MARKER_SQUARE
MARKER_STAR
MARKER_TILTED_CROSS
MARKER_TRIANGLE_DOWN
MARKER_TRIANGLE_UP
MORPH_BLACKHAT
MORPH_CLOSE
MORPH_CROSS
MORPH_DILATE
MORPH_ELLIPSE
MORPH_ERODE
MORPH_GRADIENT
MORPH_HITMISS
MORPH_OPEN
MORPH_RECT
MORPH_TOPHAT
PROJ_SPHERICAL_EQRECT
PROJ_SPHERICAL_ORTHO
RETR_CCOMP
RETR_EXTERNAL
RETR_FLOODFILL
RETR_LIST
RETR_TREE
Subdiv2D_NEXT_AROUND_DST
Subdiv2D_NEXT_AROUND_LEFT
Subdiv2D_NEXT_AROUND_ORG
Subdiv2D_NEXT_AROUND_RIGHT
Subdiv2D_PREV_AROUND_DST
Subdiv2D_PREV_AROUND_LEFT
Subdiv2D_PREV_AROUND_ORG
Subdiv2D_PREV_AROUND_RIGHT
Subdiv2D_PTLOC_ERROR
Subdiv2D_PTLOC_INSIDE
Subdiv2D_PTLOC_ON_EDGE
Subdiv2D_PTLOC_OUTSIDE_RECT
Subdiv2D_PTLOC_VERTEX
THRESH_BINARY
THRESH_BINARY_INV
THRESH_MASK
THRESH_OTSU
THRESH_TOZERO
THRESH_TOZERO_INV
THRESH_TRIANGLE
THRESH_TRUNC
TM_CCOEFF
TM_CCOEFF_NORMED
TM_CCORR
TM_CCORR_NORMED
TM_SQDIFF
TM_SQDIFF_NORMED
WARP_FILL_OUTLIERS
WARP_INVERSE_MAP
WARP_POLAR_LINEAR
WARP_POLAR_LOG

Traits

CLAHE

Base class for Contrast Limited Adaptive Histogram Equalization.

GeneralizedHough

finds arbitrary template in the grayscale image using Generalized Hough Transform

GeneralizedHoughBallard

finds arbitrary template in the grayscale image using Generalized Hough Transform

GeneralizedHoughGuil

finds arbitrary template in the grayscale image using Generalized Hough Transform

LineSegmentDetector

Line segment detector class

Functions

accumulate

accumulate_product

accumulate_square

accumulate_weighted

adaptive_threshold

apply_color_map

Applies a user colormap on a given image.

apply_color_map_1

Applies a GNU Octave/MATLAB equivalent colormap on a given image.

approx_poly_dp

Approximates a polygonal curve(s) with the specified precision.

arc_length

Calculates a contour perimeter or a curve length.

arrowed_line

Draws a arrow segment pointing from the first point to the second one.

bilateral_filter

Applies the bilateral filter to an image.

blend_linear
blur

bounding_rect

Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image.

box_filter

box_points

Finds the four vertices of a rotated rect. Useful to draw the rotated rectangle.

build_pyramid

Constructs the Gaussian pyramid for an image.

calc_back_project

@overload

calc_hist

@overload

canny

canny_derivative

circle

Draws a circle.

clip_line

@overload

clip_line_size

Clips the line against the image rectangle.

clip_line_size_i64

@overload

compare_hist

connected_components

@overload

connected_components_1

computes the connected components labeled image of boolean image

connected_components_with_stats

@overload

connected_components_with_stats_1

computes the connected components labeled image of boolean image and also produces a statistics output for each label

contour_area

Calculates a contour area.

convert_maps

convex_hull

Finds the convex hull of a point set.

convexity_defects

Finds the convexity defects of a contour.

corner_eigen_vals_and_vecs

corner_harris

corner_min_eigen_val

corner_sub_pix

create_clahe

Creates a smart pointer to a cv::CLAHE class and initializes it.

create_generalized_hough_ballard

Creates a smart pointer to a cv::GeneralizedHoughBallard class and initializes it.

create_generalized_hough_guil

Creates a smart pointer to a cv::GeneralizedHoughGuil class and initializes it.

create_hanning_window

This function computes a Hanning window coefficients in two dimensions.

create_line_segment_detector

Creates a smart pointer to a LineSegmentDetector object and initializes it.

cv_contour_perimeter

same as cvArcLength for closed contour

cv_match_shapes

Compares two contours by matching their moments @see cv::matchShapes

cvt_bg_rto_bgr
cvt_bg_rto_bgr5x5
cvt_bg_rto_gray
cvt_bg_rto_hsv
cvt_bg_rto_lab
cvt_bg_rto_three_plane_yuv
cvt_bg_rto_two_plane_yuv
cvt_bg_rto_xyz
cvt_bg_rto_yuv
cvt_bgr5x5to_bgr
cvt_bgr5x5to_gray
cvt_color

cvt_color_two_plane

Converts an image from one color space to another where the source image is stored in two planes.

cvt_grayto_bgr
cvt_grayto_bgr5x5
cvt_hs_vto_bgr
cvt_labto_bgr
cvt_multiplied_rgb_ato_rgba
cvt_one_plane_yu_vto_bgr
cvt_rgb_ato_multiplied_rgba
cvt_three_plane_yu_vto_bgr
cvt_two_plane_yu_vto_bgr
cvt_two_plane_yu_vto_bgr_1
cvt_xy_zto_bgr
cvt_yu_vto_bgr
demosaicing

main function for all demosaicing processes

dilate

distance_transform

distance_transform_labels

draw_contours

draw_marker

Draws a marker on a predefined position in an image.

ellipse

Draws a simple or thick elliptic arc or fills an ellipse sector.

ellipse2_poly

Approximates an elliptic arc with a polyline.

ellipse2_poly_f64

@overload

ellipse_new_rotated_rect

@overload

emd

equalize_hist

erode

fill_convex_poly

Fills a convex polygon.

fill_convex_poly_1

@overload

fill_poly

Fills the area bounded by one or more polygons.

filter2_d

filter2_d_1
find_contours

@overload

find_contours_with_hierarchy

Finds contours in a binary image.

fit_ellipse

Fits an ellipse around a set of 2D points.

fit_ellipse_ams

fit_ellipse_direct

fit_line

flood_fill

flood_fill_1

@overload

gaussian_blur

Blurs an image using a Gaussian filter.

get_affine_transform
get_affine_transform_1

get_default_new_camera_matrix

get_deriv_kernels

get_font_scale_from_height

Calculates the font-specific size to use to achieve a given height in pixels.

get_gabor_kernel

Returns Gabor filter coefficients.

get_gaussian_kernel

get_perspective_transform

get_perspective_transform_1
get_rect_sub_pix

get_rotation_matrix2_d

get_structuring_element

get_text_size

Calculates the width and height of a text string.

good_features_to_track

good_features_to_track_1

C++ default parameters:

grab_cut

Runs the GrabCut algorithm.

hal_resize
hough_circles

hough_lines

hough_lines_p

hough_lines_point_set

init_undistort_rectify_map

init_wide_angle_proj_map

C++ default parameters:

integral
integral_1

@overload

integral_sq_depth

@overload

integral_titled_sq

intersect_convex_convex

C++ default parameters:

invert_affine_transform

is_contour_convex

Tests a contour convexity.

laplacian

line

Draws a line segment connecting two points.

linear_polar

log_polar

match_shapes

Compares two shapes.

match_template

median_blur

min_area_rect

Finds a rotated rectangle of the minimum area enclosing the input 2D point set.

min_enclosing_circle

Finds a circle of the minimum area enclosing a 2D point set.

min_enclosing_triangle

morphology_default_border_value
morphology_ex

Performs advanced morphological transformations.

phase_correlate

point_polygon_test

Performs a point-in-contour test.

polylines

Draws several polygonal curves.

pre_corner_detect

put_text

Draws a text string.

pyr_down

pyr_mean_shift_filtering

pyr_up

rectangle

@overload

rectangle_points

Draws a simple, thick, or filled up-right rectangle.

remap

resize

rotated_rectangle_intersection

Finds out if there is any intersection between two rotated rectangles.

scharr

sep_filter2_d
sep_filter2_d_1

sobel

spatial_gradient

Calculates the first order image derivative in both x and y using a Sobel operator

sqr_box_filter

threshold

Applies a fixed-level threshold to each array element.

undistort

undistort_points

undistort_points_1

@overload

warp_affine

warp_perspective

warp_polar

watershed

Performs a marker-based image segmentation using the watershed algorithm.

wrapper_emd

C++ default parameters:

Type Definitions

CvDistanceFunction
CvDistanceFunctionExtern