Opencv Plus Unity
Static Public Member Functions | Public Attributes | List of all members
OpenCvSharp.Cv2 Class Reference

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

Static Public Member Functions

static void Rodrigues (InputArray src, OutputArray dst, OutputArray jacobian=null)
 converts rotation vector to rotation matrix or vice versa using Rodrigues transformation More...
 
static void Rodrigues (double[] vector, out double[,] matrix, out double[,] jacobian)
 converts rotation vector to rotation matrix using Rodrigues transformation More...
 
static void Rodrigues (double[] vector, out double[,] matrix)
 converts rotation vector to rotation matrix using Rodrigues transformation More...
 
static void Rodrigues (double[,] matrix, out double[] vector, out double[,] jacobian)
 converts rotation matrix to rotation vector using Rodrigues transformation More...
 
static void Rodrigues (double[,] matrix, out double[] vector)
 converts rotation matrix to rotation vector using Rodrigues transformation More...
 
static Mat FindHomography (InputArray srcPoints, InputArray dstPoints, HomographyMethods method=HomographyMethods.None, double ransacReprojThreshold=3, OutputArray mask=null)
 computes the best-fit perspective transformation mapping srcPoints to dstPoints. More...
 
static Mat FindHomography (IEnumerable< Point2d > srcPoints, IEnumerable< Point2d > dstPoints, HomographyMethods method=HomographyMethods.None, double ransacReprojThreshold=3, OutputArray mask=null)
 computes the best-fit perspective transformation mapping srcPoints to dstPoints. More...
 
static Vec3d RQDecomp3x3 (InputArray src, OutputArray mtxR, OutputArray mtxQ, OutputArray qx=null, OutputArray qy=null, OutputArray qz=null)
 Computes RQ decomposition of 3x3 matrix More...
 
static Vec3d RQDecomp3x3 (double[,] src, out double[,] mtxR, out double[,] mtxQ)
 Computes RQ decomposition of 3x3 matrix More...
 
static Vec3d RQDecomp3x3 (double[,] src, out double[,] mtxR, out double[,] mtxQ, out double[,] qx, out double[,] qy, out double[,] qz)
 Computes RQ decomposition of 3x3 matrix More...
 
static void DecomposeProjectionMatrix (InputArray projMatrix, OutputArray cameraMatrix, OutputArray rotMatrix, OutputArray transVect, OutputArray rotMatrixX=null, OutputArray rotMatrixY=null, OutputArray rotMatrixZ=null, OutputArray eulerAngles=null)
 Decomposes the projection matrix into camera matrix and the rotation martix and the translation vector More...
 
static void DecomposeProjectionMatrix (double[,] projMatrix, out double[,] cameraMatrix, out double[,] rotMatrix, out double[] transVect, out double[,] rotMatrixX, out double[,] rotMatrixY, out double[,] rotMatrixZ, out double[] eulerAngles)
 Decomposes the projection matrix into camera matrix and the rotation martix and the translation vector More...
 
static void DecomposeProjectionMatrix (double[,] projMatrix, out double[,] cameraMatrix, out double[,] rotMatrix, out double[] transVect)
 Decomposes the projection matrix into camera matrix and the rotation martix and the translation vector More...
 
static void MatMulDeriv (InputArray a, InputArray b, OutputArray dABdA, OutputArray dABdB)
 computes derivatives of the matrix product w.r.t each of the multiplied matrix coefficients More...
 
static void ComposeRT (InputArray rvec1, InputArray tvec1, InputArray rvec2, InputArray tvec2, OutputArray rvec3, OutputArray tvec3, OutputArray dr3dr1=null, OutputArray dr3dt1=null, OutputArray dr3dr2=null, OutputArray dr3dt2=null, OutputArray dt3dr1=null, OutputArray dt3dt1=null, OutputArray dt3dr2=null, OutputArray dt3dt2=null)
 composes 2 [R|t] transformations together. Also computes the derivatives of the result w.r.t the arguments More...
 
static void ComposeRT (double[] rvec1, double[] tvec1, double[] rvec2, double[] tvec2, out double[] rvec3, out double[] tvec3, out double[,] dr3dr1, out double[,] dr3dt1, out double[,] dr3dr2, out double[,] dr3dt2, out double[,] dt3dr1, out double[,] dt3dt1, out double[,] dt3dr2, out double[,] dt3dt2)
 composes 2 [R|t] transformations together. Also computes the derivatives of the result w.r.t the arguments More...
 
static void ComposeRT (double[] rvec1, double[] tvec1, double[] rvec2, double[] tvec2, out double[] rvec3, out double[] tvec3)
 composes 2 [R|t] transformations together. Also computes the derivatives of the result w.r.t the arguments More...
 
static void ProjectPoints (InputArray objectPoints, InputArray rvec, InputArray tvec, InputArray cameraMatrix, InputArray distCoeffs, OutputArray imagePoints, OutputArray jacobian=null, double aspectRatio=0)
 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 More...
 
static void ProjectPoints (IEnumerable< Point3f > objectPoints, double[] rvec, double[] tvec, double[,] cameraMatrix, double[] distCoeffs, out Point2f[] imagePoints, out double[,] jacobian, double aspectRatio=0)
 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 More...
 
static void SolvePnP (InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess=false, SolvePnPFlags flags=SolvePnPFlags.Iterative)
 Finds an object pose from 3D-2D point correspondences. More...
 
static void SolvePnP (IEnumerable< Point3f > objectPoints, IEnumerable< Point2f > imagePoints, double[,] cameraMatrix, IEnumerable< double > distCoeffs, out double[] rvec, out double[] tvec, bool useExtrinsicGuess=false, SolvePnPFlags flags=SolvePnPFlags.Iterative)
 Finds an object pose from 3D-2D point correspondences. More...
 
static void SolvePnPRansac (InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess=false, int iterationsCount=100, float reprojectionError=8.0f, double confidence=0.99, OutputArray inliers=null, SolvePnPFlags flags=SolvePnPFlags.Iterative)
 computes the camera pose from a few 3D points and the corresponding projections. The outliers are possible. More...
 
static void SolvePnPRansac (IEnumerable< Point3f > objectPoints, IEnumerable< Point2f > imagePoints, double[,] cameraMatrix, IEnumerable< double > distCoeffs, out double[] rvec, out double[] tvec)
 computes the camera pose from a few 3D points and the corresponding projections. The outliers are possible. More...
 
static void SolvePnPRansac (IEnumerable< Point3f > objectPoints, IEnumerable< Point2f > imagePoints, double[,] cameraMatrix, IEnumerable< double > distCoeffs, out double[] rvec, out double[] tvec, out int[] inliers, bool useExtrinsicGuess=false, int iterationsCount=100, float reprojectionError=8.0f, double confidence=0.99, SolvePnPFlags flags=SolvePnPFlags.Iterative)
 computes the camera pose from a few 3D points and the corresponding projections. The outliers are possible. More...
 
static Mat InitCameraMatrix2D (IEnumerable< Mat > objectPoints, IEnumerable< Mat > imagePoints, Size imageSize, double aspectRatio=1.0)
 initializes camera matrix from a few 3D points and the corresponding projections. More...
 
static Mat InitCameraMatrix2D (IEnumerable< IEnumerable< Point3d >> objectPoints, IEnumerable< IEnumerable< Point2d >> imagePoints, Size imageSize, double aspectRatio=1.0)
 initializes camera matrix from a few 3D points and the corresponding projections. More...
 
static bool FindChessboardCorners (InputArray image, Size patternSize, OutputArray corners, ChessboardFlags flags=ChessboardFlags.AdaptiveThresh|ChessboardFlags.NormalizeImage)
 Finds the positions of internal corners of the chessboard. More...
 
static bool FindChessboardCorners (InputArray image, Size patternSize, out Point2f[] corners, ChessboardFlags flags=ChessboardFlags.AdaptiveThresh|ChessboardFlags.NormalizeImage)
 Finds the positions of internal corners of the chessboard. More...
 
static bool Find4QuadCornerSubpix (InputArray img, InputOutputArray corners, Size regionSize)
 finds subpixel-accurate positions of the chessboard corners More...
 
static bool Find4QuadCornerSubpix (InputArray img, [In, Out] Point2f[] corners, Size regionSize)
 finds subpixel-accurate positions of the chessboard corners More...
 
static void DrawChessboardCorners (InputOutputArray image, Size patternSize, InputArray corners, bool patternWasFound)
 Renders the detected chessboard corners. More...
 
static void DrawChessboardCorners (InputOutputArray image, Size patternSize, IEnumerable< Point2f > corners, bool patternWasFound)
 Renders the detected chessboard corners. More...
 
static bool FindCirclesGrid (InputArray image, Size patternSize, OutputArray centers, FindCirclesGridFlags flags=FindCirclesGridFlags.SymmetricGrid, FeatureDetector blobDetector=null)
 Finds centers in the grid of circles. More...
 
static bool FindCirclesGrid (InputArray image, Size patternSize, out Point2f[] centers, FindCirclesGridFlags flags=FindCirclesGridFlags.SymmetricGrid, FeatureDetector blobDetector=null)
 Finds centers in the grid of circles. More...
 
static double CalibrateCamera (IEnumerable< Mat > objectPoints, IEnumerable< Mat > imagePoints, Size imageSize, InputOutputArray cameraMatrix, InputOutputArray distCoeffs, out Mat[] rvecs, out Mat[] tvecs, CalibrationFlags flags=CalibrationFlags.None, TermCriteria? criteria=null)
 finds intrinsic and extrinsic camera parameters from several fews of a known calibration pattern. More...
 
static double CalibrateCamera (IEnumerable< IEnumerable< Point3f >> objectPoints, IEnumerable< IEnumerable< Point2f >> imagePoints, Size imageSize, double[,] cameraMatrix, double[] distCoeffs, out Vec3d[] rvecs, out Vec3d[] tvecs, CalibrationFlags flags=CalibrationFlags.None, TermCriteria? criteria=null)
 finds intrinsic and extrinsic camera parameters from several fews of a known calibration pattern. More...
 
static void CalibrationMatrixValues (InputArray cameraMatrix, Size imageSize, double apertureWidth, double apertureHeight, out double fovx, out double fovy, out double focalLength, out Point2d principalPoint, out double aspectRatio)
 computes several useful camera characteristics from the camera matrix, camera frame resolution and the physical sensor size. More...
 
static void CalibrationMatrixValues (double[,] cameraMatrix, Size imageSize, double apertureWidth, double apertureHeight, out double fovx, out double fovy, out double focalLength, out Point2d principalPoint, out double aspectRatio)
 computes several useful camera characteristics from the camera matrix, camera frame resolution and the physical sensor size. More...
 
static double StereoCalibrate (IEnumerable< InputArray > objectPoints, IEnumerable< InputArray > imagePoints1, IEnumerable< InputArray > imagePoints2, InputOutputArray cameraMatrix1, InputOutputArray distCoeffs1, InputOutputArray cameraMatrix2, InputOutputArray distCoeffs2, Size imageSize, OutputArray R, OutputArray T, OutputArray E, OutputArray F, CalibrationFlags flags=CalibrationFlags.FixIntrinsic, TermCriteria? criteria=null)
 finds intrinsic and extrinsic parameters of a stereo camera More...
 
static double StereoCalibrate (IEnumerable< IEnumerable< Point3f >> objectPoints, IEnumerable< IEnumerable< Point2f >> imagePoints1, IEnumerable< IEnumerable< Point2f >> imagePoints2, double[,] cameraMatrix1, double[] distCoeffs1, double[,] cameraMatrix2, double[] distCoeffs2, Size imageSize, OutputArray R, OutputArray T, OutputArray E, OutputArray F, CalibrationFlags flags=CalibrationFlags.FixIntrinsic, TermCriteria? criteria=null)
 finds intrinsic and extrinsic parameters of a stereo camera More...
 
static void StereoRectify (InputArray cameraMatrix1, InputArray distCoeffs1, InputArray cameraMatrix2, InputArray distCoeffs2, Size imageSize, InputArray R, InputArray T, OutputArray R1, OutputArray R2, OutputArray P1, OutputArray P2, OutputArray Q, StereoRectificationFlags flags=StereoRectificationFlags.ZeroDisparity, double alpha=-1, Size? newImageSize=null)
 computes the rectification transformation for a stereo camera from its intrinsic and extrinsic parameters More...
 
static void StereoRectify (InputArray cameraMatrix1, InputArray distCoeffs1, InputArray cameraMatrix2, InputArray distCoeffs2, Size imageSize, InputArray R, InputArray T, OutputArray R1, OutputArray R2, OutputArray P1, OutputArray P2, OutputArray Q, StereoRectificationFlags flags, double alpha, Size newImageSize, out Rect validPixROI1, out Rect validPixROI2)
 computes the rectification transformation for a stereo camera from its intrinsic and extrinsic parameters More...
 
static void StereoRectify (double[,] cameraMatrix1, double[] distCoeffs1, double[,] cameraMatrix2, double[] distCoeffs2, Size imageSize, double[,] R, double[] T, out double[,] R1, out double[,] R2, out double[,] P1, out double[,] P2, out double[,] Q, StereoRectificationFlags flags=StereoRectificationFlags.ZeroDisparity, double alpha=-1, Size? newImageSize=null)
 computes the rectification transformation for a stereo camera from its intrinsic and extrinsic parameters More...
 
static void StereoRectify (double[,] cameraMatrix1, double[] distCoeffs1, double[,] cameraMatrix2, double[] distCoeffs2, Size imageSize, double[,] R, double[] T, out double[,] R1, out double[,] R2, out double[,] P1, out double[,] P2, out double[,] Q, StereoRectificationFlags flags, double alpha, Size newImageSize, out Rect validPixROI1, out Rect validPixROI2)
 computes the rectification transformation for a stereo camera from its intrinsic and extrinsic parameters More...
 
static bool StereoRectifyUncalibrated (InputArray points1, InputArray points2, InputArray F, Size imgSize, OutputArray H1, OutputArray H2, double threshold=5)
 computes the rectification transformation for an uncalibrated stereo camera (zero distortion is assumed) More...
 
static bool StereoRectifyUncalibrated (IEnumerable< Point2d > points1, IEnumerable< Point2d > points2, double[,] F, Size imgSize, out double[,] H1, out double[,] H2, double threshold=5)
 computes the rectification transformation for an uncalibrated stereo camera (zero distortion is assumed) More...
 
static float Rectify3Collinear (InputArray cameraMatrix1, InputArray distCoeffs1, InputArray cameraMatrix2, InputArray distCoeffs2, InputArray cameraMatrix3, InputArray distCoeffs3, IEnumerable< InputArray > imgpt1, IEnumerable< InputArray > imgpt3, Size imageSize, InputArray R12, InputArray T12, InputArray R13, InputArray T13, OutputArray R1, OutputArray R2, OutputArray R3, OutputArray P1, OutputArray P2, OutputArray P3, OutputArray Q, double alpha, Size newImgSize, out Rect roi1, out Rect roi2, StereoRectificationFlags flags)
 computes the rectification transformations for 3-head camera, where all the heads are on the same line. More...
 
static Mat GetOptimalNewCameraMatrix (InputArray cameraMatrix, InputArray distCoeffs, Size imageSize, double alpha, Size newImgSize, out Rect validPixROI, bool centerPrincipalPoint=false)
 Returns the new camera matrix based on the free scaling parameter. More...
 
static double [,] GetOptimalNewCameraMatrix (double[,] cameraMatrix, double[] distCoeffs, Size imageSize, double alpha, Size newImgSize, out Rect validPixROI, bool centerPrincipalPoint=false)
 Returns the new camera matrix based on the free scaling parameter. More...
 
static void ConvertPointsToHomogeneous (InputArray src, OutputArray dst)
 converts point coordinates from normal pixel coordinates to homogeneous coordinates ((x,y)->(x,y,1)) More...
 
static Vec3f [] ConvertPointsToHomogeneous (IEnumerable< Vec2f > src)
 converts point coordinates from normal pixel coordinates to homogeneous coordinates ((x,y)->(x,y,1)) More...
 
static Vec4f [] ConvertPointsToHomogeneous (IEnumerable< Vec3f > src)
 converts point coordinates from normal pixel coordinates to homogeneous coordinates ((x,y)->(x,y,1)) More...
 
static void ConvertPointsFromHomogeneous (InputArray src, OutputArray dst)
 converts point coordinates from homogeneous to normal pixel coordinates ((x,y,z)->(x/z, y/z)) More...
 
static Vec2f [] ConvertPointsFromHomogeneous (IEnumerable< Vec3f > src)
 converts point coordinates from homogeneous to normal pixel coordinates ((x,y,z)->(x/z, y/z)) More...
 
static Vec3f [] ConvertPointsFromHomogeneous (IEnumerable< Vec4f > src)
 converts point coordinates from homogeneous to normal pixel coordinates ((x,y,z)->(x/z, y/z)) More...
 
static void ConvertPointsHomogeneous (InputArray src, OutputArray dst)
 Converts points to/from homogeneous coordinates. More...
 
static Mat FindFundamentalMat (InputArray points1, InputArray points2, FundamentalMatMethod method=FundamentalMatMethod.Ransac, double param1=3.0, double param2=0.99, OutputArray mask=null)
 Calculates a fundamental matrix from the corresponding points in two images. More...
 
static Mat FindFundamentalMat (IEnumerable< Point2d > points1, IEnumerable< Point2d > points2, FundamentalMatMethod method=FundamentalMatMethod.Ransac, double param1=3.0, double param2=0.99, OutputArray mask=null)
 Calculates a fundamental matrix from the corresponding points in two images. More...
 
static void ComputeCorrespondEpilines (InputArray points, int whichImage, InputArray F, OutputArray lines)
 For points in an image of a stereo pair, computes the corresponding epilines in the other image. More...
 
static Point3f [] ComputeCorrespondEpilines (IEnumerable< Point2d > points, int whichImage, double[,] F)
 For points in an image of a stereo pair, computes the corresponding epilines in the other image. More...
 
static Point3f [] ComputeCorrespondEpilines (IEnumerable< Point3d > points, int whichImage, double[,] F)
 For points in an image of a stereo pair, computes the corresponding epilines in the other image. More...
 
static void TriangulatePoints (InputArray projMatr1, InputArray projMatr2, InputArray projPoints1, InputArray projPoints2, OutputArray points4D)
 Reconstructs points by triangulation. More...
 
static Vec4d [] TriangulatePoints (double[,] projMatr1, double[,] projMatr2, IEnumerable< Point2d > projPoints1, IEnumerable< Point2d > projPoints2)
 Reconstructs points by triangulation. More...
 
static void CorrectMatches (InputArray F, InputArray points1, InputArray points2, OutputArray newPoints1, OutputArray newPoints2)
 Refines coordinates of corresponding points. More...
 
static void CorrectMatches (double[,] F, IEnumerable< Point2d > points1, IEnumerable< Point2d > points2, out Point2d[] newPoints1, out Point2d[] newPoints2)
 Refines coordinates of corresponding points. More...
 
static void FilterSpeckles (InputOutputArray img, double newVal, int maxSpeckleSize, double maxDiff, InputOutputArray buf=null)
 filters off speckles (small regions of incorrectly computed disparity) More...
 
static Rect GetValidDisparityROI (Rect roi1, Rect roi2, int minDisparity, int numberOfDisparities, int SADWindowSize)
 computes valid disparity ROI from the valid ROIs of the rectified images (that are returned by cv::stereoRectify()) More...
 
static void ValidateDisparity (InputOutputArray disparity, InputArray cost, int minDisparity, int numberOfDisparities, int disp12MaxDisp=1)
 validates disparity using the left-right check. The matrix "cost" should be computed by the stereo correspondence algorithm More...
 
static void ReprojectImageTo3D (InputArray disparity, OutputArray _3dImage, InputArray Q, bool handleMissingValues=false, int ddepth=-1)
 reprojects disparity image to 3D: (x,y,d)->(X,Y,Z) using the matrix Q returned by cv::stereoRectify More...
 
static int EstimateAffine3D (InputArray src, InputArray dst, OutputArray outVal, OutputArray inliers, double ransacThreshold=3, double confidence=0.99)
 Computes an optimal affine transformation between two 3D point sets. More...
 
static void SetNumThreads (int nthreads)
 
static int GetNumThreads ()
 
static int GetThreadNum ()
 
static string GetBuildInformation ()
 
static long GetTickCount ()
 
static double GetTickFrequency ()
 
static long GetCpuTickCount ()
 
static bool CheckHardwareSupport (CpuFeatures feature)
 
static int GetNumberOfCpus ()
 
static IntPtr FastMalloc (long bufSize)
 
static void FastFree (IntPtr ptr)
 
static void SetUseOptimized (bool onoff)
 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. More...
 
static bool UseOptimized ()
 Returns the current optimization status. The function returns the current optimization status, which is controlled by cv::setUseOptimized(). More...
 
static int AlignSize (int sz, int n)
 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. More...
 
static MatExpr Abs (Mat src)
 Computes absolute value of each matrix element More...
 
static MatExpr Abs (MatExpr src)
 Computes absolute value of each matrix element More...
 
static void Add (InputArray src1, InputArray src2, OutputArray dst, InputArray mask=null, int dtype=-1)
 Computes the per-element sum of two arrays or an array and a scalar. More...
 
static void Subtract (InputArray src1, InputArray src2, OutputArray dst, InputArray mask=null, int dtype=-1)
 Calculates per-element difference between two arrays or array and a scalar More...
 
static void Multiply (InputArray src1, InputArray src2, OutputArray dst, double scale=1, int dtype=-1)
 Calculates the per-element scaled product of two arrays More...
 
static void Divide (InputArray src1, InputArray src2, OutputArray dst, double scale=1, int dtype=-1)
 Performs per-element division of two arrays or a scalar by an array. More...
 
static void Divide (double scale, InputArray src2, OutputArray dst, int dtype=-1)
 Performs per-element division of two arrays or a scalar by an array. More...
 
static void ScaleAdd (InputArray src1, double alpha, InputArray src2, OutputArray dst)
 adds scaled array to another one (dst = alpha*src1 + src2) More...
 
static void AddWeighted (InputArray src1, double alpha, InputArray src2, double beta, double gamma, OutputArray dst, int dtype=-1)
 computes weighted sum of two arrays (dst = alpha*src1 + beta*src2 + gamma) More...
 
static void ConvertScaleAbs (InputArray src, OutputArray dst, double alpha=1, double beta=0)
 Scales, computes absolute values and converts the result to 8-bit. More...
 
static void LUT (InputArray src, InputArray lut, OutputArray dst, int interpolation=0)
 transforms array of numbers using a lookup table: dst(i)=lut(src(i)) More...
 
static void LUT (InputArray src, byte[] lut, OutputArray dst, int interpolation=0)
 transforms array of numbers using a lookup table: dst(i)=lut(src(i)) More...
 
static Scalar Sum (InputArray src)
 computes sum of array elements More...
 
static int CountNonZero (InputArray mtx)
 computes the number of nonzero array elements More...
 
static void FindNonZero (InputArray src, OutputArray idx)
 returns the list of locations of non-zero pixels More...
 
static Scalar Mean (InputArray src, InputArray mask=null)
 computes mean value of selected array elements More...
 
static void MeanStdDev (InputArray src, OutputArray mean, OutputArray stddev, InputArray mask=null)
 computes mean value and standard deviation of all or selected array elements More...
 
static void MeanStdDev (InputArray src, out Scalar mean, out Scalar stddev, InputArray mask=null)
 computes mean value and standard deviation of all or selected array elements More...
 
static double Norm (InputArray src1, NormTypes normType=NormTypes.L2, InputArray mask=null)
 Calculates absolute array norm, absolute difference norm, or relative difference norm. More...
 
static double Norm (InputArray src1, InputArray src2, NormTypes normType=NormTypes.L2, InputArray mask=null)
 computes norm of selected part of the difference between two arrays More...
 
static void BatchDistance (InputArray src1, InputArray src2, OutputArray dist, int dtype, OutputArray nidx, NormTypes normType=NormTypes.L2, int k=0, InputArray mask=null, int update=0, bool crosscheck=false)
 naive nearest neighbor finder More...
 
static void Normalize (InputArray src, InputOutputArray dst, double alpha=1, double beta=0, NormTypes normType=NormTypes.L2, int dtype=-1, InputArray mask=null)
 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 More...
 
static void MinMaxLoc (InputArray src, out double minVal, out double maxVal)
 finds global minimum and maximum array elements and returns their values and their locations More...
 
static void MinMaxLoc (InputArray src, out Point minLoc, out Point maxLoc)
 finds global minimum and maximum array elements and returns their values and their locations More...
 
static void MinMaxLoc (InputArray src, out double minVal, out double maxVal, out Point minLoc, out Point maxLoc, InputArray mask=null)
 finds global minimum and maximum array elements and returns their values and their locations More...
 
static void MinMaxIdx (InputArray src, out double minVal, out double maxVal)
 finds global minimum and maximum array elements and returns their values and their locations More...
 
static void MinMaxIdx (InputArray src, out int minIdx, out int maxIdx)
 finds global minimum and maximum array elements and returns their values and their locations More...
 
static void MinMaxIdx (InputArray src, out double minVal, out double maxVal, out int minIdx, out int maxIdx, InputArray mask=null)
 finds global minimum and maximum array elements and returns their values and their locations More...
 
static void Reduce (InputArray src, OutputArray dst, ReduceDimension dim, ReduceTypes rtype, int dtype)
 transforms 2D matrix to 1D row or column vector by taking sum, minimum, maximum or mean value over all the rows More...
 
static void Merge (Mat[] mv, Mat dst)
 makes multi-channel array out of several single-channel arrays More...
 
static void Split (Mat src, out Mat[] mv)
 Copies each plane of a multi-channel array to a dedicated array More...
 
static Mat [] Split (Mat src)
 Copies each plane of a multi-channel array to a dedicated array More...
 
static void MixChannels (Mat[] src, Mat[] dst, int[] fromTo)
 copies selected channels from the input arrays to the selected channels of the output arrays More...
 
