Table of Contents

Class Cv2

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

OpenCV Functions of C++ I/F (cv::xxx)

public static class Cv2
Inheritance
Cv2
Inherited Members

Fields

FILLED
LOG2
PI

The ratio of a circle's circumference to its diameter

Methods

AGAST(InputArray, int, bool, DetectorType)

Detects corners using the AGAST algorithm

Abs(Mat)

Computes absolute value of each matrix element

Absdiff(InputArray, InputArray, OutputArray)

Calculates the per-element absolute difference between two arrays or between an array and a scalar.

Accumulate(InputArray, InputOutputArray, InputArray)

Adds an image to the accumulator.

AccumulateProduct(InputArray, InputArray, InputOutputArray, InputArray)

Adds the per-element product of two input images to the accumulator.

AccumulateSquare(InputArray, InputOutputArray, InputArray)

Adds the square of a source image to the accumulator.

AccumulateWeighted(InputArray, InputOutputArray, double, InputArray)

Updates a running average.

AdaptiveThreshold(InputArray, OutputArray, double, AdaptiveThresholdTypes, ThresholdTypes, int, double)

Applies an adaptive threshold to an array.

Add(InputArray, InputArray, OutputArray, InputArray, int)

Computes the per-element sum of two arrays or an array and a scalar.

AddWeighted(InputArray, double, InputArray, double, double, OutputArray, int)

computes weighted sum of two arrays (dst = alphasrc1 + betasrc2 + gamma)

AlignSize(int, int)

Aligns buffer size by the certain number of bytes This small inline function aligns a buffer size by the certian number of bytes by enlarging it.

ApplyColorMap(InputArray, OutputArray, ColormapTypes)

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

ApplyColorMap(InputArray, OutputArray, InputArray)

Applies a user colormap on a given image.

ApproxPolyDP(InputArray, OutputArray, double, bool)

Approximates contour or a curve using Douglas-Peucker algorithm

ApproxPolyDP(IEnumerable<Point2f>, double, bool)

Approximates contour or a curve using Douglas-Peucker algorithm

ApproxPolyDP(IEnumerable<Point>, double, bool)

Approximates contour or a curve using Douglas-Peucker algorithm

ApproxPolyN(InputArray, OutputArray, int, float, bool)

Approximates a polygon with a convex hull with a specified accuracy and number of sides.

ArcLength(InputArray, bool)

Calculates a contour perimeter or a curve length.

ArcLength(IEnumerable<Point2f>, bool)

Calculates a contour perimeter or a curve length.

ArcLength(IEnumerable<Point>, bool)

Calculates a contour perimeter or a curve length.

ArrowedLine(InputOutputArray, Point, Point, Scalar, int, LineTypes, int, double)

Draws a arrow segment pointing from the first point to the second one. The function arrowedLine draws an arrow between pt1 and pt2 points in the image. See also cv::line.

BatchDistance(InputArray, InputArray, OutputArray, int, OutputArray, NormTypes, int, InputArray, int, bool)

naive nearest neighbor finder

BilateralFilter(InputArray, OutputArray, int, double, double, BorderTypes)

Applies bilateral filter to the image

BitwiseAnd(InputArray, InputArray, OutputArray, InputArray)

computes bitwise conjunction of the two arrays (dst = src1 & src2)

BitwiseNot(InputArray, OutputArray, InputArray)

inverts each bit of array (dst = ~src)

BitwiseOr(InputArray, InputArray, OutputArray, InputArray)

computes bitwise disjunction of the two arrays (dst = src1 | src2)

BitwiseXor(InputArray, InputArray, OutputArray, InputArray)

computes bitwise exclusive-or of the two arrays (dst = src1 ^ src2)

BlendLinear(InputArray, InputArray, InputArray, InputArray, OutputArray)

Performs linear blending of two images: dst(i,j) = weights1(i,j)*src1(i,j) + weights2(i,j)*src2(i,j)

Blur(InputArray, OutputArray, Size, Point?, BorderTypes)

Smoothes image using normalized box filter

BorderInterpolate(int, int, BorderTypes)

Computes the source location of an extrapolated pixel.

BoundingRect(InputArray)

Calculates the up-right bounding rectangle of a point set.

BoundingRect(IEnumerable<Point2f>)

Calculates the up-right bounding rectangle of a point set.

BoundingRect(IEnumerable<Point>)

Calculates the up-right bounding rectangle of a point set.

BoxFilter(InputArray, OutputArray, MatType, Size, Point?, bool, BorderTypes)

Smoothes image using box filter

BoxPoints(RotatedRect)

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

The function finds the four vertices of a rotated rectangle.This function is useful to draw the rectangle.In C++, instead of using this function, you can directly use RotatedRect::points method. Please visit the @ref tutorial_bounding_rotated_ellipses "tutorial on Creating Bounding rotated boxes and ellipses for contours" for more information.

BoxPoints(RotatedRect, OutputArray)

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

The function finds the four vertices of a rotated rectangle.This function is useful to draw the rectangle.In C++, instead of using this function, you can directly use RotatedRect::points method. Please visit the @ref tutorial_bounding_rotated_ellipses "tutorial on Creating Bounding rotated boxes and ellipses for contours" for more information.

Broadcast(InputArray, InputArray, OutputArray)

Broadcasts the given array to the given shape.

BuildMST(int, MSTEdge[], MSTAlgorithm, int)

Builds a Minimum Spanning Tree (MST) using the specified algorithm.

Supports graphs with negative edge weights. Self-loop edges (edges where source and target are the same) are ignored. If multiple edges exist between the same pair of nodes, only the one with the lowest weight is considered. If the graph is disconnected or input is invalid, the function returns false.

BuildOpticalFlowPyramid(InputArray, out Mat[], Size, int, bool, BorderTypes, BorderTypes, bool)

Constructs a pyramid which can be used as input for calcOpticalFlowPyrLK

BuildOpticalFlowPyramid(InputArray, OutputArray, Size, int, bool, BorderTypes, BorderTypes, bool)

Constructs a pyramid which can be used as input for calcOpticalFlowPyrLK

BuildPyramid(InputArray, VectorOfMat, int, BorderTypes)
CalcBackProject(Mat[], int[], InputArray, OutputArray, Rangef[], bool)

computes the joint dense histogram for a set of images.

CalcCovarMatrix(InputArray, OutputArray, InputOutputArray, CovarFlags, MatType?)

computes covariation matrix of a set of samples

CalcCovarMatrix(ReadOnlySpan<Mat>, Mat, Mat, CovarFlags, MatType?)

computes covariation matrix of a set of samples

CalcHist(Mat[], int[], InputArray, OutputArray, int, int[], Rangef[], bool, bool)

computes the joint dense histogram for a set of images.

CalcHist(Mat[], int[], InputArray, OutputArray, int, int[], float[][], bool, bool)

computes the joint dense histogram for a set of images.

CalcOpticalFlowFarneback(InputArray, InputArray, InputOutputArray, double, int, int, int, int, double, OpticalFlowFlags)

Computes a dense optical flow using the Gunnar Farneback's algorithm.

CalcOpticalFlowPyrLK(InputArray, InputArray, InputArray, InputOutputArray, OutputArray, OutputArray, Size?, int, TermCriteria?, OpticalFlowFlags, double)

computes sparse optical flow using multi-scale Lucas-Kanade algorithm

CalcOpticalFlowPyrLK(InputArray, InputArray, Point2f[], ref Point2f[], out byte[], out float[], Size?, int, TermCriteria?, OpticalFlowFlags, double)

computes sparse optical flow using multi-scale Lucas-Kanade algorithm

CalibrateCamera(IEnumerable<Mat>, IEnumerable<Mat>, Size, InputOutputArray, InputOutputArray, out Mat[], out Mat[], CalibrationFlags, TermCriteria?)

finds intrinsic and extrinsic camera parameters from several fews of a known calibration pattern.

CalibrateCamera(IEnumerable<IEnumerable<Point3f>>, IEnumerable<IEnumerable<Point2f>>, Size, double[,], double[], out Vec3d[], out Vec3d[], CalibrationFlags, TermCriteria?)

finds intrinsic and extrinsic camera parameters from several fews of a known calibration pattern.

CalibrateCameraRO(IEnumerable<Mat>, IEnumerable<Mat>, Size, int, InputOutputArray, InputOutputArray, out Mat[], out Mat[], OutputArray, CalibrationFlags, TermCriteria?)

Finds intrinsic and extrinsic camera parameters, additionally allowing one point of the calibration pattern object to be optimized ("releasing object" method). Useful when the calibration pattern is not perfectly rigid/planar.

CalibrateHandEye(IEnumerable<Mat>, IEnumerable<Mat>, IEnumerable<Mat>, IEnumerable<Mat>, OutputArray, OutputArray, HandEyeCalibrationMethod)

Computes Hand-Eye calibration.

The function performs the Hand-Eye calibration using various methods. One approach consists in estimating the rotation then the translation(separable solutions) and the following methods are implemented:

  • R.Tsai, R.Lenz A New Technique for Fully Autonomous and Efficient 3D Robotics Hand/EyeCalibration \cite Tsai89
  • F.Park, B.Martin Robot Sensor Calibration: Solving AX = XB on the Euclidean Group \cite Park94
  • R.Horaud, F.Dornaika Hand-Eye Calibration \cite Horaud95

Another approach consists in estimating simultaneously the rotation and the translation(simultaneous solutions), with the following implemented method:

  • N.Andreff, R.Horaud, B.Espiau On-line Hand-Eye Calibration \cite Andreff99
  • K.Daniilidis Hand-Eye Calibration Using Dual Quaternions \cite Daniilidis98
CalibrateMultiview(IEnumerable<Mat>, IReadOnlyList<IReadOnlyList<Mat>>, IEnumerable<Size>, InputArray, InputArray, out Mat[], out Mat[], out Mat[], out Mat[], InputArray, CalibrationFlags, TermCriteria?)

Estimates intrinsics and extrinsics (camera poses) for a multi-camera system, a.k.a. multi-view calibration (OpenCV 5).

CalibrateRobotWorldHandEye(IEnumerable<Mat>, IEnumerable<Mat>, IEnumerable<Mat>, IEnumerable<Mat>, OutputArray, OutputArray, OutputArray, OutputArray, RobotWorldHandEyeCalibrationMethod)

Computes Robot-World/Hand-Eye calibration. The function performs the Robot-World/Hand-Eye calibration using various methods. One approach consists in estimating the rotation then the translation(separable solutions):

  • M.Shah, Solving the robot-world/hand-eye calibration problem using the kronecker product \cite Shah2013SolvingTR
CalibrateRobotWorldHandEye(IEnumerable<Mat>, IEnumerable<Mat>, IEnumerable<Mat>, IEnumerable<Mat>, out double[,], out double[], out double[,], out double[], RobotWorldHandEyeCalibrationMethod)

omputes Robot-World/Hand-Eye calibration. The function performs the Robot-World/Hand-Eye calibration using various methods. One approach consists in estimating the rotation then the translation(separable solutions):

  • M.Shah, Solving the robot-world/hand-eye calibration problem using the kronecker product \cite Shah2013SolvingTR
CalibrationMatrixValues(InputArray, Size, double, double, out double, out double, out double, out Point2d, out double)

computes several useful camera characteristics from the camera matrix, camera frame resolution and the physical sensor size.

CalibrationMatrixValues(double[,], Size, double, double, out double, out double, out double, out Point2d, out double)

computes several useful camera characteristics from the camera matrix, camera frame resolution and the physical sensor size.

CamShift(InputArray, ref Rect, TermCriteria)

Finds an object center, size, and orientation.

Canny(InputArray, InputArray, OutputArray, double, double, bool)

Finds edges in an image using the Canny algorithm with custom image gradient.

Canny(InputArray, OutputArray, double, double, int, bool)

Finds edges in an image using Canny algorithm.

CartToPolar(InputArray, InputArray, OutputArray, OutputArray, bool)

Calculates the magnitude and angle of 2D vectors.

CheckChessboard(InputArray, Size)