static void ExtractChannel (InputArray src, OutputArray dst, int coi)
 extracts a single channel from src (coi is 0-based index) More...
 
static void InsertChannel (InputArray src, InputOutputArray dst, int coi)
 inserts a single channel to dst (coi is 0-based index) More...
 
static void Flip (InputArray src, OutputArray dst, FlipMode flipCode)
 reverses the order of the rows, columns or both in a matrix More...
 
static void Repeat (InputArray src, int ny, int nx, OutputArray dst)
 replicates the input matrix the specified number of times in the horizontal and/or vertical direction More...
 
static Mat Repeat (Mat src, int ny, int nx)
 replicates the input matrix the specified number of times in the horizontal and/or vertical direction More...
 
static void HConcat (Mat[] src, OutputArray dst)
 
static void HConcat (InputArray src1, InputArray src2, OutputArray dst)
 
static void VConcat (Mat[] src, OutputArray dst)
 
static void VConcat (InputArray src1, InputArray src2, OutputArray dst)
 
static void BitwiseAnd (InputArray src1, InputArray src2, OutputArray dst, InputArray mask=null)
 computes bitwise conjunction of the two arrays (dst = src1 & src2) More...
 
static void BitwiseOr (InputArray src1, InputArray src2, OutputArray dst, InputArray mask=null)
 computes bitwise disjunction of the two arrays (dst = src1 | src2) More...
 
static void BitwiseXor (InputArray src1, InputArray src2, OutputArray dst, InputArray mask=null)
 computes bitwise exclusive-or of the two arrays (dst = src1 ^ src2) More...
 
static void BitwiseNot (InputArray src, OutputArray dst, InputArray mask=null)
 inverts each bit of array (dst = ~src) More...
 
static void Absdiff (InputArray src1, InputArray src2, OutputArray dst)
 computes element-wise absolute difference of two arrays (dst = abs(src1 - src2)) More...
 
static void InRange (InputArray src, InputArray lowerb, InputArray upperb, OutputArray dst)
 set mask elements for those array elements which are within the element-specific bounding box (dst = lowerb <= src && src < upperb) More...
 
static void InRange (InputArray src, Scalar lowerb, Scalar upperb, OutputArray dst)
 set mask elements for those array elements which are within the element-specific bounding box (dst = lowerb <= src && src < upperb) More...
 
static void Compare (InputArray src1, InputArray src2, OutputArray dst, CmpTypes cmpop)
 Performs the per-element comparison of two arrays or an array and scalar value. More...
 
static void Min (InputArray src1, InputArray src2, OutputArray dst)
 computes per-element minimum of two arrays (dst = min(src1, src2)) More...
 
static void Min (Mat src1, Mat src2, Mat dst)
 computes per-element minimum of two arrays (dst = min(src1, src2)) More...
 
static void Min (Mat src1, double src2, Mat dst)
 computes per-element minimum of array and scalar (dst = min(src1, src2)) More...
 
static void Max (InputArray src1, InputArray src2, OutputArray dst)
 computes per-element maximum of two arrays (dst = max(src1, src2)) More...
 
static void Max (Mat src1, Mat src2, Mat dst)
 computes per-element maximum of two arrays (dst = max(src1, src2)) More...
 
static void Max (Mat src1, double src2, Mat dst)
 computes per-element maximum of array and scalar (dst = max(src1, src2)) More...
 
static void Sqrt (InputArray src, OutputArray dst)
 computes square root of each matrix element (dst = src**0.5) More...
 
static void Pow (InputArray src, double power, OutputArray dst)
 raises the input matrix elements to the specified power (b = a**power) More...
 
static void Exp (InputArray src, OutputArray dst)
 computes exponent of each matrix element (dst = e**src) More...
 
static void Log (InputArray src, OutputArray dst)
 computes natural logarithm of absolute value of each matrix element: dst = log(abs(src)) More...
 
static float CubeRoot (float val)
 computes cube root of the argument More...
 
static float FastAtan2 (float y, float x)
 computes the angle in degrees (0..360) of the vector (x,y) More...
 
static void PolarToCart (InputArray magnitude, InputArray angle, OutputArray x, OutputArray y, bool angleInDegrees=false)
 converts polar coordinates to Cartesian More...
 
static void CartToPolar (InputArray x, InputArray y, OutputArray magnitude, OutputArray angle, bool angleInDegrees=false)
 converts Cartesian coordinates to polar More...
 
static void Phase (InputArray x, InputArray y, OutputArray angle, bool angleInDegrees=false)
 computes angle (angle(i)) of each (x(i), y(i)) vector More...
 
static void Magnitude (InputArray x, InputArray y, OutputArray magnitude)
 computes magnitude (magnitude(i)) of each (x(i), y(i)) vector More...
 
static bool CheckRange (InputArray src, bool quiet=true)
 checks that each matrix element is within the specified range. More...
 
static bool CheckRange (InputArray src, bool quiet, out Point pos, double minVal=double.MinValue, double maxVal=double.MaxValue)
 checks that each matrix element is within the specified range. More...
 
static void PatchNaNs (InputOutputArray a, double val=0)
 converts NaN's to the given number More...
 
static void Gemm (InputArray src1, InputArray src2, double alpha, InputArray src3, double gamma, OutputArray dst, GemmFlags flags=GemmFlags.None)
 implements generalized matrix product algorithm GEMM from BLAS More...
 
static void MulTransposed (InputArray src, OutputArray dst, bool aTa, InputArray delta=null, double scale=1, int dtype=-1)
 multiplies matrix by its transposition from the left or from the right More...
 
static void Transpose (InputArray src, OutputArray dst)
 transposes the matrix More...
 
static void Transform (InputArray src, OutputArray dst, InputArray m)
 performs affine transformation of each element of multi-channel input matrix More...
 
static void PerspectiveTransform (InputArray src, OutputArray dst, InputArray m)
 performs perspective transformation of each element of multi-channel input matrix More...
 
static Point2f [] PerspectiveTransform (IEnumerable< Point2f > src, Mat m)
 performs perspective transformation of each element of multi-channel input matrix More...
 
static Point2d [] PerspectiveTransform (IEnumerable< Point2d > src, Mat m)
 performs perspective transformation of each element of multi-channel input matrix More...
 
static Point3f [] PerspectiveTransform (IEnumerable< Point3f > src, Mat m)
 performs perspective transformation of each element of multi-channel input matrix More...
 
static Point3d [] PerspectiveTransform (IEnumerable< Point3d > src, Mat m)
 performs perspective transformation of each element of multi-channel input matrix More...
 
static void CompleteSymm (InputOutputArray mtx, bool lowerToUpper=false)
 extends the symmetrical matrix from the lower half or from the upper half More...
 
static void SetIdentity (InputOutputArray mtx, Scalar? s=null)
 initializes scaled identity matrix More...
 
static double Determinant (InputArray mtx)
 computes determinant of a square matrix More...
 
static Scalar Trace (InputArray mtx)
 computes trace of a matrix More...
 
static double Invert (InputArray src, OutputArray dst, DecompTypes flags=DecompTypes.LU)
 computes inverse or pseudo-inverse matrix More...
 
static bool Solve (InputArray src1, InputArray src2, OutputArray dst, DecompTypes flags=DecompTypes.LU)
 solves linear system or a least-square problem More...
 
static void Sort (InputArray src, OutputArray dst, SortFlags flags)
 sorts independently each matrix row or each matrix column More...
 
static void SortIdx (InputArray src, OutputArray dst, SortFlags flags)
 sorts independently each matrix row or each matrix column More...
 
static int SolveCubic (InputArray coeffs, OutputArray roots)
 finds real roots of a cubic polynomial More...
 
static double SolvePoly (InputArray coeffs, OutputArray roots, int maxIters=300)
 finds real and complex roots of a polynomial More...
 
static bool Eigen (InputArray src, OutputArray eigenvalues, OutputArray eigenvectors)
 Computes eigenvalues and eigenvectors of a symmetric matrix. More...
 
static void CalcCovarMatrix (Mat[] samples, Mat covar, Mat mean, CovarFlags flags)
 computes covariation matrix of a set of samples More...
 
static void CalcCovarMatrix (Mat[] samples, Mat covar, Mat mean, CovarFlags flags, MatType ctype)
 computes covariation matrix of a set of samples More...
 
static void CalcCovarMatrix (InputArray samples, OutputArray covar, InputOutputArray mean, CovarFlags flags)
 computes covariation matrix of a set of samples More...
 
static void CalcCovarMatrix (InputArray samples, OutputArray covar, InputOutputArray mean, CovarFlags flags, MatType ctype)
 computes covariation matrix of a set of samples More...
 
static void PCACompute (InputArray data, InputOutputArray mean, OutputArray eigenvectors, int maxComponents=0)
 PCA of the supplied dataset. More...
 
static void PCAComputeVar (InputArray data, InputOutputArray mean, OutputArray eigenvectors, double retainedVariance)
 
static void PCAProject (InputArray data, InputArray mean, InputArray eigenvectors, OutputArray result)
 
static void PCABackProject (InputArray data, InputArray mean, InputArray eigenvectors, OutputArray result)
 
static void SVDecomp (InputArray src, OutputArray w, OutputArray u, OutputArray vt, SVD.Flags flags=SVD.Flags.None)
 computes SVD of src More...
 
static void SVBackSubst (InputArray w, InputArray u, InputArray vt, InputArray rhs, OutputArray dst)
 performs back substitution for the previously computed SVD More...
 
static double Mahalanobis (InputArray v1, InputArray v2, InputArray icovar)
 
static double Mahalonobis (InputArray v1, InputArray v2, InputArray icovar)
 computes Mahalanobis distance between two vectors: sqrt((v1-v2)'icovar(v1-v2)), where icovar is the inverse covariation matrix More...
 
static void Dft (InputArray src, OutputArray dst, DftFlags flags=DftFlags.None, int nonzeroRows=0)
 Performs a forward Discrete Fourier transform of 1D or 2D floating-point array. More...
 
static void Idft (InputArray src, OutputArray dst, DftFlags flags=DftFlags.None, int nonzeroRows=0)
 Performs an inverse Discrete Fourier transform of 1D or 2D floating-point array. More...
 
static void Dct (InputArray src, OutputArray dst, DctFlags flags=DctFlags.None)
 Performs forward or inverse 1D or 2D Discrete Cosine Transformation More...
 
static void Idct (InputArray src, OutputArray dst, DctFlags flags=DctFlags.None)
 Performs inverse 1D or 2D Discrete Cosine Transformation More...
 
static void MulSpectrums (InputArray a, InputArray b, OutputArray c, DftFlags flags, bool conjB=false)
 computes element-wise product of the two Fourier spectrums. The second spectrum can optionally be conjugated before the multiplication More...
 
static int GetOptimalDFTSize (int vecsize)
 computes the minimal vector size vecsize1 >= vecsize so that the dft() of the vector of length vecsize1 can be computed efficiently More...
 
static double Kmeans (InputArray data, int k, InputOutputArray bestLabels, TermCriteria criteria, int attempts, KMeansFlags flags, OutputArray centers=null)
 clusters the input data using k-Means algorithm More...
 
static RNG TheRNG ()
 returns the thread-local Random number generator More...
 
static void Randu (InputOutputArray dst, InputArray low, InputArray high)
 fills array with uniformly-distributed random numbers from the range [low, high) More...
 
static void Randu (InputOutputArray dst, Scalar low, Scalar high)
 fills array with uniformly-distributed random numbers from the range [low, high) More...
 
static void Randn (InputOutputArray dst, InputArray mean, InputArray stddev)
 fills array with normally-distributed random numbers with the specified mean and the standard deviation More...
 
static void Randn (InputOutputArray dst, Scalar mean, Scalar stddev)
 fills array with normally-distributed random numbers with the specified mean and the standard deviation More...
 
static void RandShuffle (InputOutputArray dst, double iterFactor, RNG rng=null)
 shuffles the input array elements More...
 
static void Write (FileStorage fs, string name, int value)
 
static void Write (FileStorage fs, string name, float value)
 
static void Write (FileStorage fs, string name, double value)
 
static void Write (FileStorage fs, string name, string value)
 
static void Write (FileStorage fs, string name, Mat value)
 
static void Write (FileStorage fs, string name, SparseMat value)
 
static void Write (FileStorage fs, string name, IEnumerable< KeyPoint > value)
 
static void Write (FileStorage fs, string name, IEnumerable< DMatch > value)
 
static void WriteScalar (FileStorage fs, int value)
 
static void WriteScalar (FileStorage fs, float value)
 
static void WriteScalar (FileStorage fs, double value)
 
static void WriteScalar (FileStorage fs, string value)
 
static int ReadInt (FileNode node, int defaultValue=default(int))
 
static float ReadFloat (FileNode node, float defaultValue=default(float))
 
static double ReadDouble (FileNode node, double defaultValue=default(double))
 
static string ReadString (FileNode node, string defaultValue=default(string))
 
static Mat ReadMat (FileNode node, Mat defaultMat=null)
 
static SparseMat ReadSparseMat (FileNode node, SparseMat defaultMat=null)
 
static KeyPoint [] ReadKeyPoints (FileNode node)
 
static DMatch [] ReadDMatches (FileNode node)
 
static KeyPoint [] FAST (InputArray image, int threshold, bool nonmaxSupression=true)
 Detects corners using the FAST algorithm More...
 
static KeyPoint [] FAST (InputArray image, int threshold, bool nonmaxSupression, FASTType type)
 Detects corners using the FAST algorithm More...
 
static KeyPoint [] AGAST (InputArray image, int threshold, bool nonmaxSuppression, AGASTType type)
 Detects corners using the AGAST algorithm More...
 
static void DrawKeypoints (Mat image, IEnumerable< KeyPoint > keypoints, Mat outImage, Scalar? color=null, DrawMatchesFlags flags=DrawMatchesFlags.Default)
 Draw keypoints. More...
 
static void DrawMatches (Mat img1, IEnumerable< KeyPoint > keypoints1, Mat img2, IEnumerable< KeyPoint > keypoints2, IEnumerable< DMatch > matches1To2, Mat outImg, Scalar? matchColor=null, Scalar? singlePointColor=null, IEnumerable< byte > matchesMask=null, DrawMatchesFlags flags=DrawMatchesFlags.Default)
 Draws matches of keypints from two images on output image. More...
 
static void DrawMatches (Mat img1, IEnumerable< KeyPoint > keypoints1, Mat img2, IEnumerable< KeyPoint > keypoints2, IEnumerable< IEnumerable< DMatch >> matches1To2, Mat outImg, Scalar? matchColor=null, Scalar? singlePointColor=null, IEnumerable< IEnumerable< byte >> matchesMask=null, DrawMatchesFlags flags=DrawMatchesFlags.Default)
 Draws matches of keypints from two images on output image. More...
 
static void EvaluateFeatureDetector (Mat img1, Mat img2, Mat H1to2, ref KeyPoint[] keypoints1, ref KeyPoint[] keypoints2, out float repeatability, out int correspCount)
 
static Point2f [] ComputeRecallPrecisionCurve (DMatch[][] matches1to2, byte[][] correctMatches1to2Mask)
 
static float GetRecall (IEnumerable< Point2f > recallPrecisionCurve, float lPrecision)
 
static int GetNearestPoint (IEnumerable< Point2f > recallPrecisionCurve, float lPrecision)
 
static void NamedWindow (string winname)
 Creates a window. More...
 
static void NamedWindow (string winname, WindowMode flags)
 Creates a window. More...
 
static void DestroyWindow (string winName)
 
static void DestroyAllWindows ()
 
static void ImShow (string winname, Mat mat)
 Displays the image in the specified window More...
 
static int StartWindowThread ()
 
static int WaitKey (int delay=0)
 Waits for a pressed key. More...
 
static void ResizeWindow (string winName, int width, int height)
 Resizes window to the specified size More...
 
static void MoveWindow (string winName, int x, int y)
 Moves window to the specified position More...
 
static void SetWindowProperty (string winName, WindowProperty propId, double propValue)
 Changes parameters of a window dynamically. More...
 
static void SetWindowTitle (string winname, string title)
 Updates window title More...
 
static double GetWindowProperty (string winName, WindowProperty propId)
 Provides parameters of a window. More...
 
static void SetMouseCallback (string windowName, CvMouseCallback onMouse)
 Sets the callback function for mouse events occuting within the specified window. More...
 
static Mat ImRead (string fileName, ImreadModes flags=ImreadModes.Color)
 Loads an image from a file. More...
 
static bool ImReadMulti (string filename, out Mat[] mats, ImreadModes flags=ImreadModes.AnyColor)
 Loads a multi-page image from a file. More...
 
static bool ImWrite (string fileName, Mat img, int[] prms=null)
 Saves an image to a specified file. More...
 
static bool ImWrite (string fileName, Mat img, params ImageEncodingParam[] prms)
 Saves an image to a specified file. More...
 
static Mat ImDecode (Mat buf, ImreadModes flags)
 Reads image from the specified buffer in memory. More...
 
static Mat ImDecode (InputArray buf, ImreadModes flags)
 Reads image from the specified buffer in memory. More...
 
static Mat ImDecode (byte[] buf, ImreadModes flags)
 Reads image from the specified buffer in memory. More...
 
static bool ImEncode (string ext, InputArray img, out byte[] buf, int[] prms=null)
 Compresses the image and stores it in the memory buffer More...
 
static void ImEncode (string ext, InputArray img, out byte[] buf, params ImageEncodingParam[] prms)
 Compresses the image and stores it in the memory buffer More...
 
static void ConvertImage (Mat src, Mat dst, ConvertImageModes flags=ConvertImageModes.None)
 utility function: convert one image to another with optional vertical flip More...
 
static bool HaveImageReader (string fileName)
 
static bool HaveImageWriter (string fileName)
 
static Mat GetGaussianKernel (int ksize, double sigma, MatType? ktype=null)
 Returns Gaussian filter coefficients. More...
 
static void GetDerivKernels (OutputArray kx, OutputArray ky, int dx, int dy, int ksize, bool normalize=false, MatType? ktype=null)
 Returns filter coefficients for computing spatial image derivatives. More...
 
static Mat GetGaborKernel (Size ksize, double sigma, double theta, double lambd, double gamma, double psi, int ktype)
 
static Mat GetStructuringElement (MorphShapes shape, Size ksize)
 
static Mat GetStructuringElement (MorphShapes shape, Size ksize, Point anchor)
 
static void CopyMakeBorder (InputArray src, OutputArray dst, int top, int bottom, int left, int right, BorderTypes borderType, Scalar? value=null)
 Forms a border around the image More...
 
static void MedianBlur (InputArray src, OutputArray dst, int ksize)
 Smoothes image using median filter More...
 
static void GaussianBlur (InputArray src, OutputArray dst, Size ksize, double sigmaX, double sigmaY=0, BorderTypes borderType=BorderTypes.Default)
 Blurs an image using a Gaussian filter. More...
 
static void BilateralFilter (InputArray src, OutputArray dst, int d, double sigmaColor, double sigmaSpace, BorderTypes borderType=BorderTypes.Default)
 Applies bilateral filter to the image More...
 
static void BoxFilter (InputArray src, OutputArray dst, MatType ddepth, Size ksize, Point? anchor=null, bool normalize=true, BorderTypes borderType=BorderTypes.Default)
 Smoothes image using box filter More...
 
static void Blur (InputArray src, OutputArray dst, Size ksize, Point? anchor=null, BorderTypes borderType=BorderTypes.Default)
 Smoothes image using normalized box filter More...
 
static void Filter2D (InputArray src, OutputArray dst, MatType ddepth, InputArray kernel, Point? anchor=null, double delta=0, BorderTypes borderType=BorderTypes.Default)
 Convolves an image with the kernel More...
 
static void SepFilter2D (InputArray src, OutputArray dst, MatType ddepth, InputArray kernelX, InputArray kernelY, Point? anchor=null, double delta=0, BorderTypes borderType=BorderTypes.Default)
 Applies separable linear filter to an image More...
 
static void Sobel (InputArray src, OutputArray dst, MatType ddepth, int xorder, int yorder, int ksize=3, double scale=1, double delta=0, BorderTypes borderType=BorderTypes.Default)
 Calculates the first, second, third or mixed image derivatives using an extended Sobel operator More...
 
static void Scharr (InputArray src, OutputArray dst, MatType ddepth, int xorder, int yorder, double scale=1, double delta=0, BorderTypes borderType=BorderTypes.Default)
 Calculates the first x- or y- image derivative using Scharr operator More...
 
static void Laplacian (InputArray src, OutputArray dst, MatType ddepth, int ksize=1, double scale=1, double delta=0, BorderTypes borderType=BorderTypes.Default)
 Calculates the Laplacian of an image More...
 
static void Canny (InputArray src, OutputArray edges, double threshold1, double threshold2, int apertureSize=3, bool L2gradient=false)
 Finds edges in an image using Canny algorithm. More...
 
static void CornerEigenValsAndVecs (InputArray src, OutputArray dst, int blockSize, int ksize, BorderTypes borderType=BorderTypes.Default)
 computes both eigenvalues and the eigenvectors of 2x2 derivative covariation matrix at each pixel. The output is stored as 6-channel matrix. More...
 
static void PreCornerDetect (InputArray src, OutputArray dst, int ksize, BorderTypes borderType=BorderTypes.Default)
 computes another complex cornerness criteria at each pixel More...
 
static Point2f [] CornerSubPix (InputArray image, IEnumerable< Point2f > inputCorners, Size winSize, Size zeroZone, TermCriteria criteria)
 adjusts the corner locations with sub-pixel accuracy to maximize the certain cornerness criteria More...
 
static Point2f [] GoodFeaturesToTrack (InputArray src, int maxCorners, double qualityLevel, double minDistance, InputArray mask, int blockSize, bool useHarrisDetector, double k)
 finds the strong enough corners where the cornerMinEigenVal() or cornerHarris() report the local maxima More...
 
static LineSegmentPolar [] HoughLines (InputArray image, double rho, double theta, int threshold, double srn=0, double stn=0)
 Finds lines in a binary image using standard Hough transform. More...
 
static LineSegmentPoint [] HoughLinesP (InputArray image, double rho, double theta, int threshold, double minLineLength=0, double maxLineGap=0)
 Finds lines segments in a binary image using probabilistic Hough transform. More...
 
static CircleSegment [] HoughCircles (InputArray image, HoughMethods method, double dp, double minDist, double param1=100, double param2=100, int minRadius=0, int maxRadius=0)
 Finds circles in a grayscale image using a Hough transform. More...
 
static Scalar MorphologyDefaultBorderValue ()
 Default borderValue for Dilate/Erode More...
 
static void Dilate (InputArray src, OutputArray dst, InputArray element, Point? anchor=null, int iterations=1, BorderTypes borderType=BorderTypes.Constant, Scalar? borderValue=null)
 Dilates an image by using a specific structuring element. More...
 
static void Erode (InputArray src, OutputArray dst, InputArray element, Point? anchor=null, int iterations=1, BorderTypes borderType=BorderTypes.Constant, Scalar? borderValue=null)
 Erodes an image by using a specific structuring element. More...
 
static void MorphologyEx (InputArray src, OutputArray dst, MorphTypes op, InputArray element, Point? anchor=null, int iterations=1, BorderTypes borderType=BorderTypes.Constant, Scalar? borderValue=null)
 Performs advanced morphological transformations More...
 
static void Resize (InputArray src, OutputArray dst, Size dsize, double fx=0, double fy=0, InterpolationFlags interpolation=InterpolationFlags.Linear)
 Resizes an image. More...
 
static void WarpAffine (InputArray src, OutputArray dst, InputArray m, Size dsize, InterpolationFlags flags=InterpolationFlags.Linear, BorderTypes borderMode=BorderTypes.Constant, Scalar? borderValue=null)
 Applies an affine transformation to an image. More...
 
static void WarpPerspective (InputArray src, OutputArray dst, InputArray m, Size dsize, InterpolationFlags flags=InterpolationFlags.Linear, BorderTypes borderMode=BorderTypes.Constant, Scalar? borderValue=null)
 Applies a perspective transformation to an image. More...
 
static void WarpPerspective (InputArray src, OutputArray dst, float[,] m, Size dsize, InterpolationFlags flags=InterpolationFlags.Linear, BorderTypes borderMode=BorderTypes.Constant, Scalar? borderValue=null)
 Applies a perspective transformation to an image. More...
 
static void Remap (InputArray src, OutputArray dst, InputArray map1, InputArray map2, InterpolationFlags interpolation=InterpolationFlags.Linear, BorderTypes borderMode=BorderTypes.Constant, Scalar? borderValue=null)
 Applies a generic geometrical transformation to an image. More...
 
static void ConvertMaps (InputArray map1, InputArray map2, OutputArray dstmap1, OutputArray dstmap2, MatType dstmap1Type, bool nnInterpolation=false)
 
static Mat GetRotationMatrix2D (Point2f center, double angle, double scale)
 
static void InvertAffineTransform (InputArray m, OutputArray im)
 Inverts an affine transformation. More...
 
static Mat GetPerspectiveTransform (IEnumerable< Point2f > src, IEnumerable< Point2f > dst)
 
static Mat GetPerspectiveTransform (InputArray src, InputArray dst)
 
static Mat GetAffineTransform (IEnumerable< Point2f > src, IEnumerable< Point2f > dst)
 
static Mat GetAffineTransform (InputArray src, InputArray dst)
 
static void GetRectSubPix (InputArray image, Size patchSize, Point2f center, OutputArray patch, int patchType=-1)
 Retrieves a pixel rectangle from an image with sub-pixel accuracy. More...
 
static void LogPolar (InputArray src, OutputArray dst, Point2f center, double m, InterpolationFlags flags)
 Remaps an image to log-polar space. More...
 
static void LinearPolar (InputArray src, OutputArray dst, Point2f center, double maxRadius, InterpolationFlags flags)
 Remaps an image to polar space. More...
 
static void Integral (InputArray src, OutputArray sum, int sdepth=-1)
 
static void Integral (InputArray src, OutputArray sum, OutputArray sqsum, int sdepth=-1)
 
static void Integral (InputArray src, OutputArray sum, OutputArray sqsum, OutputArray tilted, int sdepth=-1)
 
static void Accumulate (InputArray src, InputOutputArray dst, InputArray mask)
 Adds an image to the accumulator. More...
 
static void AccumulateSquare (InputArray src, InputOutputArray dst, InputArray mask)
 Adds the square of a source image to the accumulator. More...
 
static void AccumulateProduct (InputArray src1, InputArray src2, InputOutputArray dst, InputArray mask)
 Adds the per-element product of two input images to the accumulator. More...
 
static void AccumulateWeighted (InputArray src, InputOutputArray dst, double alpha, InputArray mask)
 Updates a running average. More...
 
static double PSNR (InputArray src1, InputArray src2)
 
static Point2d PhaseCorrelate (InputArray src1, InputArray src2, InputArray window=null)
 
static Point2d PhaseCorrelateRes (InputArray src1, InputArray src2, InputArray window)
 
static Point2d PhaseCorrelateRes (InputArray src1, InputArray src2, InputArray window, out double response)
 
static void CreateHanningWindow (InputOutputArray dst, Size winSize, MatType type)
 Computes a Hanning window coefficients in two dimensions. More...
 
static double Threshold (InputArray src, OutputArray dst, double thresh, double maxval, ThresholdTypes type)
 Applies a fixed-level threshold to each array element. More...
 
static void AdaptiveThreshold (InputArray src, OutputArray dst, double maxValue, AdaptiveThresholdTypes adaptiveMethod, ThresholdTypes thresholdType, int blockSize, double c)
 Applies an adaptive threshold to an array. More...
 
static void PyrDown (InputArray src, OutputArray dst, Size? dstSize=null, BorderTypes borderType=BorderTypes.Default)
 Blurs an image and downsamples it. More...
 
static void PyrUp (InputArray src, OutputArray dst, Size? dstSize=null, BorderTypes borderType=BorderTypes.Default)
 Upsamples an image and then blurs it. More...
 
static void Undistort (InputArray src, OutputArray dst, InputArray cameraMatrix, InputArray distCoeffs, InputArray newCameraMatrix=null)
 corrects lens distortion for the given camera matrix and distortion coefficients More...
 
static void InitUndistortRectifyMap (InputArray cameraMatrix, InputArray distCoeffs, InputArray r, InputArray newCameraMatrix, Size size, MatType m1Type, OutputArray map1, OutputArray map2)
 initializes maps for cv::remap() to correct lens distortion and optionally rectify the image More...
 
static float InitWideAngleProjMap (InputArray cameraMatrix, InputArray distCoeffs, Size imageSize, int destImageWidth, MatType m1Type, OutputArray map1, OutputArray map2, ProjectionType projType, double alpha=0)
 initializes maps for cv::remap() for wide-angle More...
 
static Mat GetDefaultNewCameraMatrix (InputArray cameraMatrix, Size? imgSize=null, bool centerPrincipalPoint=false)
 returns the default new camera matrix (by default it is the same as cameraMatrix unless centerPricipalPoint=true) More...
 
static void UndistortPoints (InputArray src, OutputArray dst, InputArray cameraMatrix, InputArray distCoeffs, InputArray r=null, InputArray p=null)
 Computes the ideal point coordinates from the observed point coordinates. More...
 
static void CalcHist (Mat[] images, int[] channels, InputArray mask, OutputArray hist, int dims, int[] histSize, Rangef[] ranges, bool uniform=true, bool accumulate=false)
 computes the joint dense histogram for a set of images. More...
 
static void CalcHist (Mat[] images, int[] channels, InputArray mask, OutputArray hist, int dims, int[] histSize, float[][] ranges, bool uniform=true, bool accumulate=false)
 computes the joint dense histogram for a set of images. More...
 
static void CalcBackProject (Mat[] images, int[] channels, InputArray hist, OutputArray backProject, Rangef[] ranges, bool uniform=true)
 computes the joint dense histogram for a set of images. More...
 
static double CompareHist (InputArray h1, InputArray h2, HistCompMethods method)
 compares two histograms stored in dense arrays More...
 
static void EqualizeHist (InputArray src, OutputArray dst)
 normalizes the grayscale image brightness and contrast by normalizing its histogram More...
 
static CLAHE CreateCLAHE (double clipLimit=40.0, Size? tileGridSize=null)
 Creates a predefined CLAHE object More...
 
static float EMD (InputArray signature1, InputArray signature2, DistanceTypes distType)
 
static float EMD (InputArray signature1, InputArray signature2, DistanceTypes distType, InputArray cost)
 
static float EMD (InputArray signature1, InputArray signature2, DistanceTypes distType, InputArray cost, out float lowerBound)
 
static float EMD (InputArray signature1, InputArray signature2, DistanceTypes distType, InputArray cost, out float lowerBound, OutputArray flow)
 
static void Watershed (InputArray image, InputOutputArray markers)
 Performs a marker-based image segmentation using the watershed algorithm. More...
 
static void PyrMeanShiftFiltering (InputArray src, OutputArray dst, double sp, double sr, int maxLevel=1, TermCriteria? termcrit=null)
 Performs initial step of meanshift segmentation of an image. More...
 
static void GrabCut (InputArray img, InputOutputArray mask, Rect rect, InputOutputArray bgdModel, InputOutputArray fgdModel, int iterCount, GrabCutModes mode)
 Segments the image using GrabCut algorithm More...
 
static void DistanceTransformWithLabels (InputArray src, OutputArray dst, OutputArray labels, DistanceTypes distanceType, DistanceMaskSize maskSize, DistanceTransformLabelTypes labelType=DistanceTransformLabelTypes.CComp)
 builds the discrete Voronoi diagram More...
 
static void DistanceTransform (InputArray src, OutputArray dst, DistanceTypes distanceType, DistanceMaskSize maskSize)
 computes the distance transform map More...
 
static int FloodFill (InputOutputArray image, Point seedPoint, Scalar newVal)
 Fills a connected component with the given color. More...
 
static int FloodFill (InputOutputArray image, Point seedPoint, Scalar newVal, out Rect rect, Scalar? loDiff=null, Scalar? upDiff=null, FloodFillFlags flags=FloodFillFlags.Link4)
 Fills a connected component with the given color. More...
 
static int FloodFill (InputOutputArray image, InputOutputArray mask, Point seedPoint, Scalar newVal)
 Fills a connected component with the given color. More...
 
static int FloodFill (InputOutputArray image, InputOutputArray mask, Point seedPoint, Scalar newVal, out Rect rect, Scalar? loDiff=null, Scalar? upDiff=null, FloodFillFlags flags=FloodFillFlags.Link4)
 Fills a connected component with the given color. More...
 
static void CvtColor (InputArray src, OutputArray dst, ColorConversionCodes code, int dstCn=0)
 Converts image from one color space to another More...
 
static Moments Moments (InputArray array, bool binaryImage=false)
 Calculates all of the moments up to the third order of a polygon or rasterized shape. More...
 
static Moments Moments (byte[,] array, bool binaryImage=false)
 Calculates all of the moments up to the third order of a polygon or rasterized shape. More...
 
static Moments Moments (float[,] array, bool binaryImage=false)
 Calculates all of the moments up to the third order of a polygon or rasterized shape. More...
 
static Moments Moments (IEnumerable< Point > array, bool binaryImage=false)
 Calculates all of the moments up to the third order of a polygon or rasterized shape. More...
 
static Moments Moments (IEnumerable< Point2f > array, bool binaryImage=false)
 Calculates all of the moments up to the third order of a polygon or rasterized shape. More...
 
static void MatchTemplate (InputArray image, InputArray templ, OutputArray result, TemplateMatchModes method, InputArray mask=null)
 Computes the proximity map for the raster template and the image where the template is searched for More...
 
static int ConnectedComponents (InputArray image, OutputArray labels, PixelConnectivity connectivity=PixelConnectivity.Connectivity8)
 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. More...
 
static int ConnectedComponents (InputArray image, OutputArray labels, PixelConnectivity connectivity, MatType ltype)
 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. More...
 
static int ConnectedComponents (InputArray image, out int[,] labels, PixelConnectivity connectivity)
 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. More...
 
static int ConnectedComponentsWithStats (InputArray image, OutputArray labels, OutputArray stats, OutputArray centroids, PixelConnectivity connectivity=PixelConnectivity.Connectivity8)
 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. More...
 
static int ConnectedComponentsWithStats (InputArray image, OutputArray labels, OutputArray stats, OutputArray centroids, PixelConnectivity connectivity, MatType ltype)
 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. More...
 
static ConnectedComponents ConnectedComponentsEx (InputArray image, PixelConnectivity connectivity=PixelConnectivity.Connectivity8)
 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. More...
 
static void FindContours (InputOutputArray image, out Point[][] contours, out HierarchyIndex[] hierarchy, RetrievalModes mode, ContourApproximationModes method, Point? offset=null)
 Finds contours in a binary image. More...
 
static void FindContours (InputOutputArray image, out Mat[] contours, OutputArray hierarchy, RetrievalModes mode, ContourApproximationModes method, Point? offset=null)
 Finds contours in a binary image. More...
 
static Point [][] FindContoursAsArray (InputOutputArray image, RetrievalModes mode, ContourApproximationModes method, Point? offset=null)
 Finds contours in a binary image. More...
 
static MatOfPoint [] FindContoursAsMat (InputOutputArray image, RetrievalModes mode, ContourApproximationModes method, Point? offset=null)
 Finds contours in a binary image. More...
 
static void ApproxPolyDP (InputArray curve, OutputArray approxCurve, double epsilon, bool closed)
 Approximates contour or a curve using Douglas-Peucker algorithm More...
 
static Point [] ApproxPolyDP (IEnumerable< Point > curve, double epsilon, bool closed)
 Approximates contour or a curve using Douglas-Peucker algorithm More...
 
static Point2f [] ApproxPolyDP (IEnumerable< Point2f > curve, double epsilon, bool closed)
 Approximates contour or a curve using Douglas-Peucker algorithm More...
 
static double ArcLength (InputArray curve, bool closed)
 Calculates a contour perimeter or a curve length. More...
 
static double ArcLength (IEnumerable< Point > curve, bool closed)
 Calculates a contour perimeter or a curve length. More...
 
static double ArcLength (IEnumerable< Point2f > curve, bool closed)
 Calculates a contour perimeter or a curve length. More...
 
static Rect BoundingRect (InputArray curve)
 Calculates the up-right bounding rectangle of a point set. More...
 
static Rect BoundingRect (IEnumerable< Point > curve)
 Calculates the up-right bounding rectangle of a point set. More...
 
static Rect BoundingRect (IEnumerable< Point2f > curve)
 Calculates the up-right bounding rectangle of a point set. More...
 
static double ContourArea (InputArray contour, bool oriented=false)
 Calculates the contour area More...
 
static double ContourArea (IEnumerable< Point > contour, bool oriented=false)
 Calculates the contour area More...
 
static double ContourArea (IEnumerable< Point2f > contour, bool oriented=false)
 Calculates the contour area More...
 
static RotatedRect MinAreaRect (InputArray points)
 Finds the minimum area rotated rectangle enclosing a 2D point set. More...
 
static RotatedRect MinAreaRect (IEnumerable< Point > points)
 Finds the minimum area rotated rectangle enclosing a 2D point set. More...
 
static RotatedRect MinAreaRect (IEnumerable< Point2f > points)
 Finds the minimum area rotated rectangle enclosing a 2D point set. More...
 
static void MinEnclosingCircle (InputArray points, out Point2f center, out float radius)
 Finds the minimum area circle enclosing a 2D point set. More...
 
static void MinEnclosingCircle (IEnumerable< Point > points, out Point2f center, out float radius)
 Finds the minimum area circle enclosing a 2D point set. More...
 
static void MinEnclosingCircle (IEnumerable< Point2f > points, out Point2f center, out float radius)
 Finds the minimum area circle enclosing a 2D point set. More...
 
static double MatchShapes (InputArray contour1, InputArray contour2, ShapeMatchModes method, double parameter=0)
 matches two contours using one of the available algorithms More...
 
static double MatchShapes (IEnumerable< Point > contour1, IEnumerable< Point > contour2, ShapeMatchModes method, double parameter=0)
 matches two contours using one of the available algorithms More...
 
static void ConvexHull (InputArray points, OutputArray hull, bool clockwise=false, bool returnPoints=true)
 Computes convex hull for a set of 2D points. More...
 
static Point [] ConvexHull (IEnumerable< Point > points, bool clockwise=false)
 Computes convex hull for a set of 2D points. More...
 
static Point2f [] ConvexHull (IEnumerable< Point2f > points, bool clockwise=false)
 Computes convex hull for a set of 2D points. More...
 
static int [] ConvexHullIndices (IEnumerable< Point > points, bool clockwise=false)
 Computes convex hull for a set of 2D points. More...
 
static int [] ConvexHullIndices (IEnumerable< Point2f > points, bool clockwise=false)
 Computes convex hull for a set of 2D points. More...
 
static void ConvexityDefects (InputArray contour, InputArray convexHull, OutputArray convexityDefects)
 Computes the contour convexity defects More...
 
static Vec4i [] ConvexityDefects (IEnumerable< Point > contour, IEnumerable< int > convexHull)
 Computes the contour convexity defects More...
 
static Vec4i [] ConvexityDefects (IEnumerable< Point2f > contour, IEnumerable< int > convexHull)
 Computes the contour convexity defects More...
 
static bool IsContourConvex (InputArray contour)
 returns true if the contour is convex. Does not support contours with self-intersection More...
 
static bool IsContourConvex (IEnumerable< Point > contour)
 returns true if the contour is convex. Does not support contours with self-intersection More...
 
static bool IsContourConvex (IEnumerable< Point2f > contour)
 returns true if the contour is convex. D oes not support contours with self-intersection More...
 
static float IntersectConvexConvex (InputArray p1, InputArray p2, OutputArray p12, bool handleNested=true)
 finds intersection of two convex polygons More...
 
static float IntersectConvexConvex (IEnumerable< Point > p1, IEnumerable< Point > p2, out Point[] p12, bool handleNested=true)
 finds intersection of two convex polygons More...
 
static float IntersectConvexConvex (IEnumerable< Point2f > p1, IEnumerable< Point2f > p2, out Point2f[] p12, bool handleNested=true)
 finds intersection of two convex polygons More...
 
static RotatedRect FitEllipse (InputArray points)
 Fits ellipse to the set of 2D points. More...
 
static RotatedRect FitEllipse (IEnumerable< Point > points)
 Fits ellipse to the set of 2D points. More...
 
static RotatedRect FitEllipse (IEnumerable< Point2f > points)
 Fits ellipse to the set of 2D points. More...
 
static void FitLine (InputArray points, OutputArray line, DistanceTypes distType, double param, double reps, double aeps)
 Fits line to the set of 2D points using M-estimator algorithm More...
 
static Line2D FitLine (IEnumerable< Point > points, DistanceTypes distType, double param, double reps, double aeps)
 Fits line to the set of 2D points using M-estimator algorithm More...
 
static Line2D FitLine (IEnumerable< Point2f > points, DistanceTypes distType, double param, double reps, double aeps)
 Fits line to the set of 2D points using M-estimator algorithm More...
 
static Line3D FitLine (IEnumerable< Point3i > points, DistanceTypes distType, double param, double reps, double aeps)
 Fits line to the set of 3D points using M-estimator algorithm More...
 
static Line3D FitLine (IEnumerable< Point3f > points, DistanceTypes distType, double param, double reps, double aeps)
 Fits line to the set of 3D points using M-estimator algorithm More...
 
static double PointPolygonTest (InputArray contour, Point2f pt, bool measureDist)
 Checks if the point is inside the contour. Optionally computes the signed distance from the point to the contour boundary More...
 
static double PointPolygonTest (IEnumerable< Point > contour, Point2f pt, bool measureDist)
 Checks if the point is inside the contour. Optionally computes the signed distance from the point to the contour boundary More...
 
static double PointPolygonTest (IEnumerable< Point2f > contour, Point2f pt, bool measureDist)
 Checks if the point is inside the contour. Optionally computes the signed distance from the point to the contour boundary. More...
 
static RectanglesIntersectTypes RotatedRectangleIntersection (RotatedRect rect1, RotatedRect rect2, OutputArray intersectingRegion)
 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. More...
 
static RectanglesIntersectTypes RotatedRectangleIntersection (RotatedRect rect1, RotatedRect rect2, out Point2f[] intersectingRegion)
 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. More...
 
static void ApplyColorMap (InputArray src, OutputArray dst, ColormapTypes colormap)
 Applies a GNU Octave/MATLAB equivalent colormap on a given image. More...
 
static void Line (InputOutputArray img, int pt1X, int pt1Y, int pt2X, int pt2Y, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, int shift=0)
 Draws a line segment connecting two points More...
 
static void Line (InputOutputArray img, Point pt1, Point pt2, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, int shift=0)
 Draws a line segment connecting two points More...
 
static void ArrowedLine (InputOutputArray img, Point pt1, Point pt2, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, int shift=0, double tipLength=0.1)
 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. More...
 
static void Rectangle (InputOutputArray img, Point pt1, Point pt2, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, int shift=0)
 Draws simple, thick or filled rectangle More...
 
static void Rectangle (InputOutputArray img, Rect rect, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, int shift=0)
 Draws simple, thick or filled rectangle More...
 
static void Rectangle (Mat img, Point pt1, Point pt2, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, int shift=0)
 Draws simple, thick or filled rectangle More...
 
static void Rectangle (Mat img, Rect rect, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, int shift=0)
 Draws simple, thick or filled rectangle More...
 
static void Circle (InputOutputArray img, int centerX, int centerY, int radius, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, int shift=0)
 Draws a circle More...
 
static void Circle (InputOutputArray img, Point center, int radius, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, int shift=0)
 Draws a circle More...
 
static void Ellipse (InputOutputArray img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, int shift=0)
 Draws simple or thick elliptic arc or fills ellipse sector More...
 
static void Ellipse (InputOutputArray img, RotatedRect box, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8)
 Draws simple or thick elliptic arc or fills ellipse sector More...
 
static void FillConvexPoly (Mat img, IEnumerable< Point > pts, Scalar color, LineTypes lineType=LineTypes.Link8, int shift=0)
 Fills a convex polygon. More...
 
static void FillConvexPoly (InputOutputArray img, InputArray pts, Scalar color, LineTypes lineType=LineTypes.Link8, int shift=0)
 Fills a convex polygon. More...
 
static void FillPoly (Mat img, IEnumerable< IEnumerable< Point >> pts, Scalar color, LineTypes lineType=LineTypes.Link8, int shift=0, Point? offset=null)
 Fills the area bounded by one or more polygons More...
 
static void FillPoly (InputOutputArray img, InputArray pts, Scalar color, LineTypes lineType=LineTypes.Link8, int shift=0, Point? offset=null)
 Fills the area bounded by one or more polygons More...
 
static void Polylines (Mat img, IEnumerable< IEnumerable< Point >> pts, bool isClosed, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, int shift=0)
 draws one or more polygonal curves More...
 
static void Polylines (InputOutputArray img, InputArray pts, bool isClosed, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, int shift=0)
 draws one or more polygonal curves More...
 
static void DrawContours (InputOutputArray image, IEnumerable< IEnumerable< Point >> contours, int contourIdx, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, IEnumerable< HierarchyIndex > hierarchy=null, int maxLevel=Int32.MaxValue, Point? offset=null)
 draws contours in the image More...
 
static void DrawContours (InputOutputArray image, IEnumerable< Mat > contours, int contourIdx, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, Mat hierarchy=null, int maxLevel=Int32.MaxValue, Point? offset=null)
 draws contours in the image More...
 
static bool ClipLine (Size imgSize, ref Point pt1, ref Point pt2)
 Clips the line against the image rectangle More...
 
static bool ClipLine (Rect imgRect, ref Point pt1, ref Point pt2)
 Clips the line against the image rectangle More...
 
static Point [] Ellipse2Poly (Point center, Size axes, int angle, int arcStart, int arcEnd, int delta)
 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. More...
 
static void PutText (InputOutputArray img, string text, Point org, HersheyFonts fontFace, double fontScale, Scalar color, int thickness=1, LineTypes lineType=LineTypes.Link8, bool bottomLeftOrigin=false)
 renders text string in the image More...
 
static Size GetTextSize (string text, HersheyFonts fontFace, double fontScale, int thickness, out int baseLine)
 returns bounding box of the text string More...
 
static void GroupRectangles (IList< Rect > rectList, int groupThreshold, double eps=0.2)
 Groups the object candidate rectangles. More...
 
static void GroupRectangles (IList< Rect > rectList, out int[] weights, int groupThreshold, double eps=0.2)
 Groups the object candidate rectangles. More...
 
static void GroupRectangles (IList< Rect > rectList, int groupThreshold, double eps, out int[] weights, out double[] levelWeights)
 Groups the object candidate rectangles. More...
 
static void GroupRectangles (IList< Rect > rectList, out int[] rejectLevels, out double[] levelWeights, int groupThreshold, double eps=0.2)
 Groups the object candidate rectangles. More...
 
static void GroupRectanglesMeanshift (IList< Rect > rectList, out double[] foundWeights, out double[] foundScales, double detectThreshold=0.0, Size? winDetSize=null)
 
static void UpdateMotionHistory (InputArray silhouette, InputOutputArray mhi, double timestamp, double duration)
 Updates motion history image using the current silhouette More...
 
static void CalcMotionGradient (InputArray mhi, OutputArray mask, OutputArray orientation, double delta1, double delta2, int apertureSize=3)
 Computes the motion gradient orientation image from the motion history image More...
 
static double CalcGlobalOrientation (InputArray orientation, InputArray mask, InputArray mhi, double timestamp, double duration)
 Computes the global orientation of the selected motion history image part More...
 
static void SegmentMotion (InputArray mhi, OutputArray segmask, out Rect[] boundingRects, double timestamp, double segThresh)
 Splits a motion history image into a few parts corresponding to separate independent motions (for example, left hand, right hand). More...
 
static void CalcOpticalFlowSF (Mat from, Mat to, Mat flow, int layers, int averagingBlockSize, int maxFlow)
 computes dense optical flow using Simple Flow algorithm More...
 
static void calcOpticalFlowSF (Mat from, Mat to, Mat flow, int layers, int averagingBlockSize, int maxFlow, double sigmaDist, double sigmaColor, int postprocessWindow, double sigmaDistFix, double sigmaColorFix, double occThr, int upscaleAveragingRadius, double upscaleSigmaDist, double upscaleSigmaColor, double speedUpThr)
 computes dense optical flow using Simple Flow algorithm More...
 
static void Inpaint (InputArray src, InputArray inpaintMask, OutputArray dst, double inpaintRadius, InpaintMethod flags)
 restores the damaged image areas using one of the available intpainting algorithms More...
 
static void FastNlMeansDenoising (InputArray src, OutputArray dst, float h=3, int templateWindowSize=7, int searchWindowSize=21)
 Perform image denoising using Non-local Means Denoising algorithm with several computational optimizations. Noise expected to be a gaussian white noise More...
 
static void FastNlMeansDenoisingColored (InputArray src, OutputArray dst, float h=3, float hColor=3, int templateWindowSize=7, int searchWindowSize=21)
 Modification of fastNlMeansDenoising function for colored images More...
 
static void FastNlMeansDenoisingMulti (IEnumerable< InputArray > srcImgs, OutputArray dst, int imgToDenoiseIndex, int temporalWindowSize, float h=3, int templateWindowSize=7, int searchWindowSize=21)
 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. More...
 
static void FastNlMeansDenoisingMulti (IEnumerable< Mat > srcImgs, OutputArray dst, int imgToDenoiseIndex, int temporalWindowSize, float h=3, int templateWindowSize=7, int searchWindowSize=21)
 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. More...
 
static void FastNlMeansDenoisingColoredMulti (IEnumerable< InputArray > srcImgs, OutputArray dst, int imgToDenoiseIndex, int temporalWindowSize, float h=3, float hColor=3, int templateWindowSize=7, int searchWindowSize=21)
 Modification of fastNlMeansDenoisingMulti function for colored images sequences More...
 
static void FastNlMeansDenoisingColoredMulti (IEnumerable< Mat > srcImgs, OutputArray dst, int imgToDenoiseIndex, int temporalWindowSize, float h=3, float hColor=3, int templateWindowSize=7, int searchWindowSize=21)
 Modification of fastNlMeansDenoisingMulti function for colored images sequences More...
 
static void DenoiseTVL1 (IEnumerable< Mat > observations, Mat result, double lambda=1.0, int niters=30)
 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. More...
 
static void Decolor (InputArray src, OutputArray grayscale, OutputArray colorBoost)
 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 [CL12] . More...
 
static void SeamlessClone (InputArray src, InputArray dst, InputArray mask, Point p, OutputArray blend, SeamlessCloneMethods flags)
 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 [PM03] . More...
 
static void ColorChange (InputArray src, InputArray mask, OutputArray dst, float redMul=1.0f, float greenMul=1.0f, float blueMul=1.0f)
 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. More...
 
static void IlluminationChange (InputArray src, InputArray mask, OutputArray dst, float alpha=0.2f, float beta=0.4f)
 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. More...
 
static void TextureFlattening (InputArray src, InputArray mask, OutputArray dst, float lowThreshold=30, float highThreshold=45, int kernelSize=3)
 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. More...
 
static void EdgePreservingFilter (InputArray src, OutputArray dst, EdgePreservingMethods flags=EdgePreservingMethods.RecursFilter, float sigmaS=60, float sigmaR=0.4f)
 Filtering is the fundamental operation in image and video processing. Edge-preserving smoothing filters are used in many different applications [EM11] . More...
 
static void DetailEnhance (InputArray src, OutputArray dst, float sigmaS=10, float sigmaR=0.15f)
 This filter enhances the details of a particular image. More...
 
static void PencilSketch (InputArray src, OutputArray dst1, OutputArray dst2, float sigmaS=60, float sigmaR=0.07f, float shadeFactor=0.02f)
 Pencil-like non-photorealistic line drawing More...
 
static void Stylization (InputArray src, OutputArray dst, float sigmaS=60, float sigmaR=0.45f)
 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. More...
 
static FrameSource CreateFrameSource_Empty ()
 
static FrameSource CreateFrameSource_Video (string fileName)
 
static FrameSource CreateFrameSource_Video_CUDA (string fileName)
 
static FrameSource CreateFrameSource_Camera (int deviceId)
 
static SuperResolution CreateSuperResolution_BTVL1 ()
 Create Bilateral TV-L1 Super Resolution. More...
 
static SuperResolution CreateSuperResolution_BTVL1_CUDA ()
 Create Bilateral TV-L1 Super Resolution. More...
 
static SuperResolution CreateSuperResolution_BTVL1_OCL ()
 Create Bilateral TV-L1 Super Resolution. More...
 
static DenseOpticalFlowExt CreateOptFlow_Farneback ()
 
static DenseOpticalFlowExt CreateOptFlow_Farneback_GPU ()
 
static DenseOpticalFlowExt CreateOptFlow_Farneback_OCL ()
 
static DenseOpticalFlowExt CreateOptFlow_Simple ()
 
static DenseOpticalFlowExt CreateOptFlow_DualTVL1Ex ()
 
static DenseOpticalFlowExt CreateOptFlow_DualTVL1_GPU ()
 
static DenseOpticalFlowExt CreateOptFlow_DualTVL1_OCL ()
 
static DenseOpticalFlowExt CreateOptFlow_Brox_GPU ()
 
static DenseOpticalFlowExt CreateOptFlow_PyrLK_GPU ()
 
static DenseOpticalFlowExt CreateOptFlow_PyrLK_OCL ()
 
static RotatedRect CamShift (InputArray probImage, ref Rect window, TermCriteria criteria)
 Finds an object center, size, and orientation. More...
 
static int MeanShift (InputArray probImage, ref Rect window, TermCriteria criteria)
 Finds an object on a back projection image. More...
 
static int BuildOpticalFlowPyramid (InputArray img, OutputArray pyramid, Size winSize, int maxLevel, bool withDerivatives=true, BorderTypes pyrBorder=BorderTypes.Reflect101, BorderTypes derivBorder=BorderTypes.Constant, bool tryReuseInputImage=true)
 Constructs a pyramid which can be used as input for calcOpticalFlowPyrLK More...
 
static int BuildOpticalFlowPyramid (InputArray img, out Mat[] pyramid, Size winSize, int maxLevel, bool withDerivatives=true, BorderTypes pyrBorder=BorderTypes.Reflect101, BorderTypes derivBorder=BorderTypes.Constant, bool tryReuseInputImage=true)
 Constructs a pyramid which can be used as input for calcOpticalFlowPyrLK More...
 
static void CalcOpticalFlowPyrLK (InputArray prevImg, InputArray nextImg, InputArray prevPts, InputOutputArray nextPts, OutputArray status, OutputArray err, Size? winSize=null, int maxLevel=3, TermCriteria? criteria=null, OpticalFlowFlags flags=OpticalFlowFlags.None, double minEigThreshold=1e-4)
 computes sparse optical flow using multi-scale Lucas-Kanade algorithm More...
 
static void CalcOpticalFlowPyrLK (InputArray prevImg, InputArray nextImg, Point2f[] prevPts, ref Point2f[] nextPts, out byte[] status, out float[] err, Size? winSize=null, int maxLevel=3, TermCriteria? criteria=null, OpticalFlowFlags flags=OpticalFlowFlags.None, double minEigThreshold=1e-4)
 computes sparse optical flow using multi-scale Lucas-Kanade algorithm More...
 
static void CalcOpticalFlowFarneback (InputArray prev, InputArray next, InputOutputArray flow, double pyrScale, int levels, int winsize, int iterations, int polyN, double polySigma, OpticalFlowFlags flags)
 Computes a dense optical flow using the Gunnar Farneback's algorithm. More...
 
static Mat EstimateRigidTransform (InputArray src, InputArray dst, bool fullAffine)
 Estimates the best-fit Euqcidean, similarity, affine or perspective transformation that maps one 2D point set to another or one image to another. More...
 
static DenseOpticalFlow CreateOptFlow_DualTVL1 ()
 Implementation of the Zach, Pock and Bischof Dual TV-L1 Optical Flow method More...
 
static void BalanceWhite (InputArray src, OutputArray dst)
 

Public Attributes

const double PI = 3.1415926535897932384626433832795
 The ratio of a circle's circumference to its diameter More...
 
const double LOG2 = 0.69314718055994530941723212145818
 

Detailed Description

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

Member Function Documentation

§ Abs() [1/2]

static MatExpr OpenCvSharp.Cv2.Abs ( Mat  src)
static

Computes absolute value of each matrix element

Parameters
srcmatrix
Returns

§ Abs() [2/2]

static MatExpr OpenCvSharp.Cv2.Abs ( MatExpr  src)
static

Computes absolute value of each matrix element

Parameters
srcmatrix expression
Returns

§ Absdiff()

static void OpenCvSharp.Cv2.Absdiff ( InputArray  src1,
InputArray  src2,
OutputArray  dst 
)
static

computes element-wise absolute difference of two arrays (dst = abs(src1 - src2))

Parameters
src1
src2
dst

§ Accumulate()

static void OpenCvSharp.Cv2.Accumulate ( InputArray  src,
InputOutputArray  dst,
InputArray  mask 
)
static

Adds an image to the accumulator.

Parameters
srcInput image as 1- or 3-channel, 8-bit or 32-bit floating point.
dstAccumulator image with the same number of channels as input image, 32-bit or 64-bit floating-point.
maskOptional operation mask.

§ AccumulateProduct()

static void OpenCvSharp.Cv2.AccumulateProduct ( InputArray  src1,
InputArray  src2,
InputOutputArray  dst,
InputArray  mask 
)
static

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

Parameters
src1First input image, 1- or 3-channel, 8-bit or 32-bit floating point.
src2Second input image of the same type and the same size as src1
dstAccumulator with the same number of channels as input images, 32-bit or 64-bit floating-point.
maskOptional operation mask.

§ AccumulateSquare()

static void OpenCvSharp.Cv2.AccumulateSquare ( InputArray  src,
InputOutputArray  dst,
InputArray  mask 
)
static

Adds the square of a source image to the accumulator.

Parameters
srcInput image as 1- or 3-channel, 8-bit or 32-bit floating point.
dstAccumulator image with the same number of channels as input image, 32-bit or 64-bit floating-point.
maskOptional operation mask.

§ AccumulateWeighted()

static void OpenCvSharp.Cv2.AccumulateWeighted ( InputArray  src,
InputOutputArray  dst,
double  alpha,
InputArray  mask 
)
static

Updates a running average.

Parameters
srcInput image as 1- or 3-channel, 8-bit or 32-bit floating point.
dstAccumulator image with the same number of channels as input image, 32-bit or 64-bit floating-point.
alphaWeight of the input image.
maskOptional operation mask.

§ AdaptiveThreshold()

static void OpenCvSharp.Cv2.AdaptiveThreshold ( InputArray  src,
OutputArray  dst,
double  maxValue,
AdaptiveThresholdTypes  adaptiveMethod,
ThresholdTypes  thresholdType,
int  blockSize,
double  c 
)
static

Applies an adaptive threshold to an array.

Parameters
srcSource 8-bit single-channel image.
dstDestination image of the same size and the same type as src .
maxValueNon-zero value assigned to the pixels for which the condition is satisfied. See the details below.
adaptiveMethodAdaptive thresholding algorithm to use, ADAPTIVE_THRESH_MEAN_C or ADAPTIVE_THRESH_GAUSSIAN_C .
thresholdTypeThresholding type that must be either THRESH_BINARY or THRESH_BINARY_INV .
blockSizeSize of a pixel neighborhood that is used to calculate a threshold value for the pixel: 3, 5, 7, and so on.
cConstant subtracted from the mean or weighted mean (see the details below). Normally, it is positive but may be zero or negative as well.

§ Add()

static void OpenCvSharp.Cv2.Add ( InputArray  src1,
InputArray  src2,
OutputArray  dst,
InputArray  mask = null,
int  dtype = -1 
)
static

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

Parameters
src1The first source array
src2The second source array. It must have the same size and same type as src1
dstThe destination array; it will have the same size and same type as src1
maskThe optional operation mask, 8-bit single channel array; specifies elements of the destination array to be changed. [By default this is null]
dtype

§ AddWeighted()

static void OpenCvSharp.Cv2.AddWeighted ( InputArray  src1,
double  alpha,
InputArray  src2,
double  beta,
double  gamma,
OutputArray  dst,
int  dtype = -1 
)
static

computes weighted sum of two arrays (dst = alpha*src1 + beta*src2 + gamma)

Parameters
src1
alpha
src2
beta
gamma
dst
dtype

§ AGAST()

static KeyPoint [] OpenCvSharp.Cv2.AGAST ( InputArray  image,
int  threshold,
bool  nonmaxSuppression,
AGASTType  type 
)
static

Detects corners using the AGAST algorithm

Parameters
imagegrayscale image where keypoints (corners) are detected.
thresholdthreshold on difference between intensity of the central pixel and pixels of a circle around this pixel.
nonmaxSuppressionif true, non-maximum suppression is applied to detected corners (keypoints).
typeone of the four neighborhoods as defined in the paper
Returns
keypoints detected on the image.

§ AlignSize()

static int OpenCvSharp.Cv2.AlignSize ( int  sz,
int  n 
)
static

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.

Parameters
sz
n
Returns

§ ApplyColorMap()

static void OpenCvSharp.Cv2.ApplyColorMap ( InputArray  src,
OutputArray  dst,
ColormapTypes  colormap 
)
static

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

Parameters
src
dst
colormap

§ ApproxPolyDP() [1/3]

static void OpenCvSharp.Cv2.ApproxPolyDP ( InputArray  curve,
OutputArray  approxCurve,
double  epsilon,
bool  closed 
)
static

Approximates contour or a curve using Douglas-Peucker algorithm

Parameters
curveThe polygon or curve to approximate. Must be 1 x N or N x 1 matrix of type CV_32SC2 or CV_32FC2.
approxCurveThe result of the approximation; The type should match the type of the input curve
epsilonSpecifies the approximation accuracy. This is the maximum distance between the original curve and its approximation.
closedThe result of the approximation; The type should match the type of the input curve

§ ApproxPolyDP() [2/3]

static Point [] OpenCvSharp.Cv2.ApproxPolyDP ( IEnumerable< Point curve,
double  epsilon,
bool  closed 
)
static

Approximates contour or a curve using Douglas-Peucker algorithm

Parameters
curveThe polygon or curve to approximate.
epsilonSpecifies the approximation accuracy. This is the maximum distance between the original curve and its approximation.
closedThe result of the approximation; The type should match the type of the input curve
Returns
The result of the approximation; The type should match the type of the input curve

§ ApproxPolyDP() [3/3]

static Point2f [] OpenCvSharp.Cv2.ApproxPolyDP ( IEnumerable< Point2f curve,
double  epsilon,
bool  closed 
)
static

Approximates contour or a curve using Douglas-Peucker algorithm

Parameters
curveThe polygon or curve to approximate.
epsilonSpecifies the approximation accuracy. This is the maximum distance between the original curve and its approximation.
closedIf true, the approximated curve is closed (i.e. its first and last vertices are connected), otherwise it’s not
Returns
The result of the approximation; The type should match the type of the input curve

§ ArcLength() [1/3]

static double OpenCvSharp.Cv2.ArcLength ( InputArray  curve,
bool  closed 
)
static

Calculates a contour perimeter or a curve length.

Parameters
curveThe input vector of 2D points, represented by CV_32SC2 or CV_32FC2 matrix.
closedIndicates, whether the curve is closed or not.
Returns

§ ArcLength() [2/3]

static double OpenCvSharp.Cv2.ArcLength ( IEnumerable< Point curve,
bool  closed 
)
static

Calculates a contour perimeter or a curve length.

Parameters
curveThe input vector of 2D points.
closedIndicates, whether the curve is closed or not.
Returns

§ ArcLength() [3/3]

static double OpenCvSharp.Cv2.ArcLength ( IEnumerable< Point2f curve,
bool  closed 
)
static

Calculates a contour perimeter or a curve length.

Parameters
curveThe input vector of 2D points.
closedIndicates, whether the curve is closed or not.
Returns

§ ArrowedLine()

static void OpenCvSharp.Cv2.ArrowedLine ( InputOutputArray  img,
Point  pt1,
Point  pt2,
Scalar  color,
int  thickness = 1,
LineTypes  lineType = LineTypes.Link8,
int  shift = 0,
double  tipLength = 0.1 
)
static

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.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
lineTypeType of the line, see cv::LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

§ BalanceWhite()

static void OpenCvSharp.Cv2.BalanceWhite ( InputArray  src,
OutputArray  dst 
)
static

§ BatchDistance()

static void OpenCvSharp.Cv2.BatchDistance ( InputArray  src1,
InputArray  src2,
OutputArray  dist,
int  dtype,
OutputArray  nidx,
NormTypes  normType = NormTypes.L2,
int  k = 0,
InputArray  mask = null,
int  update = 0,
bool  crosscheck = false 
)
static

naive nearest neighbor finder

Parameters
src1
src2
dist
dtype
nidx
normType
k
mask
update
crosscheck

§ BilateralFilter()

static void OpenCvSharp.Cv2.BilateralFilter ( InputArray  src,
OutputArray  dst,
int  d,
double  sigmaColor,
double  sigmaSpace,
BorderTypes  borderType = BorderTypes.Default 
)
static

Applies bilateral filter to the image

Parameters
srcThe source 8-bit or floating-point, 1-channel or 3-channel image
dstThe destination image; will have the same size and the same type as src
dThe diameter of each pixel neighborhood, that is used during filtering. If it is non-positive, it's computed from sigmaSpace
sigmaColorFilter sigma in the color space. Larger value of the parameter means that farther colors within the pixel neighborhood will be mixed together, resulting in larger areas of semi-equal color
sigmaSpaceFilter sigma in the coordinate space. Larger value of the parameter means that farther pixels will influence each other (as long as their colors are close enough; see sigmaColor). Then d>0 , it specifies the neighborhood size regardless of sigmaSpace, otherwise d is proportional to sigmaSpace
borderType

§ BitwiseAnd()

static void OpenCvSharp.Cv2.BitwiseAnd ( InputArray  src1,
InputArray  src2,
OutputArray  dst,
InputArray  mask = null 
)
static

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

Parameters
src1
src2
dst
mask

§ BitwiseNot()

static void OpenCvSharp.Cv2.BitwiseNot ( InputArray  src,
OutputArray  dst,
InputArray  mask = null 
)
static

inverts each bit of array (dst = ~src)

Parameters
src
dst
mask

§ BitwiseOr()

static void OpenCvSharp.Cv2.BitwiseOr ( InputArray  src1,
InputArray  src2,
OutputArray  dst,
InputArray  mask = null 
)
static

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

Parameters
src1
src2
dst
mask

§ BitwiseXor()

static void OpenCvSharp.Cv2.BitwiseXor ( InputArray  src1,
InputArray  src2,
OutputArray  dst,
InputArray  mask = null 
)
static

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

Parameters
src1
src2
dst
mask

§ Blur()

static void OpenCvSharp.Cv2.Blur ( InputArray  src,
OutputArray  dst,
Size  ksize,
Point anchor = null,
BorderTypes  borderType = BorderTypes.Default 
)
static

Smoothes image using normalized box filter

Parameters
srcThe source image
dstThe destination image; will have the same size and the same type as src
ksizeThe smoothing kernel size
anchorThe anchor point. The default value Point(-1,-1) means that the anchor is at the kernel center
borderTypeThe border mode used to extrapolate pixels outside of the image

§ BoundingRect() [1/3]

static Rect OpenCvSharp.Cv2.BoundingRect ( InputArray  curve)
static

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

Parameters
curveThe input 2D point set, represented by CV_32SC2 or CV_32FC2 matrix.
Returns
Minimal up-right bounding rectangle for the specified point set.

§ BoundingRect() [2/3]

static Rect OpenCvSharp.Cv2.BoundingRect ( IEnumerable< Point curve)
static

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

Parameters
curveThe input 2D point set, represented by CV_32SC2 or CV_32FC2 matrix.
Returns
Minimal up-right bounding rectangle for the specified point set.

§ BoundingRect() [3/3]

static Rect OpenCvSharp.Cv2.BoundingRect ( IEnumerable< Point2f curve)
static

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

Parameters
curveThe input 2D point set, represented by CV_32SC2 or CV_32FC2 matrix.
Returns
Minimal up-right bounding rectangle for the specified point set.

§ BoxFilter()

static void OpenCvSharp.Cv2.BoxFilter ( InputArray  src,
OutputArray  dst,
MatType  ddepth,
Size  ksize,
Point anchor = null,
bool  normalize = true,
BorderTypes  borderType = BorderTypes.Default 
)
static

Smoothes image using box filter

Parameters
srcThe source image
dstThe destination image; will have the same size and the same type as src
ddepth
ksizeThe smoothing kernel size
anchorThe anchor point. The default value Point(-1,-1) means that the anchor is at the kernel center
normalizeIndicates, whether the kernel is normalized by its area or not
borderTypeThe border mode used to extrapolate pixels outside of the image

§ BuildOpticalFlowPyramid() [1/2]

static int OpenCvSharp.Cv2.BuildOpticalFlowPyramid ( InputArray  img,
OutputArray  pyramid,
Size  winSize,
int  maxLevel,
bool  withDerivatives = true,
BorderTypes  pyrBorder = BorderTypes.Reflect101,
BorderTypes  derivBorder = BorderTypes.Constant,
bool  tryReuseInputImage = true 
)
static

Constructs a pyramid which can be used as input for calcOpticalFlowPyrLK

Parameters
img8-bit input image.
pyramidoutput pyramid.
winSizewindow size of optical flow algorithm. Must be not less than winSize argument of calcOpticalFlowPyrLK(). It is needed to calculate required padding for pyramid levels.
maxLevel0-based maximal pyramid level number.
withDerivativesset to precompute gradients for the every pyramid level. If pyramid is constructed without the gradients then calcOpticalFlowPyrLK() will calculate them internally.
pyrBorderthe border mode for pyramid layers.
derivBorderthe border mode for gradients.
tryReuseInputImageput ROI of input image into the pyramid if possible. You can pass false to force data copying.
Returns
number of levels in constructed pyramid. Can be less than maxLevel.

§ BuildOpticalFlowPyramid() [2/2]

static int OpenCvSharp.Cv2.BuildOpticalFlowPyramid ( InputArray  img,
out Mat []  pyramid,
Size  winSize,
int  maxLevel,
bool  withDerivatives = true,
BorderTypes  pyrBorder = BorderTypes.Reflect101,
BorderTypes  derivBorder = BorderTypes.Constant,
bool  tryReuseInputImage = true 
)
static

Constructs a pyramid which can be used as input for calcOpticalFlowPyrLK

Parameters
img8-bit input image.
pyramidoutput pyramid.
winSizewindow size of optical flow algorithm. Must be not less than winSize argument of calcOpticalFlowPyrLK(). It is needed to calculate required padding for pyramid levels.
maxLevel0-based maximal pyramid level number.
withDerivativesset to precompute gradients for the every pyramid level. If pyramid is constructed without the gradients then calcOpticalFlowPyrLK() will calculate them internally.
pyrBorderthe border mode for pyramid layers.
derivBorderthe border mode for gradients.
tryReuseInputImageput ROI of input image into the pyramid if possible. You can pass false to force data copying.
Returns
number of levels in constructed pyramid. Can be less than maxLevel.

§ CalcBackProject()

static void OpenCvSharp.Cv2.CalcBackProject ( Mat []  images,
int []  channels,
InputArray  hist,
OutputArray  backProject,
Rangef []  ranges,
bool  uniform = true 
)
static

computes the joint dense histogram for a set of images.

Parameters
images
channels
hist
backProject
ranges
uniform

§ CalcCovarMatrix() [1/4]

static void OpenCvSharp.Cv2.CalcCovarMatrix ( Mat []  samples,
Mat  covar,
Mat  mean,
CovarFlags  flags 
)
static

computes covariation matrix of a set of samples

Parameters
samples
covar
mean
flags

§ CalcCovarMatrix() [2/4]

static void OpenCvSharp.Cv2.CalcCovarMatrix ( Mat []  samples,
Mat  covar,
Mat  mean,
CovarFlags  flags,
MatType  ctype 
)
static

computes covariation matrix of a set of samples

Parameters
samples
covar
mean
flags
ctype

§ CalcCovarMatrix() [3/4]

static void OpenCvSharp.Cv2.CalcCovarMatrix ( InputArray  samples,
OutputArray  covar,
InputOutputArray  mean,
CovarFlags  flags 
)
static

computes covariation matrix of a set of samples

Parameters
samples
covar
mean
flags

§ CalcCovarMatrix() [4/4]

static void OpenCvSharp.Cv2.CalcCovarMatrix ( InputArray  samples,
OutputArray  covar,
InputOutputArray  mean,
CovarFlags  flags,
MatType  ctype 
)
static

computes covariation matrix of a set of samples

Parameters
samples
covar
mean
flags
ctype

§ CalcGlobalOrientation()

static double OpenCvSharp.Cv2.CalcGlobalOrientation ( InputArray  orientation,
InputArray  mask,
InputArray  mhi,
double  timestamp,
double  duration 
)
static

Computes the global orientation of the selected motion history image part

Parameters
orientationMotion gradient orientation image calculated by the function CalcMotionGradient() .
maskMask image. It may be a conjunction of a valid gradient mask, also calculated by CalcMotionGradient() , and the mask of a region whose direction needs to be calculated.
mhiMotion history image calculated by UpdateMotionHistory() .
timestampTimestamp passed to UpdateMotionHistory() .
durationMaximum duration of a motion track in milliseconds, passed to UpdateMotionHistory() .
Returns

§ CalcHist() [1/2]

static void OpenCvSharp.Cv2.CalcHist ( Mat []  images,
int []  channels,
InputArray  mask,
OutputArray  hist,
int  dims,
int []  histSize,
Rangef []  ranges,
bool  uniform = true,
bool  accumulate = false 
)
static

computes the joint dense histogram for a set of images.

Parameters
images
channels
mask
hist
dims
histSize
ranges
uniform
accumulate

§ CalcHist() [2/2]

static void OpenCvSharp.Cv2.CalcHist ( Mat []  images,
int []  channels,
InputArray  mask,
OutputArray  hist,
int  dims,
int []  histSize,
float  ranges[][],
bool  uniform = true,
bool  accumulate = false 
)
static

computes the joint dense histogram for a set of images.

Parameters
images
channels
mask
hist
dims
histSize
ranges
uniform
accumulate

§ CalcMotionGradient()

static void OpenCvSharp.Cv2.CalcMotionGradient ( InputArray  mhi,
OutputArray  mask,
OutputArray  orientation,
double  delta1,
double  delta2,
int  apertureSize = 3 
)
static

Computes the motion gradient orientation image from the motion history image

Parameters
mhiMotion history single-channel floating-point image.
maskOutput mask image that has the type CV_8UC1 and the same size as mhi. Its non-zero elements mark pixels where the motion gradient data is correct.
orientationOutput motion gradient orientation image that has the same type and the same size as mhi. Each pixel of the image is a motion orientation, from 0 to 360 degrees.
delta1Minimal (or maximal) allowed difference between mhi values within a pixel neighborhood.
delta2Maximal (or minimal) allowed difference between mhi values within a pixel neighborhood. That is, the function finds the minimum ( m(x,y) ) and maximum ( M(x,y) ) mhi values over 3x3 neighborhood of each pixel and marks the motion orientation at (x, y) as valid only if: min(delta1, delta2) <= M(x,y)-m(x,y) <= max(delta1, delta2).
apertureSize

§ CalcOpticalFlowFarneback()

static void OpenCvSharp.Cv2.CalcOpticalFlowFarneback ( InputArray  prev,
InputArray  next,
InputOutputArray  flow,
double  pyrScale,
int  levels,
int  winsize,
int  iterations,
int  polyN,
double  polySigma,
OpticalFlowFlags  flags 
)
static

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

Parameters
prevfirst 8-bit single-channel input image.
nextsecond input image of the same size and the same type as prev.
flowcomputed flow image that has the same size as prev and type CV_32FC2.
pyrScaleparameter, specifying the image scale (<1) to build pyramids for each image; pyrScale=0.5 means a classical pyramid, where each next layer is twice smaller than the previous one.
levelsnumber of pyramid layers including the initial image; levels=1 means that no extra layers are created and only the original images are used.
winsizeaveraging window size; larger values increase the algorithm robustness to image noise and give more chances for fast motion detection, but yield more blurred motion field.
iterationsnumber of iterations the algorithm does at each pyramid level.
polyNsize of the pixel neighborhood used to find polynomial expansion in each pixel; larger values mean that the image will be approximated with smoother surfaces, yielding more robust algorithm and more blurred motion field, typically poly_n =5 or 7.
polySigmastandard deviation of the Gaussian that is used to smooth derivatives used as a basis for the polynomial expansion; for polyN=5, you can set polySigma=1.1, for polyN=7, a good value would be polySigma=1.5.
flagsoperation flags that can be a combination of OPTFLOW_USE_INITIAL_FLOW and/or OPTFLOW_FARNEBACK_GAUSSIAN

§ CalcOpticalFlowPyrLK() [1/2]

static void OpenCvSharp.Cv2.CalcOpticalFlowPyrLK ( InputArray  prevImg,
InputArray  nextImg,
InputArray  prevPts,
InputOutputArray  nextPts,
OutputArray  status,
OutputArray  err,
Size winSize = null,
int  maxLevel = 3,
TermCriteria criteria = null,
OpticalFlowFlags  flags = OpticalFlowFlags.None,
double  minEigThreshold = 1e-4 
)
static

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

Parameters
prevImg
nextImg
prevPts
nextPts
status
err
winSize
maxLevel
criteria
flags
minEigThreshold

§ CalcOpticalFlowPyrLK() [2/2]

static void OpenCvSharp.Cv2.CalcOpticalFlowPyrLK ( InputArray  prevImg,
InputArray  nextImg,
Point2f []  prevPts,
ref Point2f []  nextPts,
out byte []  status,
out float []  err,
Size winSize = null,
int  maxLevel = 3,
TermCriteria criteria = null,
OpticalFlowFlags  flags = OpticalFlowFlags.None,
double  minEigThreshold = 1e-4 
)
static

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

Parameters
prevImg
nextImg
prevPts
nextPts
status
err
winSize
maxLevel
criteria
flags
minEigThreshold

§ CalcOpticalFlowSF()

static void OpenCvSharp.Cv2.CalcOpticalFlowSF ( Mat  from,
Mat  to,
Mat  flow,
int  layers,
int  averagingBlockSize,
int  maxFlow 
)
static

computes dense optical flow using Simple Flow algorithm

Parameters
fromFirst 8-bit 3-channel image.
toSecond 8-bit 3-channel image
flowEstimated flow
layersNumber of layers
averagingBlockSizeSize of block through which we sum up when calculate cost function for pixel
maxFlowmaximal flow that we search at each level

§ calcOpticalFlowSF()

static void OpenCvSharp.Cv2.calcOpticalFlowSF ( Mat  from,
Mat  to,
Mat  flow,
int  layers,
int  averagingBlockSize,
int  maxFlow,
double  sigmaDist,
double  sigmaColor,
int  postprocessWindow,
double  sigmaDistFix,
double  sigmaColorFix,
double  occThr,
int  upscaleAveragingRadius,
double  upscaleSigmaDist,
double  upscaleSigmaColor,
double  speedUpThr 
)
static

computes dense optical flow using Simple Flow algorithm

Parameters
fromFirst 8-bit 3-channel image.
toSecond 8-bit 3-channel image
flowEstimated flow
layersNumber of layers
averagingBlockSizeSize of block through which we sum up when calculate cost function for pixel
maxFlowmaximal flow that we search at each level
sigmaDistvector smooth spatial sigma parameter
sigmaColorvector smooth color sigma parameter
postprocessWindowwindow size for postprocess cross bilateral filter
sigmaDistFixspatial sigma for postprocess cross bilateralf filter
sigmaColorFixcolor sigma for postprocess cross bilateral filter
occThrthreshold for detecting occlusions
upscaleAveragingRadiuswindow size for bilateral upscale operation
upscaleSigmaDistspatial sigma for bilateral upscale operation
upscaleSigmaColorcolor sigma for bilateral upscale operation
speedUpThrthreshold to detect point with irregular flow - where flow should be recalculated after upscale

§ CalibrateCamera() [1/2]

static double OpenCvSharp.Cv2.CalibrateCamera ( IEnumerable< Mat objectPoints,
IEnumerable< Mat imagePoints,
Size  imageSize,
InputOutputArray  cameraMatrix,
InputOutputArray  distCoeffs,
out Mat []  rvecs,
out Mat []  tvecs,
CalibrationFlags  flags = CalibrationFlags.None,
TermCriteria criteria = null 
)
static

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

Parameters
objectPointsIn the new interface it is a vector of vectors of calibration pattern points in the calibration pattern coordinate space. The outer vector contains as many elements as the number of the pattern views. If the same calibration pattern is shown in each view and it is fully visible, all the vectors will be the same. Although, it is possible to use partially occluded patterns, or even different patterns in different views. Then, the vectors will be different. The points are 3D, but since they are in a pattern coordinate system, then, if the rig is planar, it may make sense to put the model to a XY coordinate plane so that Z-coordinate of each input object point is 0. In the old interface all the vectors of object points from different views are concatenated together.
imagePointsIn the new interface it is a vector of vectors of the projections of calibration pattern points. imagePoints.Count() and objectPoints.Count() and imagePoints[i].Count() must be equal to objectPoints[i].Count() for each i.
imageSizeSize of the image used only to initialize the intrinsic camera matrix.
cameraMatrixOutput 3x3 floating-point camera matrix. If CV_CALIB_USE_INTRINSIC_GUESS and/or CV_CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
distCoeffsOutput vector of distortion coefficients (k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]) of 4, 5, or 8 elements.
rvecsOutput vector of rotation vectors (see Rodrigues() ) estimated for each pattern view. That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the calibration pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. M -1)
tvecsOutput vector of translation vectors estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the CalibrationFlag values
criteriaTermination criteria for the iterative optimization algorithm.
Returns