Checks whether the image contains chessboard of the specific size or not.

CheckHardwareSupport(CpuFeatures)

Returns true if the specified feature is supported by the host hardware. The function returns true if the host hardware supports the specified feature.When user calls setUseOptimized(false), the subsequent calls to checkHardwareSupport() will return false until setUseOptimized(true) is called.This way user can dynamically switch on and off the optimized code in OpenCV.

CheckRange(InputArray, bool)

checks that each matrix element is within the specified range.

CheckRange(InputArray, bool, out Point, double, double)

checks that each matrix element is within the specified range.

Circle(InputOutputArray, Point, int, Scalar, int, LineTypes, int)

Draws a circle

Circle(InputOutputArray, int, int, int, Scalar, int, LineTypes, int)

Draws a circle

ClipLine(Rect, ref Point, ref Point)

Clips the line against the image rectangle

ClipLine(Size, ref Point, ref Point)

Clips the line against the image rectangle

ColorChange(InputArray, InputArray, OutputArray, float, float, float)

Given an original color image, two differently colored versions of this image can be mixed seamlessly. Multiplication factor is between 0.5 to 2.5.

Compare(InputArray, InputArray, OutputArray, CmpTypes)

Performs the per-element comparison of two arrays or an array and scalar value.

CompareHist(InputArray, InputArray, HistCompMethods)

compares two histograms stored in dense arrays

CompleteSymm(InputOutputArray, bool)

extends the symmetrical matrix from the lower half or from the upper half

ComposeRT(InputArray, InputArray, InputArray, InputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray)

composes 2 [R|t] transformations together. Also computes the derivatives of the result w.r.t the arguments

ComposeRT(double[], double[], double[], double[], out double[], out double[])

composes 2 [R|t] transformations together. Also computes the derivatives of the result w.r.t the arguments

ComposeRT(double[], double[], double[], double[], out double[], out double[], out double[,], out double[,], out double[,], out double[,], out double[,], out double[,], out double[,], out double[,])

composes 2 [R|t] transformations together. Also computes the derivatives of the result w.r.t the arguments

ComputeCorrespondEpilines(InputArray, int, InputArray, OutputArray)

For points in an image of a stereo pair, computes the corresponding epilines in the other image.

ComputeCorrespondEpilines(IEnumerable<Point2d>, int, double[,])

For points in an image of a stereo pair, computes the corresponding epilines in the other image.

ComputeCorrespondEpilines(IEnumerable<Point3d>, int, double[,])

For points in an image of a stereo pair, computes the corresponding epilines in the other image.

ComputeECC(InputArray, InputArray, InputArray)

Computes the Enhanced Correlation Coefficient value between two images @cite EP08 .

ComputeRecallPrecisionCurve(DMatch[][], byte[][])
ConnectedComponents(InputArray, OutputArray, PixelConnectivity)

computes the connected components labeled image of boolean image. image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 represents the background label. ltype specifies the output label image type, an important consideration based on the total number of labels or alternatively the total number of pixels in the source image.

ConnectedComponents(InputArray, OutputArray, PixelConnectivity, MatType)

computes the connected components labeled image of boolean image. image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 represents the background label. ltype specifies the output label image type, an important consideration based on the total number of labels or alternatively the total number of pixels in the source image.

ConnectedComponents(InputArray, out int[,], PixelConnectivity)

computes the connected components labeled image of boolean image. image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 represents the background label. ltype specifies the output label image type, an important consideration based on the total number of labels or alternatively the total number of pixels in the source image.

ConnectedComponentsEx(InputArray, PixelConnectivity, ConnectedComponentsAlgorithmsTypes, MatType?)

computes the connected components labeled image of boolean image. image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 represents the background label. ltype specifies the output label image type, an important consideration based on the total number of labels or alternatively the total number of pixels in the source image.

ConnectedComponentsWithAlgorithm(InputArray, OutputArray, PixelConnectivity, MatType, ConnectedComponentsAlgorithmsTypes)

Computes the connected components labeled image of boolean image.

image with 4 or 8 way connectivity - returns N, the total number of labels[0, N - 1] where 0 represents the background label.ltype specifies the output label image type, an important consideration based on the total number of labels or alternatively the total number of pixels in the source image.ccltype specifies the connected components labeling algorithm to use, currently Grana (BBDT) and Wu's (SAUF) algorithms are supported, see the #ConnectedComponentsAlgorithmsTypes for details.Note that SAUF algorithm forces a row major ordering of labels while BBDT does not. This function uses parallel version of both Grana and Wu's algorithms if at least one allowed parallel framework is enabled and if the rows of the image are at least twice the number returned by #getNumberOfCPUs.

ConnectedComponentsWithStats(InputArray, OutputArray, OutputArray, OutputArray, PixelConnectivity)

computes the connected components labeled image of boolean image. image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 represents the background label. ltype specifies the output label image type, an important consideration based on the total number of labels or alternatively the total number of pixels in the source image.

ConnectedComponentsWithStats(InputArray, OutputArray, OutputArray, OutputArray, PixelConnectivity, MatType)

computes the connected components labeled image of boolean image. image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 represents the background label. ltype specifies the output label image type, an important consideration based on the total number of labels or alternatively the total number of pixels in the source image.

ConnectedComponentsWithStatsWithAlgorithm(InputArray, OutputArray, OutputArray, OutputArray, PixelConnectivity, MatType, ConnectedComponentsAlgorithmsTypes)

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

image with 4 or 8 way connectivity - returns N, the total number of labels[0, N - 1] where 0 represents the background label.ltype specifies the output label image type, an important consideration based on the total number of labels or alternatively the total number of pixels in the source image.ccltype specifies the connected components labeling algorithm to use, currently Grana's (BBDT) and Wu's (SAUF) algorithms are supported, see the #ConnectedComponentsAlgorithmsTypes for details.Note that SAUF algorithm forces a row major ordering of labels while BBDT does not. This function uses parallel version of both Grana and Wu's algorithms (statistics included) if at least one allowed parallel framework is enabled and if the rows of the image are at least twice the number returned by #getNumberOfCPUs.

ContourArea(InputArray, bool)

Calculates the contour area

ContourArea(IEnumerable<Point2f>, bool)

Calculates the contour area

ContourArea(IEnumerable<Point>, bool)

Calculates the contour area

ConvertMaps(InputArray, InputArray, OutputArray, OutputArray, MatType, bool)

Converts image transformation maps from one representation to another.

ConvertPointsFromHomogeneous(InputArray, OutputArray)

converts point coordinates from homogeneous to normal pixel coordinates ((x,y,z)->(x/z, y/z))

ConvertPointsFromHomogeneous(IEnumerable<Vec3f>)

converts point coordinates from homogeneous to normal pixel coordinates ((x,y,z)->(x/z, y/z))

ConvertPointsFromHomogeneous(IEnumerable<Vec4f>)

converts point coordinates from homogeneous to normal pixel coordinates ((x,y,z)->(x/z, y/z))

ConvertPointsHomogeneous(InputArray, OutputArray)

Converts points to/from homogeneous coordinates.

ConvertPointsToHomogeneous(InputArray, OutputArray)

converts point coordinates from normal pixel coordinates to homogeneous coordinates ((x,y)->(x,y,1))

ConvertPointsToHomogeneous(IEnumerable<Vec2f>)

converts point coordinates from normal pixel coordinates to homogeneous coordinates ((x,y)->(x,y,1))

ConvertPointsToHomogeneous(IEnumerable<Vec3f>)

converts point coordinates from normal pixel coordinates to homogeneous coordinates ((x,y)->(x,y,1))

ConvertScaleAbs(InputArray, OutputArray, double, double)

Scales, computes absolute values and converts the result to 8-bit.

ConvexHull(InputArray, OutputArray, bool, bool)

Computes convex hull for a set of 2D points.

ConvexHull(IEnumerable<Point2f>, bool)

Computes convex hull for a set of 2D points.

ConvexHull(IEnumerable<Point>, bool)

Computes convex hull for a set of 2D points.

ConvexHullIndices(IEnumerable<Point2f>, bool)

Computes convex hull for a set of 2D points.

ConvexHullIndices(IEnumerable<Point>, bool)

Computes convex hull for a set of 2D points.

ConvexityDefects(InputArray, InputArray, OutputArray)

Computes the contour convexity defects

ConvexityDefects(IEnumerable<Point2f>, IEnumerable<int>)

Computes the contour convexity defects

ConvexityDefects(IEnumerable<Point>, IEnumerable<int>)

Computes the contour convexity defects

CopyMakeBorder(InputArray, OutputArray, int, int, int, int, BorderTypes, Scalar?)

Forms a border around the image

CopyTo(InputArray, OutputArray, InputArray)

Copies the matrix to another one. When the operation mask is specified, if the Mat::create call shown above reallocates the matrix, the newly allocated matrix is initialized with all zeros before copying the data.

CornerEigenValsAndVecs(InputArray, OutputArray, int, int, BorderTypes)

computes both eigenvalues and the eigenvectors of 2x2 derivative covariation matrix at each pixel. The output is stored as 6-channel matrix.

CornerHarris(InputArray, OutputArray, int, int, double, BorderTypes)

Harris corner detector.

CornerMinEigenVal(InputArray, OutputArray, int, int, BorderTypes)

Calculates the minimal eigenvalue of gradient matrices for corner detection.

CornerSubPix(InputArray, IEnumerable<Point2f>, Size, Size, TermCriteria)

adjusts the corner locations with sub-pixel accuracy to maximize the certain cornerness criteria

CorrectMatches(InputArray, InputArray, InputArray, OutputArray, OutputArray)

Refines coordinates of corresponding points.

CorrectMatches(double[,], IEnumerable<Point2d>, IEnumerable<Point2d>, out Point2d[], out Point2d[])

Refines coordinates of corresponding points.

CountNonZero(InputArray)

computes the number of nonzero array elements

CreateAffineTransformer(bool)

Creates an Affine shape transformer.

CreateCLAHE(double, Size?)

Creates a predefined CLAHE object

CreateChiHistogramCostExtractor(int, float)

Creates a chi-squared histogram cost extractor.

CreateEMDHistogramCostExtractor(DistanceTypes, int, float)

Creates an EMD-based histogram cost extractor.

CreateEMDL1HistogramCostExtractor(int, float)

Creates an EMD-L1 histogram cost extractor.

CreateFrameSource_Camera(int)
CreateFrameSource_Empty()
CreateFrameSource_Video(string)
CreateFrameSource_Video_CUDA(string)
CreateHanningWindow(OutputArray, Size, MatType)

Computes a Hanning window coefficients in two dimensions.

CreateNormHistogramCostExtractor(DistanceTypes, int, float)

Creates a norm-based histogram cost extractor.

CreateOptFlow_Brox_GPU()
CreateOptFlow_DualTVL1_GPU()
CreateOptFlow_Farneback()
CreateOptFlow_Farneback_GPU()
CreateOptFlow_PyrLK_GPU()
CreateSuperResolution_BTVL1()

Create Bilateral TV-L1 Super Resolution.

CreateSuperResolution_BTVL1_CUDA()

Create Bilateral TV-L1 Super Resolution.

CreateThinPlateSplineShapeTransformer(double)

Creates a Thin Plate Spline shape transformer.

CreateTrackbar(string, string, int, TrackbarCallbackNative?, nint)

Creates a trackbar and attaches it to the specified window. The function createTrackbar creates a trackbar(a slider or range control) with the specified name and range, assigns a variable value to be a position synchronized with the trackbar and specifies the callback function onChange to be called on the trackbar position change.The created trackbar is displayed in the specified window winName.

CreateTrackbar(string, string, ref int, int, TrackbarCallbackNative?, nint)

Creates a trackbar and attaches it to the specified window. The function createTrackbar creates a trackbar(a slider or range control) with the specified name and range, assigns a variable value to be a position synchronized with the trackbar and specifies the callback function onChange to be called on the trackbar position change.The created trackbar is displayed in the specified window winName.

CubeRoot(float)