§ CalibrateCamera() [2/2]

static double OpenCvSharp.Cv2.CalibrateCamera ( IEnumerable< IEnumerable< Point3f >>  objectPoints,
IEnumerable< IEnumerable< Point2f >>  imagePoints,
Size  imageSize,
double  cameraMatrix[,],
double []  distCoeffs,
out Vec3d []  rvecs,
out Vec3d []  tvecs,
CalibrationFlags  flags = CalibrationFlags.None,
TermCriteria criteria = null 
)
static

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

Parameters
objectPointsIn the new interface it is a vector of vectors of calibration pattern points in the calibration pattern coordinate space. The outer vector contains as many elements as the number of the pattern views. If the same calibration pattern is shown in each view and it is fully visible, all the vectors will be the same. Although, it is possible to use partially occluded patterns, or even different patterns in different views. Then, the vectors will be different. The points are 3D, but since they are in a pattern coordinate system, then, if the rig is planar, it may make sense to put the model to a XY coordinate plane so that Z-coordinate of each input object point is 0. In the old interface all the vectors of object points from different views are concatenated together.
imagePointsIn the new interface it is a vector of vectors of the projections of calibration pattern points. imagePoints.Count() and objectPoints.Count() and imagePoints[i].Count() must be equal to objectPoints[i].Count() for each i.
imageSizeSize of the image used only to initialize the intrinsic camera matrix.
cameraMatrixOutput 3x3 floating-point camera matrix. If CV_CALIB_USE_INTRINSIC_GUESS and/or CV_CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
distCoeffsOutput vector of distortion coefficients (k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]) of 4, 5, or 8 elements.
rvecsOutput vector of rotation vectors (see Rodrigues() ) estimated for each pattern view. That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the calibration pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. M -1)
tvecsOutput vector of translation vectors estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the CalibrationFlag values
criteriaTermination criteria for the iterative optimization algorithm.
Returns

§ CalibrationMatrixValues() [1/2]

static void OpenCvSharp.Cv2.CalibrationMatrixValues ( InputArray  cameraMatrix,
Size  imageSize,
double  apertureWidth,
double  apertureHeight,
out double  fovx,
out double  fovy,
out double  focalLength,
out Point2d  principalPoint,
out double  aspectRatio 
)
static

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

Parameters
cameraMatrixInput camera matrix that can be estimated by calibrateCamera() or stereoCalibrate() .
imageSizeInput image size in pixels.
apertureWidthPhysical width of the sensor.
apertureHeightPhysical height of the sensor.
fovxOutput field of view in degrees along the horizontal sensor axis.
fovyOutput field of view in degrees along the vertical sensor axis.
focalLengthFocal length of the lens in mm.
principalPointPrincipal point in pixels.
aspectRatiofy / fx

§ CalibrationMatrixValues() [2/2]

static void OpenCvSharp.Cv2.CalibrationMatrixValues ( double  cameraMatrix[,],
Size  imageSize,
double  apertureWidth,
double  apertureHeight,
out double  fovx,
out double  fovy,
out double  focalLength,
out Point2d  principalPoint,
out double  aspectRatio 
)
static

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

Parameters
cameraMatrixInput camera matrix that can be estimated by calibrateCamera() or stereoCalibrate() .
imageSizeInput image size in pixels.
apertureWidthPhysical width of the sensor.
apertureHeightPhysical height of the sensor.
fovxOutput field of view in degrees along the horizontal sensor axis.
fovyOutput field of view in degrees along the vertical sensor axis.
focalLengthFocal length of the lens in mm.
principalPointPrincipal point in pixels.
aspectRatiofy / fx

§ CamShift()

static RotatedRect OpenCvSharp.Cv2.CamShift ( InputArray  probImage,
ref Rect  window,
TermCriteria  criteria 
)
static

Finds an object center, size, and orientation.

Parameters
probImageBack projection of the object histogram.
windowInitial search window.
criteriaStop criteria for the underlying MeanShift() .
Returns

§ Canny()

static void OpenCvSharp.Cv2.Canny ( InputArray  src,
OutputArray  edges,
double  threshold1,
double  threshold2,
int  apertureSize = 3,
bool  L2gradient = false 
)
static

Finds edges in an image using Canny algorithm.

Parameters
srcSingle-channel 8-bit input image
edgesThe output edge map. It will have the same size and the same type as image
threshold1The first threshold for the hysteresis procedure
threshold2The second threshold for the hysteresis procedure
apertureSizeAperture size for the Sobel operator [By default this is ApertureSize.Size3]
L2gradientIndicates, whether the more accurate L2 norm should be used to compute the image gradient magnitude (true), or a faster default L1 norm is enough (false). [By default this is false]

§ CartToPolar()

static void OpenCvSharp.Cv2.CartToPolar ( InputArray  x,
InputArray  y,
OutputArray  magnitude,
OutputArray  angle,
bool  angleInDegrees = false 
)
static

converts Cartesian coordinates to polar

Parameters
x
y
magnitude
angle
angleInDegrees

§ CheckHardwareSupport()

static bool OpenCvSharp.Cv2.CheckHardwareSupport ( CpuFeatures  feature)
static

Parameters
feature
Returns

§ CheckRange() [1/2]

static bool OpenCvSharp.Cv2.CheckRange ( InputArray  src,
bool  quiet = true 
)
static

checks that each matrix element is within the specified range.

Parameters
srcThe array to check
quietThe flag indicating whether the functions quietly return false when the array elements are out of range, or they throw an exception.
Returns

§ CheckRange() [2/2]

static bool OpenCvSharp.Cv2.CheckRange ( InputArray  src,
bool  quiet,
out Point  pos,
double  minVal = double.MinValue,
double  maxVal = double.MaxValue 
)
static

checks that each matrix element is within the specified range.

Parameters
srcThe array to check
quietThe flag indicating whether the functions quietly return false when the array elements are out of range, or they throw an exception.
posThe optional output parameter, where the position of the first outlier is stored.
minValThe inclusive lower boundary of valid values range
maxValThe exclusive upper boundary of valid values range
Returns

§ Circle() [1/2]

static void OpenCvSharp.Cv2.Circle ( InputOutputArray  img,
int  centerX,
int  centerY,
int  radius,
Scalar  color,
int  thickness = 1,
LineTypes  lineType = LineTypes.Link8,
int  shift = 0 
)
static

Draws a circle

Parameters
imgImage where the circle is drawn.
centerXX-coordinate of the center of the circle.
centerYY-coordinate of the center of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline if positive, otherwise indicates that a filled circle has to be drawn. [By default this is 1]
lineTypeType of the circle boundary. [By default this is LineType.Link8]
shiftNumber of fractional bits in the center coordinates and radius value. [By default this is 0]

§ Circle() [2/2]

static void OpenCvSharp.Cv2.Circle ( InputOutputArray  img,
Point  center,
int  radius,
Scalar  color,
int  thickness = 1,
LineTypes  lineType = LineTypes.Link8,
int  shift = 0 
)
static

Draws a circle

Parameters
imgImage where the circle is drawn.
centerCenter of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline if positive, otherwise indicates that a filled circle has to be drawn. [By default this is 1]
lineTypeType of the circle boundary. [By default this is LineType.Link8]
shiftNumber of fractional bits in the center coordinates and radius value. [By default this is 0]

§ ClipLine() [1/2]

static bool OpenCvSharp.Cv2.ClipLine ( Size  imgSize,
ref Point  pt1,
ref Point  pt2 
)
static

Clips the line against the image rectangle

Parameters
imgSizeThe image size
pt1The first line point
pt2The second line point
Returns

§ ClipLine() [2/2]

static bool OpenCvSharp.Cv2.ClipLine ( Rect  imgRect,
ref Point  pt1,
ref Point  pt2 
)
static

Clips the line against the image rectangle

Parameters
imgRectsThe image rectangle
pt1The first line point
pt2The second line point
Returns

§ ColorChange()

static void OpenCvSharp.Cv2.ColorChange ( InputArray  src,
InputArray  mask,
OutputArray  dst,
float  redMul = 1.0f,
float  greenMul = 1.0f,
float  blueMul = 1.0f 
)
static

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.

Parameters
srcInput 8-bit 3-channel image.
maskInput 8-bit 1 or 3-channel image.
dstOutput image with the same size and type as src.
redMulR-channel multiply factor.
greenMulG-channel multiply factor.
blueMulB-channel multiply factor.

§ Compare()

static void OpenCvSharp.Cv2.Compare ( InputArray  src1,
InputArray  src2,
OutputArray  dst,
CmpTypes  cmpop 
)
static

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

Parameters
src1first input array or a scalar; when it is an array, it must have a single channel.
src2second input array or a scalar; when it is an array, it must have a single channel.
dstoutput array of type ref CV_8U that has the same size and the same number of channels as the input arrays.
cmpopa flag, that specifies correspondence between the arrays (cv::CmpTypes)

§ CompareHist()

static double OpenCvSharp.Cv2.CompareHist ( InputArray  h1,
InputArray  h2,
HistCompMethods  method 
)
static

compares two histograms stored in dense arrays

Parameters
h1The first compared histogram
h2The second compared histogram of the same size as h1
methodThe comparison method
Returns

§ CompleteSymm()

static void OpenCvSharp.Cv2.CompleteSymm ( InputOutputArray  mtx,
bool  lowerToUpper = false 
)
static

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

Parameters
mtxInput-output floating-point square matrix
lowerToUpperIf true, the lower half is copied to the upper half, otherwise the upper half is copied to the lower half

§ ComposeRT() [1/3]

static void OpenCvSharp.Cv2.ComposeRT ( InputArray  rvec1,
InputArray  tvec1,
InputArray  rvec2,
InputArray  tvec2,
OutputArray  rvec3,
OutputArray  tvec3,
OutputArray  dr3dr1 = null,
OutputArray  dr3dt1 = null,
OutputArray  dr3dr2 = null,
OutputArray  dr3dt2 = null,
OutputArray  dt3dr1 = null,
OutputArray  dt3dt1 = null,
OutputArray  dt3dr2 = null,
OutputArray  dt3dt2 = null 
)
static

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

Parameters
rvec1First rotation vector.
tvec1First translation vector.
rvec2Second rotation vector.
tvec2Second translation vector.
rvec3Output rotation vector of the superposition.
tvec3Output translation vector of the superposition.
dr3dr1Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.
dr3dt1Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.
dr3dr2Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.
dr3dt2Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.
dt3dr1Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.
dt3dt1Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.
dt3dr2Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.
dt3dt2Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.

§ ComposeRT() [2/3]

static void OpenCvSharp.Cv2.ComposeRT ( double []  rvec1,
double []  tvec1,
double []  rvec2,
double []  tvec2,
out double []  rvec3,
out double []  tvec3,
out double  dr3dr1[,],
out double  dr3dt1[,],
out double  dr3dr2[,],
out double  dr3dt2[,],
out double  dt3dr1[,],
out double  dt3dt1[,],
out double  dt3dr2[,],
out double  dt3dt2[,] 
)
static

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

Parameters
rvec1First rotation vector.
tvec1First translation vector.
rvec2Second rotation vector.
tvec2Second translation vector.
rvec3Output rotation vector of the superposition.
tvec3Output translation vector of the superposition.
dr3dr1Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.
dr3dt1Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.
dr3dr2Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.
dr3dt2Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.
dt3dr1Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.
dt3dt1Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.
dt3dr2Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.
dt3dt2Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and tvec2, respectively.

§ ComposeRT() [3/3]

static void OpenCvSharp.Cv2.ComposeRT ( double []  rvec1,
double []  tvec1,
double []  rvec2,
double []  tvec2,
out double []  rvec3,
out double []  tvec3 
)
static

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

Parameters
rvec1First rotation vector.
tvec1First translation vector.
rvec2Second rotation vector.
tvec2Second translation vector.
rvec3Output rotation vector of the superposition.
tvec3Output translation vector of the superposition.

§ ComputeCorrespondEpilines() [1/3]

static void OpenCvSharp.Cv2.ComputeCorrespondEpilines ( InputArray  points,
int  whichImage,
InputArray  F,
OutputArray  lines 
)
static

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

Parameters
pointsInput points. N 1 or 1 x N matrix of type CV_32FC2 or CV_64FC2.
whichImageIndex of the image (1 or 2) that contains the points .
FFundamental matrix that can be estimated using findFundamentalMat() or stereoRectify() .
linesOutput vector of the epipolar lines corresponding to the points in the other image. Each line ax + by + c=0 is encoded by 3 numbers (a, b, c) .

§ ComputeCorrespondEpilines() [2/3]

static Point3f [] OpenCvSharp.Cv2.ComputeCorrespondEpilines ( IEnumerable< Point2d points,
int  whichImage,
double  F[,] 
)
static

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

Parameters
pointsInput points. N 1 or 1 x N matrix of type CV_32FC2 or CV_64FC2.
whichImageIndex of the image (1 or 2) that contains the points .
FFundamental matrix that can be estimated using findFundamentalMat() or stereoRectify() .
Returns
Output vector of the epipolar lines corresponding to the points in the other image. Each line ax + by + c=0 is encoded by 3 numbers (a, b, c) .

§ ComputeCorrespondEpilines() [3/3]

static Point3f [] OpenCvSharp.Cv2.ComputeCorrespondEpilines ( IEnumerable< Point3d points,
int  whichImage,
double  F[,] 
)
static

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

Parameters
pointsInput points. N 1 or 1 x N matrix of type CV_32FC2 or CV_64FC2.
whichImageIndex of the image (1 or 2) that contains the points .
FFundamental matrix that can be estimated using findFundamentalMat() or stereoRectify() .
Returns
Output vector of the epipolar lines corresponding to the points in the other image. Each line ax + by + c=0 is encoded by 3 numbers (a, b, c) .

§ ComputeRecallPrecisionCurve()

static Point2f [] OpenCvSharp.Cv2.ComputeRecallPrecisionCurve ( DMatch  matches1to2[][],
byte  correctMatches1to2Mask[][] 
)
static

Parameters
matches1to2
correctMatches1to2Mask
Returns
recallPrecisionCurve

§ ConnectedComponents() [1/3]

static int OpenCvSharp.Cv2.ConnectedComponents ( InputArray  image,
OutputArray  labels,
PixelConnectivity  connectivity = PixelConnectivity.Connectivity8 
)
static

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.

Parameters
imagethe image to be labeled
labelsdestination labeled image
connectivity8 or 4 for 8-way or 4-way connectivity respectively
Returns
The number of labels

§ ConnectedComponents() [2/3]

static int OpenCvSharp.Cv2.ConnectedComponents ( InputArray  image,
OutputArray  labels,
PixelConnectivity  connectivity,
MatType  ltype 
)
static

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.

Parameters
imagethe image to be labeled
labelsdestination labeled image
connectivity8 or 4 for 8-way or 4-way connectivity respectively
ltypeoutput image label type. Currently CV_32S and CV_16U are supported.
Returns
The number of labels

§ ConnectedComponents() [3/3]

static int OpenCvSharp.Cv2.ConnectedComponents ( InputArray  image,
out int  labels[,],
PixelConnectivity  connectivity 
)
static

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.

Parameters
imagethe image to be labeled
labelsdestination labeled rectangular array
connectivity8 or 4 for 8-way or 4-way connectivity respectively
Returns
The number of labels

§ ConnectedComponentsEx()

static ConnectedComponents OpenCvSharp.Cv2.ConnectedComponentsEx ( InputArray  image,
PixelConnectivity  connectivity = PixelConnectivity.Connectivity8 
)
static

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.

Parameters
imagethe image to be labeled
connectivity8 or 4 for 8-way or 4-way connectivity respectively
Returns

§ ConnectedComponentsWithStats() [1/2]

static int OpenCvSharp.Cv2.ConnectedComponentsWithStats ( InputArray  image,
OutputArray  labels,
OutputArray  stats,
OutputArray  centroids,
PixelConnectivity  connectivity = PixelConnectivity.Connectivity8 
)
static

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.

Parameters
imagethe image to be labeled
labelsdestination labeled image
statsstatistics output for each label, including the background label, see below for available statistics. Statistics are accessed via stats(label, COLUMN) where COLUMN is one of cv::ConnectedComponentsTypes
centroidsfloating point centroid (x,y) output for each label, including the background label
connectivity8 or 4 for 8-way or 4-way connectivity respectively
Returns

§ ConnectedComponentsWithStats() [2/2]

static int OpenCvSharp.Cv2.ConnectedComponentsWithStats ( InputArray  image,
OutputArray  labels,
OutputArray  stats,
OutputArray  centroids,
PixelConnectivity  connectivity,
MatType  ltype 
)
static

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.

Parameters
imagethe image to be labeled
labelsdestination labeled image
statsstatistics output for each label, including the background label, see below for available statistics. Statistics are accessed via stats(label, COLUMN) where COLUMN is one of cv::ConnectedComponentsTypes
centroidsfloating point centroid (x,y) output for each label, including the background label
connectivity8 or 4 for 8-way or 4-way connectivity respectively
ltypeoutput image label type. Currently CV_32S and CV_16U are supported.
Returns

§ ContourArea() [1/3]

static double OpenCvSharp.Cv2.ContourArea ( InputArray  contour,
bool  oriented = false 
)
static

Calculates the contour area

Parameters
contourThe contour vertices, represented by CV_32SC2 or CV_32FC2 matrix
oriented
Returns

§ ContourArea() [2/3]

static double OpenCvSharp.Cv2.ContourArea ( IEnumerable< Point contour,
bool  oriented = false 
)
static

Calculates the contour area

Parameters
contourThe contour vertices, represented by CV_32SC2 or CV_32FC2 matrix
oriented
Returns

§ ContourArea() [3/3]

static double OpenCvSharp.Cv2.ContourArea ( IEnumerable< Point2f contour,
bool  oriented = false 
)
static

Calculates the contour area

Parameters
contourThe contour vertices, represented by CV_32SC2 or CV_32FC2 matrix
oriented
Returns

§ ConvertImage()

static void OpenCvSharp.Cv2.ConvertImage ( Mat  src,
Mat  dst,
ConvertImageModes  flags = ConvertImageModes.None 
)
static

utility function: convert one image to another with optional vertical flip

Parameters
src
dst
flags

§ ConvertMaps()

static void OpenCvSharp.Cv2.ConvertMaps ( InputArray  map1,
InputArray  map2,
OutputArray  dstmap1,
OutputArray  dstmap2,
MatType  dstmap1Type,
bool  nnInterpolation = false 
)
static

Parameters
map1
map2
dstmap1
dstmap2
dstmap1Type
nnInterpolation

§ ConvertPointsFromHomogeneous() [1/3]

static void OpenCvSharp.Cv2.ConvertPointsFromHomogeneous ( InputArray  src,
OutputArray  dst 
)
static

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

Parameters
srcInput vector of N-dimensional points.
dstOutput vector of N-1-dimensional points.

§ ConvertPointsFromHomogeneous() [2/3]

static Vec2f [] OpenCvSharp.Cv2.ConvertPointsFromHomogeneous ( IEnumerable< Vec3f src)
static

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

Parameters
srcInput vector of N-dimensional points.
Returns
Output vector of N-1-dimensional points.

§ ConvertPointsFromHomogeneous() [3/3]

static Vec3f [] OpenCvSharp.Cv2.ConvertPointsFromHomogeneous ( IEnumerable< Vec4f src)
static

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

Parameters
srcInput vector of N-dimensional points.
Returns
Output vector of N-1-dimensional points.

§ ConvertPointsHomogeneous()

static void OpenCvSharp.Cv2.ConvertPointsHomogeneous ( InputArray  src,
OutputArray  dst 
)
static

Converts points to/from homogeneous coordinates.

Parameters
srcInput array or vector of 2D, 3D, or 4D points.
dstOutput vector of 2D, 3D, or 4D points.

§ ConvertPointsToHomogeneous() [1/3]

static void OpenCvSharp.Cv2.ConvertPointsToHomogeneous ( InputArray  src,
OutputArray  dst 
)
static

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

Parameters
srcInput vector of N-dimensional points.
dstOutput vector of N+1-dimensional points.

§ ConvertPointsToHomogeneous() [2/3]

static Vec3f [] OpenCvSharp.Cv2.ConvertPointsToHomogeneous ( IEnumerable< Vec2f src)
static

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

Parameters
srcInput vector of N-dimensional points.
Returns
Output vector of N+1-dimensional points.

§ ConvertPointsToHomogeneous() [3/3]

static Vec4f [] OpenCvSharp.Cv2.ConvertPointsToHomogeneous ( IEnumerable< Vec3f src)
static

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

Parameters
srcInput vector of N-dimensional points.
Returns
Output vector of N+1-dimensional points.

§ ConvertScaleAbs()

static void OpenCvSharp.Cv2.ConvertScaleAbs ( InputArray  src,
OutputArray  dst,
double  alpha = 1,
double  beta = 0 
)
static

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

Parameters
srcThe source array
dstThe destination array
alphaThe optional scale factor. [By default this is 1]
betaThe optional delta added to the scaled values. [By default this is 0]

§ ConvexHull() [1/3]

static void OpenCvSharp.Cv2.ConvexHull ( InputArray  points,
OutputArray  hull,
bool  clockwise = false,
bool  returnPoints = true 
)
static

Computes convex hull for a set of 2D points.