computes cube root of the argument

CurrentUIFramework()

Returns the HighGUI backend name in use: could be COCOA, GTK2/3, QT, WAYLAND or WIN32. Returns an empty string if there is no available UI backend.

CvtColor(InputArray, OutputArray, ColorConversionCodes, int, AlgorithmHint)

Converts image from one color space to another

CvtColorTwoPlane(InputArray, InputArray, OutputArray, ColorConversionCodes, AlgorithmHint)

Converts an image from one color space to another where the source image is stored in two planes. This function only supports YUV420 to RGB conversion as of now.

Dct(InputArray, OutputArray, DctFlags)

Performs forward or inverse 1D or 2D Discrete Cosine Transformation

Decolor(InputArray, OutputArray, OutputArray)

Transforms a color image to a grayscale image. It is a basic tool in digital printing, stylized black-and-white photograph rendering, and in many single channel image processing applications @cite CL12 .

DecomposeEssentialMat(InputArray, OutputArray, OutputArray, OutputArray)

Decomposes an essential matrix to possible rotations and translation.

DecomposeHomographyMat(InputArray, InputArray, out Mat[], out Mat[], out Mat[])

Decompose a homography matrix to rotation(s), translation(s) and plane normal(s).

DecomposeProjectionMatrix(InputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray)

Decomposes the projection matrix into camera matrix and the rotation martix and the translation vector

DecomposeProjectionMatrix(double[,], out double[,], out double[,], out double[])

Decomposes the projection matrix into camera matrix and the rotation martix and the translation vector

DecomposeProjectionMatrix(double[,], out double[,], out double[,], out double[], out double[,], out double[,], out double[,], out double[])

Decomposes the projection matrix into camera matrix and the rotation martix and the translation vector

Demosaicing(InputArray, OutputArray, ColorConversionCodes, int)

main function for all demosaicing processes

DenoiseTVL1(IEnumerable<Mat>, Mat, double, int)

Primal-dual algorithm is an algorithm for solving special types of variational problems (that is, finding a function to minimize some functional). As the image denoising, in particular, may be seen as the variational problem, primal-dual algorithm then can be used to perform denoising and this is exactly what is implemented.

DepthTo3d(InputArray, InputArray, OutputArray, InputArray)

Converts a depth image to 3d points.

DepthTo3dSparse(InputArray, InputArray, InputArray, OutputArray)

Converts the specified sparse depth coordinates to 3d points.

DestroyAllWindows()

Destroys all of the HighGUI windows.

DestroyWindow(string)

Destroys the specified window.

DetailEnhance(InputArray, OutputArray, float, float)

This filter enhances the details of a particular image.

Determinant(InputArray)

computes determinant of a square matrix

Dft(InputArray, OutputArray, DftFlags, int)

Performs a forward Discrete Fourier transform of 1D or 2D floating-point array.

Dilate(InputArray, OutputArray, InputArray, Point?, int, BorderTypes, Scalar?)

Dilates an image by using a specific structuring element.

DistanceTransform(InputArray, OutputArray, DistanceTypes, DistanceTransformMasks, int)

computes the distance transform map

DistanceTransformWithLabels(InputArray, OutputArray, OutputArray, DistanceTypes, DistanceTransformMasks, DistanceTransformLabelTypes)

Calculates the distance to the closest zero pixel for each pixel of the source image.

Divide(InputArray, InputArray, OutputArray, double, MatType?)

Performs per-element division of two arrays or a scalar by an array.

Divide(double, InputArray, OutputArray, int)

Performs per-element division of two arrays or a scalar by an array.

DrawChessboardCorners(InputOutputArray, Size, InputArray, bool)

Renders the detected chessboard corners.

DrawChessboardCorners(InputOutputArray, Size, IEnumerable<Point2f>, bool)

Renders the detected chessboard corners.

DrawContours(InputOutputArray, IEnumerable<Mat>, int, Scalar, int, LineTypes, InputArray, int, Point?)

draws contours in the image

DrawContours(InputOutputArray, IEnumerable<IEnumerable<Point>>, int, Scalar, int, LineTypes, IEnumerable<HierarchyIndex>?, int, Point?)

draws contours in the image

DrawFrameAxes(InputOutputArray, InputArray, InputArray, InputArray, InputArray, float, int)

Draw axes of the world/object coordinate system from pose estimation.

DrawKeypoints(InputArray, IEnumerable<KeyPoint>, InputOutputArray, Scalar?, DrawMatchesFlags)

Draw keypoints.

DrawMarker(InputOutputArray, Point, Scalar, MarkerTypes, int, int, LineTypes)

Draws a marker on a predefined position in an image.

The function cv::drawMarker draws a marker on a given position in the image.For the moment several marker types are supported, see #MarkerTypes for more information.

DrawMatches(Mat, IEnumerable<KeyPoint>, Mat, IEnumerable<KeyPoint>, IEnumerable<DMatch>, Mat, Scalar?, Scalar?, IEnumerable<byte>?, DrawMatchesFlags)

Draws the found matches of keypoints from two images.

DrawMatchesKnn(Mat, IEnumerable<KeyPoint>, Mat, IEnumerable<KeyPoint>, IEnumerable<IEnumerable<DMatch>>, Mat, Scalar?, Scalar?, IEnumerable<IEnumerable<byte>>?, DrawMatchesFlags)

Draws the found matches of keypoints from two images.

EMD(InputArray, InputArray, DistanceTypes)

Computes the "minimal work" distance between two weighted point configurations.

The function computes the earth mover distance and/or a lower boundary of the distance between the two weighted point configurations.One of the applications described in @cite RubnerSept98, @cite Rubner2000 is multi-dimensional histogram comparison for image retrieval.EMD is a transportation problem that is solved using some modification of a simplex algorithm, thus the complexity is exponential in the worst case, though, on average it is much faster.In the case of a real metric the lower boundary can be calculated even faster (using linear-time algorithm) and it can be used to determine roughly whether the two signatures are far enough so that they cannot relate to the same object.

EMD(InputArray, InputArray, DistanceTypes, InputArray)

Computes the "minimal work" distance between two weighted point configurations.

The function computes the earth mover distance and/or a lower boundary of the distance between the two weighted point configurations.One of the applications described in @cite RubnerSept98, @cite Rubner2000 is multi-dimensional histogram comparison for image retrieval.EMD is a transportation problem that is solved using some modification of a simplex algorithm, thus the complexity is exponential in the worst case, though, on average it is much faster.In the case of a real metric the lower boundary can be calculated even faster (using linear-time algorithm) and it can be used to determine roughly whether the two signatures are far enough so that they cannot relate to the same object.

EMD(InputArray, InputArray, DistanceTypes, InputArray, out float, OutputArray)

Computes the "minimal work" distance between two weighted point configurations.

The function computes the earth mover distance and/or a lower boundary of the distance between the two weighted point configurations.One of the applications described in @cite RubnerSept98, @cite Rubner2000 is multi-dimensional histogram comparison for image retrieval.EMD is a transportation problem that is solved using some modification of a simplex algorithm, thus the complexity is exponential in the worst case, though, on average it is much faster.In the case of a real metric the lower boundary can be calculated even faster (using linear-time algorithm) and it can be used to determine roughly whether the two signatures are far enough so that they cannot relate to the same object.

EMDL1(InputArray, InputArray)

Computes the Earth Mover's Distance L1 (EMDL1) between two weighted point configurations.

EdgePreservingFilter(InputArray, OutputArray, EdgePreservingMethods, float, float)

Filtering is the fundamental operation in image and video processing. Edge-preserving smoothing filters are used in many different applications @cite EM11 .

Eigen(InputArray, OutputArray, OutputArray)

Computes eigenvalues and eigenvectors of a symmetric matrix.

EigenNonSymmetric(InputArray, OutputArray, OutputArray)

Calculates eigenvalues and eigenvectors of a non-symmetric matrix (real eigenvalues only).

Ellipse(InputOutputArray, Point, Size, double, double, double, Scalar, int, LineTypes, int)

Draws simple or thick elliptic arc or fills ellipse sector

Ellipse(InputOutputArray, RotatedRect, Scalar, int, LineTypes)

Draws simple or thick elliptic arc or fills ellipse sector

Ellipse2Poly(Point, Size, int, int, int, int)

Approximates an elliptic arc with a polyline. The function ellipse2Poly computes the vertices of a polyline that approximates the specified elliptic arc. It is used by cv::ellipse.

Ellipse2Poly(Point2d, Size2d, int, int, int, int)

Approximates an elliptic arc with a polyline. The function ellipse2Poly computes the vertices of a polyline that approximates the specified elliptic arc. It is used by cv::ellipse.

EqualizeHist(InputArray, OutputArray)

normalizes the grayscale image brightness and contrast by normalizing its histogram

Erode(InputArray, OutputArray, InputArray, Point?, int, BorderTypes, Scalar?)

Erodes an image by using a specific structuring element.

EstimateAffine2D(InputArray, InputArray, OutputArray, RobustEstimationAlgorithms, double, ulong, double, ulong)

Computes an optimal affine transformation between two 2D point sets.

EstimateAffine3D(InputArray, InputArray, OutputArray, OutputArray, double, double)

Computes an optimal affine transformation between two 3D point sets.

EstimateAffinePartial2D(InputArray, InputArray, OutputArray, RobustEstimationAlgorithms, double, ulong, double, ulong)

Computes an optimal limited affine transformation with 4 degrees of freedom between two 2D point sets.

EstimateChessboardSharpness(InputArray, Size, InputArray, float, bool, OutputArray)

Estimates the sharpness of a detected chessboard. Image sharpness, as well as brightness, are a critical parameter for accuracy of feature point extraction. As an example, consider the sharpness level of a camera as being described in terms of a Gaussian low pass filter and estimate the parameter based on the width of the transition area between a fully saturated pixel and the background pixel.

EstimateTranslation2D(InputArray, InputArray, OutputArray, RobustEstimationAlgorithms, double, ulong, double, ulong)

Computes an optimal translation between two 2D point sets.

EstimateTranslation3D(InputArray, InputArray, OutputArray, OutputArray, double, double)

Computes an optimal translation between two 3D point sets using RANSAC.

EvaluateFeatureDetector(Mat, Mat, Mat, ref KeyPoint[], ref KeyPoint[], out float, out int)
Exp(InputArray, OutputArray)

computes exponent of each matrix element (dst = e**src)

ExtractChannel(InputArray, OutputArray, int)

extracts a single channel from src (coi is 0-based index)

FAST(InputArray, int, bool)

Detects corners using the FAST algorithm

FAST(InputArray, int, bool, FASTType)

Detects corners using the FAST algorithm

FarthestPointSampling(OutputArray, InputArray, int, float)

Point cloud sampling by Farthest Point Sampling (FPS).

FarthestPointSampling(OutputArray, InputArray, float, float)

Point cloud sampling by Farthest Point Sampling (FPS).

FastAtan2(float, float)

computes the angle in degrees (0..360) of the vector (x,y)

FastNlMeansDenoising(InputArray, OutputArray, float, int, int)

Perform image denoising using Non-local Means Denoising algorithm with several computational optimizations. Noise expected to be a gaussian white noise

FastNlMeansDenoisingColored(InputArray, OutputArray, float, float, int, int)

Modification of fastNlMeansDenoising function for colored images

FastNlMeansDenoisingColoredMulti(IEnumerable<Mat>, OutputArray, int, int, float, float, int, int)

Modification of fastNlMeansDenoisingMulti function for colored images sequences

FastNlMeansDenoisingMulti(IEnumerable<Mat>, OutputArray, int, int, float, int, int)

Modification of fastNlMeansDenoising function for images sequence where consequtive images have been captured in small period of time. For example video. This version of the function is for grayscale images or for manual manipulation with colorspaces.

FillConvexPoly(InputOutputArray, InputArray, Scalar, LineTypes, int)

Fills a convex polygon.

FillConvexPoly(Mat, IEnumerable<Point>, Scalar, LineTypes, int)

Fills a convex polygon.

FillPoly(InputOutputArray, InputArray, Scalar, LineTypes, int, Point?)

Fills the area bounded by one or more polygons

FillPoly(Mat, IEnumerable<IEnumerable<Point>>, Scalar, LineTypes, int, Point?)

Fills the area bounded by one or more polygons

Filter2D(InputArray, OutputArray, InputArray, Filter2DParams?)

Convolves an image with the kernel (OpenCV 5 parameter-struct overload).

Filter2D(InputArray, OutputArray, MatType, InputArray, Point?, double, BorderTypes)

Convolves an image with the kernel

FilterHomographyDecompByVisibleRefpoints(IEnumerable<Mat>, IEnumerable<Mat>, InputArray, InputArray, OutputArray, InputArray)

Filters homography decompositions based on additional information.

FilterSpeckles(InputOutputArray, double, int, double, InputOutputArray)

filters off speckles (small regions of incorrectly computed disparity)

Find4QuadCornerSubpix(InputArray, InputOutputArray, Size)

finds subpixel-accurate positions of the chessboard corners

Find4QuadCornerSubpix(InputArray, Point2f[], Size)

finds subpixel-accurate positions of the chessboard corners

FindChessboardCorners(InputArray, Size, OutputArray, ChessboardFlags)

Finds the positions of internal corners of the chessboard.

FindChessboardCorners(InputArray, Size, out Point2f[], ChessboardFlags)

Finds the positions of internal corners of the chessboard.

FindChessboardCornersSB(InputArray, Size, OutputArray, ChessboardFlags)

Finds the positions of internal corners of the chessboard using a sector based approach.

FindChessboardCornersSB(InputArray, Size, out Point2f[], ChessboardFlags)

Finds the positions of internal corners of the chessboard using a sector based approach.

FindCirclesGrid(InputArray, Size, OutputArray, FindCirclesGridFlags, Feature2D?)

Finds centers in the grid of circles.

FindCirclesGrid(InputArray, Size, OutputArray, FindCirclesGridFlags, Feature2D?, in CirclesGridFinderParameters)

Finds centers in the grid of circles, using custom finder parameters.

FindCirclesGrid(InputArray, Size, out Point2f[], FindCirclesGridFlags, Feature2D?)

Finds centers in the grid of circles.

FindCirclesGrid(InputArray, Size, out Point2f[], FindCirclesGridFlags, Feature2D?, in CirclesGridFinderParameters)

Finds centers in the grid of circles, using custom finder parameters.

FindContours(InputArray, out Mat[], OutputArray, RetrievalModes, ContourApproximationModes, Point?)

Finds contours in a binary image.

FindContours(InputArray, out Point[][], out HierarchyIndex[], RetrievalModes, ContourApproximationModes, Point?)

Finds contours in a binary image.

FindContoursAsArray(InputArray, RetrievalModes, ContourApproximationModes, Point?)

Finds contours in a binary image.

FindContoursAsMat(InputArray, RetrievalModes, ContourApproximationModes, Point?)

Finds contours in a binary image.

FindContoursLinkRuns(InputArray, out Point[][])

Finds contours in a binary image using the link-runs algorithm (OpenCV 5), without hierarchy output.

FindContoursLinkRuns(InputArray, out Point[][], out HierarchyIndex[])

Finds contours in a binary image using the link-runs algorithm (OpenCV 5). This is an alternative to FindContours(InputArray, out Point[][], out HierarchyIndex[], RetrievalModes, ContourApproximationModes, Point?) with reduced memory consumption; it always uses the equivalent of RETR_CCOMP retrieval.

FindEssentialMat(InputArray, InputArray, InputArray, EssentialMatMethod, double, double, OutputArray)

Calculates an essential matrix from the corresponding points in two images.

FindEssentialMat(InputArray, InputArray, double, Point2d, EssentialMatMethod, double, double, OutputArray)

Calculates an essential matrix from the corresponding points in two images.

FindFundamentalMat(InputArray, InputArray, FundamentalMatMethods, double, double, OutputArray)

Calculates a fundamental matrix from the corresponding points in two images.

FindFundamentalMat(InputArray, InputArray, OutputArray, UsacParams?)

Calculates a fundamental matrix from the corresponding points in two images, using the USAC robust estimation framework (OpenCV 5).

FindFundamentalMat(IEnumerable<Point2d>, IEnumerable<Point2d>, FundamentalMatMethods, double, double, OutputArray)

Calculates a fundamental matrix from the corresponding points in two images.

FindFundamentalMat(IEnumerable<Point2f>, IEnumerable<Point2f>, FundamentalMatMethods, double, double, OutputArray)

Calculates a fundamental matrix from the corresponding points in two images.

FindHomography(InputArray, InputArray, HomographyMethods, double, OutputArray, int, double)

computes the best-fit perspective transformation mapping srcPoints to dstPoints.

FindHomography(InputArray, InputArray, OutputArray, UsacParams?)

computes the best-fit perspective transformation mapping srcPoints to dstPoints.

FindHomography(IEnumerable<Point2d>, IEnumerable<Point2d>, HomographyMethods, double, OutputArray, int, double)

computes the best-fit perspective transformation mapping srcPoints to dstPoints.

FindNonZero(InputArray, OutputArray)

returns the list of locations of non-zero pixels

FindPlanes(InputArray, InputArray, OutputArray, OutputArray, int, int, double, double, double, double, RgbdPlaneMethod)

Finds the planes in a depth image.

FindTransformECC(InputArray, InputArray, InputOutputArray, MotionTypes, TermCriteria, InputArray, int)

Finds the geometric transform (warp) between two images in terms of the ECC criterion @cite EP08 .

FindTransformECC(InputArray, InputArray, InputOutputArray, MotionTypes, TermCriteria?, InputArray)

Finds the geometric transform (warp) between two images in terms of the ECC criterion @cite EP08 .

FindTransformECCMultiScale(InputArray, InputArray, InputOutputArray, ECCParameters?, InputArray, InputArray)

Finds the geometric transform (warp) between two images in terms of the ECC criterion. Uses pyramids, making the function more stable and able to correctly handle more sophisticated cases than FindTransformECC(InputArray, InputArray, InputOutputArray, MotionTypes, TermCriteria?, InputArray).

FindTransformECCWithMask(InputArray, InputArray, InputArray, InputArray, InputOutputArray, MotionTypes, TermCriteria?, int)

Finds the geometric transform (warp) between two images in terms of the ECC criterion, using validity masks for both the template and the input images. This extends FindTransformECC(InputArray, InputArray, InputOutputArray, MotionTypes, TermCriteria?, InputArray) by adding a mask for the template image. The Enhanced Correlation Coefficient is evaluated only over pixels that are valid in both images: on each iteration inputMask is warped into the template frame and combined with templateMask, and only the intersection of these masks contributes to the objective function.

FiniteMask(InputArray, OutputArray)

Computes a mask of finite (non-NaN, non-Inf) elements, a companion to PatchNaNs(InputOutputArray, double).

FitEllipse(InputArray)

Fits ellipse to the set of 2D points.

FitEllipse(IEnumerable<Point2f>)

Fits ellipse to the set of 2D points.

FitEllipse(IEnumerable<Point>)

Fits ellipse to the set of 2D points.

FitEllipseAMS(InputArray)

Fits an ellipse around a set of 2D points.

The function calculates the ellipse that fits a set of 2D points. It returns the rotated rectangle in which the ellipse is inscribed. The Approximate Mean Square(AMS) proposed by @cite Taubin1991 is used.

FitEllipseAMS(IEnumerable<Point2f>)

Fits an ellipse around a set of 2D points.

The function calculates the ellipse that fits a set of 2D points. It returns the rotated rectangle in which the ellipse is inscribed. The Approximate Mean Square(AMS) proposed by @cite Taubin1991 is used.

FitEllipseAMS(IEnumerable<Point>)

Fits an ellipse around a set of 2D points.

The function calculates the ellipse that fits a set of 2D points. It returns the rotated rectangle in which the ellipse is inscribed. The Approximate Mean Square(AMS) proposed by @cite Taubin1991 is used.

FitEllipseDirect(InputArray)

Fits an ellipse around a set of 2D points.

The function calculates the ellipse that fits a set of 2D points. It returns the rotated rectangle in which the ellipse is inscribed. The Direct least square(Direct) method by @cite Fitzgibbon1999 is used.

FitEllipseDirect(IEnumerable<Point2f>)

Fits an ellipse around a set of 2D points.

The function calculates the ellipse that fits a set of 2D points. It returns the rotated rectangle in which the ellipse is inscribed. The Direct least square(Direct) method by @cite Fitzgibbon1999 is used.

FitEllipseDirect(IEnumerable<Point>)

Fits an ellipse around a set of 2D points.

The function calculates the ellipse that fits a set of 2D points. It returns the rotated rectangle in which the ellipse is inscribed. The Direct least square(Direct) method by @cite Fitzgibbon1999 is used.

FitLine(InputArray, OutputArray, DistanceTypes, double, double, double)

Fits line to the set of 2D points using M-estimator algorithm

FitLine(IEnumerable<Point2f>, DistanceTypes, double, double, double)

Fits line to the set of 2D points using M-estimator algorithm

FitLine(IEnumerable<Point3f>, DistanceTypes, double, double, double)

Fits line to the set of 3D points using M-estimator algorithm

FitLine(IEnumerable<Point3i>, DistanceTypes, double, double, double)

Fits line to the set of 3D points using M-estimator algorithm

FitLine(IEnumerable<Point>, DistanceTypes, double, double, double)

Fits line to the set of 2D points using M-estimator algorithm

Flip(InputArray, OutputArray, FlipMode)

reverses the order of the rows, columns or both in a matrix

FlipND(InputArray, OutputArray, int)

Flips an n-dimensional array along the given axis.

FloodFill(InputOutputArray, InputOutputArray, Point, Scalar)

Fills a connected component with the given color.

FloodFill(InputOutputArray, InputOutputArray, Point, Scalar, out Rect, Scalar?, Scalar?, FloodFillFlags)

Fills a connected component with the given color.

FloodFill(InputOutputArray, Point, Scalar)

Fills a connected component with the given color.

FloodFill(InputOutputArray, Point, Scalar, out Rect, Scalar?, Scalar?, FloodFillFlags)

Fills a connected component with the given color.

Format(InputArray, FormatType)
GammaCorrection(InputArray, OutputArray, double)

Applies gamma correction to the input image.

GaussianBlur(InputArray, OutputArray, Size, double, double, BorderTypes, AlgorithmHint)

Blurs an image using a Gaussian filter.

Gemm(InputArray, InputArray, double, InputArray, double, OutputArray, GemmFlags)

implements generalized matrix product algorithm GEMM from BLAS

GetAffineTransform(InputArray, InputArray)

Calculates an affine transform from three pairs of the corresponding points. The function calculates the 2×3 matrix of an affine transform.

GetAffineTransform(IEnumerable<Point2f>, IEnumerable<Point2f>)

Calculates an affine transform from three pairs of the corresponding points. The function calculates the 2×3 matrix of an affine transform.

GetBuildInformation()

Returns full configuration time cmake output.

Returned value is raw cmake output including version control system revision, compiler version, compiler flags, enabled modules and third party libraries, etc.Output format depends on target architecture.

GetClosestEllipsePoints(RotatedRect, InputArray, OutputArray)

Computes for each 2D point the nearest 2D point located on a given ellipse.

GetCpuFeaturesLine()

Returns list of CPU features enabled during compilation. Returned value is a string containing space separated list of CPU features with following markers:

  • no markers - baseline features
  • prefix * - features enabled in dispatcher
  • suffix ? - features enabled but not available in HW
GetCpuTickCount()

Returns the number of CPU ticks.

The function returns the current number of CPU ticks on some architectures(such as x86, x64, PowerPC). On other platforms the function is equivalent to getTickCount.It can also be used for very accurate time measurements, as well as for RNG initialization.Note that in case of multi-CPU systems a thread, from which getCPUTickCount is called, can be suspended and resumed at another CPU with its own counter. So, theoretically (and practically) the subsequent calls to the function do not necessary return the monotonously increasing values. Also, since a modern CPU varies the CPU frequency depending on the load, the number of CPU clocks spent in some code cannot be directly converted to time units.Therefore, getTickCount is generally a preferable solution for measuringexecution time.