Parameters
pointsThe input 2D point set, represented by CV_32SC2 or CV_32FC2 matrix
hullThe output convex hull. It is either a vector of points that form the hull (must have the same type as the input points), or a vector of 0-based point indices of the hull points in the original array (since the set of convex hull points is a subset of the original point set).
clockwiseIf true, the output convex hull will be oriented clockwise, otherwise it will be oriented counter-clockwise. Here, the usual screen coordinate system is assumed - the origin is at the top-left corner, x axis is oriented to the right, and y axis is oriented downwards.
returnPoints

§ ConvexHull() [2/3]

static Point [] OpenCvSharp.Cv2.ConvexHull ( IEnumerable< Point points,
bool  clockwise = false 
)
static

Computes convex hull for a set of 2D points.

Parameters
pointsThe input 2D point set, represented by CV_32SC2 or CV_32FC2 matrix
clockwiseIf true, the output convex hull will be oriented clockwise, otherwise it will be oriented counter-clockwise. Here, the usual screen coordinate system is assumed - the origin is at the top-left corner, x axis is oriented to the right, and y axis is oriented downwards.
Returns
The output convex hull. It is a vector of points that form the hull (must have the same type as the input points).

§ ConvexHull() [3/3]

static Point2f [] OpenCvSharp.Cv2.ConvexHull ( IEnumerable< Point2f points,
bool  clockwise = false 
)
static

Computes convex hull for a set of 2D points.

Parameters
pointsThe input 2D point set, represented by CV_32SC2 or CV_32FC2 matrix
clockwiseIf true, the output convex hull will be oriented clockwise, otherwise it will be oriented counter-clockwise. Here, the usual screen coordinate system is assumed - the origin is at the top-left corner, x axis is oriented to the right, and y axis is oriented downwards.
Returns
The output convex hull. It is a vector of points that form the hull (must have the same type as the input points).

§ ConvexHullIndices() [1/2]

static int [] OpenCvSharp.Cv2.ConvexHullIndices ( IEnumerable< Point points,
bool  clockwise = false 
)
static

Computes convex hull for a set of 2D points.

Parameters
pointsThe input 2D point set, represented by CV_32SC2 or CV_32FC2 matrix
clockwiseIf true, the output convex hull will be oriented clockwise, otherwise it will be oriented counter-clockwise. Here, the usual screen coordinate system is assumed - the origin is at the top-left corner, x axis is oriented to the right, and y axis is oriented downwards.
Returns
The output convex hull. It is a vector of 0-based point indices of the hull points in the original array (since the set of convex hull points is a subset of the original point set).

§ ConvexHullIndices() [2/2]

static int [] OpenCvSharp.Cv2.ConvexHullIndices ( IEnumerable< Point2f points,
bool  clockwise = false 
)
static

Computes convex hull for a set of 2D points.

Parameters
pointsThe input 2D point set, represented by CV_32SC2 or CV_32FC2 matrix
clockwiseIf true, the output convex hull will be oriented clockwise, otherwise it will be oriented counter-clockwise. Here, the usual screen coordinate system is assumed - the origin is at the top-left corner, x axis is oriented to the right, and y axis is oriented downwards.
Returns
The output convex hull. It is a vector of 0-based point indices of the hull points in the original array (since the set of convex hull points is a subset of the original point set).

§ ConvexityDefects() [1/3]

static void OpenCvSharp.Cv2.ConvexityDefects ( InputArray  contour,
InputArray  convexHull,
OutputArray  convexityDefects 
)
static

Computes the contour convexity defects

Parameters
contourInput contour.
convexHullConvex hull obtained using convexHull() that should contain indices of the contour points that make the hull.
convexityDefectsThe output vector of convexity defects. Each convexity defect is represented as 4-element integer vector (a.k.a. cv::Vec4i): (start_index, end_index, farthest_pt_index, fixpt_depth), where indices are 0-based indices in the original contour of the convexity defect beginning, end and the farthest point, and fixpt_depth is fixed-point approximation (with 8 fractional bits) of the distance between the farthest contour point and the hull. That is, to get the floating-point value of the depth will be fixpt_depth/256.0.

§ ConvexityDefects() [2/3]

static Vec4i [] OpenCvSharp.Cv2.ConvexityDefects ( IEnumerable< Point contour,
IEnumerable< int >  convexHull 
)
static

Computes the contour convexity defects

Parameters
contourInput contour.
convexHullConvex hull obtained using convexHull() that should contain indices of the contour points that make the hull.
Returns
The output vector of convexity defects. Each convexity defect is represented as 4-element integer vector (a.k.a. cv::Vec4i): (start_index, end_index, farthest_pt_index, fixpt_depth), where indices are 0-based indices in the original contour of the convexity defect beginning, end and the farthest point, and fixpt_depth is fixed-point approximation (with 8 fractional bits) of the distance between the farthest contour point and the hull. That is, to get the floating-point value of the depth will be fixpt_depth/256.0.

§ ConvexityDefects() [3/3]

static Vec4i [] OpenCvSharp.Cv2.ConvexityDefects ( IEnumerable< Point2f contour,
IEnumerable< int >  convexHull 
)
static

Computes the contour convexity defects

Parameters
contourInput contour.
convexHullConvex hull obtained using convexHull() that should contain indices of the contour points that make the hull.
Returns
The output vector of convexity defects. Each convexity defect is represented as 4-element integer vector (a.k.a. cv::Vec4i): (start_index, end_index, farthest_pt_index, fixpt_depth), where indices are 0-based indices in the original contour of the convexity defect beginning, end and the farthest point, and fixpt_depth is fixed-point approximation (with 8 fractional bits) of the distance between the farthest contour point and the hull. That is, to get the floating-point value of the depth will be fixpt_depth/256.0.

§ CopyMakeBorder()

static void OpenCvSharp.Cv2.CopyMakeBorder ( InputArray  src,
OutputArray  dst,
int  top,
int  bottom,
int  left,
int  right,
BorderTypes  borderType,
Scalar value = null 
)
static

Forms a border around the image

Parameters
srcThe source image
dstThe destination image; will have the same type as src and the size Size(src.cols+left+right, src.rows+top+bottom)
topSpecify how much pixels in each direction from the source image rectangle one needs to extrapolate
bottomSpecify how much pixels in each direction from the source image rectangle one needs to extrapolate
leftSpecify how much pixels in each direction from the source image rectangle one needs to extrapolate
rightSpecify how much pixels in each direction from the source image rectangle one needs to extrapolate
borderTypeThe border type
valueThe border value if borderType == Constant

§ CornerEigenValsAndVecs()

static void OpenCvSharp.Cv2.CornerEigenValsAndVecs ( InputArray  src,
OutputArray  dst,
int  blockSize,
int  ksize,
BorderTypes  borderType = BorderTypes.Default 
)
static

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

Parameters
src
dst
blockSize
ksize
borderType

§ CornerSubPix()

static Point2f [] OpenCvSharp.Cv2.CornerSubPix ( InputArray  image,
IEnumerable< Point2f inputCorners,
Size  winSize,
Size  zeroZone,
TermCriteria  criteria 
)
static

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

Parameters
imageInput image.
inputCornersInitial coordinates of the input corners and refined coordinates provided for output.
winSizeHalf of the side length of the search window.
zeroZoneHalf of the size of the dead region in the middle of the search zone over which the summation in the formula below is not done. It is used sometimes to avoid possible singularities of the autocorrelation matrix. The value of (-1,-1) indicates that there is no such a size.
criteriaCriteria for termination of the iterative process of corner refinement. That is, the process of corner position refinement stops either after criteria.maxCount iterations or when the corner position moves by less than criteria.epsilon on some iteration.
Returns

§ CorrectMatches() [1/2]

static void OpenCvSharp.Cv2.CorrectMatches ( InputArray  F,
InputArray  points1,
InputArray  points2,
OutputArray  newPoints1,
OutputArray  newPoints2 
)
static

Refines coordinates of corresponding points.

Parameters
F3x3 fundamental matrix.
points11xN array containing the first set of points.
points21xN array containing the second set of points.
newPoints1The optimized points1.
newPoints2The optimized points2.

§ CorrectMatches() [2/2]

static void OpenCvSharp.Cv2.CorrectMatches ( double  F[,],
IEnumerable< Point2d points1,
IEnumerable< Point2d points2,
out Point2d []  newPoints1,
out Point2d []  newPoints2 
)
static

Refines coordinates of corresponding points.

Parameters
F3x3 fundamental matrix.
points11xN array containing the first set of points.
points21xN array containing the second set of points.
newPoints1The optimized points1.
newPoints2The optimized points2.

§ CountNonZero()

static int OpenCvSharp.Cv2.CountNonZero ( InputArray  mtx)
static

computes the number of nonzero array elements

Parameters
mtxSingle-channel array
Returns
number of non-zero elements in mtx

§ CreateCLAHE()

static CLAHE OpenCvSharp.Cv2.CreateCLAHE ( double  clipLimit = 40.0,
Size tileGridSize = null 
)
static

Creates a predefined CLAHE object

Parameters
clipLimit
tileGridSize
Returns

§ CreateFrameSource_Camera()

static FrameSource OpenCvSharp.Cv2.CreateFrameSource_Camera ( int  deviceId)
static

Parameters
deviceId
Returns

§ CreateFrameSource_Empty()

static FrameSource OpenCvSharp.Cv2.CreateFrameSource_Empty ( )
static

Returns

§ CreateFrameSource_Video()

static FrameSource OpenCvSharp.Cv2.CreateFrameSource_Video ( string  fileName)
static

Parameters
fileName
Returns

§ CreateFrameSource_Video_CUDA()

static FrameSource OpenCvSharp.Cv2.CreateFrameSource_Video_CUDA ( string  fileName)
static

Parameters
fileName
Returns

§ CreateHanningWindow()

static void OpenCvSharp.Cv2.CreateHanningWindow ( InputOutputArray  dst,
Size  winSize,
MatType  type 
)
static

Computes a Hanning window coefficients in two dimensions.

Parameters
dstDestination array to place Hann coefficients in
winSizeThe window size specifications
typeCreated array type

§ CreateOptFlow_Brox_GPU()

static DenseOpticalFlowExt OpenCvSharp.Cv2.CreateOptFlow_Brox_GPU ( )
static

Returns

§ CreateOptFlow_DualTVL1()

static DenseOpticalFlow OpenCvSharp.Cv2.CreateOptFlow_DualTVL1 ( )
static

Implementation of the Zach, Pock and Bischof Dual TV-L1 Optical Flow method

Returns

§ CreateOptFlow_DualTVL1_GPU()

static DenseOpticalFlowExt OpenCvSharp.Cv2.CreateOptFlow_DualTVL1_GPU ( )
static

Returns

§ CreateOptFlow_DualTVL1_OCL()

static DenseOpticalFlowExt OpenCvSharp.Cv2.CreateOptFlow_DualTVL1_OCL ( )
static

Returns

§ CreateOptFlow_DualTVL1Ex()

static DenseOpticalFlowExt OpenCvSharp.Cv2.CreateOptFlow_DualTVL1Ex ( )
static

Returns

§ CreateOptFlow_Farneback()

static DenseOpticalFlowExt OpenCvSharp.Cv2.CreateOptFlow_Farneback ( )
static

Returns

§ CreateOptFlow_Farneback_GPU()

static DenseOpticalFlowExt OpenCvSharp.Cv2.CreateOptFlow_Farneback_GPU ( )
static

Returns

§ CreateOptFlow_Farneback_OCL()

static DenseOpticalFlowExt OpenCvSharp.Cv2.CreateOptFlow_Farneback_OCL ( )
static

Returns

§ CreateOptFlow_PyrLK_GPU()

static DenseOpticalFlowExt OpenCvSharp.Cv2.CreateOptFlow_PyrLK_GPU ( )
static

Returns

§ CreateOptFlow_PyrLK_OCL()

static DenseOpticalFlowExt OpenCvSharp.Cv2.CreateOptFlow_PyrLK_OCL ( )
static

Returns

§ CreateOptFlow_Simple()

static DenseOpticalFlowExt OpenCvSharp.Cv2.CreateOptFlow_Simple ( )
static

Returns

§ CreateSuperResolution_BTVL1()

static SuperResolution OpenCvSharp.Cv2.CreateSuperResolution_BTVL1 ( )
static

Create Bilateral TV-L1 Super Resolution.

Returns

§ CreateSuperResolution_BTVL1_CUDA()

static SuperResolution OpenCvSharp.Cv2.CreateSuperResolution_BTVL1_CUDA ( )
static

Create Bilateral TV-L1 Super Resolution.

Returns

§ CreateSuperResolution_BTVL1_OCL()

static SuperResolution OpenCvSharp.Cv2.CreateSuperResolution_BTVL1_OCL ( )
static

Create Bilateral TV-L1 Super Resolution.

Returns

§ CubeRoot()

static float OpenCvSharp.Cv2.CubeRoot ( float  val)
static

computes cube root of the argument

Parameters
val
Returns

§ CvtColor()

static void OpenCvSharp.Cv2.CvtColor ( InputArray  src,
OutputArray  dst,
ColorConversionCodes  code,
int  dstCn = 0 
)
static

Converts image from one color space to another

Parameters
srcThe source image, 8-bit unsigned, 16-bit unsigned or single-precision floating-point
dstThe destination image; will have the same size and the same depth as src
codeThe color space conversion code
dstCnThe number of channels in the destination image; if the parameter is 0, the number of the channels will be derived automatically from src and the code

§ Dct()

static void OpenCvSharp.Cv2.Dct ( InputArray  src,
OutputArray  dst,
DctFlags  flags = DctFlags.None 
)
static

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

Parameters
srcThe source floating-point array
dstThe destination array; will have the same size and same type as src
flagsTransformation flags, a combination of DctFlag2 values

§ Decolor()

static void OpenCvSharp.Cv2.Decolor ( InputArray  src,
OutputArray  grayscale,
OutputArray  colorBoost 
)
static

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 [CL12] .

Parameters
srcInput 8-bit 3-channel image.
grayscaleOutput 8-bit 1-channel image.
colorBoostOutput 8-bit 3-channel image.

§ DecomposeProjectionMatrix() [1/3]

static void OpenCvSharp.Cv2.DecomposeProjectionMatrix ( InputArray  projMatrix,
OutputArray  cameraMatrix,
OutputArray  rotMatrix,
OutputArray  transVect,
OutputArray  rotMatrixX = null,
OutputArray  rotMatrixY = null,
OutputArray  rotMatrixZ = null,
OutputArray  eulerAngles = null 
)
static

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

Parameters
projMatrix3x4 input projection matrix P.
cameraMatrixOutput 3x3 camera matrix K.
rotMatrixOutput 3x3 external rotation matrix R.
transVectOutput 4x1 translation vector T.
rotMatrixXOptional 3x3 rotation matrix around x-axis.
rotMatrixYOptional 3x3 rotation matrix around y-axis.
rotMatrixZOptional 3x3 rotation matrix around z-axis.
eulerAnglesptional three-element vector containing three Euler angles of rotation in degrees.

§ DecomposeProjectionMatrix() [2/3]

static void OpenCvSharp.Cv2.DecomposeProjectionMatrix ( double  projMatrix[,],
out double  cameraMatrix[,],
out double  rotMatrix[,],
out double []  transVect,
out double  rotMatrixX[,],
out double  rotMatrixY[,],
out double  rotMatrixZ[,],
out double []  eulerAngles 
)
static

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

Parameters
projMatrix3x4 input projection matrix P.
cameraMatrixOutput 3x3 camera matrix K.
rotMatrixOutput 3x3 external rotation matrix R.
transVectOutput 4x1 translation vector T.
rotMatrixXOptional 3x3 rotation matrix around x-axis.
rotMatrixYOptional 3x3 rotation matrix around y-axis.
rotMatrixZOptional 3x3 rotation matrix around z-axis.
eulerAnglesptional three-element vector containing three Euler angles of rotation in degrees.

§ DecomposeProjectionMatrix() [3/3]

static void OpenCvSharp.Cv2.DecomposeProjectionMatrix ( double  projMatrix[,],
out double  cameraMatrix[,],
out double  rotMatrix[,],
out double []  transVect 
)
static

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

Parameters
projMatrix3x4 input projection matrix P.
cameraMatrixOutput 3x3 camera matrix K.
rotMatrixOutput 3x3 external rotation matrix R.
transVectOutput 4x1 translation vector T.

§ DenoiseTVL1()

static void OpenCvSharp.Cv2.DenoiseTVL1 ( IEnumerable< Mat observations,
Mat  result,
double  lambda = 1.0,
int  niters = 30 
)
static

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.

Parameters
observationsThis array should contain one or more noised versions of the image that is to be restored.
resultHere the denoised image will be stored. There is no need to do pre-allocation of storage space, as it will be automatically allocated, if necessary.
lambdaCorresponds to $\lambda$ in the formulas above. As it is enlarged, the smooth (blurred) images are treated more favorably than detailed (but maybe more noised) ones. Roughly speaking, as it becomes smaller, the result will be more blur but more sever outliers will be removed.
nitersNumber of iterations that the algorithm will run. Of course, as more iterations as better, but it is hard to quantitatively refine this statement, so just use the default and increase it if the results are poor.

§ DestroyAllWindows()

static void OpenCvSharp.Cv2.DestroyAllWindows ( )
static

§ DestroyWindow()

static void OpenCvSharp.Cv2.DestroyWindow ( string  winName)
static

Parameters
winName

§ DetailEnhance()

static void OpenCvSharp.Cv2.DetailEnhance ( InputArray  src,
OutputArray  dst,
float  sigmaS = 10,
float  sigmaR = 0.15f 
)
static

This filter enhances the details of a particular image.

Parameters
srcInput 8-bit 3-channel image.
dstOutput image with the same size and type as src.
sigmaSRange between 0 to 200.
sigmaRRange between 0 to 1.

§ Determinant()

static double OpenCvSharp.Cv2.Determinant ( InputArray  mtx)
static

computes determinant of a square matrix

Parameters
mtxThe input matrix; must have CV_32FC1 or CV_64FC1 type and square size
Returns
determinant of the specified matrix.

§ Dft()

static void OpenCvSharp.Cv2.Dft ( InputArray  src,
OutputArray  dst,
DftFlags  flags = DftFlags.None,
int  nonzeroRows = 0 
)
static

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

Parameters
srcThe source array, real or complex
dstThe destination array, which size and type depends on the flags
flagsTransformation flags, a combination of the DftFlag2 values
nonzeroRowsWhen the parameter != 0, the function assumes that only the first nonzeroRows rows of the input array ( DFT_INVERSE is not set) or only the first nonzeroRows of the output array ( DFT_INVERSE is set) contain non-zeros, thus the function can handle the rest of the rows more efficiently and thus save some time. This technique is very useful for computing array cross-correlation or convolution using DFT

§ Dilate()

static void OpenCvSharp.Cv2.Dilate ( InputArray  src,
OutputArray  dst,
InputArray  element,
Point anchor = null,
int  iterations = 1,
BorderTypes  borderType = BorderTypes.Constant,
Scalar borderValue = null 
)
static

Dilates an image by using a specific structuring element.

Parameters
srcThe source image
dstThe destination image. It will have the same size and the same type as src
elementThe structuring element used for dilation. If element=new Mat() , a 3x3 rectangular structuring element is used
anchorPosition of the anchor within the element. The default value (-1, -1) means that the anchor is at the element center
iterationsThe number of times dilation is applied. [By default this is 1]
borderTypeThe pixel extrapolation method. [By default this is BorderType.Constant]
borderValueThe border value in case of a constant border. The default value has a special meaning. [By default this is CvCpp.MorphologyDefaultBorderValue()]

§ DistanceTransform()

static void OpenCvSharp.Cv2.DistanceTransform ( InputArray  src,
OutputArray  dst,
DistanceTypes  distanceType,
DistanceMaskSize  maskSize 
)
static

computes the distance transform map

Parameters
src
dst
distanceType
maskSize

§ DistanceTransformWithLabels()

static void OpenCvSharp.Cv2.DistanceTransformWithLabels ( InputArray  src,
OutputArray  dst,
OutputArray  labels,
DistanceTypes  distanceType,
DistanceMaskSize  maskSize,
DistanceTransformLabelTypes  labelType = DistanceTransformLabelTypes.CComp 
)
static

builds the discrete Voronoi diagram

Parameters
src
dst
labels
distanceType
maskSize
labelType

§ Divide() [1/2]

static void OpenCvSharp.Cv2.Divide ( InputArray  src1,
InputArray  src2,
OutputArray  dst,
double  scale = 1,
int  dtype = -1 
)
static

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

Parameters
src1The first source array
src2The second source array; should have the same size and same type as src1
dstThe destination array; will have the same size and same type as src2
scaleScale factor [By default this is 1]
dtype

§ Divide() [2/2]

static void OpenCvSharp.Cv2.Divide ( double  scale,
InputArray  src2,
OutputArray  dst,
int  dtype = -1 
)
static

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

Parameters
scaleScale factor
src2The first source array
dstThe destination array; will have the same size and same type as src2
dtype

§ DrawChessboardCorners() [1/2]

static void OpenCvSharp.Cv2.DrawChessboardCorners ( InputOutputArray  image,
Size  patternSize,
InputArray  corners,
bool  patternWasFound 
)
static

Renders the detected chessboard corners.

Parameters
imageDestination image. It must be an 8-bit color image.
patternSizeNumber of inner corners per a chessboard row and column (patternSize = cv::Size(points_per_row,points_per_column)).
cornersArray of detected corners, the output of findChessboardCorners.
patternWasFoundParameter indicating whether the complete board was found or not. The return value of findChessboardCorners() should be passed here.

§ DrawChessboardCorners() [2/2]

static void OpenCvSharp.Cv2.DrawChessboardCorners ( InputOutputArray  image,
Size  patternSize,
IEnumerable< Point2f corners,
bool  patternWasFound 
)
static

Renders the detected chessboard corners.

Parameters
imageDestination image. It must be an 8-bit color image.
patternSizeNumber of inner corners per a chessboard row and column (patternSize = cv::Size(points_per_row,points_per_column)).
cornersArray of detected corners, the output of findChessboardCorners.
patternWasFoundParameter indicating whether the complete board was found or not. The return value of findChessboardCorners() should be passed here.

§ DrawContours() [1/2]

static void OpenCvSharp.Cv2.DrawContours ( InputOutputArray  image,
IEnumerable< IEnumerable< Point >>  contours,
int  contourIdx,
Scalar  color,
int  thickness = 1,
LineTypes  lineType = LineTypes.Link8,
IEnumerable< HierarchyIndex hierarchy = null,
int  maxLevel = Int32.MaxValue,
Point offset = null 
)
static

draws contours in the image

Parameters
imageDestination image.
contoursAll the input contours. Each contour is stored as a point vector.
contourIdxParameter indicating a contour to draw. If it is negative, all the contours are drawn.
colorColor of the contours.
thicknessThickness of lines the contours are drawn with. If it is negative (for example, thickness=CV_FILLED ), the contour interiors are drawn.
lineTypeLine connectivity.
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours
maxLevelMaximal level for drawn contours. If it is 0, only the specified contour is drawn. If it is 1, the function draws the contour(s) and all the nested contours. If it is 2, the function draws the contours, all the nested contours, all the nested-to-nested contours, and so on. This parameter is only taken into account when there is hierarchy available.
offsetOptional contour shift parameter. Shift all the drawn contours by the specified offset = (dx, dy)

§ DrawContours() [2/2]

static void OpenCvSharp.Cv2.DrawContours ( InputOutputArray  image,
IEnumerable< Mat contours,
int  contourIdx,
Scalar  color,
int  thickness = 1,
LineTypes  lineType = LineTypes.Link8,
Mat  hierarchy = null,
int  maxLevel = Int32.MaxValue,
Point offset = null 
)
static

draws contours in the image

Parameters
imageDestination image.
contoursAll the input contours. Each contour is stored as a point vector.
contourIdxParameter indicating a contour to draw. If it is negative, all the contours are drawn.
colorColor of the contours.
thicknessThickness of lines the contours are drawn with. If it is negative (for example, thickness=CV_FILLED ), the contour interiors are drawn.
lineTypeLine connectivity.
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours
maxLevelMaximal level for drawn contours. If it is 0, only the specified contour is drawn. If it is 1, the function draws the contour(s) and all the nested contours. If it is 2, the function draws the contours, all the nested contours, all the nested-to-nested contours, and so on. This parameter is only taken into account when there is hierarchy available.
offsetOptional contour shift parameter. Shift all the drawn contours by the specified offset = (dx, dy)

§ DrawKeypoints()

static void OpenCvSharp.Cv2.DrawKeypoints ( Mat  image,
IEnumerable< KeyPoint keypoints,
Mat  outImage,
Scalar color = null,
DrawMatchesFlags  flags = DrawMatchesFlags.Default 
)
static

Draw keypoints.

Parameters
image
keypoints
outImage
color
flags

§ DrawMatches() [1/2]

static void OpenCvSharp.Cv2.DrawMatches ( Mat  img1,
IEnumerable< KeyPoint keypoints1,
Mat  img2,
IEnumerable< KeyPoint keypoints2,
IEnumerable< DMatch matches1To2,
Mat  outImg,
Scalar matchColor = null,
Scalar singlePointColor = null,
IEnumerable< byte >  matchesMask = null,
DrawMatchesFlags  flags = DrawMatchesFlags.Default 
)
static

Draws matches of keypints from two images on output image.

Parameters
img1
keypoints1
img2
keypoints2
matches1To2
outImg
matchColor
singlePointColor
matchesMask
flags

§ DrawMatches() [2/2]

static void OpenCvSharp.Cv2.DrawMatches ( Mat  img1,
IEnumerable< KeyPoint keypoints1,
Mat  img2,
IEnumerable< KeyPoint keypoints2,
IEnumerable< IEnumerable< DMatch >>  matches1To2,
Mat  outImg,
Scalar matchColor = null,
Scalar singlePointColor = null,
IEnumerable< IEnumerable< byte >>  matchesMask = null,
DrawMatchesFlags  flags = DrawMatchesFlags.Default 
)
static

Draws matches of keypints from two images on output image.