GetDefaultNewCameraMatrix(InputArray, Size?, bool)

returns the default new camera matrix (by default it is the same as cameraMatrix unless centerPricipalPoint=true)

GetDerivKernels(OutputArray, OutputArray, int, int, int, bool, MatType?)

Returns filter coefficients for computing spatial image derivatives.

GetFontScaleFromHeight(HersheyFonts, int, int)

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

GetGaborKernel(Size, double, double, double, double, double, int)

Returns Gabor filter coefficients.

GetGaussianKernel(int, double, MatType?)

Returns Gaussian filter coefficients.

GetHardwareFeatureName(CpuFeatures)

Returns feature name by ID. Returns empty string if feature is not defined

GetIppVersion()

Returns the current IPP library version.

GetLogLevel()

Get global logging level

GetMouseWheelDelta(MouseEventFlags)

Gets the mouse-wheel motion delta, when handling mouse-wheel events cv::EVENT_MOUSEWHEEL and cv::EVENT_MOUSEHWHEEL.

For regular mice with a scroll-wheel, delta will be a multiple of 120. The value 120 corresponds to a one notch rotation of the wheel or the threshold for action to be taken and one such action should occur for each delta.Some high-precision mice with higher-resolution freely-rotating wheels may generate smaller values.

For cv::EVENT_MOUSEWHEEL positive and negative values mean forward and backward scrolling, respectively.For cv::EVENT_MOUSEHWHEEL, where available, positive and negative values mean right and left scrolling, respectively.

GetNearestPoint(IEnumerable<Point2f>, float)
GetNumThreads()

Returns the number of threads used by OpenCV for parallel regions.

Always returns 1 if OpenCV is built without threading support. The exact meaning of return value depends on the threading framework used by OpenCV library:

  • TBB - The number of threads, that OpenCV will try to use for parallel regions. If there is any tbb::thread_scheduler_init in user code conflicting with OpenCV, then function returns default number of threads used by TBB library.
  • OpenMP - An upper bound on the number of threads that could be used to form a new team.
  • Concurrency - The number of threads, that OpenCV will try to use for parallel regions.
  • GCD - Unsupported; returns the GCD thread pool limit(512) for compatibility.
  • C= - The number of threads, that OpenCV will try to use for parallel regions, if before called setNumThreads with threads > 0, otherwise returns the number of logical CPUs, available for the process.
GetNumberOfCpus()

Returns the number of logical CPUs available for the process.

GetOptimalDFTSize(int)

Returns the optimal DFT size for a given vector size.

GetOptimalNewCameraMatrix(InputArray, InputArray, Size, double, Size, out Rect, bool)

Returns the new camera matrix based on the free scaling parameter.

GetOptimalNewCameraMatrix(double[,], double[]?, Size, double, Size, out Rect, bool)

Returns the new camera matrix based on the free scaling parameter.

GetPerspectiveTransform(InputArray, InputArray)

Calculates a perspective transform from four pairs of the corresponding points. The function calculates the 3×3 matrix of a perspective transform.

GetPerspectiveTransform(IEnumerable<Point2f>, IEnumerable<Point2f>)

Calculates a perspective transform from four pairs of the corresponding points. The function calculates the 3×3 matrix of a perspective transform.

GetRecall(IEnumerable<Point2f>, float)
GetRectSubPix(InputArray, Size, Point2f, OutputArray, int)

Retrieves a pixel rectangle from an image with sub-pixel accuracy.

GetRotationMatrix2D(Point2f, double, double)

Calculates an affine matrix of 2D rotation.

GetStructuringElement(MorphShapes, Size)

Returns a structuring element of the specified size and shape for morphological operations. The function constructs and returns the structuring element that can be further passed to erode, dilate or morphologyEx.But you can also construct an arbitrary binary mask yourself and use it as the structuring element.

GetStructuringElement(MorphShapes, Size, Point)

Returns a structuring element of the specified size and shape for morphological operations. The function constructs and returns the structuring element that can be further passed to erode, dilate or morphologyEx.But you can also construct an arbitrary binary mask yourself and use it as the structuring element.

GetTextSize(Size, string, Point, FontFace, int, int, PutTextFlags, Range?)

Calculates the bounding rect for the text rendered with the specified TrueType font (OpenCV 5).

GetTextSize(string, HersheyFonts, double, int, out int)

returns bounding box of the text string

GetTheRNG()

Returns the thread-local Random number generator

GetThreadNum()

Returns the index of the currently executed thread within the current parallel region. Always returns 0 if called outside of parallel region. @deprecated Current implementation doesn't corresponding to this documentation. The exact meaning of the return value depends on the threading framework used by OpenCV library:

  • TBB - Unsupported with current 4.1 TBB release.Maybe will be supported in future.
  • OpenMP - The thread number, within the current team, of the calling thread.
  • Concurrency - An ID for the virtual processor that the current context is executing on(0 for master thread and unique number for others, but not necessary 1,2,3,...).
  • GCD - System calling thread's ID. Never returns 0 inside parallel region.
  • C= - The index of the current parallel task.
GetTickCount()

Returns the number of ticks. The function returns the number of ticks after the certain event (for example, when the machine was turned on). It can be used to initialize RNG or to measure a function execution time by reading the tick count before and after the function call.

GetTickFrequency()

Returns the number of ticks per second. The function returns the number of ticks per second.That is, the following code computes the execution time in seconds:

GetTrackbarPos(string, string)

Returns the trackbar position.

GetValidDisparityROI(Rect, Rect, int, int, int)

computes valid disparity ROI from the valid ROIs of the rectified images (that are returned by cv::stereoRectify())

GetVersionMajor()

Returns major library version

GetVersionMinor()

Returns minor library version

GetVersionRevision()

Returns revision field of the library version

GetVersionString()

Returns library version string. For example "3.4.1-dev".

GetWindowImageRect(string)

Provides rectangle of image in the window. The function getWindowImageRect returns the client screen coordinates, width and height of the image rendering area.

GetWindowProperty(string, WindowPropertyFlags)

Provides parameters of a window.

GoodFeaturesToTrack(InputArray, int, double, double, InputArray, int, bool, double)

finds the strong enough corners where the cornerMinEigenVal() or cornerHarris() report the local maxima

GoodFeaturesToTrack(InputArray, int, double, double, InputArray, int, int, bool, double)

finds the strong enough corners where the cornerMinEigenVal() or cornerHarris() report the local maxima

GoodFeaturesToTrackWithQuality(InputArray, int, double, double, InputArray, OutputArray, int, int, bool, double)

Same as GoodFeaturesToTrack, but returns also quality measure of the detected corners.

GrabCut(InputArray, InputOutputArray, Rect, InputOutputArray, InputOutputArray, int, GrabCutModes)

Segments the image using GrabCut algorithm

GroupRectangles(IList<Rect>, int, double)

Groups the object candidate rectangles.

GroupRectangles(IList<Rect>, int, double, out int[], out double[])

Groups the object candidate rectangles.

GroupRectangles(IList<Rect>, out int[], out double[], int, double)

Groups the object candidate rectangles.

GroupRectangles(IList<Rect>, out int[], int, double)

Groups the object candidate rectangles.

GroupRectanglesMeanshift(IList<Rect>, out double[], out double[], double, Size?)
HConcat(InputArray, InputArray, OutputArray)

Applies horizontal concatenation to given matrices.

HConcat(ReadOnlySpan<Mat>, OutputArray)

Applies horizontal concatenation to given matrices.

HasNonZero(InputArray)

Checks whether the array contains at least one non-zero element. Faster than CountNonZero(InputArray) when only the presence of non-zero elements matters.

HaveImageReader(string)
HaveImageWriter(string)
HoughCircles(InputArray, HoughModes, double, double, double, double, int, int)

Finds circles in a grayscale image using a Hough transform.

HoughLines(InputArray, double, double, int, double, double)

Finds lines in a binary image using standard Hough transform.

HoughLinesP(InputArray, double, double, int, double, double)

Finds lines segments in a binary image using probabilistic Hough transform.

HoughLinesPointSet(InputArray, OutputArray, int, int, double, double, double, double, double, double)

Finds lines in a set of points using the standard Hough transform. The function finds lines in a set of points using a modification of the Hough transform.

Idct(InputArray, OutputArray, DctFlags)

Performs inverse 1D or 2D Discrete Cosine Transformation

Idft(InputArray, OutputArray, DftFlags, int)

Performs an inverse Discrete Fourier transform of 1D or 2D floating-point array.

IlluminationChange(InputArray, InputArray, OutputArray, float, float)

Applying an appropriate non-linear transformation to the gradient field inside the selection and then integrating back with a Poisson solver, modifies locally the apparent illumination of an image.

ImCount(string, ImreadModes)

Returns the number of images inside the given file. The function returns the number of pages in a multi-page image (e.g. TIFF), the number of frames in an animation (e.g. AVIF), and 1 otherwise. If the image cannot be decoded, 0 is returned.

ImDecode(InputArray, ImreadModes)

Reads image from the specified buffer in memory.

ImDecode(Mat, ImreadModes)

Reads image from the specified buffer in memory.

ImDecode(byte[], ImreadModes)

Reads image from the specified buffer in memory.

ImDecode(ReadOnlySpan<byte>, ImreadModes)

Reads image from the specified buffer in memory.

ImDecodeAnimation(InputArray, Animation, int, int)

Loads frames from an animated image buffer (e.g., GIF, AVIF, APNG, WEBP) into the provided Animation object.

ImDecodeMulti(InputArray, ImreadModes, Range?)

Reads a multi-page image from a buffer in memory.

ImDecodeWithMetadata(InputArray, out ImageMetadataType[], out Mat[], ImreadModes)

Decodes an image from a memory buffer and extracts associated metadata.

ImEncode(string, InputArray, out byte[], ImageEncodingParam[]?)

Compresses the image and stores it in the memory buffer

ImEncodeAnimation(string, Animation, out byte[], int[]?)

Encodes an Animation into a memory buffer in an animated format (e.g., GIF, AVIF, APNG, WEBP).

ImEncodeMulti(string, IEnumerable<Mat>, out byte[], int[]?)

Encodes array of images into a memory buffer.

ImEncodeWithMetadata(string, InputArray, ImageMetadataType[], IEnumerable<Mat>, out byte[], int[]?)

Compresses the image into a memory buffer, additionally encoding metadata if the corresponding format supports it.

ImRead(string, ImreadModes)

Loads an image from a file.

ImReadAnimation(string, Animation, int, int)

Loads frames from an animated image file (e.g., GIF, AVIF, APNG, WEBP) into the provided Animation object.

ImReadMulti(string, ImreadModes)

Loads a multi-page image from a file.

ImReadMulti(string, int, int, ImreadModes)

Loads a specified range of pages from a multi-page image from a file.

ImReadWithMetadata(string, out ImageMetadataType[], out Mat[], ImreadModes)

Reads an image from a file along with associated metadata (EXIF, XMP, etc.), depending on file format support.

ImShow(string, Mat)

Displays the image in the specified window

ImWrite(string, Mat, ImageEncodingParam[]?)

Saves an image to a specified file.

ImWrite(string, IEnumerable<Mat>, ImageEncodingParam[]?)

Saves an image to a specified file.

ImWriteAnimation(string, Animation, int[]?)

Saves an Animation to a specified file in an animated format (e.g., GIF, AVIF, APNG, WEBP).

ImWriteWithMetadata(string, Mat, ImageMetadataType[], IEnumerable<Mat>, int[]?)

Saves an image to a specified file, additionally writing metadata if the corresponding format supports it.

InRange(InputArray, InputArray, InputArray, OutputArray)

Checks if array elements lie between the elements of two other arrays.

InRange(InputArray, Scalar, Scalar, OutputArray)

Checks if array elements lie between the elements of two other arrays.

InitCameraMatrix2D(IEnumerable<Mat>, IEnumerable<Mat>, Size, double)

initializes camera matrix from a few 3D points and the corresponding projections.

InitCameraMatrix2D(IEnumerable<IEnumerable<Point3f>>, IEnumerable<IEnumerable<Point2f>>, Size, double)

initializes camera matrix from a few 3D points and the corresponding projections.

InitUndistortRectifyMap(InputArray, InputArray, InputArray, InputArray, Size, MatType, OutputArray, OutputArray)

initializes maps for cv::remap() to correct lens distortion and optionally rectify the image

InitWideAngleProjMap(InputArray, InputArray, Size, int, MatType, OutputArray, OutputArray, ProjectionType, double)

initializes maps for cv::remap() for wide-angle

Inpaint(InputArray, InputArray, OutputArray, double, InpaintTypes)

Restores the selected region in an image using the region neighborhood.

InsertChannel(InputArray, InputOutputArray, int)

inserts a single channel to dst (coi is 0-based index)

Integral(InputArray, OutputArray, OutputArray, OutputArray, MatType?, MatType?)

Calculates the integral of an image. The function calculates one or more integral images for the source image.

Integral(InputArray, OutputArray, OutputArray, MatType?)

Calculates the integral of an image. The function calculates one or more integral images for the source image.

Integral(InputArray, OutputArray, MatType?)

Calculates the integral of an image. The function calculates one or more integral images for the source image.

IntersectConvexConvex(InputArray, InputArray, OutputArray, bool)

finds intersection of two convex polygons

IntersectConvexConvex(IEnumerable<Point2f>, IEnumerable<Point2f>, out Point2f[], bool)

finds intersection of two convex polygons

IntersectConvexConvex(IEnumerable<Point>, IEnumerable<Point>, out Point[], bool)

finds intersection of two convex polygons

Invert(InputArray, OutputArray, DecompTypes)

computes inverse or pseudo-inverse matrix

InvertAffineTransform(InputArray, OutputArray)

Inverts an affine transformation.

IsContourConvex(InputArray)

returns true if the contour is convex. Does not support contours with self-intersection

IsContourConvex(IEnumerable<Point2f>)

returns true if the contour is convex. D oes not support contours with self-intersection

IsContourConvex(IEnumerable<Point>)

returns true if the contour is convex. Does not support contours with self-intersection

Kmeans(InputArray, int, InputOutputArray, TermCriteria, int, KMeansFlags, OutputArray)

Finds centers of clusters and groups input samples around the clusters.

LUT(InputArray, InputArray, OutputArray)

transforms array of numbers using a lookup table: dst(i)=lut(src(i))

LUT(InputArray, byte[], OutputArray)

transforms array of numbers using a lookup table: dst(i)=lut(src(i))

Laplacian(InputArray, OutputArray, MatType, int, double, double, BorderTypes)

Calculates the Laplacian of an image

Line(InputOutputArray, Point, Point, Scalar, int, LineTypes, int)

Draws a line segment connecting two points

Line(InputOutputArray, int, int, int, int, Scalar, int, LineTypes, int)

Draws a line segment connecting two points

LoadMesh(string, OutputArray, out Mat[], OutputArray, OutputArray, OutputArray)

Loads a mesh from a file (.ply / .obj). The file format is chosen by the extension.

LoadPointCloud(string, OutputArray, OutputArray, OutputArray)

Loads a point cloud from a file (.ply / .obj). The file format is chosen by the extension.

Log(InputArray, OutputArray)

computes natural logarithm of absolute value of each matrix element: dst = log(abs(src))

Magnitude(InputArray, InputArray, OutputArray)

Calculates the magnitude of 2D vectors.

Mahalanobis(InputArray, InputArray, InputArray)

Calculates the Mahalanobis distance between two vectors.

MatMulDeriv(InputArray, InputArray, OutputArray, OutputArray)

computes derivatives of the matrix product w.r.t each of the multiplied matrix coefficients

MatchGMS(Size, Size, IEnumerable<KeyPoint>, IEnumerable<KeyPoint>, IEnumerable<DMatch>, bool, bool, double)

GMS (Grid-based Motion Statistics) feature matching strategy.

MatchLOGOS(IEnumerable<KeyPoint>, IEnumerable<KeyPoint>, IEnumerable<int>, IEnumerable<int>)

LOGOS (Local geometric support for high-outlier spatial verification) feature matching strategy.

MatchShapes(InputArray, InputArray, ShapeMatchModes, double)

Compares two shapes.

MatchShapes(IEnumerable<Point>, IEnumerable<Point>, ShapeMatchModes, double)

Compares two shapes.

MatchTemplate(InputArray, InputArray, OutputArray, TemplateMatchModes, InputArray)

Computes the proximity map for the raster template and the image where the template is searched for

Max(InputArray, InputArray, OutputArray)

computes per-element maximum of two arrays (dst = max(src1, src2))

Max(Mat, Mat, Mat)

computes per-element maximum of two arrays (dst = max(src1, src2))

Max(Mat, double, Mat)

computes per-element maximum of array and scalar (dst = max(src1, src2))

Mean(InputArray, InputArray)

computes mean value of selected array elements

MeanShift(InputArray, ref Rect, TermCriteria)

Finds an object on a back projection image.

MeanStdDev(InputArray, OutputArray, OutputArray, InputArray)

computes mean value and standard deviation of all or selected array elements

MeanStdDev(InputArray, out Scalar, out Scalar, InputArray)

computes mean value and standard deviation of all or selected array elements

MedianBlur(InputArray, OutputArray, int)

Smoothes image using median filter

Merge(ReadOnlySpan<Mat>, Mat)

makes multi-channel array out of several single-channel arrays

Min(InputArray, InputArray, OutputArray)

computes per-element minimum of two arrays (dst = min(src1, src2))

Min(Mat, Mat, Mat)

computes per-element minimum of two arrays (dst = min(src1, src2))

Min(Mat, double, Mat)

computes per-element minimum of array and scalar (dst = min(src1, src2))

MinAreaRect(InputArray)

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

MinAreaRect(IEnumerable<Point2f>)

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

MinAreaRect(IEnumerable<Point>)

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

MinEnclosingCircle(InputArray, out Point2f, out float)

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

MinEnclosingCircle(IEnumerable<Point2f>, out Point2f, out float)

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

MinEnclosingCircle(IEnumerable<Point>, out Point2f, out float)

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

MinEnclosingConvexPolygon(InputArray, OutputArray, int)

Finds a convex polygon of minimum area enclosing a 2D point set and returns its area.

MinEnclosingTriangle(InputArray, OutputArray)

Finds a triangle of minimum area enclosing a 2D point set and returns its area.

MinEnclosingTriangle(IEnumerable<Point2f>, out Point2f[])

Finds a triangle of minimum area enclosing a 2D point set and returns its area.

MinEnclosingTriangle(IEnumerable<Point>, out Point2f[])

Finds a triangle of minimum area enclosing a 2D point set and returns its area.

MinMaxIdx(InputArray, out double, out double)

finds global minimum and maximum array elements and returns their values and their locations

MinMaxIdx(InputArray, out double, out double, int[], int[], InputArray)

finds global minimum and maximum array elements and returns their values and their locations

MinMaxIdx(InputArray, int[], int[])

finds global minimum and maximum array elements and returns their values and their locations

MinMaxLoc(InputArray, out Point, out Point)

finds global minimum and maximum array elements and returns their values and their locations

MinMaxLoc(InputArray, out double, out double)

finds global minimum and maximum array elements and returns their values and their locations

MinMaxLoc(InputArray, out double, out double, out Point, out Point, InputArray)

finds global minimum and maximum array elements and returns their values and their locations

MixChannels(ReadOnlySpan<Mat>, ReadOnlySpan<Mat>, int[])

copies selected channels from the input arrays to the selected channels of the output arrays

Moments(InputArray, bool)

Calculates all of the moments up to the third order of a polygon or rasterized shape.

Moments(byte[,], bool)

Calculates all of the moments up to the third order of a polygon or rasterized shape.

Moments(IEnumerable<Point2f>, bool)

Calculates all of the moments up to the third order of a polygon or rasterized shape.

Moments(IEnumerable<Point>, bool)

Calculates all of the moments up to the third order of a polygon or rasterized shape.

Moments(float[,], bool)

Calculates all of the moments up to the third order of a polygon or rasterized shape.

MorphologyDefaultBorderValue()

Default borderValue for Dilate/Erode

MorphologyEx(InputArray, OutputArray, MorphTypes, InputArray, Point?, int, BorderTypes, Scalar?)

Performs advanced morphological transformations

MoveWindow(string, int, int)

Moves window to the specified position

MulSpectrums(InputArray, InputArray, OutputArray, DftFlags, bool)

Performs the per-element multiplication of two Fourier spectrums.

MulTransposed(InputArray, OutputArray, bool, InputArray, double, int)

multiplies matrix by its transposition from the left or from the right

Multiply(InputArray, InputArray, OutputArray, double, int)

Calculates the per-element scaled product of two arrays

NamedWindow(string, WindowFlags)

Creates a window.

Norm(InputArray, InputArray, NormTypes, InputArray)

computes norm of selected part of the difference between two arrays

Norm(InputArray, NormTypes, InputArray)

Calculates absolute array norm, absolute difference norm, or relative difference norm.

NormalEstimate(OutputArray, OutputArray, InputArray, InputArray, int)

Estimates the normal and curvature of each point in a point cloud from nearest-neighbor results.

Normalize(InputArray, InputOutputArray, double, double, NormTypes, int, InputArray)

scales and shifts array elements so that either the specified norm (alpha) or the minimum (alpha) and maximum (beta) array values get the specified values

PCABackProject(InputArray, InputArray, InputArray, OutputArray)

Reconstructs vectors from their PC projections.

PCACompute(InputArray, InputOutputArray, OutputArray, OutputArray, int)

PCA of the supplied dataset.

PCACompute(InputArray, InputOutputArray, OutputArray, int)

PCA of the supplied dataset.

PCAComputeVar(InputArray, InputOutputArray, OutputArray, OutputArray, double)

PCA of the supplied dataset.

PCAComputeVar(InputArray, InputOutputArray, OutputArray, double)

PCA of the supplied dataset.

PCAProject(InputArray, InputArray, InputArray, OutputArray)

Projects vector(s) to the principal component subspace.

PSNR(InputArray, InputArray, double)

Computes the Peak Signal-to-Noise Ratio (PSNR) image quality metric.

This function calculates the Peak Signal-to-Noise Ratio(PSNR) image quality metric in decibels(dB), between two input arrays src1 and src2.The arrays must have the same type.

Partition<T>(IEnumerable<T>, out int[], PartitionPredicate<T>)

Splits an element set into equivalency classes. Consider using GroupBy of Linq instead.

PatchNaNs(InputOutputArray, double)

converts NaN's to the given number

PencilSketch(InputArray, OutputArray, OutputArray, float, float, float)

Pencil-like non-photorealistic line drawing

PerspectiveTransform(InputArray, OutputArray, InputArray)

performs perspective transformation of each element of multi-channel input matrix

PerspectiveTransform(IEnumerable<Point2d>, Mat)

performs perspective transformation of each element of multi-channel input matrix

PerspectiveTransform(IEnumerable<Point2f>, Mat)

performs perspective transformation of each element of multi-channel input matrix

PerspectiveTransform(IEnumerable<Point3d>, Mat)

performs perspective transformation of each element of multi-channel input matrix

PerspectiveTransform(IEnumerable<Point3f>, Mat)

performs perspective transformation of each element of multi-channel input matrix

Phase(InputArray, InputArray, OutputArray, bool)

Calculates the rotation angle of 2D vectors.

PhaseCorrelate(InputArray, InputArray, InputArray, out double)

The function is used to detect translational shifts that occur between two images.

The operation takes advantage of the Fourier shift theorem for detecting the translational shift in the frequency domain.It can be used for fast image registration as well as motion estimation. For more information please see http://en.wikipedia.org/wiki/Phase_correlation.