Parameters
img1
keypoints1
img2
keypoints2
matches1To2
outImg
matchColor
singlePointColor
matchesMask
flags

§ EdgePreservingFilter()

static void OpenCvSharp.Cv2.EdgePreservingFilter ( InputArray  src,
OutputArray  dst,
EdgePreservingMethods  flags = EdgePreservingMethods.RecursFilter,
float  sigmaS = 60,
float  sigmaR = 0.4f 
)
static

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

Parameters
srcInput 8-bit 3-channel image.
dstOutput 8-bit 3-channel image.
flagsEdge preserving filters
sigmaSRange between 0 to 200.
sigmaRRange between 0 to 1.

§ Eigen()

static bool OpenCvSharp.Cv2.Eigen ( InputArray  src,
OutputArray  eigenvalues,
OutputArray  eigenvectors 
)
static

Computes eigenvalues and eigenvectors of a symmetric matrix.

Parameters
srcThe input matrix; must have CV_32FC1 or CV_64FC1 type, square size and be symmetric: src^T == src
eigenvaluesThe output vector of eigenvalues of the same type as src; The eigenvalues are stored in the descending order.
eigenvectorsThe output matrix of eigenvectors; It will have the same size and the same type as src; The eigenvectors are stored as subsequent matrix rows, in the same order as the corresponding eigenvalues
Returns

§ Ellipse() [1/2]

static void OpenCvSharp.Cv2.Ellipse ( InputOutputArray  img,
Point  center,
Size  axes,
double  angle,
double  startAngle,
double  endAngle,
Scalar  color,
int  thickness = 1,
LineTypes  lineType = LineTypes.Link8,
int  shift = 0 
)
static

Draws simple or thick elliptic arc or fills ellipse sector

Parameters
imgImage.
centerCenter of the ellipse.
axesLength of the ellipse axes.
angleRotation angle.
startAngleStarting angle of the elliptic arc.
endAngleEnding angle of the elliptic arc.
colorEllipse color.
thicknessThickness of the ellipse arc. [By default this is 1]
lineTypeType of the ellipse boundary. [By default this is LineType.Link8]
shiftNumber of fractional bits in the center coordinates and axes' values. [By default this is 0]

§ Ellipse() [2/2]

static void OpenCvSharp.Cv2.Ellipse ( InputOutputArray  img,
RotatedRect  box,
Scalar  color,
int  thickness = 1,
LineTypes  lineType = LineTypes.Link8 
)
static

Draws simple or thick elliptic arc or fills ellipse sector

Parameters
imgImage.
boxThe enclosing box of the ellipse drawn
colorEllipse color.
thicknessThickness of the ellipse boundary. [By default this is 1]
lineTypeType of the ellipse boundary. [By default this is LineType.Link8]

§ Ellipse2Poly()

static Point [] OpenCvSharp.Cv2.Ellipse2Poly ( Point  center,
Size  axes,
int  angle,
int  arcStart,
int  arcEnd,
int  delta 
)
static

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.

Parameters
centerCenter of the arc.
axesHalf of the size of the ellipse main axes. See the ellipse for details.
angleRotation angle of the ellipse in degrees. See the ellipse for details.
arcStartStarting angle of the elliptic arc in degrees.
arcEndEnding angle of the elliptic arc in degrees.
deltaAngle between the subsequent polyline vertices. It defines the approximation
Returns
Output vector of polyline vertices.

§ EMD() [1/4]

static float OpenCvSharp.Cv2.EMD ( InputArray  signature1,
InputArray  signature2,
DistanceTypes  distType 
)
static

Parameters
signature1
signature2
distType
Returns

§ EMD() [2/4]

static float OpenCvSharp.Cv2.EMD ( InputArray  signature1,
InputArray  signature2,
DistanceTypes  distType,
InputArray  cost 
)
static

Parameters
signature1
signature2
distType
cost
Returns

§ EMD() [3/4]

static float OpenCvSharp.Cv2.EMD ( InputArray  signature1,
InputArray  signature2,
DistanceTypes  distType,
InputArray  cost,
out float  lowerBound 
)
static

Parameters
signature1
signature2
distType
cost
lowerBound
Returns

§ EMD() [4/4]

static float OpenCvSharp.Cv2.EMD ( InputArray  signature1,
InputArray  signature2,
DistanceTypes  distType,
InputArray  cost,
out float  lowerBound,
OutputArray  flow 
)
static

Parameters
signature1
signature2
distType
cost
lowerBound
flow
Returns

§ EqualizeHist()

static void OpenCvSharp.Cv2.EqualizeHist ( InputArray  src,
OutputArray  dst 
)
static

normalizes the grayscale image brightness and contrast by normalizing its histogram

Parameters
srcThe source 8-bit single channel image
dstThe destination image; will have the same size and the same type as src

§ Erode()

static void OpenCvSharp.Cv2.Erode ( InputArray  src,
OutputArray  dst,
InputArray  element,
Point anchor = null,
int  iterations = 1,
BorderTypes  borderType = BorderTypes.Constant,
Scalar borderValue = null 
)
static

Erodes an image by using a specific structuring element.

Parameters
srcThe source image
dstThe destination image. It will have the same size and the same type as src
elementThe structuring element used for dilation. If element=new Mat(), a 3x3 rectangular structuring element is used
anchorPosition of the anchor within the element. The default value (-1, -1) means that the anchor is at the element center
iterationsThe number of times erosion is applied
borderTypeThe pixel extrapolation method
borderValueThe border value in case of a constant border. The default value has a special meaning. [By default this is CvCpp.MorphologyDefaultBorderValue()]

§ EstimateAffine3D()

static int OpenCvSharp.Cv2.EstimateAffine3D ( InputArray  src,
InputArray  dst,
OutputArray  outVal,
OutputArray  inliers,
double  ransacThreshold = 3,
double  confidence = 0.99 
)
static

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

Parameters
srcFirst input 3D point set.
dstSecond input 3D point set.
outValOutput 3D affine transformation matrix 3 x 4 .
inliersOutput vector indicating which points are inliers.
ransacThresholdMaximum reprojection error in the RANSAC algorithm to consider a point as an inlier.
confidenceConfidence level, between 0 and 1, for the estimated transformation. Anything between 0.95 and 0.99 is usually good enough. Values too close to 1 can slow down the estimation significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation.
Returns

§ EstimateRigidTransform()

static Mat OpenCvSharp.Cv2.EstimateRigidTransform ( InputArray  src,
InputArray  dst,
bool  fullAffine 
)
static

Estimates the best-fit Euqcidean, similarity, affine or perspective transformation that maps one 2D point set to another or one image to another.

Parameters
srcFirst input 2D point set stored in std::vector or Mat, or an image stored in Mat.
dstSecond input 2D point set of the same size and the same type as A, or another image.
fullAffineIf true, the function finds an optimal affine transformation with no additional restrictions (6 degrees of freedom). Otherwise, the class of transformations to choose from is limited to combinations of translation, rotation, and uniform scaling (5 degrees of freedom).
Returns

§ EvaluateFeatureDetector()

static void OpenCvSharp.Cv2.EvaluateFeatureDetector ( Mat  img1,
Mat  img2,
Mat  H1to2,
ref KeyPoint []  keypoints1,
ref KeyPoint []  keypoints2,
out float  repeatability,
out int  correspCount 
)
static

Parameters
img1
img2
H1to2
keypoints1
keypoints2
repeatability
correspCount

§ Exp()

static void OpenCvSharp.Cv2.Exp ( InputArray  src,
OutputArray  dst 
)
static

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

Parameters
srcThe source array
dstThe destination array; will have the same size and same type as src

§ ExtractChannel()

static void OpenCvSharp.Cv2.ExtractChannel ( InputArray  src,
OutputArray  dst,
int  coi 
)
static

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

Parameters
src
dst
coi

§ FAST() [1/2]

static KeyPoint [] OpenCvSharp.Cv2.FAST ( InputArray  image,
int  threshold,
bool  nonmaxSupression = true 
)
static

Detects corners using the FAST algorithm

Parameters
imagegrayscale image where keypoints (corners) are detected.
thresholdthreshold on difference between intensity of the central pixel and pixels of a circle around this pixel.
nonmaxSupressionif true, non-maximum suppression is applied to detected corners (keypoints).
Returns
keypoints detected on the image.

§ FAST() [2/2]

static KeyPoint [] OpenCvSharp.Cv2.FAST ( InputArray  image,
int  threshold,
bool  nonmaxSupression,
FASTType  type 
)
static

Detects corners using the FAST algorithm

Parameters
imagegrayscale image where keypoints (corners) are detected.
thresholdthreshold on difference between intensity of the central pixel and pixels of a circle around this pixel.
nonmaxSupressionif true, non-maximum suppression is applied to detected corners (keypoints).
typeone of the three neighborhoods as defined in the paper
Returns
keypoints detected on the image.

§ FastAtan2()

static float OpenCvSharp.Cv2.FastAtan2 ( float  y,
float  x 
)
static

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

Parameters
y
x
Returns

§ FastFree()

static void OpenCvSharp.Cv2.FastFree ( IntPtr  ptr)
static

Parameters
ptr

§ FastMalloc()

static IntPtr OpenCvSharp.Cv2.FastMalloc ( long  bufSize)
static

Parameters
bufSize
Returns

§ FastNlMeansDenoising()

static void OpenCvSharp.Cv2.FastNlMeansDenoising ( InputArray  src,
OutputArray  dst,
float  h = 3,
int  templateWindowSize = 7,
int  searchWindowSize = 21 
)
static

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

Parameters
srcInput 8-bit 1-channel, 2-channel or 3-channel image.
dstOutput image with the same size and type as src .
hParameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise
templateWindowSizeSize in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels
searchWindowSizeSize in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels

§ FastNlMeansDenoisingColored()

static void OpenCvSharp.Cv2.FastNlMeansDenoisingColored ( InputArray  src,
OutputArray  dst,
float  h = 3,
float  hColor = 3,
int  templateWindowSize = 7,
int  searchWindowSize = 21 
)
static

Modification of fastNlMeansDenoising function for colored images

Parameters
srcInput 8-bit 3-channel image.
dstOutput image with the same size and type as src.
hParameter regulating filter strength for luminance component. Bigger h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise
hColorThe same as h but for color components. For most images value equals 10 will be enought to remove colored noise and do not distort colors
templateWindowSizeSize in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels
searchWindowSizeSize in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels

§ FastNlMeansDenoisingColoredMulti() [1/2]

static void OpenCvSharp.Cv2.FastNlMeansDenoisingColoredMulti ( IEnumerable< InputArray srcImgs,
OutputArray  dst,
int  imgToDenoiseIndex,
int  temporalWindowSize,
float  h = 3,
float  hColor = 3,
int  templateWindowSize = 7,
int  searchWindowSize = 21 
)
static

Modification of fastNlMeansDenoisingMulti function for colored images sequences

Parameters
srcImgsInput 8-bit 3-channel images sequence. All images should have the same type and size.
dstOutput image with the same size and type as srcImgs images.
imgToDenoiseIndexTarget image to denoise index in srcImgs sequence
temporalWindowSizeNumber of surrounding images to use for target image denoising. Should be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise srcImgs[imgToDenoiseIndex] image.
hParameter regulating filter strength for luminance component. Bigger h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
hColorThe same as h but for color components.
templateWindowSizeSize in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels
searchWindowSizeSize in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels

§ FastNlMeansDenoisingColoredMulti() [2/2]

static void OpenCvSharp.Cv2.FastNlMeansDenoisingColoredMulti ( IEnumerable< Mat srcImgs,
OutputArray  dst,
int  imgToDenoiseIndex,
int  temporalWindowSize,
float  h = 3,
float  hColor = 3,
int  templateWindowSize = 7,
int  searchWindowSize = 21 
)
static

Modification of fastNlMeansDenoisingMulti function for colored images sequences

Parameters
srcImgsInput 8-bit 3-channel images sequence. All images should have the same type and size.
dstOutput image with the same size and type as srcImgs images.
imgToDenoiseIndexTarget image to denoise index in srcImgs sequence
temporalWindowSizeNumber of surrounding images to use for target image denoising. Should be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise srcImgs[imgToDenoiseIndex] image.
hParameter regulating filter strength for luminance component. Bigger h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
hColorThe same as h but for color components.
templateWindowSizeSize in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels
searchWindowSizeSize in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels

§ FastNlMeansDenoisingMulti() [1/2]

static void OpenCvSharp.Cv2.FastNlMeansDenoisingMulti ( IEnumerable< InputArray srcImgs,
OutputArray  dst,
int  imgToDenoiseIndex,
int  temporalWindowSize,
float  h = 3,
int  templateWindowSize = 7,
int  searchWindowSize = 21 
)
static

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.

Parameters
srcImgsInput 8-bit 1-channel, 2-channel or 3-channel images sequence. All images should have the same type and size.
dstOutput image with the same size and type as srcImgs images.
imgToDenoiseIndexTarget image to denoise index in srcImgs sequence
temporalWindowSizeNumber of surrounding images to use for target image denoising. Should be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise srcImgs[imgToDenoiseIndex] image.
hParameter regulating filter strength for luminance component. Bigger h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise
templateWindowSizeSize in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels
searchWindowSizeSize in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels

§ FastNlMeansDenoisingMulti() [2/2]

static void OpenCvSharp.Cv2.FastNlMeansDenoisingMulti ( IEnumerable< Mat srcImgs,
OutputArray  dst,
int  imgToDenoiseIndex,
int  temporalWindowSize,
float  h = 3,
int  templateWindowSize = 7,
int  searchWindowSize = 21 
)
static

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.

Parameters
srcImgsInput 8-bit 1-channel, 2-channel or 3-channel images sequence. All images should have the same type and size.
dstOutput image with the same size and type as srcImgs images.
imgToDenoiseIndexTarget image to denoise index in srcImgs sequence
temporalWindowSizeNumber of surrounding images to use for target image denoising. Should be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise srcImgs[imgToDenoiseIndex] image.
hParameter regulating filter strength for luminance component. Bigger h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise
templateWindowSizeSize in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels
searchWindowSizeSize in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels

§ FillConvexPoly() [1/2]

static void OpenCvSharp.Cv2.FillConvexPoly ( Mat  img,
IEnumerable< Point pts,
Scalar  color,
LineTypes  lineType = LineTypes.Link8,
int  shift = 0 
)
static

Fills a convex polygon.

Parameters
imgImage
ptsThe polygon vertices
colorPolygon color
lineTypeType of the polygon boundaries
shiftThe number of fractional bits in the vertex coordinates

§ FillConvexPoly() [2/2]

static void OpenCvSharp.Cv2.FillConvexPoly ( InputOutputArray  img,
InputArray  pts,
Scalar  color,
LineTypes  lineType = LineTypes.Link8,
int  shift = 0 
)
static

Fills a convex polygon.

Parameters
imgImage
ptsThe polygon vertices
colorPolygon color
lineTypeType of the polygon boundaries
shiftThe number of fractional bits in the vertex coordinates

§ FillPoly() [1/2]

static void OpenCvSharp.Cv2.FillPoly ( Mat  img,
IEnumerable< IEnumerable< Point >>  pts,
Scalar  color,
LineTypes  lineType = LineTypes.Link8,
int  shift = 0,
Point offset = null 
)
static

Fills the area bounded by one or more polygons

Parameters
imgImage
ptsArray of polygons, each represented as an array of points
colorPolygon color
lineTypeType of the polygon boundaries
shiftThe number of fractional bits in the vertex coordinates
offset

§ FillPoly() [2/2]

static void OpenCvSharp.Cv2.FillPoly ( InputOutputArray  img,
InputArray  pts,
Scalar  color,
LineTypes  lineType = LineTypes.Link8,
int  shift = 0,
Point offset = null 
)
static

Fills the area bounded by one or more polygons

Parameters
imgImage
ptsArray of polygons, each represented as an array of points
colorPolygon color
lineTypeType of the polygon boundaries
shiftThe number of fractional bits in the vertex coordinates
offset

§ Filter2D()

static void OpenCvSharp.Cv2.Filter2D ( InputArray  src,
OutputArray  dst,
MatType  ddepth,
InputArray  kernel,
Point anchor = null,
double  delta = 0,
BorderTypes  borderType = BorderTypes.Default 
)
static

Convolves an image with the kernel

Parameters
srcThe source image
dstThe destination image. It will have the same size and the same number of channels as src
ddepthThe desired depth of the destination image. If it is negative, it will be the same as src.depth()
kernelConvolution kernel (or rather a correlation kernel), a single-channel floating point matrix. If you want to apply different kernels to different channels, split the image into separate color planes using split() and process them individually
anchorThe anchor of the kernel that indicates the relative position of a filtered point within the kernel. The anchor should lie within the kernel. The special default value (-1,-1) means that the anchor is at the kernel center
deltaThe optional value added to the filtered pixels before storing them in dst
borderTypeThe pixel extrapolation method

§ FilterSpeckles()

static void OpenCvSharp.Cv2.FilterSpeckles ( InputOutputArray  img,
double  newVal,
int  maxSpeckleSize,
double  maxDiff,
InputOutputArray  buf = null 
)
static

filters off speckles (small regions of incorrectly computed disparity)

Parameters
imgThe input 16-bit signed disparity image
newValThe disparity value used to paint-off the speckles
maxSpeckleSizeThe maximum speckle size to consider it a speckle. Larger blobs are not affected by the algorithm
maxDiffMaximum difference between neighbor disparity pixels to put them into the same blob. Note that since StereoBM, StereoSGBM and may be other algorithms return a fixed-point disparity map, where disparity values are multiplied by 16, this scale factor should be taken into account when specifying this parameter value.
bufThe optional temporary buffer to avoid memory allocation within the function.

§ Find4QuadCornerSubpix() [1/2]

static bool OpenCvSharp.Cv2.Find4QuadCornerSubpix ( InputArray  img,
InputOutputArray  corners,
Size  regionSize 
)
static

finds subpixel-accurate positions of the chessboard corners

Parameters
img
corners
regionSize
Returns

§ Find4QuadCornerSubpix() [2/2]

static bool OpenCvSharp.Cv2.Find4QuadCornerSubpix ( InputArray  img,
[In, Out] Point2f []  corners,
Size  regionSize 
)
static

finds subpixel-accurate positions of the chessboard corners

Parameters
img
corners
regionSize
Returns

§ FindChessboardCorners() [1/2]

static bool OpenCvSharp.Cv2.FindChessboardCorners ( InputArray  image,
Size  patternSize,
OutputArray  corners,
ChessboardFlags  flags = ChessboardFlags.AdaptiveThresh | ChessboardFlags.NormalizeImage 
)
static

Finds the positions of internal corners of the chessboard.

Parameters
imageSource chessboard view. It must be an 8-bit grayscale or color image.
patternSizeNumber of inner corners per a chessboard row and column ( patternSize = Size(points_per_row,points_per_colum) = Size(columns, rows) ).
cornersOutput array of detected corners.
flagsVarious operation flags that can be zero or a combination of the ChessboardFlag values
Returns
The function returns true if all of the corners are found and they are placed in a certain order (row by row, left to right in every row). Otherwise, if the function fails to find all the corners or reorder them, it returns false.

§ FindChessboardCorners() [2/2]

static bool OpenCvSharp.Cv2.FindChessboardCorners ( InputArray  image,
Size  patternSize,
out Point2f []  corners,
ChessboardFlags  flags = ChessboardFlags.AdaptiveThresh | ChessboardFlags.NormalizeImage 
)
static

Finds the positions of internal corners of the chessboard.

Parameters
imageSource chessboard view. It must be an 8-bit grayscale or color image.
patternSizeNumber of inner corners per a chessboard row and column ( patternSize = Size(points_per_row,points_per_colum) = Size(columns, rows) ).
cornersOutput array of detected corners.
flagsVarious operation flags that can be zero or a combination of the ChessboardFlag values
Returns
The function returns true if all of the corners are found and they are placed in a certain order (row by row, left to right in every row). Otherwise, if the function fails to find all the corners or reorder them, it returns false.

§ FindCirclesGrid() [1/2]

static bool OpenCvSharp.Cv2.FindCirclesGrid ( InputArray  image,
Size  patternSize,
OutputArray  centers,
FindCirclesGridFlags  flags = FindCirclesGridFlags.SymmetricGrid,
FeatureDetector  blobDetector = null 
)
static

Finds centers in the grid of circles.

Parameters
imagegrid view of input circles; it must be an 8-bit grayscale or color image.
patternSizenumber of circles per row and column ( patternSize = Size(points_per_row, points_per_colum) ).
centersoutput array of detected centers.
flagsvarious operation flags that can be one of the FindCirclesGridFlag values
blobDetectorfeature detector that finds blobs like dark circles on light background.
Returns

§ FindCirclesGrid() [2/2]

static bool OpenCvSharp.Cv2.FindCirclesGrid ( InputArray  image,
Size  patternSize,
out Point2f []  centers,
FindCirclesGridFlags  flags = FindCirclesGridFlags.SymmetricGrid,
FeatureDetector  blobDetector = null 
)
static

Finds centers in the grid of circles.

Parameters
imagegrid view of input circles; it must be an 8-bit grayscale or color image.
patternSizenumber of circles per row and column ( patternSize = Size(points_per_row, points_per_colum) ).
centersoutput array of detected centers.
flagsvarious operation flags that can be one of the FindCirclesGridFlag values
blobDetectorfeature detector that finds blobs like dark circles on light background.
Returns

§ FindContours() [1/2]

static void OpenCvSharp.Cv2.FindContours ( InputOutputArray  image,
out Point  contours[][],
out HierarchyIndex []  hierarchy,
RetrievalModes  mode,
ContourApproximationModes  method,
Point offset = null 
)
static

Finds contours in a binary image.

Parameters
imageSource, an 8-bit single-channel image. Non-zero pixels are treated as 1’s. Zero pixels remain 0’s, so the image is treated as binary. The function modifies the image while extracting the contours.
contoursDetected contours. Each contour is stored as a vector of points.
hierarchyOptional output vector, containing information about the image topology. It has as many elements as the number of contours. For each i-th contour contours[i], the members of the elements hierarchy[i] are set to 0-based indices in contours of the next and previous contours at the same hierarchical level, the first child contour and the parent contour, respectively. If for the contour i there are no next, previous, parent, or nested contours, the corresponding elements of hierarchy[i] will be negative.
modeContour retrieval mode
methodContour approximation method
offsetOptional offset by which every contour point is shifted. This is useful if the contours are extracted from the image ROI and then they should be analyzed in the whole image context.

§ FindContours() [2/2]

static void OpenCvSharp.Cv2.FindContours ( InputOutputArray  image,
out Mat []  contours,
OutputArray  hierarchy,
RetrievalModes  mode,
ContourApproximationModes  method,
Point offset = null 
)
static

Finds contours in a binary image.

Parameters
imageSource, an 8-bit single-channel image. Non-zero pixels are treated as 1’s. Zero pixels remain 0’s, so the image is treated as binary. The function modifies the image while extracting the contours.
contoursDetected contours. Each contour is stored as a vector of points.
hierarchyOptional output vector, containing information about the image topology. It has as many elements as the number of contours. For each i-th contour contours[i], the members of the elements hierarchy[i] are set to 0-based indices in contours of the next and previous contours at the same hierarchical level, the first child contour and the parent contour, respectively. If for the contour i there are no next, previous, parent, or nested contours, the corresponding elements of hierarchy[i] will be negative.
modeContour retrieval mode
methodContour approximation method
offsetOptional offset by which every contour point is shifted. This is useful if the contours are extracted from the image ROI and then they should be analyzed in the whole image context.

§ FindContoursAsArray()

static Point [][] OpenCvSharp.Cv2.FindContoursAsArray ( InputOutputArray  image,
RetrievalModes  mode,
ContourApproximationModes  method,
Point offset = null 
)
static

Finds contours in a binary image.

Parameters
imageSource, an 8-bit single-channel image. Non-zero pixels are treated as 1’s. Zero pixels remain 0’s, so the image is treated as binary. The function modifies the image while extracting the contours.
modeContour retrieval mode
methodContour approximation method
offsetOptional offset by which every contour point is shifted. This is useful if the contours are extracted from the image ROI and then they should be analyzed in the whole image context.
Returns
Detected contours. Each contour is stored as a vector of points.

§ FindContoursAsMat()

static MatOfPoint [] OpenCvSharp.Cv2.FindContoursAsMat ( InputOutputArray  image,
RetrievalModes  mode,
ContourApproximationModes  method,
Point offset = null 
)
static

Finds contours in a binary image.

Parameters
imageSource, an 8-bit single-channel image. Non-zero pixels are treated as 1’s. Zero pixels remain 0’s, so the image is treated as binary. The function modifies the image while extracting the contours.
modeContour retrieval mode
methodContour approximation method
offsetOptional offset by which every contour point is shifted. This is useful if the contours are extracted from the image ROI and then they should be analyzed in the whole image context.
Returns
Detected contours. Each contour is stored as a vector of points.

§ FindFundamentalMat() [1/2]

static Mat OpenCvSharp.Cv2.FindFundamentalMat ( InputArray  points1,
InputArray  points2,
FundamentalMatMethod  method = FundamentalMatMethod.Ransac,
double  param1 = 3.0,
double  param2 = 0.99,
OutputArray  mask = null 
)
static

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

Parameters
points1Array of N points from the first image. The point coordinates should be floating-point (single or double precision).
points2Array of the second image points of the same size and format as points1 .
methodMethod for computing a fundamental matrix.
param1Parameter used for RANSAC. It is the maximum distance from a point to an epipolar line in pixels, beyond which the point is considered an outlier and is not used for computing the final fundamental matrix. It can be set to something like 1-3, depending on the accuracy of the point localization, image resolution, and the image noise.
param2Parameter used for the RANSAC or LMedS methods only. It specifies a desirable level of confidence (probability) that the estimated matrix is correct.
maskOutput array of N elements, every element of which is set to 0 for outliers and to 1 for the other points. The array is computed only in the RANSAC and LMedS methods. For other methods, it is set to all 1’s.
Returns
fundamental matrix