Calculates the cross-power spectrum of two supplied source arrays. The arrays are padded if needed with getOptimalDFTSize.

PhaseCorrelateIterative(InputArray, InputArray, int, int)

Iterative variant of PhaseCorrelate(InputArray, InputArray, InputArray, out double) that refines the detected shift over multiple iterations for improved sub-pixel accuracy.

PointPolygonTest(InputArray, Point2f, bool)

Checks if the point is inside the contour. Optionally computes the signed distance from the point to the contour boundary

PointPolygonTest(IEnumerable<Point2f>, Point2f, bool)

Checks if the point is inside the contour. Optionally computes the signed distance from the point to the contour boundary.

PointPolygonTest(IEnumerable<Point>, Point2f, bool)

Checks if the point is inside the contour. Optionally computes the signed distance from the point to the contour boundary

PolarToCart(InputArray, InputArray, OutputArray, OutputArray, bool)

Calculates x and y coordinates of 2D vectors from their magnitude and angle.

PollKey()

Polls for a pressed key without waiting. To wait until a key is pressed, use WaitKey instead. Only works if there is at least one HighGUI window created and active.

Polylines(InputOutputArray, InputArray, bool, Scalar, int, LineTypes, int)

draws one or more polygonal curves

Polylines(Mat, IEnumerable<IEnumerable<Point>>, bool, Scalar, int, LineTypes, int)

draws one or more polygonal curves

Pow(InputArray, double, OutputArray)

raises the input matrix elements to the specified power (b = a**power)

PreCornerDetect(InputArray, OutputArray, int, BorderTypes)

computes another complex cornerness criteria at each pixel

ProjectPoints(InputArray, InputArray, InputArray, InputArray, InputArray, OutputArray, OutputArray, double)

projects points from the model coordinate space to the image coordinates. Also computes derivatives of the image coordinates w.r.t the intrinsic and extrinsic camera parameters

ProjectPoints(IEnumerable<Point3f>, double[], double[], double[,], double[], out Point2f[], out double[,], double)

projects points from the model coordinate space to the image coordinates. Also computes derivatives of the image coordinates w.r.t the intrinsic and extrinsic camera parameters

PutText(InputOutputArray, string, Point, HersheyFonts, double, Scalar, int, LineTypes, bool)

renders text string in the image

PutText(InputOutputArray, string, Point, Scalar, FontFace, int, int, PutTextFlags, Range?)

Draws a text string using the specified TrueType font (OpenCV 5). Symbols that cannot be rendered using the specified font are replaced by question marks.

PyrDown(InputArray, OutputArray, Size?, BorderTypes)

Blurs an image and downsamples it.

PyrMeanShiftFiltering(InputArray, OutputArray, double, double, int, TermCriteria?)

Performs initial step of meanshift segmentation of an image.

PyrUp(InputArray, OutputArray, Size?, BorderTypes)

Upsamples an image and then blurs it.

RQDecomp3x3(InputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray)

Computes RQ decomposition of 3x3 matrix

RQDecomp3x3(double[,], out double[,], out double[,])

Computes RQ decomposition of 3x3 matrix

RQDecomp3x3(double[,], out double[,], out double[,], out double[,], out double[,], out double[,])

Computes RQ decomposition of 3x3 matrix

RandShuffle(InputOutputArray, double)

shuffles the input array elements

RandShuffle(InputOutputArray, double, ref RNG)

shuffles the input array elements

Randn(InputOutputArray, InputArray, InputArray)

fills array with normally-distributed random numbers with the specified mean and the standard deviation

Randn(InputOutputArray, Scalar, Scalar)

fills array with normally-distributed random numbers with the specified mean and the standard deviation

RandomSampling(OutputArray, InputArray, int)

Point cloud sampling by randomly selecting points.

RandomSampling(OutputArray, InputArray, float)

Point cloud sampling by randomly selecting points.

Randu(InputOutputArray, InputArray, InputArray)

fills array with uniformly-distributed random numbers from the range [low, high)

Randu(InputOutputArray, Scalar, Scalar)

fills array with uniformly-distributed random numbers from the range [low, high)

ReadOpticalFlow(string)

Reads a .flo file. The function loads a flow field from a file and returns it as a single matrix. Resulting Mat has a type CV_32FC2 - floating-point, 2-channel. First channel corresponds to the flow in the horizontal direction (u), second - vertical (v).

RecoverPose(InputArray, InputArray, InputArray, InputArray, OutputArray, OutputArray, InputOutputArray)

Recover relative camera rotation and translation from an estimated essential matrix and the corresponding points in two images, using cheirality check. Returns the number of inliers which pass the check.

RecoverPose(InputArray, InputArray, InputArray, InputArray, OutputArray, OutputArray, double, InputOutputArray, OutputArray)

Recover relative camera rotation and translation from an estimated essential matrix and the corresponding points in two images, using cheirality check. Returns the number of inliers which pass the check.

RecoverPose(InputArray, InputArray, InputArray, OutputArray, OutputArray, double, Point2d, InputOutputArray)

Recover relative camera rotation and translation from an estimated essential matrix and the corresponding points in two images, using cheirality check. Returns the number of inliers which pass the check.

Rectangle(InputOutputArray, Point, Point, Scalar, int, LineTypes, int)

Draws simple, thick or filled rectangle

Rectangle(InputOutputArray, Rect, Scalar, int, LineTypes, int)

Draws simple, thick or filled rectangle

Rectangle(Mat, Point, Point, Scalar, int, LineTypes, int)

Draws simple, thick or filled rectangle

Rectangle(Mat, Rect, Scalar, int, LineTypes, int)

Draws simple, thick or filled rectangle

Rectify3Collinear(InputArray, InputArray, InputArray, InputArray, InputArray, InputArray, IReadOnlyList<Mat>, IReadOnlyList<Mat>, Size, InputArray, InputArray, InputArray, InputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray, double, Size, out Rect, out Rect, StereoRectificationFlags)

computes the rectification transformations for 3-head camera, where all the heads are on the same line.

Reduce(InputArray, OutputArray, ReduceDimension, ReduceTypes, int)

transforms 2D matrix to 1D row or column vector by taking sum, minimum, maximum or mean value over all the rows

ReduceArgMax(InputArray, OutputArray, int, bool)

Finds indices of max elements along provided axis

ReduceArgMin(InputArray, OutputArray, int, bool)

Finds indices of min elements along provided axis

RegisterCameras(IEnumerable<Mat>, IEnumerable<Mat>, IEnumerable<Mat>, IEnumerable<Mat>, InputArray, InputArray, CameraModel, InputArray, InputArray, CameraModel, InputOutputArray, InputOutputArray, OutputArray, OutputArray, OutputArray, CalibrationFlags, TermCriteria?)

Registers a pair of cameras (OpenCV 5), estimating the relative pose (R, T) between them. The two cameras may use different camera models (pinhole / fisheye).

RegisterDepth(InputArray, InputArray, InputArray, InputArray, InputArray, Size, OutputArray, bool)

Registers depth data to an external camera.

Remap(InputArray, OutputArray, InputArray, InputArray, InterpolationFlags, BorderTypes, Scalar?, AlgorithmHint)

Applies a generic geometrical transformation to an image.

Repeat(InputArray, int, int, OutputArray)

replicates the input matrix the specified number of times in the horizontal and/or vertical direction

Repeat(Mat, int, int)

replicates the input matrix the specified number of times in the horizontal and/or vertical direction

ReprojectImageTo3D(InputArray, OutputArray, InputArray, bool, int)

reprojects disparity image to 3D: (x,y,d)->(X,Y,Z) using the matrix Q returned by cv::stereoRectify

RescaleDepth(InputArray, int, OutputArray, double)

Rescales a depth image. If the input image is of type CV_16UC1, it is converted to floats, divided by depthFactor to get a depth in meters; otherwise it is simply converted to floats.

Resize(InputArray, OutputArray, Size, double, double, InterpolationFlags)

Resizes an image.

ResizeWindow(string, Size)

Resizes window to the specified size

ResizeWindow(string, int, int)

Resizes window to the specified size

Rodrigues(InputArray, OutputArray, OutputArray)

converts rotation vector to rotation matrix or vice versa using Rodrigues transformation

Rodrigues(double[,], out double[], out double[,])

converts rotation matrix to rotation vector using Rodrigues transformation

Rodrigues(double[], out double[,], out double[,])

converts rotation vector to rotation matrix using Rodrigues transformation

Rotate(InputArray, OutputArray, RotateFlags)

Rotates a 2D array in multiples of 90 degrees.

RotatedRectangleIntersection(RotatedRect, RotatedRect, OutputArray)

Finds out if there is any intersection between two rotated rectangles. If there is then the vertices of the interesecting region are returned as well. Below are some examples of intersection configurations. The hatched pattern indicates the intersecting region and the red vertices are returned by the function.

RotatedRectangleIntersection(RotatedRect, RotatedRect, out Point2f[])

Finds out if there is any intersection between two rotated rectangles. If there is then the vertices of the interesecting region are returned as well. Below are some examples of intersection configurations. The hatched pattern indicates the intersecting region and the red vertices are returned by the function.

SVBackSubst(InputArray, InputArray, InputArray, InputArray, OutputArray)

performs back substitution for the previously computed SVD

SVDecomp(InputArray, OutputArray, OutputArray, OutputArray, Flags)

decomposes matrix and stores the results to user-provided matrices

SampsonDistance(InputArray, InputArray, InputArray)

Calculates the Sampson Distance between two points.

SampsonDistance(Point3d, Point3d, double[,])

Calculates the Sampson Distance between two points.

SaveMesh(string, InputArray, IEnumerable<Mat>, InputArray, InputArray, InputArray)

Saves a mesh to a file (.ply / .obj). The file format is chosen by the extension.

SavePointCloud(string, InputArray, InputArray, InputArray)

Saves a point cloud to a file (.ply / .obj). The file format is chosen by the extension.

ScaleAdd(InputArray, double, InputArray, OutputArray)

adds scaled array to another one (dst = alpha*src1 + src2)

Scharr(InputArray, OutputArray, MatType, int, int, double, double, BorderTypes)

Calculates the first x- or y- image derivative using Scharr operator

SeamlessClone(InputArray, InputArray, InputArray, Point, OutputArray, SeamlessCloneFlags)

Image editing tasks concern either global changes (color/intensity corrections, filters, deformations) or local changes concerned to a selection. Here we are interested in achieving local changes, ones that are restricted to a region manually selected (ROI), in a seamless and effortless manner. The extent of the changes ranges from slight distortions to complete replacement by novel content @cite PM03 .

SelectROI(InputArray, bool, bool)

Selects ROI on the given image. Function creates a window and allows user to select a ROI using mouse. Controls: use space or enter to finish selection, use key c to cancel selection (function will return the zero cv::Rect).

SelectROI(string, InputArray, bool, bool)

Selects ROI on the given image. Function creates a window and allows user to select a ROI using mouse. Controls: use space or enter to finish selection, use key c to cancel selection (function will return the zero cv::Rect).

SelectROIs(string, InputArray, bool, bool)

Selects ROIs on the given image. Function creates a window and allows user to select a ROIs using mouse. Controls: use space or enter to finish current selection and start a new one, use esc to terminate multiple ROI selection process.

SepFilter2D(InputArray, OutputArray, MatType, InputArray, InputArray, Point?, double, BorderTypes)

Applies separable linear filter to an image

SetBreakOnError(bool)

Sets/resets the break-on-error mode. When the break-on-error mode is set, the default error handler issues a hardware exception, which can make debugging more convenient.

SetIdentity(InputOutputArray, Scalar?)

initializes scaled identity matrix

SetLogLevel(LogLevel)

Set global logging level

SetMouseCallback(string, MouseCallback, nint)

Sets the callback function for mouse events occuring within the specified window.

SetNumThreads(int)

OpenCV will try to set the number of threads for the next parallel region. If threads == 0, OpenCV will disable threading optimizations and run all it's functions sequentially.Passing threads < 0 will reset threads number to system default. This function must be called outside of parallel region. OpenCV will try to run its functions with specified threads number, but some behaviour differs from framework:

  • TBB - User-defined parallel constructions will run with the same threads number, if another is not specified.If later on user creates his own scheduler, OpenCV will use it.
  • OpenMP - No special defined behaviour.
  • Concurrency - If threads == 1, OpenCV will disable threading optimizations and run its functions sequentially.
  • GCD - Supports only values <= 0.
  • C= - No special defined behaviour.
SetTheRNG(ulong)

Sets the thread-local Random number generator

SetTrackbarMax(string, string, int)

Sets the trackbar maximum position. The function sets the maximum position of the specified trackbar in the specified window.

SetTrackbarMin(string, string, int)

Sets the trackbar minimum position. The function sets the minimum position of the specified trackbar in the specified window.

SetTrackbarPos(string, string, int)

Sets the trackbar position.

SetUseIPP(bool)

Turns on/off IPP-based acceleration.

SetUseIppNotExact(bool)

Turns on/off IPP "not exact" mode.

SetUseOptimized(bool)

Turns on/off available optimization. The function turns on or off the optimized code in OpenCV. Some optimization can not be enabled or disabled, but, for example, most of SSE code in OpenCV can be temporarily turned on or off this way.

SetWindowProperty(string, WindowPropertyFlags, double)

Changes parameters of a window dynamically.

SetWindowTitle(string, string)

Updates window title

Sobel(InputArray, OutputArray, MatType, int, int, int, double, double, BorderTypes)

Calculates the first, second, third or mixed image derivatives using an extended Sobel operator

Solve(InputArray, InputArray, OutputArray, DecompTypes)

solves linear system or a least-square problem

SolveCubic(InputArray, OutputArray)

finds real roots of a cubic polynomial

SolveLP(InputArray, InputArray, OutputArray)

Solve given (non-integer) linear programming problem using the Simplex Algorithm (Simplex Method).

SolvePnP(InputArray, InputArray, InputArray, InputArray, OutputArray, OutputArray, bool, SolvePnPMethod)

Finds an object pose from 3D-2D point correspondences.

SolvePnP(IEnumerable<Point3f>, IEnumerable<Point2f>, double[,], IEnumerable<double>?, ref double[], ref double[], bool, SolvePnPMethod)

Finds an object pose from 3D-2D point correspondences.

SolvePnPRansac(InputArray, InputArray, InputArray, InputArray, OutputArray, OutputArray, bool, int, float, double, OutputArray, SolvePnPMethod)

computes the camera pose from a few 3D points and the corresponding projections. The outliers are possible.

SolvePnPRansac(IEnumerable<Point3f>, IEnumerable<Point2f>, double[,], IEnumerable<double>, out double[], out double[])

computes the camera pose from a few 3D points and the corresponding projections. The outliers are possible.

SolvePnPRansac(IEnumerable<Point3f>, IEnumerable<Point2f>, double[,], IEnumerable<double>?, out double[], out double[], out int[], bool, int, float, double, SolvePnPMethod)

computes the camera pose from a few 3D points and the corresponding projections. The outliers are possible.

SolvePnPRefineLM(InputArray, InputArray, InputArray, InputArray, InputOutputArray, InputOutputArray, TermCriteria?)

Refines a pose (rotation and translation) from 3D-2D point correspondences, starting from an initial solution, using a Levenberg-Marquardt iterative scheme.

SolvePnPRefineVVS(InputArray, InputArray, InputArray, InputArray, InputOutputArray, InputOutputArray, TermCriteria?, double)

Refines a pose (rotation and translation) from 3D-2D point correspondences, starting from an initial solution, using a virtual visual servoing (VVS) scheme.

SolvePoly(InputArray, OutputArray, int)

finds real and complex roots of a polynomial

Sort(InputArray, OutputArray, SortFlags)

sorts independently each matrix row or each matrix column

SortIdx(InputArray, OutputArray, SortFlags)

sorts independently each matrix row or each matrix column

SpatialGradient(InputArray, OutputArray, OutputArray, int, BorderTypes)

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

Split(Mat)

Copies each plane of a multi-channel array to a dedicated array

Split(Mat, out Mat[])

Copies each plane of a multi-channel array to a dedicated array

SqrBoxFilter(InputArray, OutputArray, int, Size, Point?, bool, BorderTypes)

Calculates the normalized sum of squares of the pixel values overlapping the filter.

For every pixel f(x, y) in the source image, the function calculates the sum of squares of those neighboring pixel values which overlap the filter placed over the pixel f(x, y).

The unnormalized square box filter can be useful in computing local image statistics such as the the local variance and standard deviation around the neighborhood of a pixel.

Sqrt(InputArray, OutputArray)

computes square root of each matrix element (dst = src**0.5)

StackBlur(InputArray, OutputArray, Size)

Blurs an image using the stackBlur algorithm, a fast approximation of a Gaussian blur.

StartWindowThread()
StereoCalibrate(IEnumerable<IEnumerable<Point3f>>, IEnumerable<IEnumerable<Point2f>>, IEnumerable<IEnumerable<Point2f>>, double[,], double[], double[,], double[], Size, OutputArray, OutputArray, OutputArray, OutputArray, CalibrationFlags, TermCriteria?)

finds intrinsic and extrinsic parameters of a stereo camera

StereoCalibrate(IReadOnlyList<Mat>, IReadOnlyList<Mat>, IReadOnlyList<Mat>, InputOutputArray, InputOutputArray, InputOutputArray, InputOutputArray, Size, OutputArray, OutputArray, OutputArray, OutputArray, CalibrationFlags, TermCriteria?)

finds intrinsic and extrinsic parameters of a stereo camera

StereoRectify(InputArray, InputArray, InputArray, InputArray, Size, InputArray, InputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray, StereoRectificationFlags, double, Size, out Rect, out Rect)

computes the rectification transformation for a stereo camera from its intrinsic and extrinsic parameters

StereoRectify(InputArray, InputArray, InputArray, InputArray, Size, InputArray, InputArray, OutputArray, OutputArray, OutputArray, OutputArray, OutputArray, StereoRectificationFlags, double, Size?)

computes the rectification transformation for a stereo camera from its intrinsic and extrinsic parameters

StereoRectify(double[,], double[], double[,], double[], Size, double[,], double[], out double[,], out double[,], out double[,], out double[,], out double[,], StereoRectificationFlags, double, Size, out Rect, out Rect)

computes the rectification transformation for a stereo camera from its intrinsic and extrinsic parameters

StereoRectify(double[,], double[], double[,], double[], Size, double[,], double[], out double[,], out double[,], out double[,], out double[,], out double[,], StereoRectificationFlags, double, Size?)

computes the rectification transformation for a stereo camera from its intrinsic and extrinsic parameters

StereoRectifyUncalibrated(InputArray, InputArray, InputArray, Size, OutputArray, OutputArray, double)

computes the rectification transformation for an uncalibrated stereo camera (zero distortion is assumed)

StereoRectifyUncalibrated(IEnumerable<Point2d>, IEnumerable<Point2d>, double[,], Size, out double[,], out double[,], double)

computes the rectification transformation for an uncalibrated stereo camera (zero distortion is assumed)

Stylization(InputArray, OutputArray, float, float)

Stylization aims to produce digital imagery with a wide variety of effects not focused on photorealism. Edge-aware filters are ideal for stylization, as they can abstract regions of low contrast while preserving, or enhancing, high-contrast features.

Subtract(InputArray, InputArray, OutputArray, InputArray, int)

Calculates per-element difference between two arrays or array and a scalar

Subtract(InputArray, Scalar, OutputArray, InputArray, int)

Calculates per-element difference between two arrays or array and a scalar

Subtract(Scalar, InputArray, OutputArray, InputArray, int)

Calculates per-element difference between two arrays or array and a scalar

Sum(InputArray)

computes sum of array elements

TextureFlattening(InputArray, InputArray, OutputArray, float, float, int)

By retaining only the gradients at edge locations, before integrating with the Poisson solver, one washes out the texture of the selected region, giving its contents a flat aspect. Here Canny Edge Detector is used.

Threshold(InputArray, OutputArray, double, double, ThresholdTypes)

Applies a fixed-level threshold to each array element.

ThresholdWithMask(InputArray, InputOutputArray, InputArray, double, double, ThresholdTypes)

Applies a fixed-level threshold to each array element, restricted to the pixels selected by mask.

Trace(InputArray)

computes trace of a matrix

Transform(InputArray, OutputArray, InputArray)

performs affine transformation of each element of multi-channel input matrix

Transpose(InputArray, OutputArray)

transposes the matrix

TransposeND(InputArray, int[], OutputArray)

Transposes an n-dimensional array by permuting its axes according to the given order.

TriangulatePoints(InputArray, InputArray, InputArray, InputArray, OutputArray)

Reconstructs points by triangulation.

TriangulatePoints(double[,], double[,], IEnumerable<Point2d>, IEnumerable<Point2d>)

Reconstructs points by triangulation.

Undistort(InputArray, OutputArray, InputArray, InputArray, InputArray)

corrects lens distortion for the given camera matrix and distortion coefficients

UndistortPoints(InputArray, OutputArray, InputArray, InputArray, InputArray, InputArray)

Computes the ideal point coordinates from the observed point coordinates.

UndistortPointsIter(InputArray, OutputArray, InputArray, InputArray, InputArray, InputArray, TermCriteria?)

Computes the ideal point coordinates from the observed point coordinates.

UseIPP()

Returns whether IPP is used for acceleration.

UseIppNotExact()

Returns whether IPP is used in "not exact" mode. In this mode IPP may be used even where it and OpenCV have internal accuracy differences that impact accuracy tests.

UseOptimized()

Returns the current optimization status. The function returns the current optimization status, which is controlled by cv::setUseOptimized().

VConcat(InputArray, InputArray, OutputArray)

Applies vertical concatenation to given matrices.

VConcat(ReadOnlySpan<Mat>, OutputArray)

Applies vertical concatenation to given matrices.

ValidateDisparity(InputOutputArray, InputArray, int, int, int)

validates disparity using the left-right check. The matrix "cost" should be computed by the stereo correspondence algorithm

VoxelGridSampling(OutputArray, InputArray, float, float, float)

Point cloud sampling by Voxel Grid filter downsampling.

Creates a 3D voxel grid (a set of tiny 3D boxes in space) over the input point cloud data. In each voxel, all the points present are approximated (downsampled) with the point closest to their centroid.

WaitKey(int)

Waits for a pressed key.

WaitKeyEx(int)

Waits for a pressed key. Similar to #waitKey, but returns full key code. Key code is implementation specific and depends on used backend: QT/GTK/Win32/etc

WarpAffine(InputArray, OutputArray, InputArray, Size, InterpolationFlags, BorderTypes, Scalar?, AlgorithmHint)

Applies an affine transformation to an image.

WarpFrame(InputArray, InputArray, InputArray, InputArray, InputArray, OutputArray, OutputArray, OutputArray)

Warps depth or RGB-D image by reprojecting it in 3d, applying an Rt transformation and then projecting it back onto the image plane.

WarpPerspective(InputArray, OutputArray, InputArray, Size, InterpolationFlags, BorderTypes, Scalar?, AlgorithmHint)

Applies a perspective transformation to an image.

WarpPerspective(InputArray, OutputArray, float[,], Size, InterpolationFlags, BorderTypes, Scalar?, AlgorithmHint)

Applies a perspective transformation to an image.

WarpPolar(InputArray, OutputArray, Size, Point2f, double, InterpolationFlags, WarpPolarMode)

Remaps an image to polar or semilog-polar coordinates space.

Watershed(InputArray, InputOutputArray)

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

WriteOpticalFlow(string, InputArray)

Writes a .flo file to disk. The flow field must be a 2-channel, floating-point matrix (CV_32FC2). First channel corresponds to the flow in the horizontal direction (u), second - vertical (v).