§ FindFundamentalMat() [2/2]

static Mat OpenCvSharp.Cv2.FindFundamentalMat ( IEnumerable< Point2d points1,
IEnumerable< Point2d points2,
FundamentalMatMethod  method = FundamentalMatMethod.Ransac,
double  param1 = 3.0,
double  param2 = 0.99,
OutputArray  mask = null 
)
static

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

Parameters
points1Array of N points from the first image. The point coordinates should be floating-point (single or double precision).
points2Array of the second image points of the same size and format as points1 .
methodMethod for computing a fundamental matrix.
param1Parameter used for RANSAC. It is the maximum distance from a point to an epipolar line in pixels, beyond which the point is considered an outlier and is not used for computing the final fundamental matrix. It can be set to something like 1-3, depending on the accuracy of the point localization, image resolution, and the image noise.
param2Parameter used for the RANSAC or LMedS methods only. It specifies a desirable level of confidence (probability) that the estimated matrix is correct.
maskOutput array of N elements, every element of which is set to 0 for outliers and to 1 for the other points. The array is computed only in the RANSAC and LMedS methods. For other methods, it is set to all 1’s.
Returns
fundamental matrix

§ FindHomography() [1/2]

static Mat OpenCvSharp.Cv2.FindHomography ( InputArray  srcPoints,
InputArray  dstPoints,
HomographyMethods  method = HomographyMethods.None,
double  ransacReprojThreshold = 3,
OutputArray  mask = null 
)
static

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

Parameters
srcPointsCoordinates of the points in the original plane, a matrix of the type CV_32FC2
dstPointsCoordinates of the points in the target plane, a matrix of the type CV_32FC2
methodMethod used to computed a homography matrix.
ransacReprojThresholdMaximum allowed reprojection error to treat a point pair as an inlier (used in the RANSAC method only)
maskOptional output mask set by a robust method ( CV_RANSAC or CV_LMEDS ). Note that the input mask values are ignored.
Returns

§ FindHomography() [2/2]

static Mat OpenCvSharp.Cv2.FindHomography ( IEnumerable< Point2d srcPoints,
IEnumerable< Point2d dstPoints,
HomographyMethods  method = HomographyMethods.None,
double  ransacReprojThreshold = 3,
OutputArray  mask = null 
)
static

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

Parameters
srcPointsCoordinates of the points in the original plane
dstPointsCoordinates of the points in the target plane
methodMethod used to computed a homography matrix.
ransacReprojThresholdMaximum allowed reprojection error to treat a point pair as an inlier (used in the RANSAC method only)
maskOptional output mask set by a robust method ( CV_RANSAC or CV_LMEDS ). Note that the input mask values are ignored.
Returns

§ FindNonZero()

static void OpenCvSharp.Cv2.FindNonZero ( InputArray  src,
OutputArray  idx 
)
static

returns the list of locations of non-zero pixels

Parameters
src
idx

§ FitEllipse() [1/3]

static RotatedRect OpenCvSharp.Cv2.FitEllipse ( InputArray  points)
static

Fits ellipse to the set of 2D points.

Parameters
pointsInput 2D point set
Returns

§ FitEllipse() [2/3]

static RotatedRect OpenCvSharp.Cv2.FitEllipse ( IEnumerable< Point points)
static

Fits ellipse to the set of 2D points.

Parameters
pointsInput 2D point set
Returns

§ FitEllipse() [3/3]

static RotatedRect OpenCvSharp.Cv2.FitEllipse ( IEnumerable< Point2f points)
static

Fits ellipse to the set of 2D points.

Parameters
pointsInput 2D point set
Returns

§ FitLine() [1/5]

static void OpenCvSharp.Cv2.FitLine ( InputArray  points,
OutputArray  line,
DistanceTypes  distType,
double  param,
double  reps,
double  aeps 
)
static

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

Parameters
pointsInput vector of 2D or 3D points
lineOutput line parameters. In case of 2D fitting, it should be a vector of 4 elements (like Vec4f) - (vx, vy, x0, y0), where (vx, vy) is a normalized vector collinear to the line and (x0, y0) is a point on the line. In case of 3D fitting, it should be a vector of 6 elements (like Vec6f) - (vx, vy, vz, x0, y0, z0), where (vx, vy, vz) is a normalized vector collinear to the line and (x0, y0, z0) is a point on the line.
distTypeDistance used by the M-estimator
paramNumerical parameter ( C ) for some types of distances. If it is 0, an optimal value is chosen.
repsSufficient accuracy for the radius (distance between the coordinate origin and the line).
aepsSufficient accuracy for the angle. 0.01 would be a good default value for reps and aeps.

§ FitLine() [2/5]

static Line2D OpenCvSharp.Cv2.FitLine ( IEnumerable< Point points,
DistanceTypes  distType,
double  param,
double  reps,
double  aeps 
)
static

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

Parameters
pointsInput vector of 2D or 3D points
distTypeDistance used by the M-estimator
paramNumerical parameter ( C ) for some types of distances. If it is 0, an optimal value is chosen.
repsSufficient accuracy for the radius (distance between the coordinate origin and the line).
aepsSufficient accuracy for the angle. 0.01 would be a good default value for reps and aeps.
Returns
Output line parameters.

§ FitLine() [3/5]

static Line2D OpenCvSharp.Cv2.FitLine ( IEnumerable< Point2f points,
DistanceTypes  distType,
double  param,
double  reps,
double  aeps 
)
static

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

Parameters
pointsInput vector of 2D or 3D points
distTypeDistance used by the M-estimator
paramNumerical parameter ( C ) for some types of distances. If it is 0, an optimal value is chosen.
repsSufficient accuracy for the radius (distance between the coordinate origin and the line).
aepsSufficient accuracy for the angle. 0.01 would be a good default value for reps and aeps.
Returns
Output line parameters.

§ FitLine() [4/5]

static Line3D OpenCvSharp.Cv2.FitLine ( IEnumerable< Point3i points,
DistanceTypes  distType,
double  param,
double  reps,
double  aeps 
)
static

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

Parameters
pointsInput vector of 2D or 3D points
distTypeDistance used by the M-estimator
paramNumerical parameter ( C ) for some types of distances. If it is 0, an optimal value is chosen.
repsSufficient accuracy for the radius (distance between the coordinate origin and the line).
aepsSufficient accuracy for the angle. 0.01 would be a good default value for reps and aeps.
Returns
Output line parameters.

§ FitLine() [5/5]

static Line3D OpenCvSharp.Cv2.FitLine ( IEnumerable< Point3f points,
DistanceTypes  distType,
double  param,
double  reps,
double  aeps 
)
static

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

Parameters
pointsInput vector of 2D or 3D points
distTypeDistance used by the M-estimator
paramNumerical parameter ( C ) for some types of distances. If it is 0, an optimal value is chosen.
repsSufficient accuracy for the radius (distance between the coordinate origin and the line).
aepsSufficient accuracy for the angle. 0.01 would be a good default value for reps and aeps.
Returns
Output line parameters.

§ Flip()

static void OpenCvSharp.Cv2.Flip ( InputArray  src,
OutputArray  dst,
FlipMode  flipCode 
)
static

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

Parameters
srcThe source array
dstThe destination array; will have the same size and same type as src
flipCodeSpecifies how to flip the array: 0 means flipping around the x-axis, positive (e.g., 1) means flipping around y-axis, and negative (e.g., -1) means flipping around both axes. See also the discussion below for the formulas.

§ FloodFill() [1/4]

static int OpenCvSharp.Cv2.FloodFill ( InputOutputArray  image,
Point  seedPoint,
Scalar  newVal 
)
static

Fills a connected component with the given color.

Parameters
imageInput/output 1- or 3-channel, 8-bit, or floating-point image. It is modified by the function unless the FLOODFILL_MASK_ONLY flag is set in the second variant of the function. See the details below.
seedPointStarting point.
newValNew value of the repainted domain pixels.
Returns

§ FloodFill() [2/4]

static int OpenCvSharp.Cv2.FloodFill ( InputOutputArray  image,
Point  seedPoint,
Scalar  newVal,
out Rect  rect,
Scalar loDiff = null,
Scalar upDiff = null,
FloodFillFlags  flags = FloodFillFlags.Link4 
)
static

Fills a connected component with the given color.

Parameters
imageInput/output 1- or 3-channel, 8-bit, or floating-point image. It is modified by the function unless the FLOODFILL_MASK_ONLY flag is set in the second variant of the function. See the details below.
seedPointStarting point.
newValNew value of the repainted domain pixels.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
loDiffMaximal lower brightness/color difference between the currently observed pixel and one of its neighbors belonging to the component, or a seed pixel being added to the component.
upDiffMaximal upper brightness/color difference between the currently observed pixel and one of its neighbors belonging to the component, or a seed pixel being added to the component.
flagsOperation flags. Lower bits contain a connectivity value, 4 (default) or 8, used within the function. Connectivity determines which neighbors of a pixel are considered.
Returns

§ FloodFill() [3/4]

static int OpenCvSharp.Cv2.FloodFill ( InputOutputArray  image,
InputOutputArray  mask,
Point  seedPoint,
Scalar  newVal 
)
static

Fills a connected component with the given color.

Parameters
imageInput/output 1- or 3-channel, 8-bit, or floating-point image. It is modified by the function unless the FLOODFILL_MASK_ONLY flag is set in the second variant of the function. See the details below.
mask(For the second function only) Operation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller. The function uses and updates the mask, so you take responsibility of initializing the mask content. Flood-filling cannot go across non-zero pixels in the mask. For example, an edge detector output can be used as a mask to stop filling at edges. It is possible to use the same mask in multiple calls to the function to make sure the filled area does not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
Returns

§ FloodFill() [4/4]

static int OpenCvSharp.Cv2.FloodFill ( InputOutputArray  image,
InputOutputArray  mask,
Point  seedPoint,
Scalar  newVal,
out Rect  rect,
Scalar loDiff = null,
Scalar upDiff = null,
FloodFillFlags  flags = FloodFillFlags.Link4 
)
static

Fills a connected component with the given color.

Parameters
imageInput/output 1- or 3-channel, 8-bit, or floating-point image. It is modified by the function unless the FLOODFILL_MASK_ONLY flag is set in the second variant of the function. See the details below.
mask(For the second function only) Operation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller. The function uses and updates the mask, so you take responsibility of initializing the mask content. Flood-filling cannot go across non-zero pixels in the mask. For example, an edge detector output can be used as a mask to stop filling at edges. It is possible to use the same mask in multiple calls to the function to make sure the filled area does not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
loDiffMaximal lower brightness/color difference between the currently observed pixel and one of its neighbors belonging to the component, or a seed pixel being added to the component.
upDiffMaximal upper brightness/color difference between the currently observed pixel and one of its neighbors belonging to the component, or a seed pixel being added to the component.
flagsOperation flags. Lower bits contain a connectivity value, 4 (default) or 8, used within the function. Connectivity determines which neighbors of a pixel are considered.
Returns

§ GaussianBlur()

static void OpenCvSharp.Cv2.GaussianBlur ( InputArray  src,
OutputArray  dst,
Size  ksize,
double  sigmaX,
double  sigmaY = 0,
BorderTypes  borderType = BorderTypes.Default 
)
static

Blurs an image using a Gaussian filter.

Parameters
srcinput image; the image can have any number of channels, which are processed independently, but the depth should be CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
ksizeGaussian kernel size. ksize.width and ksize.height can differ but they both must be positive and odd. Or, they can be zero’s and then they are computed from sigma* .
sigmaXGaussian kernel standard deviation in X direction.
sigmaYGaussian kernel standard deviation in Y direction; if sigmaY is zero, it is set to be equal to sigmaX, if both sigmas are zeros, they are computed from ksize.width and ksize.height, respectively (see getGaussianKernel() for details); to fully control the result regardless of possible future modifications of all this semantics, it is recommended to specify all of ksize, sigmaX, and sigmaY.
borderTypepixel extrapolation method

§ Gemm()

static void OpenCvSharp.Cv2.Gemm ( InputArray  src1,
InputArray  src2,
double  alpha,
InputArray  src3,
double  gamma,
OutputArray  dst,
GemmFlags  flags = GemmFlags.None 
)
static

implements generalized matrix product algorithm GEMM from BLAS

Parameters
src1
src2
alpha
src3
gamma
dst
flags

§ GetAffineTransform() [1/2]

static Mat OpenCvSharp.Cv2.GetAffineTransform ( IEnumerable< Point2f src,
IEnumerable< Point2f dst 
)
static

Parameters
src
dst
Returns

§ GetAffineTransform() [2/2]

static Mat OpenCvSharp.Cv2.GetAffineTransform ( InputArray  src,
InputArray  dst 
)
static

Parameters
src
dst
Returns

§ GetBuildInformation()

static string OpenCvSharp.Cv2.GetBuildInformation ( )
static

Returns

§ GetCpuTickCount()

static long OpenCvSharp.Cv2.GetCpuTickCount ( )
static

Returns

§ GetDefaultNewCameraMatrix()

static Mat OpenCvSharp.Cv2.GetDefaultNewCameraMatrix ( InputArray  cameraMatrix,
Size imgSize = null,
bool  centerPrincipalPoint = false 
)
static

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

Parameters
cameraMatrixInput camera matrix.
imgSizeCamera view image size in pixels.
centerPrincipalPointLocation of the principal point in the new camera matrix. The parameter indicates whether this location should be at the image center or not.
Returns
the camera matrix that is either an exact copy of the input cameraMatrix (when centerPrinicipalPoint=false), or the modified one (when centerPrincipalPoint=true).

§ GetDerivKernels()

static void OpenCvSharp.Cv2.GetDerivKernels ( OutputArray  kx,
OutputArray  ky,
int  dx,
int  dy,
int  ksize,
bool  normalize = false,
MatType ktype = null 
)
static

Returns filter coefficients for computing spatial image derivatives.

Parameters
kxOutput matrix of row filter coefficients. It has the type ktype.
kyOutput matrix of column filter coefficients. It has the type ktype.
dxDerivative order in respect of x.
dyDerivative order in respect of y.
ksizeAperture size. It can be CV_SCHARR, 1, 3, 5, or 7.
normalizeFlag indicating whether to normalize (scale down) the filter coefficients or not. Theoretically, the coefficients should have the denominator $=2^{ksize*2-dx-dy-2}$. If you are going to filter floating-point images, you are likely to use the normalized kernels. But if you compute derivatives of an 8-bit image, store the results in a 16-bit image, and wish to preserve all the fractional bits, you may want to set normalize = false.
ktypeType of filter coefficients. It can be CV_32f or CV_64F.

§ GetGaborKernel()

static Mat OpenCvSharp.Cv2.GetGaborKernel ( Size  ksize,
double  sigma,
double  theta,
double  lambd,
double  gamma,
double  psi,
int  ktype 
)
static

Parameters
ksize
sigma
theta
lambd
gamma
psi
ktype
Returns

§ GetGaussianKernel()

static Mat OpenCvSharp.Cv2.GetGaussianKernel ( int  ksize,
double  sigma,
MatType ktype = null 
)
static

Returns Gaussian filter coefficients.

Parameters
ksizeAperture size. It should be odd and positive.
sigmaGaussian standard deviation. If it is non-positive, it is computed from ksize as sigma = 0.3*((ksize-1)*0.5 - 1) + 0.8.
ktypeType of filter coefficients. It can be CV_32F or CV_64F.
Returns

§ GetNearestPoint()

static int OpenCvSharp.Cv2.GetNearestPoint ( IEnumerable< Point2f recallPrecisionCurve,
float  lPrecision 
)
static

Parameters
recallPrecisionCurve
lPrecision
Returns

§ GetNumberOfCpus()

static int OpenCvSharp.Cv2.GetNumberOfCpus ( )
static

Returns

§ GetNumThreads()

static int OpenCvSharp.Cv2.GetNumThreads ( )
static

Returns

§ GetOptimalDFTSize()

static int OpenCvSharp.Cv2.GetOptimalDFTSize ( int  vecsize)
static

computes the minimal vector size vecsize1 >= vecsize so that the dft() of the vector of length vecsize1 can be computed efficiently

Parameters
vecsize
Returns

§ GetOptimalNewCameraMatrix() [1/2]

static Mat OpenCvSharp.Cv2.GetOptimalNewCameraMatrix ( InputArray  cameraMatrix,
InputArray  distCoeffs,
Size  imageSize,
double  alpha,
Size  newImgSize,
out Rect  validPixROI,
bool  centerPrincipalPoint = false 
)
static

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

Parameters
cameraMatrixInput camera matrix.
distCoeffsInput vector of distortion coefficients (k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]) of 4, 5, or 8 elements. If the array is null, the zero distortion coefficients are assumed.
imageSizeOriginal image size.
alphaFree scaling parameter between 0 (when all the pixels in the undistorted image are valid) and 1 (when all the source image pixels are retained in the undistorted image).
newImgSizeImage size after rectification. By default,it is set to imageSize .
validPixROIOptional output rectangle that outlines all-good-pixels region in the undistorted image. See roi1, roi2 description in stereoRectify() .
centerPrincipalPointOptional flag that indicates whether in the new camera matrix the principal point should be at the image center or not. By default, the principal point is chosen to best fit a subset of the source image (determined by alpha) to the corrected image.
Returns
optimal new camera matrix

§ GetOptimalNewCameraMatrix() [2/2]

static double [,] OpenCvSharp.Cv2.GetOptimalNewCameraMatrix ( double  cameraMatrix[,],
double []  distCoeffs,
Size  imageSize,
double  alpha,
Size  newImgSize,
out Rect  validPixROI,
bool  centerPrincipalPoint = false 
)
static

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

Parameters
cameraMatrixInput camera matrix.
distCoeffsInput vector of distortion coefficients (k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]) of 4, 5, or 8 elements. If the array is null, the zero distortion coefficients are assumed.
imageSizeOriginal image size.
alphaFree scaling parameter between 0 (when all the pixels in the undistorted image are valid) and 1 (when all the source image pixels are retained in the undistorted image).
newImgSizeImage size after rectification. By default,it is set to imageSize .
validPixROIOptional output rectangle that outlines all-good-pixels region in the undistorted image. See roi1, roi2 description in stereoRectify() .
centerPrincipalPointOptional flag that indicates whether in the new camera matrix the principal point should be at the image center or not. By default, the principal point is chosen to best fit a subset of the source image (determined by alpha) to the corrected image.
Returns
optimal new camera matrix

§ GetPerspectiveTransform() [1/2]

static Mat OpenCvSharp.Cv2.GetPerspectiveTransform ( IEnumerable< Point2f src,
IEnumerable< Point2f dst 
)
static

Parameters
src
dst
Returns

§ GetPerspectiveTransform() [2/2]

static Mat OpenCvSharp.Cv2.GetPerspectiveTransform ( InputArray  src,
InputArray  dst 
)
static

Parameters
src
dst
Returns

§ GetRecall()

static float OpenCvSharp.Cv2.GetRecall ( IEnumerable< Point2f recallPrecisionCurve,
float  lPrecision 
)
static

Parameters
recallPrecisionCurve
lPrecision
Returns

§ GetRectSubPix()

static void OpenCvSharp.Cv2.GetRectSubPix ( InputArray  image,
Size  patchSize,
Point2f  center,
OutputArray  patch,
int  patchType = -1 
)
static

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

Parameters
imageSource image.
patchSizeSize of the extracted patch.
centerFloating point coordinates of the center of the extracted rectangle within the source image. The center must be inside the image.
patchExtracted patch that has the size patchSize and the same number of channels as src .
patchTypeDepth of the extracted pixels. By default, they have the same depth as src.

§ GetRotationMatrix2D()

static Mat OpenCvSharp.Cv2.GetRotationMatrix2D ( Point2f  center,
double  angle,
double  scale 
)
static

Parameters
center
angle
scale
Returns

§ GetStructuringElement() [1/2]

static Mat OpenCvSharp.Cv2.GetStructuringElement ( MorphShapes  shape,
Size  ksize 
)
static

Parameters
shape
ksize
Returns

§ GetStructuringElement() [2/2]

static Mat OpenCvSharp.Cv2.GetStructuringElement ( MorphShapes  shape,
Size  ksize,
Point  anchor 
)
static

Parameters
shape
ksize
anchor
Returns

§ GetTextSize()

static Size OpenCvSharp.Cv2.GetTextSize ( string  text,
HersheyFonts  fontFace,
double  fontScale,
int  thickness,
out int  baseLine 
)
static

returns bounding box of the text string

Parameters
text
fontFace
fontScale
thickness
baseLine
Returns

§ GetThreadNum()

static int OpenCvSharp.Cv2.GetThreadNum ( )
static

Returns

§ GetTickCount()

static long OpenCvSharp.Cv2.GetTickCount ( )
static

Returns

§ GetTickFrequency()

static double OpenCvSharp.Cv2.GetTickFrequency ( )
static

Returns

§ GetValidDisparityROI()

static Rect OpenCvSharp.Cv2.GetValidDisparityROI ( Rect  roi1,
Rect  roi2,
int  minDisparity,
int  numberOfDisparities,
int  SADWindowSize 
)
static

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

Parameters
roi1
roi2
minDisparity
numberOfDisparities
SADWindowSize
Returns

§ GetWindowProperty()

static double OpenCvSharp.Cv2.GetWindowProperty ( string  winName,
WindowProperty  propId 
)
static

Provides parameters of a window.

Parameters
winNameName of the window.
propIdWindow property to retrieve.
Returns

§ GoodFeaturesToTrack()

static Point2f [] OpenCvSharp.Cv2.GoodFeaturesToTrack ( InputArray  src,
int  maxCorners,
double  qualityLevel,
double  minDistance,
InputArray  mask,
int  blockSize,
bool  useHarrisDetector,
double  k 
)
static

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

Parameters
srcInput 8-bit or floating-point 32-bit, single-channel image.
maxCornersMaximum number of corners to return. If there are more corners than are found, the strongest of them is returned.
qualityLevelParameter characterizing the minimal accepted quality of image corners. The parameter value is multiplied by the best corner quality measure, which is the minimal eigenvalue or the Harris function response (see cornerHarris() ). The corners with the quality measure less than the product are rejected. For example, if the best corner has the quality measure = 1500, and the qualityLevel=0.01, then all the corners with the quality measure less than 15 are rejected.
minDistanceMinimum possible Euclidean distance between the returned corners.
maskOptional region of interest. If the image is not empty (it needs to have the type CV_8UC1 and the same size as image ), it specifies the region in which the corners are detected.
blockSizeSize of an average block for computing a derivative covariation matrix over each pixel neighborhood.
useHarrisDetectorParameter indicating whether to use a Harris detector
kFree parameter of the Harris detector.
Returns
Output vector of detected corners.

§ GrabCut()

static void OpenCvSharp.Cv2.GrabCut ( InputArray  img,
InputOutputArray  mask,
Rect  rect,
InputOutputArray  bgdModel,
InputOutputArray  fgdModel,
int  iterCount,
GrabCutModes  mode 
)
static

Segments the image using GrabCut algorithm

Parameters
imgInput 8-bit 3-channel image.
maskInput/output 8-bit single-channel mask. The mask is initialized by the function when mode is set to GC_INIT_WITH_RECT. Its elements may have Cv2.GC_BGD / Cv2.GC_FGD / Cv2.GC_PR_BGD / Cv2.GC_PR_FGD
rectROI containing a segmented object. The pixels outside of the ROI are marked as "obvious background". The parameter is only used when mode==GC_INIT_WITH_RECT.
bgdModelTemporary array for the background model. Do not modify it while you are processing the same image.
fgdModelTemporary arrays for the foreground model. Do not modify it while you are processing the same image.
iterCountNumber of iterations the algorithm should make before returning the result. Note that the result can be refined with further calls with mode==GC_INIT_WITH_MASK or mode==GC_EVAL .
modeOperation mode that could be one of GrabCutFlag value.

§ GroupRectangles() [1/4]

static void OpenCvSharp.Cv2.GroupRectangles ( IList< Rect rectList,
int  groupThreshold,
double  eps = 0.2 
)
static

Groups the object candidate rectangles.

Parameters
rectListInput/output vector of rectangles. Output vector includes retained and grouped rectangles.
groupThresholdMinimum possible number of rectangles minus 1. The threshold is used in a group of rectangles to retain it.
eps

§ GroupRectangles() [2/4]

static void OpenCvSharp.Cv2.GroupRectangles ( IList< Rect rectList,
out int []  weights,
int  groupThreshold,
double  eps = 0.2 
)
static

Groups the object candidate rectangles.

Parameters
rectListInput/output vector of rectangles. Output vector includes retained and grouped rectangles.
weights
groupThresholdMinimum possible number of rectangles minus 1. The threshold is used in a group of rectangles to retain it.
epsRelative difference between sides of the rectangles to merge them into a group.

§ GroupRectangles() [3/4]

static void OpenCvSharp.Cv2.GroupRectangles ( IList< Rect rectList,
int  groupThreshold,
double  eps,
out int []  weights,
out double []  levelWeights 
)
static

Groups the object candidate rectangles.

Parameters
rectList
groupThreshold
eps
weights
levelWeights

§ GroupRectangles() [4/4]

static void OpenCvSharp.Cv2.GroupRectangles ( IList< Rect rectList,
out int []  rejectLevels,
out double []  levelWeights,
int  groupThreshold,
double  eps = 0.2 
)
static

Groups the object candidate rectangles.

Parameters
rectList
rejectLevels
levelWeights
groupThreshold
eps

§ GroupRectanglesMeanshift()

static void OpenCvSharp.Cv2.GroupRectanglesMeanshift ( IList< Rect rectList,
out double []  foundWeights,
out double []  foundScales,
double  detectThreshold = 0.0,
Size winDetSize = null 
)
static

Parameters
rectList
foundWeights
foundScales
detectThreshold
winDetSize

§ HaveImageReader()

static bool OpenCvSharp.Cv2.HaveImageReader ( string  fileName)