OpenCV for Unity 2.6.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.ImgprocModule.Imgproc Class Reference

Static Public Member Functions

static void accumulate (Mat src, Mat dst)
 Adds an image to the accumulator image.
 
static void accumulate (Mat src, Mat dst, Mat mask)
 Adds an image to the accumulator image.
 
static void accumulateProduct (Mat src1, Mat src2, Mat dst)
 Adds the per-element product of two input images to the accumulator image.
 
static void accumulateProduct (Mat src1, Mat src2, Mat dst, Mat mask)
 Adds the per-element product of two input images to the accumulator image.
 
static void accumulateSquare (Mat src, Mat dst)
 Adds the square of a source image to the accumulator image.
 
static void accumulateSquare (Mat src, Mat dst, Mat mask)
 Adds the square of a source image to the accumulator image.
 
static void accumulateWeighted (Mat src, Mat dst, double alpha)
 Updates a running average.
 
static void accumulateWeighted (Mat src, Mat dst, double alpha, Mat mask)
 Updates a running average.
 
static void adaptiveThreshold (Mat src, Mat dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C)
 Applies an adaptive threshold to an array.
 
static void applyColorMap (Mat src, Mat dst, int colormap)
 Applies a GNU Octave/MATLAB equivalent colormap on a given image.
 
static void applyColorMap (Mat src, Mat dst, Mat userColor)
 Applies a user colormap on a given image.
 
static void approxPolyDP (MatOfPoint2f curve, MatOfPoint2f approxCurve, double epsilon, bool closed)
 Approximates a polygonal curve(s) with the specified precision.
 
static double arcLength (MatOfPoint2f curve, bool closed)
 Calculates a contour perimeter or a curve length.
 
static void arrowedLine (Mat img, in Vec2d pt1, in Vec2d pt2, in Vec4d color)
 Draws an arrow segment pointing from the first point to the second one.
 
static void arrowedLine (Mat img, in Vec2d pt1, in Vec2d pt2, in Vec4d color, int thickness)
 Draws an arrow segment pointing from the first point to the second one.
 
static void arrowedLine (Mat img, in Vec2d pt1, in Vec2d pt2, in Vec4d color, int thickness, int line_type)
 Draws an arrow segment pointing from the first point to the second one.
 
static void arrowedLine (Mat img, in Vec2d pt1, in Vec2d pt2, in Vec4d color, int thickness, int line_type, int shift)
 Draws an arrow segment pointing from the first point to the second one.
 
static void arrowedLine (Mat img, in Vec2d pt1, in Vec2d pt2, in Vec4d color, int thickness, int line_type, int shift, double tipLength)
 Draws an arrow segment pointing from the first point to the second one.
 
static void arrowedLine (Mat img, in(double x, double y) pt1, in(double x, double y) pt2, in(double v0, double v1, double v2, double v3) color)
 Draws an arrow segment pointing from the first point to the second one.
 
static void arrowedLine (Mat img, in(double x, double y) pt1, in(double x, double y) pt2, in(double v0, double v1, double v2, double v3) color, int thickness)
 Draws an arrow segment pointing from the first point to the second one.
 
static void arrowedLine (Mat img, in(double x, double y) pt1, in(double x, double y) pt2, in(double v0, double v1, double v2, double v3) color, int thickness, int line_type)
 Draws an arrow segment pointing from the first point to the second one.
 
static void arrowedLine (Mat img, in(double x, double y) pt1, in(double x, double y) pt2, in(double v0, double v1, double v2, double v3) color, int thickness, int line_type, int shift)
 Draws an arrow segment pointing from the first point to the second one.
 
static void arrowedLine (Mat img, in(double x, double y) pt1, in(double x, double y) pt2, in(double v0, double v1, double v2, double v3) color, int thickness, int line_type, int shift, double tipLength)
 Draws an arrow segment pointing from the first point to the second one.
 
static void arrowedLine (Mat img, Point pt1, Point pt2, Scalar color)
 Draws an arrow segment pointing from the first point to the second one.
 
static void arrowedLine (Mat img, Point pt1, Point pt2, Scalar color, int thickness)
 Draws an arrow segment pointing from the first point to the second one.
 
static void arrowedLine (Mat img, Point pt1, Point pt2, Scalar color, int thickness, int line_type)
 Draws an arrow segment pointing from the first point to the second one.
 
static void arrowedLine (Mat img, Point pt1, Point pt2, Scalar color, int thickness, int line_type, int shift)
 Draws an arrow segment pointing from the first point to the second one.
 
static void arrowedLine (Mat img, Point pt1, Point pt2, Scalar color, int thickness, int line_type, int shift, double tipLength)
 Draws an arrow segment pointing from the first point to the second one.
 
static void bilateralFilter (Mat src, Mat dst, int d, double sigmaColor, double sigmaSpace)
 Applies the bilateral filter to an image.
 
static void bilateralFilter (Mat src, Mat dst, int d, double sigmaColor, double sigmaSpace, int borderType)
 Applies the bilateral filter to an image.
 
static void blendLinear (Mat src1, Mat src2, Mat weights1, Mat weights2, Mat dst)
 
static void blur (Mat src, Mat dst, in Vec2d ksize)
 Blurs an image using the normalized box filter.
 
static void blur (Mat src, Mat dst, in Vec2d ksize, in Vec2d anchor)
 Blurs an image using the normalized box filter.
 
static void blur (Mat src, Mat dst, in Vec2d ksize, in Vec2d anchor, int borderType)
 Blurs an image using the normalized box filter.
 
static void blur (Mat src, Mat dst, in(double width, double height) ksize)
 Blurs an image using the normalized box filter.
 
static void blur (Mat src, Mat dst, in(double width, double height) ksize, in(double x, double y) anchor)
 Blurs an image using the normalized box filter.
 
static void blur (Mat src, Mat dst, in(double width, double height) ksize, in(double x, double y) anchor, int borderType)
 Blurs an image using the normalized box filter.
 
static void blur (Mat src, Mat dst, Size ksize)
 Blurs an image using the normalized box filter.
 
static void blur (Mat src, Mat dst, Size ksize, Point anchor)
 Blurs an image using the normalized box filter.
 
static void blur (Mat src, Mat dst, Size ksize, Point anchor, int borderType)
 Blurs an image using the normalized box filter.
 
static Rect boundingRect (Mat array)
 Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image.
 
static int int int int height boundingRectAsValueTuple (Mat array)
 
static Vec4i boundingRectAsVec4i (Mat array)
 Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image.
 
static void boxFilter (Mat src, Mat dst, int ddepth, in Vec2d ksize)
 Blurs an image using the box filter.
 
static void boxFilter (Mat src, Mat dst, int ddepth, in Vec2d ksize, in Vec2d anchor)
 Blurs an image using the box filter.
 
static void boxFilter (Mat src, Mat dst, int ddepth, in Vec2d ksize, in Vec2d anchor, bool normalize)
 Blurs an image using the box filter.
 
static void boxFilter (Mat src, Mat dst, int ddepth, in Vec2d ksize, in Vec2d anchor, bool normalize, int borderType)
 Blurs an image using the box filter.
 
static void boxFilter (Mat src, Mat dst, int ddepth, in(double width, double height) ksize)
 Blurs an image using the box filter.
 
static void boxFilter (Mat src, Mat dst, int ddepth, in(double width, double height) ksize, in(double x, double y) anchor)
 Blurs an image using the box filter.
 
static void boxFilter (Mat src, Mat dst, int ddepth, in(double width, double height) ksize, in(double x, double y) anchor, bool normalize)
 Blurs an image using the box filter.
 
static void boxFilter (Mat src, Mat dst, int ddepth, in(double width, double height) ksize, in(double x, double y) anchor, bool normalize, int borderType)
 Blurs an image using the box filter.
 
static void boxFilter (Mat src, Mat dst, int ddepth, Size ksize)
 Blurs an image using the box filter.
 
static void boxFilter (Mat src, Mat dst, int ddepth, Size ksize, Point anchor)
 Blurs an image using the box filter.
 
static void boxFilter (Mat src, Mat dst, int ddepth, Size ksize, Point anchor, bool normalize)
 Blurs an image using the box filter.
 
static void boxFilter (Mat src, Mat dst, int ddepth, Size ksize, Point anchor, bool normalize, int borderType)
 Blurs an image using the box filter.
 
static void boxPoints (in Vec5d box, Mat points)
 Finds the four vertices of a rotated rect. Useful to draw the rotated rectangle.
 
static void boxPoints (in(double x, double y, double width, double height, double angle) box, Mat points)
 Finds the four vertices of a rotated rect. Useful to draw the rotated rectangle.
 
static void boxPoints (RotatedRect box, Mat points)
 Finds the four vertices of a rotated rect. Useful to draw the rotated rectangle.
 
static void calcBackProject (List< Mat > images, MatOfInt channels, Mat hist, Mat dst, MatOfFloat ranges, double scale)
 
static void calcHist (List< Mat > images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges)
 
static void calcHist (List< Mat > images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges, bool accumulate)
 
static void Canny (Mat dx, Mat dy, Mat edges, double threshold1, double threshold2)
 
static void Canny (Mat dx, Mat dy, Mat edges, double threshold1, double threshold2, bool L2gradient)
 
static void Canny (Mat image, Mat edges, double threshold1, double threshold2)
 Finds edges in an image using the Canny algorithm [Canny86] .
 
static void Canny (Mat image, Mat edges, double threshold1, double threshold2, int apertureSize)
 Finds edges in an image using the Canny algorithm [Canny86] .
 
static void Canny (Mat image, Mat edges, double threshold1, double threshold2, int apertureSize, bool L2gradient)
 Finds edges in an image using the Canny algorithm [Canny86] .
 
static void circle (Mat img, in Vec2d center, int radius, in Vec4d color)
 Draws a circle.
 
static void circle (Mat img, in Vec2d center, int radius, in Vec4d color, int thickness)
 Draws a circle.
 
static void circle (Mat img, in Vec2d center, int radius, in Vec4d color, int thickness, int lineType)
 Draws a circle.
 
static void circle (Mat img, in Vec2d center, int radius, in Vec4d color, int thickness, int lineType, int shift)
 Draws a circle.
 
static void circle (Mat img, in(double x, double y) center, int radius, in(double v0, double v1, double v2, double v3) color)
 Draws a circle.
 
static void circle (Mat img, in(double x, double y) center, int radius, in(double v0, double v1, double v2, double v3) color, int thickness)
 Draws a circle.
 
static void circle (Mat img, in(double x, double y) center, int radius, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType)
 Draws a circle.
 
static void circle (Mat img, in(double x, double y) center, int radius, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType, int shift)
 Draws a circle.
 
static void circle (Mat img, Point center, int radius, Scalar color)
 Draws a circle.
 
static void circle (Mat img, Point center, int radius, Scalar color, int thickness)
 Draws a circle.
 
static void circle (Mat img, Point center, int radius, Scalar color, int thickness, int lineType)
 Draws a circle.
 
static void circle (Mat img, Point center, int radius, Scalar color, int thickness, int lineType, int shift)
 Draws a circle.
 
static bool clipLine (in Vec4i imgRect, ref Vec2d pt1, ref Vec2d pt2)
 
static bool clipLine (in(int x, int y, int width, int height) imgRect, ref(double x, double y) pt1, ref(double x, double y) pt2)
 
static bool clipLine (Rect imgRect, Point pt1, Point pt2)
 
static double compareHist (Mat H1, Mat H2, int method)
 Compares two histograms.
 
static int connectedComponents (Mat image, Mat labels)
 
static int connectedComponents (Mat image, Mat labels, int connectivity)
 
static int connectedComponents (Mat image, Mat labels, int connectivity, int ltype)
 
static int connectedComponentsWithAlgorithm (Mat image, Mat labels, int connectivity, int ltype, int ccltype)
 computes the connected components labeled image of boolean image
 
static int connectedComponentsWithStats (Mat image, Mat labels, Mat stats, Mat centroids)
 
static int connectedComponentsWithStats (Mat image, Mat labels, Mat stats, Mat centroids, int connectivity)
 
static int connectedComponentsWithStats (Mat image, Mat labels, Mat stats, Mat centroids, int connectivity, int ltype)
 
static int connectedComponentsWithStatsWithAlgorithm (Mat image, Mat labels, Mat stats, Mat centroids, int connectivity, int ltype, int ccltype)
 computes the connected components labeled image of boolean image and also produces a statistics output for each label
 
static double contourArea (Mat contour)
 Calculates a contour area.
 
static double contourArea (Mat contour, bool oriented)
 Calculates a contour area.
 
static void convertMaps (Mat map1, Mat map2, Mat dstmap1, Mat dstmap2, int dstmap1type)
 Converts image transformation maps from one representation to another.
 
static void convertMaps (Mat map1, Mat map2, Mat dstmap1, Mat dstmap2, int dstmap1type, bool nninterpolation)
 Converts image transformation maps from one representation to another.
 
static void convexHull (MatOfPoint points, MatOfInt hull)
 Finds the convex hull of a point set.
 
static void convexHull (MatOfPoint points, MatOfInt hull, bool clockwise)
 Finds the convex hull of a point set.
 
static void convexityDefects (MatOfPoint contour, MatOfInt convexhull, MatOfInt4 convexityDefects)
 Finds the convexity defects of a contour.
 
static void cornerEigenValsAndVecs (Mat src, Mat dst, int blockSize, int ksize)
 Calculates eigenvalues and eigenvectors of image blocks for corner detection.
 
static void cornerEigenValsAndVecs (Mat src, Mat dst, int blockSize, int ksize, int borderType)
 Calculates eigenvalues and eigenvectors of image blocks for corner detection.
 
static void cornerHarris (Mat src, Mat dst, int blockSize, int ksize, double k)
 Harris corner detector.
 
static void cornerHarris (Mat src, Mat dst, int blockSize, int ksize, double k, int borderType)
 Harris corner detector.
 
static void cornerMinEigenVal (Mat src, Mat dst, int blockSize)
 Calculates the minimal eigenvalue of gradient matrices for corner detection.
 
static void cornerMinEigenVal (Mat src, Mat dst, int blockSize, int ksize)
 Calculates the minimal eigenvalue of gradient matrices for corner detection.
 
static void cornerMinEigenVal (Mat src, Mat dst, int blockSize, int ksize, int borderType)
 Calculates the minimal eigenvalue of gradient matrices for corner detection.
 
static void cornerSubPix (Mat image, Mat corners, in Vec2d winSize, in Vec2d zeroZone, in Vec3d criteria)
 Refines the corner locations.
 
static void cornerSubPix (Mat image, Mat corners, in(double width, double height) winSize, in(double width, double height) zeroZone, in(double type, double maxCount, double epsilon) criteria)
 Refines the corner locations.
 
static void cornerSubPix (Mat image, Mat corners, Size winSize, Size zeroZone, TermCriteria criteria)
 Refines the corner locations.
 
static CLAHE createCLAHE ()
 Creates a smart pointer to a cv::CLAHE class and initializes it.
 
static CLAHE createCLAHE (double clipLimit)
 Creates a smart pointer to a cv::CLAHE class and initializes it.
 
static CLAHE createCLAHE (double clipLimit, in Vec2d tileGridSize)
 Creates a smart pointer to a cv::CLAHE class and initializes it.
 
static CLAHE createCLAHE (double clipLimit, in(double width, double height) tileGridSize)
 Creates a smart pointer to a cv::CLAHE class and initializes it.
 
static CLAHE createCLAHE (double clipLimit, Size tileGridSize)
 Creates a smart pointer to a cv::CLAHE class and initializes it.
 
static GeneralizedHoughBallard createGeneralizedHoughBallard ()
 Creates a smart pointer to a cv::GeneralizedHoughBallard class and initializes it.
 
static GeneralizedHoughGuil createGeneralizedHoughGuil ()
 Creates a smart pointer to a cv::GeneralizedHoughGuil class and initializes it.
 
static void createHanningWindow (Mat dst, in Vec2d winSize, int type)
 This function computes a Hanning window coefficients in two dimensions.
 
static void createHanningWindow (Mat dst, in(double width, double height) winSize, int type)
 This function computes a Hanning window coefficients in two dimensions.
 
static void createHanningWindow (Mat dst, Size winSize, int type)
 This function computes a Hanning window coefficients in two dimensions.
 
static LineSegmentDetector createLineSegmentDetector ()
 Creates a smart pointer to a LineSegmentDetector object and initializes it.
 
static LineSegmentDetector createLineSegmentDetector (int refine)
 Creates a smart pointer to a LineSegmentDetector object and initializes it.
 
static LineSegmentDetector createLineSegmentDetector (int refine, double scale)
 Creates a smart pointer to a LineSegmentDetector object and initializes it.
 
static LineSegmentDetector createLineSegmentDetector (int refine, double scale, double sigma_scale)
 Creates a smart pointer to a LineSegmentDetector object and initializes it.
 
static LineSegmentDetector createLineSegmentDetector (int refine, double scale, double sigma_scale, double quant)
 Creates a smart pointer to a LineSegmentDetector object and initializes it.
 
static LineSegmentDetector createLineSegmentDetector (int refine, double scale, double sigma_scale, double quant, double ang_th)
 Creates a smart pointer to a LineSegmentDetector object and initializes it.
 
static LineSegmentDetector createLineSegmentDetector (int refine, double scale, double sigma_scale, double quant, double ang_th, double log_eps)
 Creates a smart pointer to a LineSegmentDetector object and initializes it.
 
static LineSegmentDetector createLineSegmentDetector (int refine, double scale, double sigma_scale, double quant, double ang_th, double log_eps, double density_th)
 Creates a smart pointer to a LineSegmentDetector object and initializes it.
 
static LineSegmentDetector createLineSegmentDetector (int refine, double scale, double sigma_scale, double quant, double ang_th, double log_eps, double density_th, int n_bins)
 Creates a smart pointer to a LineSegmentDetector object and initializes it.
 
static void cvtColor (Mat src, Mat dst, int code)
 Converts an image from one color space to another.
 
static void cvtColor (Mat src, Mat dst, int code, int dstCn)
 Converts an image from one color space to another.
 
static void cvtColorTwoPlane (Mat src1, Mat src2, Mat dst, int code)
 Converts an image from one color space to another where the source image is stored in two planes.
 
static void demosaicing (Mat src, Mat dst, int code)
 main function for all demosaicing processes
 
static void demosaicing (Mat src, Mat dst, int code, int dstCn)
 main function for all demosaicing processes
 
static void dilate (Mat src, Mat dst, Mat kernel)
 Dilates an image by using a specific structuring element.
 
static void dilate (Mat src, Mat dst, Mat kernel, in Vec2d anchor)
 Dilates an image by using a specific structuring element.
 
static void dilate (Mat src, Mat dst, Mat kernel, in Vec2d anchor, int iterations)
 Dilates an image by using a specific structuring element.
 
static void dilate (Mat src, Mat dst, Mat kernel, in Vec2d anchor, int iterations, int borderType)
 Dilates an image by using a specific structuring element.
 
static void dilate (Mat src, Mat dst, Mat kernel, in Vec2d anchor, int iterations, int borderType, in Vec4d borderValue)
 Dilates an image by using a specific structuring element.
 
static void dilate (Mat src, Mat dst, Mat kernel, in(double x, double y) anchor)
 Dilates an image by using a specific structuring element.
 
static void dilate (Mat src, Mat dst, Mat kernel, in(double x, double y) anchor, int iterations)
 Dilates an image by using a specific structuring element.
 
static void dilate (Mat src, Mat dst, Mat kernel, in(double x, double y) anchor, int iterations, int borderType)
 Dilates an image by using a specific structuring element.
 
static void dilate (Mat src, Mat dst, Mat kernel, in(double x, double y) anchor, int iterations, int borderType, in(double v0, double v1, double v2, double v3) borderValue)
 Dilates an image by using a specific structuring element.
 
static void dilate (Mat src, Mat dst, Mat kernel, Point anchor)
 Dilates an image by using a specific structuring element.
 
static void dilate (Mat src, Mat dst, Mat kernel, Point anchor, int iterations)
 Dilates an image by using a specific structuring element.
 
static void dilate (Mat src, Mat dst, Mat kernel, Point anchor, int iterations, int borderType)
 Dilates an image by using a specific structuring element.
 
static void dilate (Mat src, Mat dst, Mat kernel, Point anchor, int iterations, int borderType, Scalar borderValue)
 Dilates an image by using a specific structuring element.
 
static void distanceTransform (Mat src, Mat dst, int distanceType, int maskSize)
 
static void distanceTransform (Mat src, Mat dst, int distanceType, int maskSize, int dstType)
 
static void distanceTransformWithLabels (Mat src, Mat dst, Mat labels, int distanceType, int maskSize)
 Calculates the distance to the closest zero pixel for each pixel of the source image.
 
static void distanceTransformWithLabels (Mat src, Mat dst, Mat labels, int distanceType, int maskSize, int labelType)
 Calculates the distance to the closest zero pixel for each pixel of the source image.
 
static void divSpectrums (Mat a, Mat b, Mat c, int flags)
 Performs the per-element division of the first Fourier spectrum by the second Fourier spectrum.
 
static void divSpectrums (Mat a, Mat b, Mat c, int flags, bool conjB)
 Performs the per-element division of the first Fourier spectrum by the second Fourier spectrum.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, in Vec4d color)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, in Vec4d color, int thickness)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, in Vec4d color, int thickness, int lineType)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, in Vec4d color, int thickness, int lineType, Mat hierarchy)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, in Vec4d color, int thickness, int lineType, Mat hierarchy, int maxLevel)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, in Vec4d color, int thickness, int lineType, Mat hierarchy, int maxLevel, in Vec2d offset)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, in(double v0, double v1, double v2, double v3) color)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, in(double v0, double v1, double v2, double v3) color, int thickness)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType, Mat hierarchy)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType, Mat hierarchy, int maxLevel)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType, Mat hierarchy, int maxLevel, in(double x, double y) offset)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, Scalar color)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, Scalar color, int thickness)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, Scalar color, int thickness, int lineType)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy, int maxLevel)
 Draws contours outlines or filled contours.
 
static void drawContours (Mat image, List< MatOfPoint > contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy, int maxLevel, Point offset)
 Draws contours outlines or filled contours.
 
static void drawMarker (Mat img, in Vec2d position, in Vec4d color)
 Draws a marker on a predefined position in an image.
 
static void drawMarker (Mat img, in Vec2d position, in Vec4d color, int markerType)
 Draws a marker on a predefined position in an image.
 
static void drawMarker (Mat img, in Vec2d position, in Vec4d color, int markerType, int markerSize)
 Draws a marker on a predefined position in an image.
 
static void drawMarker (Mat img, in Vec2d position, in Vec4d color, int markerType, int markerSize, int thickness)
 Draws a marker on a predefined position in an image.
 
static void drawMarker (Mat img, in Vec2d position, in Vec4d color, int markerType, int markerSize, int thickness, int line_type)
 Draws a marker on a predefined position in an image.
 
static void drawMarker (Mat img, in(double x, double y) position, in(double v0, double v1, double v2, double v3) color)
 Draws a marker on a predefined position in an image.
 
static void drawMarker (Mat img, in(double x, double y) position, in(double v0, double v1, double v2, double v3) color, int markerType)
 Draws a marker on a predefined position in an image.
 
static void drawMarker (Mat img, in(double x, double y) position, in(double v0, double v1, double v2, double v3) color, int markerType, int markerSize)
 Draws a marker on a predefined position in an image.
 
static void drawMarker (Mat img, in(double x, double y) position, in(double v0, double v1, double v2, double v3) color, int markerType, int markerSize, int thickness)
 Draws a marker on a predefined position in an image.
 
static void drawMarker (Mat img, in(double x, double y) position, in(double v0, double v1, double v2, double v3) color, int markerType, int markerSize, int thickness, int line_type)
 Draws a marker on a predefined position in an image.
 
static void drawMarker (Mat img, Point position, Scalar color)
 Draws a marker on a predefined position in an image.
 
static void drawMarker (Mat img, Point position, Scalar color, int markerType)
 Draws a marker on a predefined position in an image.
 
static void drawMarker (Mat img, Point position, Scalar color, int markerType, int markerSize)
 Draws a marker on a predefined position in an image.
 
static void drawMarker (Mat img, Point position, Scalar color, int markerType, int markerSize, int thickness)
 Draws a marker on a predefined position in an image.
 
static void drawMarker (Mat img, Point position, Scalar color, int markerType, int markerSize, int thickness, int line_type)
 Draws a marker on a predefined position in an image.
 
static void ellipse (Mat img, in Vec2d center, in Vec2d axes, double angle, double startAngle, double endAngle, in Vec4d color)
 Draws a simple or thick elliptic arc or fills an ellipse sector.
 
static void ellipse (Mat img, in Vec2d center, in Vec2d axes, double angle, double startAngle, double endAngle, in Vec4d color, int thickness)
 Draws a simple or thick elliptic arc or fills an ellipse sector.
 
static void ellipse (Mat img, in Vec2d center, in Vec2d axes, double angle, double startAngle, double endAngle, in Vec4d color, int thickness, int lineType)
 Draws a simple or thick elliptic arc or fills an ellipse sector.
 
static void ellipse (Mat img, in Vec2d center, in Vec2d axes, double angle, double startAngle, double endAngle, in Vec4d color, int thickness, int lineType, int shift)
 Draws a simple or thick elliptic arc or fills an ellipse sector.
 
static void ellipse (Mat img, in Vec5d box, in Vec4d color)
 
static void ellipse (Mat img, in Vec5d box, in Vec4d color, int thickness)
 
static void ellipse (Mat img, in Vec5d box, in Vec4d color, int thickness, int lineType)
 
static void ellipse (Mat img, in(double x, double y) center, in(double width, double height) axes, double angle, double startAngle, double endAngle, in(double v0, double v1, double v2, double v3) color)
 Draws a simple or thick elliptic arc or fills an ellipse sector.
 
static void ellipse (Mat img, in(double x, double y) center, in(double width, double height) axes, double angle, double startAngle, double endAngle, in(double v0, double v1, double v2, double v3) color, int thickness)
 Draws a simple or thick elliptic arc or fills an ellipse sector.
 
static void ellipse (Mat img, in(double x, double y) center, in(double width, double height) axes, double angle, double startAngle, double endAngle, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType)
 Draws a simple or thick elliptic arc or fills an ellipse sector.
 
static void ellipse (Mat img, in(double x, double y) center, in(double width, double height) axes, double angle, double startAngle, double endAngle, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType, int shift)
 Draws a simple or thick elliptic arc or fills an ellipse sector.
 
static void ellipse (Mat img, in(double x, double y, double width, double height, double angle) box, in(double v0, double v1, double v2, double v3) color)
 
static void ellipse (Mat img, in(double x, double y, double width, double height, double angle) box, in(double v0, double v1, double v2, double v3) color, int thickness)
 
static void ellipse (Mat img, in(double x, double y, double width, double height, double angle) box, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType)
 
static void ellipse (Mat img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color)
 Draws a simple or thick elliptic arc or fills an ellipse sector.
 
static void ellipse (Mat img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color, int thickness)
 Draws a simple or thick elliptic arc or fills an ellipse sector.
 
static void ellipse (Mat img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color, int thickness, int lineType)
 Draws a simple or thick elliptic arc or fills an ellipse sector.
 
static void ellipse (Mat img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color, int thickness, int lineType, int shift)
 Draws a simple or thick elliptic arc or fills an ellipse sector.
 
static void ellipse (Mat img, RotatedRect box, Scalar color)
 
static void ellipse (Mat img, RotatedRect box, Scalar color, int thickness)
 
static void ellipse (Mat img, RotatedRect box, Scalar color, int thickness, int lineType)
 
static void ellipse2Poly (in Vec2d center, in Vec2d axes, int angle, int arcStart, int arcEnd, int delta, MatOfPoint pts)
 Approximates an elliptic arc with a polyline.
 
static void ellipse2Poly (in(double x, double y) center, in(double width, double height) axes, int angle, int arcStart, int arcEnd, int delta, MatOfPoint pts)
 Approximates an elliptic arc with a polyline.
 
static void ellipse2Poly (Point center, Size axes, int angle, int arcStart, int arcEnd, int delta, MatOfPoint pts)
 Approximates an elliptic arc with a polyline.
 
static float EMD (Mat signature1, Mat signature2, int distType)
 Computes the "minimal work" distance between two weighted point configurations.
 
static float EMD (Mat signature1, Mat signature2, int distType, Mat cost)
 Computes the "minimal work" distance between two weighted point configurations.
 
static float EMD (Mat signature1, Mat signature2, int distType, Mat cost, Mat flow)
 Computes the "minimal work" distance between two weighted point configurations.
 
static void equalizeHist (Mat src, Mat dst)
 Equalizes the histogram of a grayscale image.
 
static void erode (Mat src, Mat dst, Mat kernel)
 Erodes an image by using a specific structuring element.
 
static void erode (Mat src, Mat dst, Mat kernel, in Vec2d anchor)
 Erodes an image by using a specific structuring element.
 
static void erode (Mat src, Mat dst, Mat kernel, in Vec2d anchor, int iterations)
 Erodes an image by using a specific structuring element.
 
static void erode (Mat src, Mat dst, Mat kernel, in Vec2d anchor, int iterations, int borderType)
 Erodes an image by using a specific structuring element.
 
static void erode (Mat src, Mat dst, Mat kernel, in Vec2d anchor, int iterations, int borderType, in Vec4d borderValue)
 Erodes an image by using a specific structuring element.
 
static void erode (Mat src, Mat dst, Mat kernel, in(double x, double y) anchor)
 Erodes an image by using a specific structuring element.
 
static void erode (Mat src, Mat dst, Mat kernel, in(double x, double y) anchor, int iterations)
 Erodes an image by using a specific structuring element.
 
static void erode (Mat src, Mat dst, Mat kernel, in(double x, double y) anchor, int iterations, int borderType)
 Erodes an image by using a specific structuring element.
 
static void erode (Mat src, Mat dst, Mat kernel, in(double x, double y) anchor, int iterations, int borderType, in(double v0, double v1, double v2, double v3) borderValue)
 Erodes an image by using a specific structuring element.
 
static void erode (Mat src, Mat dst, Mat kernel, Point anchor)
 Erodes an image by using a specific structuring element.
 
static void erode (Mat src, Mat dst, Mat kernel, Point anchor, int iterations)
 Erodes an image by using a specific structuring element.
 
static void erode (Mat src, Mat dst, Mat kernel, Point anchor, int iterations, int borderType)
 Erodes an image by using a specific structuring element.
 
static void erode (Mat src, Mat dst, Mat kernel, Point anchor, int iterations, int borderType, Scalar borderValue)
 Erodes an image by using a specific structuring element.
 
static void fillConvexPoly (Mat img, MatOfPoint points, in Vec4d color)
 Fills a convex polygon.
 
static void fillConvexPoly (Mat img, MatOfPoint points, in Vec4d color, int lineType)
 Fills a convex polygon.
 
static void fillConvexPoly (Mat img, MatOfPoint points, in Vec4d color, int lineType, int shift)
 Fills a convex polygon.
 
static void fillConvexPoly (Mat img, MatOfPoint points, in(double v0, double v1, double v2, double v3) color)
 Fills a convex polygon.
 
static void fillConvexPoly (Mat img, MatOfPoint points, in(double v0, double v1, double v2, double v3) color, int lineType)
 Fills a convex polygon.
 
static void fillConvexPoly (Mat img, MatOfPoint points, in(double v0, double v1, double v2, double v3) color, int lineType, int shift)
 Fills a convex polygon.
 
static void fillConvexPoly (Mat img, MatOfPoint points, Scalar color)
 Fills a convex polygon.
 
static void fillConvexPoly (Mat img, MatOfPoint points, Scalar color, int lineType)
 Fills a convex polygon.
 
static void fillConvexPoly (Mat img, MatOfPoint points, Scalar color, int lineType, int shift)
 Fills a convex polygon.
 
static void fillPoly (Mat img, List< MatOfPoint > pts, in Vec4d color)
 Fills the area bounded by one or more polygons.
 
static void fillPoly (Mat img, List< MatOfPoint > pts, in Vec4d color, int lineType)
 Fills the area bounded by one or more polygons.
 
static void fillPoly (Mat img, List< MatOfPoint > pts, in Vec4d color, int lineType, int shift)
 Fills the area bounded by one or more polygons.
 
static void fillPoly (Mat img, List< MatOfPoint > pts, in Vec4d color, int lineType, int shift, in Vec2d offset)
 Fills the area bounded by one or more polygons.
 
static void fillPoly (Mat img, List< MatOfPoint > pts, in(double v0, double v1, double v2, double v3) color)
 Fills the area bounded by one or more polygons.
 
static void fillPoly (Mat img, List< MatOfPoint > pts, in(double v0, double v1, double v2, double v3) color, int lineType)
 Fills the area bounded by one or more polygons.
 
static void fillPoly (Mat img, List< MatOfPoint > pts, in(double v0, double v1, double v2, double v3) color, int lineType, int shift)
 Fills the area bounded by one or more polygons.
 
static void fillPoly (Mat img, List< MatOfPoint > pts, in(double v0, double v1, double v2, double v3) color, int lineType, int shift, in(double x, double y) offset)
 Fills the area bounded by one or more polygons.
 
static void fillPoly (Mat img, List< MatOfPoint > pts, Scalar color)
 Fills the area bounded by one or more polygons.
 
static void fillPoly (Mat img, List< MatOfPoint > pts, Scalar color, int lineType)
 Fills the area bounded by one or more polygons.
 
static void fillPoly (Mat img, List< MatOfPoint > pts, Scalar color, int lineType, int shift)
 Fills the area bounded by one or more polygons.
 
static void fillPoly (Mat img, List< MatOfPoint > pts, Scalar color, int lineType, int shift, Point offset)
 Fills the area bounded by one or more polygons.
 
static void filter2D (Mat src, Mat dst, int ddepth, Mat kernel)
 Convolves an image with the kernel.
 
static void filter2D (Mat src, Mat dst, int ddepth, Mat kernel, in Vec2d anchor)
 Convolves an image with the kernel.
 
static void filter2D (Mat src, Mat dst, int ddepth, Mat kernel, in Vec2d anchor, double delta)
 Convolves an image with the kernel.
 
static void filter2D (Mat src, Mat dst, int ddepth, Mat kernel, in Vec2d anchor, double delta, int borderType)
 Convolves an image with the kernel.
 
static void filter2D (Mat src, Mat dst, int ddepth, Mat kernel, in(double x, double y) anchor)
 Convolves an image with the kernel.
 
static void filter2D (Mat src, Mat dst, int ddepth, Mat kernel, in(double x, double y) anchor, double delta)
 Convolves an image with the kernel.
 
static void filter2D (Mat src, Mat dst, int ddepth, Mat kernel, in(double x, double y) anchor, double delta, int borderType)
 Convolves an image with the kernel.
 
static void filter2D (Mat src, Mat dst, int ddepth, Mat kernel, Point anchor)
 Convolves an image with the kernel.
 
static void filter2D (Mat src, Mat dst, int ddepth, Mat kernel, Point anchor, double delta)
 Convolves an image with the kernel.
 
static void filter2D (Mat src, Mat dst, int ddepth, Mat kernel, Point anchor, double delta, int borderType)
 Convolves an image with the kernel.
 
static void findContours (Mat image, List< MatOfPoint > contours, Mat hierarchy, int mode, int method)
 Finds contours in a binary image.
 
static void findContours (Mat image, List< MatOfPoint > contours, Mat hierarchy, int mode, int method, in Vec2d offset)
 Finds contours in a binary image.
 
static void findContours (Mat image, List< MatOfPoint > contours, Mat hierarchy, int mode, int method, in(double x, double y) offset)
 Finds contours in a binary image.
 
static void findContours (Mat image, List< MatOfPoint > contours, Mat hierarchy, int mode, int method, Point offset)
 Finds contours in a binary image.
 
static void findContoursLinkRuns (Mat image, List< Mat > contours)
 
static void findContoursLinkRuns (Mat image, List< Mat > contours, Mat hierarchy)
 
static RotatedRect fitEllipse (MatOfPoint2f points)
 Fits an ellipse around a set of 2D points.
 
static RotatedRect fitEllipseAMS (Mat points)
 Fits an ellipse around a set of 2D points.
 
static double double double double double angle fitEllipseAMSAsValueTuple (Mat points)
 
static Vec5d fitEllipseAMSAsVec5d (Mat points)
 Fits an ellipse around a set of 2D points.
 
static double double double double double angle fitEllipseAsValueTuple (MatOfPoint2f points)
 
static Vec5d fitEllipseAsVec5d (MatOfPoint2f points)
 Fits an ellipse around a set of 2D points.
 
static RotatedRect fitEllipseDirect (Mat points)
 Fits an ellipse around a set of 2D points.
 
static double double double double double angle fitEllipseDirectAsValueTuple (Mat points)
 
static Vec5d fitEllipseDirectAsVec5d (Mat points)
 Fits an ellipse around a set of 2D points.
 
static void fitLine (Mat points, Mat line, int distType, double param, double reps, double aeps)
 Fits a line to a 2D or 3D point set.
 
static int floodFill (Mat image, Mat mask, in Vec2d seedPoint, in Vec4d newVal)
 Fills a connected component with the given color.
 
static int floodFill (Mat image, Mat mask, in Vec2d seedPoint, in Vec4d newVal, out Vec4i rect)
 Fills a connected component with the given color.
 
static int floodFill (Mat image, Mat mask, in Vec2d seedPoint, in Vec4d newVal, out Vec4i rect, in Vec4d loDiff)
 Fills a connected component with the given color.
 
static int floodFill (Mat image, Mat mask, in Vec2d seedPoint, in Vec4d newVal, out Vec4i rect, in Vec4d loDiff, in Vec4d upDiff)
 Fills a connected component with the given color.
 
static int floodFill (Mat image, Mat mask, in Vec2d seedPoint, in Vec4d newVal, out Vec4i rect, in Vec4d loDiff, in Vec4d upDiff, int flags)
 Fills a connected component with the given color.
 
static int floodFill (Mat image, Mat mask, in(double x, double y) seedPoint, in(double v0, double v1, double v2, double v3) newVal)
 Fills a connected component with the given color.
 
static int floodFill (Mat image, Mat mask, in(double x, double y) seedPoint, in(double v0, double v1, double v2, double v3) newVal, out(int x, int y, int width, int height) rect)
 Fills a connected component with the given color.
 
static int floodFill (Mat image, Mat mask, in(double x, double y) seedPoint, in(double v0, double v1, double v2, double v3) newVal, out(int x, int y, int width, int height) rect, in(double v0, double v1, double v2, double v3) loDiff)
 Fills a connected component with the given color.
 
static int floodFill (Mat image, Mat mask, in(double x, double y) seedPoint, in(double v0, double v1, double v2, double v3) newVal, out(int x, int y, int width, int height) rect, in(double v0, double v1, double v2, double v3) loDiff, in(double v0, double v1, double v2, double v3) upDiff)
 Fills a connected component with the given color.
 
static int floodFill (Mat image, Mat mask, in(double x, double y) seedPoint, in(double v0, double v1, double v2, double v3) newVal, out(int x, int y, int width, int height) rect, in(double v0, double v1, double v2, double v3) loDiff, in(double v0, double v1, double v2, double v3) upDiff, int flags)
 Fills a connected component with the given color.
 
static int floodFill (Mat image, Mat mask, Point seedPoint, Scalar newVal)
 Fills a connected component with the given color.
 
static int floodFill (Mat image, Mat mask, Point seedPoint, Scalar newVal, Rect rect)
 Fills a connected component with the given color.
 
static int floodFill (Mat image, Mat mask, Point seedPoint, Scalar newVal, Rect rect, Scalar loDiff)
 Fills a connected component with the given color.
 
static int floodFill (Mat image, Mat mask, Point seedPoint, Scalar newVal, Rect rect, Scalar loDiff, Scalar upDiff)
 Fills a connected component with the given color.
 
static int floodFill (Mat image, Mat mask, Point seedPoint, Scalar newVal, Rect rect, Scalar loDiff, Scalar upDiff, int flags)
 Fills a connected component with the given color.
 
static void GaussianBlur (Mat src, Mat dst, in Vec2d ksize, double sigmaX)
 Blurs an image using a Gaussian filter.
 
static void GaussianBlur (Mat src, Mat dst, in Vec2d ksize, double sigmaX, double sigmaY)
 Blurs an image using a Gaussian filter.
 
static void GaussianBlur (Mat src, Mat dst, in Vec2d ksize, double sigmaX, double sigmaY, int borderType)
 Blurs an image using a Gaussian filter.
 
static void GaussianBlur (Mat src, Mat dst, in(double width, double height) ksize, double sigmaX)
 Blurs an image using a Gaussian filter.
 
static void GaussianBlur (Mat src, Mat dst, in(double width, double height) ksize, double sigmaX, double sigmaY)
 Blurs an image using a Gaussian filter.
 
static void GaussianBlur (Mat src, Mat dst, in(double width, double height) ksize, double sigmaX, double sigmaY, int borderType)
 Blurs an image using a Gaussian filter.
 
static void GaussianBlur (Mat src, Mat dst, Size ksize, double sigmaX)
 Blurs an image using a Gaussian filter.
 
static void GaussianBlur (Mat src, Mat dst, Size ksize, double sigmaX, double sigmaY)
 Blurs an image using a Gaussian filter.
 
static void GaussianBlur (Mat src, Mat dst, Size ksize, double sigmaX, double sigmaY, int borderType)
 Blurs an image using a Gaussian filter.
 
static Mat getAffineTransform (MatOfPoint2f src, MatOfPoint2f dst)
 
static void getDerivKernels (Mat kx, Mat ky, int dx, int dy, int ksize)
 Returns filter coefficients for computing spatial image derivatives.
 
static void getDerivKernels (Mat kx, Mat ky, int dx, int dy, int ksize, bool normalize)
 Returns filter coefficients for computing spatial image derivatives.
 
static void getDerivKernels (Mat kx, Mat ky, int dx, int dy, int ksize, bool normalize, int ktype)
 Returns filter coefficients for computing spatial image derivatives.
 
static double getFontScaleFromHeight (int fontFace, int pixelHeight)
 Calculates the font-specific size to use to achieve a given height in pixels.
 
static double getFontScaleFromHeight (int fontFace, int pixelHeight, int thickness)
 Calculates the font-specific size to use to achieve a given height in pixels.
 
static Mat getGaborKernel (in Vec2d ksize, double sigma, double theta, double lambd, double gamma)
 Returns Gabor filter coefficients.
 
static Mat getGaborKernel (in Vec2d ksize, double sigma, double theta, double lambd, double gamma, double psi)
 Returns Gabor filter coefficients.
 
static Mat getGaborKernel (in Vec2d ksize, double sigma, double theta, double lambd, double gamma, double psi, int ktype)
 Returns Gabor filter coefficients.
 
static Mat getGaborKernel (in(double width, double height) ksize, double sigma, double theta, double lambd, double gamma)
 Returns Gabor filter coefficients.
 
static Mat getGaborKernel (in(double width, double height) ksize, double sigma, double theta, double lambd, double gamma, double psi)
 Returns Gabor filter coefficients.
 
static Mat getGaborKernel (in(double width, double height) ksize, double sigma, double theta, double lambd, double gamma, double psi, int ktype)
 Returns Gabor filter coefficients.
 
static Mat getGaborKernel (Size ksize, double sigma, double theta, double lambd, double gamma)
 Returns Gabor filter coefficients.
 
static Mat getGaborKernel (Size ksize, double sigma, double theta, double lambd, double gamma, double psi)
 Returns Gabor filter coefficients.
 
static Mat getGaborKernel (Size ksize, double sigma, double theta, double lambd, double gamma, double psi, int ktype)
 Returns Gabor filter coefficients.
 
static Mat getGaussianKernel (int ksize, double sigma)
 Returns Gaussian filter coefficients.
 
static Mat getGaussianKernel (int ksize, double sigma, int ktype)
 Returns Gaussian filter coefficients.
 
static Mat getPerspectiveTransform (Mat src, Mat dst)
 Calculates a perspective transform from four pairs of the corresponding points.
 
static Mat getPerspectiveTransform (Mat src, Mat dst, int solveMethod)
 Calculates a perspective transform from four pairs of the corresponding points.
 
static void getRectSubPix (Mat image, in Vec2d patchSize, in Vec2d center, Mat patch)
 Retrieves a pixel rectangle from an image with sub-pixel accuracy.
 
static void getRectSubPix (Mat image, in Vec2d patchSize, in Vec2d center, Mat patch, int patchType)
 Retrieves a pixel rectangle from an image with sub-pixel accuracy.
 
static void getRectSubPix (Mat image, in(double width, double height) patchSize, in(double x, double y) center, Mat patch)
 Retrieves a pixel rectangle from an image with sub-pixel accuracy.
 
static void getRectSubPix (Mat image, in(double width, double height) patchSize, in(double x, double y) center, Mat patch, int patchType)
 Retrieves a pixel rectangle from an image with sub-pixel accuracy.
 
static void getRectSubPix (Mat image, Size patchSize, Point center, Mat patch)
 Retrieves a pixel rectangle from an image with sub-pixel accuracy.
 
static void getRectSubPix (Mat image, Size patchSize, Point center, Mat patch, int patchType)
 Retrieves a pixel rectangle from an image with sub-pixel accuracy.
 
static Mat getRotationMatrix2D (in Vec2d center, double angle, double scale)
 Calculates an affine matrix of 2D rotation.
 
static Mat getRotationMatrix2D (in(double x, double y) center, double angle, double scale)
 Calculates an affine matrix of 2D rotation.
 
static Mat getRotationMatrix2D (Point center, double angle, double scale)
 Calculates an affine matrix of 2D rotation.
 
static Mat getStructuringElement (int shape, in Vec2d ksize)
 Returns a structuring element of the specified size and shape for morphological operations.
 
static Mat getStructuringElement (int shape, in Vec2d ksize, in Vec2d anchor)
 Returns a structuring element of the specified size and shape for morphological operations.
 
static Mat getStructuringElement (int shape, in(double width, double height) ksize)
 Returns a structuring element of the specified size and shape for morphological operations.
 
static Mat getStructuringElement (int shape, in(double width, double height) ksize, in(double x, double y) anchor)
 Returns a structuring element of the specified size and shape for morphological operations.
 
static Mat getStructuringElement (int shape, Size ksize)
 Returns a structuring element of the specified size and shape for morphological operations.
 
static Mat getStructuringElement (int shape, Size ksize, Point anchor)
 Returns a structuring element of the specified size and shape for morphological operations.
 
static Size getTextSize (string text, int fontFace, double fontScale, int thickness, int[] baseLine)
 
static double double height getTextSizeAsValueTuple (string text, int fontFace, double fontScale, int thickness, int[] baseLine)
 
static Vec2d getTextSizeAsVec2d (string text, int fontFace, double fontScale, int thickness, int[] baseLine)
 
static void goodFeaturesToTrack (Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance)
 Determines strong corners on an image.
 
static void goodFeaturesToTrack (Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask)
 Determines strong corners on an image.
 
static void goodFeaturesToTrack (Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize)
 Determines strong corners on an image.
 
static void goodFeaturesToTrack (Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, bool useHarrisDetector)
 Determines strong corners on an image.
 
static void goodFeaturesToTrack (Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, bool useHarrisDetector, double k)
 Determines strong corners on an image.
 
static void goodFeaturesToTrack (Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, int gradientSize)
 
static void goodFeaturesToTrack (Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, int gradientSize, bool useHarrisDetector)
 
static void goodFeaturesToTrack (Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, int gradientSize, bool useHarrisDetector, double k)
 
static void goodFeaturesToTrackWithQuality (Mat image, Mat corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, Mat cornersQuality)
 Same as above, but returns also quality measure of the detected corners.
 
static void goodFeaturesToTrackWithQuality (Mat image, Mat corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, Mat cornersQuality, int blockSize)
 Same as above, but returns also quality measure of the detected corners.
 
static void goodFeaturesToTrackWithQuality (Mat image, Mat corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, Mat cornersQuality, int blockSize, int gradientSize)
 Same as above, but returns also quality measure of the detected corners.
 
static void goodFeaturesToTrackWithQuality (Mat image, Mat corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, Mat cornersQuality, int blockSize, int gradientSize, bool useHarrisDetector)
 Same as above, but returns also quality measure of the detected corners.
 
static void goodFeaturesToTrackWithQuality (Mat image, Mat corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, Mat cornersQuality, int blockSize, int gradientSize, bool useHarrisDetector, double k)
 Same as above, but returns also quality measure of the detected corners.
 
static void grabCut (Mat img, Mat mask, in Vec4i rect, Mat bgdModel, Mat fgdModel, int iterCount)
 Runs the GrabCut algorithm.
 
static void grabCut (Mat img, Mat mask, in Vec4i rect, Mat bgdModel, Mat fgdModel, int iterCount, int mode)
 Runs the GrabCut algorithm.
 
static void grabCut (Mat img, Mat mask, in(int x, int y, int width, int height) rect, Mat bgdModel, Mat fgdModel, int iterCount)
 Runs the GrabCut algorithm.
 
static void grabCut (Mat img, Mat mask, in(int x, int y, int width, int height) rect, Mat bgdModel, Mat fgdModel, int iterCount, int mode)
 Runs the GrabCut algorithm.
 
static void grabCut (Mat img, Mat mask, Rect rect, Mat bgdModel, Mat fgdModel, int iterCount)
 Runs the GrabCut algorithm.
 
static void grabCut (Mat img, Mat mask, Rect rect, Mat bgdModel, Mat fgdModel, int iterCount, int mode)
 Runs the GrabCut algorithm.
 
static void HoughCircles (Mat image, Mat circles, int method, double dp, double minDist)
 Finds circles in a grayscale image using the Hough transform.
 
static void HoughCircles (Mat image, Mat circles, int method, double dp, double minDist, double param1)
 Finds circles in a grayscale image using the Hough transform.
 
static void HoughCircles (Mat image, Mat circles, int method, double dp, double minDist, double param1, double param2)
 Finds circles in a grayscale image using the Hough transform.
 
static void HoughCircles (Mat image, Mat circles, int method, double dp, double minDist, double param1, double param2, int minRadius)
 Finds circles in a grayscale image using the Hough transform.
 
static void HoughCircles (Mat image, Mat circles, int method, double dp, double minDist, double param1, double param2, int minRadius, int maxRadius)
 Finds circles in a grayscale image using the Hough transform.
 
static void HoughLines (Mat image, Mat lines, double rho, double theta, int threshold)
 Finds lines in a binary image using the standard Hough transform.
 
static void HoughLines (Mat image, Mat lines, double rho, double theta, int threshold, double srn)
 Finds lines in a binary image using the standard Hough transform.
 
static void HoughLines (Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn)
 Finds lines in a binary image using the standard Hough transform.
 
static void HoughLines (Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn, double min_theta)
 Finds lines in a binary image using the standard Hough transform.
 
static void HoughLines (Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn, double min_theta, double max_theta)
 Finds lines in a binary image using the standard Hough transform.
 
static void HoughLinesP (Mat image, Mat lines, double rho, double theta, int threshold)
 Finds line segments in a binary image using the probabilistic Hough transform.
 
static void HoughLinesP (Mat image, Mat lines, double rho, double theta, int threshold, double minLineLength)
 Finds line segments in a binary image using the probabilistic Hough transform.
 
static void HoughLinesP (Mat image, Mat lines, double rho, double theta, int threshold, double minLineLength, double maxLineGap)
 Finds line segments in a binary image using the probabilistic Hough transform.
 
static void HoughLinesPointSet (Mat point, Mat lines, int lines_max, int threshold, double min_rho, double max_rho, double rho_step, double min_theta, double max_theta, double theta_step)
 Finds lines in a set of points using the standard Hough transform.
 
static void HoughLinesWithAccumulator (Mat image, Mat lines, double rho, double theta, int threshold)
 Finds lines in a binary image using the standard Hough transform and get accumulator.
 
static void HoughLinesWithAccumulator (Mat image, Mat lines, double rho, double theta, int threshold, double srn)
 Finds lines in a binary image using the standard Hough transform and get accumulator.
 
static void HoughLinesWithAccumulator (Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn)
 Finds lines in a binary image using the standard Hough transform and get accumulator.
 
static void HoughLinesWithAccumulator (Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn, double min_theta)
 Finds lines in a binary image using the standard Hough transform and get accumulator.
 
static void HoughLinesWithAccumulator (Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn, double min_theta, double max_theta)
 Finds lines in a binary image using the standard Hough transform and get accumulator.
 
static void HuMoments (in Vec10d m, Mat hu)
 
static void HuMoments (in(double m00, double m10, double m01, double m20, double m11, double m02, double m30, double m21, double m12, double m03) m, Mat hu)
 
static void HuMoments (Moments m, Mat hu)
 
static void integral (Mat src, Mat sum)
 
static void integral (Mat src, Mat sum, int sdepth)
 
static void integral2 (Mat src, Mat sum, Mat sqsum)
 
static void integral2 (Mat src, Mat sum, Mat sqsum, int sdepth)
 
static void integral2 (Mat src, Mat sum, Mat sqsum, int sdepth, int sqdepth)
 
static void integral3 (Mat src, Mat sum, Mat sqsum, Mat tilted)
 Calculates the integral of an image.
 
static void integral3 (Mat src, Mat sum, Mat sqsum, Mat tilted, int sdepth)
 Calculates the integral of an image.
 
static void integral3 (Mat src, Mat sum, Mat sqsum, Mat tilted, int sdepth, int sqdepth)
 Calculates the integral of an image.
 
static float intersectConvexConvex (Mat p1, Mat p2, Mat p12)
 Finds intersection of two convex polygons.
 
static float intersectConvexConvex (Mat p1, Mat p2, Mat p12, bool handleNested)
 Finds intersection of two convex polygons.
 
static void invertAffineTransform (Mat M, Mat iM)
 Inverts an affine transformation.
 
static bool isContourConvex (MatOfPoint contour)
 Tests a contour convexity.
 
static void Laplacian (Mat src, Mat dst, int ddepth)
 Calculates the Laplacian of an image.
 
static void Laplacian (Mat src, Mat dst, int ddepth, int ksize)
 Calculates the Laplacian of an image.
 
static void Laplacian (Mat src, Mat dst, int ddepth, int ksize, double scale)
 Calculates the Laplacian of an image.
 
static void Laplacian (Mat src, Mat dst, int ddepth, int ksize, double scale, double delta)
 Calculates the Laplacian of an image.
 
static void Laplacian (Mat src, Mat dst, int ddepth, int ksize, double scale, double delta, int borderType)
 Calculates the Laplacian of an image.
 
static void line (Mat img, in Vec2d pt1, in Vec2d pt2, in Vec4d color)
 Draws a line segment connecting two points.
 
static void line (Mat img, in Vec2d pt1, in Vec2d pt2, in Vec4d color, int thickness)
 Draws a line segment connecting two points.
 
static void line (Mat img, in Vec2d pt1, in Vec2d pt2, in Vec4d color, int thickness, int lineType)
 Draws a line segment connecting two points.
 
static void line (Mat img, in Vec2d pt1, in Vec2d pt2, in Vec4d color, int thickness, int lineType, int shift)
 Draws a line segment connecting two points.
 
static void line (Mat img, in(double x, double y) pt1, in(double x, double y) pt2, in(double v0, double v1, double v2, double v3) color)
 Draws a line segment connecting two points.
 
static void line (Mat img, in(double x, double y) pt1, in(double x, double y) pt2, in(double v0, double v1, double v2, double v3) color, int thickness)
 Draws a line segment connecting two points.
 
static void line (Mat img, in(double x, double y) pt1, in(double x, double y) pt2, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType)
 Draws a line segment connecting two points.
 
static void line (Mat img, in(double x, double y) pt1, in(double x, double y) pt2, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType, int shift)
 Draws a line segment connecting two points.
 
static void line (Mat img, Point pt1, Point pt2, Scalar color)
 Draws a line segment connecting two points.
 
static void line (Mat img, Point pt1, Point pt2, Scalar color, int thickness)
 Draws a line segment connecting two points.
 
static void line (Mat img, Point pt1, Point pt2, Scalar color, int thickness, int lineType)
 Draws a line segment connecting two points.
 
static void line (Mat img, Point pt1, Point pt2, Scalar color, int thickness, int lineType, int shift)
 Draws a line segment connecting two points.
 
static void linearPolar (Mat src, Mat dst, in Vec2d center, double maxRadius, int flags)
 Remaps an image to polar coordinates space.
 
static void linearPolar (Mat src, Mat dst, in(double x, double y) center, double maxRadius, int flags)
 Remaps an image to polar coordinates space.
 
static void linearPolar (Mat src, Mat dst, Point center, double maxRadius, int flags)
 Remaps an image to polar coordinates space.
 
static void logPolar (Mat src, Mat dst, in Vec2d center, double M, int flags)
 Remaps an image to semilog-polar coordinates space.
 
static void logPolar (Mat src, Mat dst, in(double x, double y) center, double M, int flags)
 Remaps an image to semilog-polar coordinates space.
 
static void logPolar (Mat src, Mat dst, Point center, double M, int flags)
 Remaps an image to semilog-polar coordinates space.
 
static double matchShapes (Mat contour1, Mat contour2, int method, double parameter)
 Compares two shapes.
 
static void matchTemplate (Mat image, Mat templ, Mat result, int method)
 Compares a template against overlapped image regions.
 
static void matchTemplate (Mat image, Mat templ, Mat result, int method, Mat mask)
 Compares a template against overlapped image regions.
 
static void medianBlur (Mat src, Mat dst, int ksize)
 Blurs an image using the median filter.
 
static RotatedRect minAreaRect (MatOfPoint2f points)
 Finds a rotated rectangle of the minimum area enclosing the input 2D point set.
 
static double double double double double angle minAreaRectAsValueTuple (MatOfPoint2f points)
 
static Vec5d minAreaRectAsVec5d (MatOfPoint2f points)
 Finds a rotated rectangle of the minimum area enclosing the input 2D point set.
 
static void minEnclosingCircle (MatOfPoint2f points, out Vec2d center, float[] radius)
 Finds a circle of the minimum area enclosing a 2D point set.
 
static void minEnclosingCircle (MatOfPoint2f points, out(double x, double y) center, float[] radius)
 Finds a circle of the minimum area enclosing a 2D point set.
 
static void minEnclosingCircle (MatOfPoint2f points, Point center, float[] radius)
 Finds a circle of the minimum area enclosing a 2D point set.
 
static double minEnclosingTriangle (Mat points, Mat triangle)
 Finds a triangle of minimum area enclosing a 2D point set and returns its area.
 
static Moments moments (Mat array)
 Calculates all of the moments up to the third order of a polygon or rasterized shape.
 
static Moments moments (Mat array, bool binaryImage)
 Calculates all of the moments up to the third order of a polygon or rasterized shape.
 
static double double double double double double double double double double m03 momentsAsValueTuple (Mat array)
 
static double double double double double double double double double double m03 momentsAsValueTuple (Mat array, bool binaryImage)
 
static Vec10d momentsAsVec10d (Mat array)
 Calculates all of the moments up to the third order of a polygon or rasterized shape.
 
static Vec10d momentsAsVec10d (Mat array, bool binaryImage)
 Calculates all of the moments up to the third order of a polygon or rasterized shape.
 
static void morphologyEx (Mat src, Mat dst, int op, Mat kernel)
 Performs advanced morphological transformations.
 
static void morphologyEx (Mat src, Mat dst, int op, Mat kernel, in Vec2d anchor)
 Performs advanced morphological transformations.
 
static void morphologyEx (Mat src, Mat dst, int op, Mat kernel, in Vec2d anchor, int iterations)
 Performs advanced morphological transformations.
 
static void morphologyEx (Mat src, Mat dst, int op, Mat kernel, in Vec2d anchor, int iterations, int borderType)
 Performs advanced morphological transformations.
 
static void morphologyEx (Mat src, Mat dst, int op, Mat kernel, in Vec2d anchor, int iterations, int borderType, in Vec4d borderValue)
 Performs advanced morphological transformations.
 
static void morphologyEx (Mat src, Mat dst, int op, Mat kernel, in(double x, double y) anchor)
 Performs advanced morphological transformations.
 
static void morphologyEx (Mat src, Mat dst, int op, Mat kernel, in(double x, double y) anchor, int iterations)
 Performs advanced morphological transformations.
 
static void morphologyEx (Mat src, Mat dst, int op, Mat kernel, in(double x, double y) anchor, int iterations, int borderType)
 Performs advanced morphological transformations.
 
static void morphologyEx (Mat src, Mat dst, int op, Mat kernel, in(double x, double y) anchor, int iterations, int borderType, in(double v0, double v1, double v2, double v3) borderValue)
 Performs advanced morphological transformations.
 
static void morphologyEx (Mat src, Mat dst, int op, Mat kernel, Point anchor)
 Performs advanced morphological transformations.
 
static void morphologyEx (Mat src, Mat dst, int op, Mat kernel, Point anchor, int iterations)
 Performs advanced morphological transformations.
 
static void morphologyEx (Mat src, Mat dst, int op, Mat kernel, Point anchor, int iterations, int borderType)
 Performs advanced morphological transformations.
 
static void morphologyEx (Mat src, Mat dst, int op, Mat kernel, Point anchor, int iterations, int borderType, Scalar borderValue)
 Performs advanced morphological transformations.
 
static Point phaseCorrelate (Mat src1, Mat src2)
 The function is used to detect translational shifts that occur between two images.
 
static Point phaseCorrelate (Mat src1, Mat src2, Mat window)
 The function is used to detect translational shifts that occur between two images.
 
static Point phaseCorrelate (Mat src1, Mat src2, Mat window, double[] response)
 The function is used to detect translational shifts that occur between two images.
 
static double double y phaseCorrelateAsValueTuple (Mat src1, Mat src2)
 
static double double y phaseCorrelateAsValueTuple (Mat src1, Mat src2, Mat window)
 
static double double y phaseCorrelateAsValueTuple (Mat src1, Mat src2, Mat window, double[] response)
 
static Vec2d phaseCorrelateAsVec2d (Mat src1, Mat src2)
 The function is used to detect translational shifts that occur between two images.
 
static Vec2d phaseCorrelateAsVec2d (Mat src1, Mat src2, Mat window)
 The function is used to detect translational shifts that occur between two images.
 
static Vec2d phaseCorrelateAsVec2d (Mat src1, Mat src2, Mat window, double[] response)
 The function is used to detect translational shifts that occur between two images.
 
static double pointPolygonTest (MatOfPoint2f contour, in Vec2d pt, bool measureDist)
 Performs a point-in-contour test.
 
static double pointPolygonTest (MatOfPoint2f contour, in(double x, double y) pt, bool measureDist)
 Performs a point-in-contour test.
 
static double pointPolygonTest (MatOfPoint2f contour, Point pt, bool measureDist)
 Performs a point-in-contour test.
 
static void polylines (Mat img, List< MatOfPoint > pts, bool isClosed, in Vec4d color)
 Draws several polygonal curves.
 
static void polylines (Mat img, List< MatOfPoint > pts, bool isClosed, in Vec4d color, int thickness)
 Draws several polygonal curves.
 
static void polylines (Mat img, List< MatOfPoint > pts, bool isClosed, in Vec4d color, int thickness, int lineType)
 Draws several polygonal curves.
 
static void polylines (Mat img, List< MatOfPoint > pts, bool isClosed, in Vec4d color, int thickness, int lineType, int shift)
 Draws several polygonal curves.
 
static void polylines (Mat img, List< MatOfPoint > pts, bool isClosed, in(double v0, double v1, double v2, double v3) color)
 Draws several polygonal curves.
 
static void polylines (Mat img, List< MatOfPoint > pts, bool isClosed, in(double v0, double v1, double v2, double v3) color, int thickness)
 Draws several polygonal curves.
 
static void polylines (Mat img, List< MatOfPoint > pts, bool isClosed, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType)
 Draws several polygonal curves.
 
static void polylines (Mat img, List< MatOfPoint > pts, bool isClosed, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType, int shift)
 Draws several polygonal curves.
 
static void polylines (Mat img, List< MatOfPoint > pts, bool isClosed, Scalar color)
 Draws several polygonal curves.
 
static void polylines (Mat img, List< MatOfPoint > pts, bool isClosed, Scalar color, int thickness)
 Draws several polygonal curves.
 
static void polylines (Mat img, List< MatOfPoint > pts, bool isClosed, Scalar color, int thickness, int lineType)
 Draws several polygonal curves.
 
static void polylines (Mat img, List< MatOfPoint > pts, bool isClosed, Scalar color, int thickness, int lineType, int shift)
 Draws several polygonal curves.
 
static void preCornerDetect (Mat src, Mat dst, int ksize)
 Calculates a feature map for corner detection.
 
static void preCornerDetect (Mat src, Mat dst, int ksize, int borderType)
 Calculates a feature map for corner detection.
 
static void putText (Mat img, string text, in Vec2d org, int fontFace, double fontScale, in Vec4d color)
 Draws a text string.
 
static void putText (Mat img, string text, in Vec2d org, int fontFace, double fontScale, in Vec4d color, int thickness)
 Draws a text string.
 
static void putText (Mat img, string text, in Vec2d org, int fontFace, double fontScale, in Vec4d color, int thickness, int lineType)
 Draws a text string.
 
static void putText (Mat img, string text, in Vec2d org, int fontFace, double fontScale, in Vec4d color, int thickness, int lineType, bool bottomLeftOrigin)
 Draws a text string.
 
static void putText (Mat img, string text, in(double x, double y) org, int fontFace, double fontScale, in(double v0, double v1, double v2, double v3) color)
 Draws a text string.
 
static void putText (Mat img, string text, in(double x, double y) org, int fontFace, double fontScale, in(double v0, double v1, double v2, double v3) color, int thickness)
 Draws a text string.
 
static void putText (Mat img, string text, in(double x, double y) org, int fontFace, double fontScale, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType)
 Draws a text string.
 
static void putText (Mat img, string text, in(double x, double y) org, int fontFace, double fontScale, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType, bool bottomLeftOrigin)
 Draws a text string.
 
static void putText (Mat img, string text, Point org, int fontFace, double fontScale, Scalar color)
 Draws a text string.
 
static void putText (Mat img, string text, Point org, int fontFace, double fontScale, Scalar color, int thickness)
 Draws a text string.
 
static void putText (Mat img, string text, Point org, int fontFace, double fontScale, Scalar color, int thickness, int lineType)
 Draws a text string.
 
static void putText (Mat img, string text, Point org, int fontFace, double fontScale, Scalar color, int thickness, int lineType, bool bottomLeftOrigin)
 Draws a text string.
 
static void pyrDown (Mat src, Mat dst)
 Blurs an image and downsamples it.
 
static void pyrDown (Mat src, Mat dst, in Vec2d dstsize)
 Blurs an image and downsamples it.
 
static void pyrDown (Mat src, Mat dst, in Vec2d dstsize, int borderType)
 Blurs an image and downsamples it.
 
static void pyrDown (Mat src, Mat dst, in(double width, double height) dstsize)
 Blurs an image and downsamples it.
 
static void pyrDown (Mat src, Mat dst, in(double width, double height) dstsize, int borderType)
 Blurs an image and downsamples it.
 
static void pyrDown (Mat src, Mat dst, Size dstsize)
 Blurs an image and downsamples it.
 
static void pyrDown (Mat src, Mat dst, Size dstsize, int borderType)
 Blurs an image and downsamples it.
 
static void pyrMeanShiftFiltering (Mat src, Mat dst, double sp, double sr)
 Performs initial step of meanshift segmentation of an image.
 
static void pyrMeanShiftFiltering (Mat src, Mat dst, double sp, double sr, int maxLevel)
 Performs initial step of meanshift segmentation of an image.
 
static void pyrMeanShiftFiltering (Mat src, Mat dst, double sp, double sr, int maxLevel, in Vec3d termcrit)
 Performs initial step of meanshift segmentation of an image.
 
static void pyrMeanShiftFiltering (Mat src, Mat dst, double sp, double sr, int maxLevel, in(double type, double maxCount, double epsilon) termcrit)
 Performs initial step of meanshift segmentation of an image.
 
static void pyrMeanShiftFiltering (Mat src, Mat dst, double sp, double sr, int maxLevel, TermCriteria termcrit)
 Performs initial step of meanshift segmentation of an image.
 
static void pyrUp (Mat src, Mat dst)
 Upsamples an image and then blurs it.
 
static void pyrUp (Mat src, Mat dst, in Vec2d dstsize)
 Upsamples an image and then blurs it.
 
static void pyrUp (Mat src, Mat dst, in Vec2d dstsize, int borderType)
 Upsamples an image and then blurs it.
 
static void pyrUp (Mat src, Mat dst, in(double width, double height) dstsize)
 Upsamples an image and then blurs it.
 
static void pyrUp (Mat src, Mat dst, in(double width, double height) dstsize, int borderType)
 Upsamples an image and then blurs it.
 
static void pyrUp (Mat src, Mat dst, Size dstsize)
 Upsamples an image and then blurs it.
 
static void pyrUp (Mat src, Mat dst, Size dstsize, int borderType)
 Upsamples an image and then blurs it.
 
static void rectangle (Mat img, in Vec2d pt1, in Vec2d pt2, in Vec4d color)
 Draws a simple, thick, or filled up-right rectangle.
 
static void rectangle (Mat img, in Vec2d pt1, in Vec2d pt2, in Vec4d color, int thickness)
 Draws a simple, thick, or filled up-right rectangle.
 
static void rectangle (Mat img, in Vec2d pt1, in Vec2d pt2, in Vec4d color, int thickness, int lineType)
 Draws a simple, thick, or filled up-right rectangle.
 
static void rectangle (Mat img, in Vec2d pt1, in Vec2d pt2, in Vec4d color, int thickness, int lineType, int shift)
 Draws a simple, thick, or filled up-right rectangle.
 
static void rectangle (Mat img, in Vec4i rec, in Vec4d color)
 
static void rectangle (Mat img, in Vec4i rec, in Vec4d color, int thickness)
 
static void rectangle (Mat img, in Vec4i rec, in Vec4d color, int thickness, int lineType)
 
static void rectangle (Mat img, in Vec4i rec, in Vec4d color, int thickness, int lineType, int shift)
 
static void rectangle (Mat img, in(double x, double y) pt1, in(double x, double y) pt2, in(double v0, double v1, double v2, double v3) color)
 Draws a simple, thick, or filled up-right rectangle.
 
static void rectangle (Mat img, in(double x, double y) pt1, in(double x, double y) pt2, in(double v0, double v1, double v2, double v3) color, int thickness)
 Draws a simple, thick, or filled up-right rectangle.
 
static void rectangle (Mat img, in(double x, double y) pt1, in(double x, double y) pt2, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType)
 Draws a simple, thick, or filled up-right rectangle.
 
static void rectangle (Mat img, in(double x, double y) pt1, in(double x, double y) pt2, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType, int shift)
 Draws a simple, thick, or filled up-right rectangle.
 
static void rectangle (Mat img, in(int x, int y, int width, int height) rec, in(double v0, double v1, double v2, double v3) color)
 
static void rectangle (Mat img, in(int x, int y, int width, int height) rec, in(double v0, double v1, double v2, double v3) color, int thickness)
 
static void rectangle (Mat img, in(int x, int y, int width, int height) rec, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType)
 
static void rectangle (Mat img, in(int x, int y, int width, int height) rec, in(double v0, double v1, double v2, double v3) color, int thickness, int lineType, int shift)
 
static void rectangle (Mat img, Point pt1, Point pt2, Scalar color)
 Draws a simple, thick, or filled up-right rectangle.
 
static void rectangle (Mat img, Point pt1, Point pt2, Scalar color, int thickness)
 Draws a simple, thick, or filled up-right rectangle.
 
static void rectangle (Mat img, Point pt1, Point pt2, Scalar color, int thickness, int lineType)
 Draws a simple, thick, or filled up-right rectangle.
 
static void rectangle (Mat img, Point pt1, Point pt2, Scalar color, int thickness, int lineType, int shift)
 Draws a simple, thick, or filled up-right rectangle.
 
static void rectangle (Mat img, Rect rec, Scalar color)
 
static void rectangle (Mat img, Rect rec, Scalar color, int thickness)
 
static void rectangle (Mat img, Rect rec, Scalar color, int thickness, int lineType)
 
static void rectangle (Mat img, Rect rec, Scalar color, int thickness, int lineType, int shift)
 
static void remap (Mat src, Mat dst, Mat map1, Mat map2, int interpolation)
 Applies a generic geometrical transformation to an image.
 
static void remap (Mat src, Mat dst, Mat map1, Mat map2, int interpolation, int borderMode)
 Applies a generic geometrical transformation to an image.
 
static void remap (Mat src, Mat dst, Mat map1, Mat map2, int interpolation, int borderMode, in Vec4d borderValue)
 Applies a generic geometrical transformation to an image.
 
static void remap (Mat src, Mat dst, Mat map1, Mat map2, int interpolation, int borderMode, in(double v0, double v1, double v2, double v3) borderValue)
 Applies a generic geometrical transformation to an image.
 
static void remap (Mat src, Mat dst, Mat map1, Mat map2, int interpolation, int borderMode, Scalar borderValue)
 Applies a generic geometrical transformation to an image.
 
static void resize (Mat src, Mat dst, in Vec2d dsize)
 Resizes an image.
 
static void resize (Mat src, Mat dst, in Vec2d dsize, double fx)
 Resizes an image.
 
static void resize (Mat src, Mat dst, in Vec2d dsize, double fx, double fy)
 Resizes an image.
 
static void resize (Mat src, Mat dst, in Vec2d dsize, double fx, double fy, int interpolation)
 Resizes an image.
 
static void resize (Mat src, Mat dst, in(double width, double height) dsize)
 Resizes an image.
 
static void resize (Mat src, Mat dst, in(double width, double height) dsize, double fx)
 Resizes an image.
 
static void resize (Mat src, Mat dst, in(double width, double height) dsize, double fx, double fy)
 Resizes an image.
 
static void resize (Mat src, Mat dst, in(double width, double height) dsize, double fx, double fy, int interpolation)
 Resizes an image.
 
static void resize (Mat src, Mat dst, Size dsize)
 Resizes an image.
 
static void resize (Mat src, Mat dst, Size dsize, double fx)
 Resizes an image.
 
static void resize (Mat src, Mat dst, Size dsize, double fx, double fy)
 Resizes an image.
 
static void resize (Mat src, Mat dst, Size dsize, double fx, double fy, int interpolation)
 Resizes an image.
 
static int rotatedRectangleIntersection (in Vec5d rect1, in Vec5d rect2, Mat intersectingRegion)
 Finds out if there is any intersection between two rotated rectangles.
 
static int rotatedRectangleIntersection (in(double x, double y, double width, double height, double angle) rect1, in(double x, double y, double width, double height, double angle) rect2, Mat intersectingRegion)
 Finds out if there is any intersection between two rotated rectangles.
 
static int rotatedRectangleIntersection (RotatedRect rect1, RotatedRect rect2, Mat intersectingRegion)
 Finds out if there is any intersection between two rotated rectangles.
 
static void Scharr (Mat src, Mat dst, int ddepth, int dx, int dy)
 Calculates the first x- or y- image derivative using Scharr operator.
 
static void Scharr (Mat src, Mat dst, int ddepth, int dx, int dy, double scale)
 Calculates the first x- or y- image derivative using Scharr operator.
 
static void Scharr (Mat src, Mat dst, int ddepth, int dx, int dy, double scale, double delta)
 Calculates the first x- or y- image derivative using Scharr operator.
 
static void Scharr (Mat src, Mat dst, int ddepth, int dx, int dy, double scale, double delta, int borderType)
 Calculates the first x- or y- image derivative using Scharr operator.
 
static void sepFilter2D (Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY)
 Applies a separable linear filter to an image.
 
static void sepFilter2D (Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, in Vec2d anchor)
 Applies a separable linear filter to an image.
 
static void sepFilter2D (Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, in Vec2d anchor, double delta)
 Applies a separable linear filter to an image.
 
static void sepFilter2D (Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, in Vec2d anchor, double delta, int borderType)
 Applies a separable linear filter to an image.
 
static void sepFilter2D (Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, in(double x, double y) anchor)
 Applies a separable linear filter to an image.
 
static void sepFilter2D (Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, in(double x, double y) anchor, double delta)
 Applies a separable linear filter to an image.
 
static void sepFilter2D (Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, in(double x, double y) anchor, double delta, int borderType)
 Applies a separable linear filter to an image.
 
static void sepFilter2D (Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor)
 Applies a separable linear filter to an image.
 
static void sepFilter2D (Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor, double delta)
 Applies a separable linear filter to an image.
 
static void sepFilter2D (Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor, double delta, int borderType)
 Applies a separable linear filter to an image.
 
static void Sobel (Mat src, Mat dst, int ddepth, int dx, int dy)
 Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator.
 
static void Sobel (Mat src, Mat dst, int ddepth, int dx, int dy, int ksize)
 Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator.
 
static void Sobel (Mat src, Mat dst, int ddepth, int dx, int dy, int ksize, double scale)
 Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator.
 
static void Sobel (Mat src, Mat dst, int ddepth, int dx, int dy, int ksize, double scale, double delta)
 Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator.
 
static void Sobel (Mat src, Mat dst, int ddepth, int dx, int dy, int ksize, double scale, double delta, int borderType)
 Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator.
 
static void spatialGradient (Mat src, Mat dx, Mat dy)
 Calculates the first order image derivative in both x and y using a Sobel operator.
 
static void spatialGradient (Mat src, Mat dx, Mat dy, int ksize)
 Calculates the first order image derivative in both x and y using a Sobel operator.
 
static void spatialGradient (Mat src, Mat dx, Mat dy, int ksize, int borderType)
 Calculates the first order image derivative in both x and y using a Sobel operator.
 
static void sqrBoxFilter (Mat src, Mat dst, int ddepth, in Vec2d ksize)
 Calculates the normalized sum of squares of the pixel values overlapping the filter.
 
static void sqrBoxFilter (Mat src, Mat dst, int ddepth, in Vec2d ksize, in Vec2d anchor)
 Calculates the normalized sum of squares of the pixel values overlapping the filter.
 
static void sqrBoxFilter (Mat src, Mat dst, int ddepth, in Vec2d ksize, in Vec2d anchor, bool normalize)
 Calculates the normalized sum of squares of the pixel values overlapping the filter.
 
static void sqrBoxFilter (Mat src, Mat dst, int ddepth, in Vec2d ksize, in Vec2d anchor, bool normalize, int borderType)
 Calculates the normalized sum of squares of the pixel values overlapping the filter.
 
static void sqrBoxFilter (Mat src, Mat dst, int ddepth, in(double width, double height) ksize)
 Calculates the normalized sum of squares of the pixel values overlapping the filter.
 
static void sqrBoxFilter (Mat src, Mat dst, int ddepth, in(double width, double height) ksize, in(double x, double y) anchor)
 Calculates the normalized sum of squares of the pixel values overlapping the filter.
 
static void sqrBoxFilter (Mat src, Mat dst, int ddepth, in(double width, double height) ksize, in(double x, double y) anchor, bool normalize)
 Calculates the normalized sum of squares of the pixel values overlapping the filter.
 
static void sqrBoxFilter (Mat src, Mat dst, int ddepth, in(double width, double height) ksize, in(double x, double y) anchor, bool normalize, int borderType)
 Calculates the normalized sum of squares of the pixel values overlapping the filter.
 
static void sqrBoxFilter (Mat src, Mat dst, int ddepth, Size ksize)
 Calculates the normalized sum of squares of the pixel values overlapping the filter.
 
static void sqrBoxFilter (Mat src, Mat dst, int ddepth, Size ksize, Point anchor)
 Calculates the normalized sum of squares of the pixel values overlapping the filter.
 
static void sqrBoxFilter (Mat src, Mat dst, int ddepth, Size ksize, Point anchor, bool normalize)
 Calculates the normalized sum of squares of the pixel values overlapping the filter.
 
static void sqrBoxFilter (Mat src, Mat dst, int ddepth, Size ksize, Point anchor, bool normalize, int borderType)
 Calculates the normalized sum of squares of the pixel values overlapping the filter.
 
static void stackBlur (Mat src, Mat dst, in Vec2d ksize)
 Blurs an image using the stackBlur.
 
static void stackBlur (Mat src, Mat dst, in(double width, double height) ksize)
 Blurs an image using the stackBlur.
 
static void stackBlur (Mat src, Mat dst, Size ksize)
 Blurs an image using the stackBlur.
 
static double threshold (Mat src, Mat dst, double thresh, double maxval, int type)
 Applies a fixed-level threshold to each array element.
 
static void warpAffine (Mat src, Mat dst, Mat M, in Vec2d dsize)
 Applies an affine transformation to an image.
 
static void warpAffine (Mat src, Mat dst, Mat M, in Vec2d dsize, int flags)
 Applies an affine transformation to an image.
 
static void warpAffine (Mat src, Mat dst, Mat M, in Vec2d dsize, int flags, int borderMode)
 Applies an affine transformation to an image.
 
static void warpAffine (Mat src, Mat dst, Mat M, in Vec2d dsize, int flags, int borderMode, in Vec4d borderValue)
 Applies an affine transformation to an image.
 
static void warpAffine (Mat src, Mat dst, Mat M, in(double width, double height) dsize)
 Applies an affine transformation to an image.
 
static void warpAffine (Mat src, Mat dst, Mat M, in(double width, double height) dsize, int flags)
 Applies an affine transformation to an image.
 
static void warpAffine (Mat src, Mat dst, Mat M, in(double width, double height) dsize, int flags, int borderMode)
 Applies an affine transformation to an image.
 
static void warpAffine (Mat src, Mat dst, Mat M, in(double width, double height) dsize, int flags, int borderMode, in(double v0, double v1, double v2, double v3) borderValue)
 Applies an affine transformation to an image.
 
static void warpAffine (Mat src, Mat dst, Mat M, Size dsize)
 Applies an affine transformation to an image.
 
static void warpAffine (Mat src, Mat dst, Mat M, Size dsize, int flags)
 Applies an affine transformation to an image.
 
static void warpAffine (Mat src, Mat dst, Mat M, Size dsize, int flags, int borderMode)
 Applies an affine transformation to an image.
 
static void warpAffine (Mat src, Mat dst, Mat M, Size dsize, int flags, int borderMode, Scalar borderValue)
 Applies an affine transformation to an image.
 
static void warpPerspective (Mat src, Mat dst, Mat M, in Vec2d dsize)
 Applies a perspective transformation to an image.
 
static void warpPerspective (Mat src, Mat dst, Mat M, in Vec2d dsize, int flags)
 Applies a perspective transformation to an image.
 
static void warpPerspective (Mat src, Mat dst, Mat M, in Vec2d dsize, int flags, int borderMode)
 Applies a perspective transformation to an image.
 
static void warpPerspective (Mat src, Mat dst, Mat M, in Vec2d dsize, int flags, int borderMode, in Vec4d borderValue)
 Applies a perspective transformation to an image.
 
static void warpPerspective (Mat src, Mat dst, Mat M, in(double width, double height) dsize)
 Applies a perspective transformation to an image.
 
static void warpPerspective (Mat src, Mat dst, Mat M, in(double width, double height) dsize, int flags)
 Applies a perspective transformation to an image.
 
static void warpPerspective (Mat src, Mat dst, Mat M, in(double width, double height) dsize, int flags, int borderMode)
 Applies a perspective transformation to an image.
 
static void warpPerspective (Mat src, Mat dst, Mat M, in(double width, double height) dsize, int flags, int borderMode, in(double v0, double v1, double v2, double v3) borderValue)
 Applies a perspective transformation to an image.
 
static void warpPerspective (Mat src, Mat dst, Mat M, Size dsize)
 Applies a perspective transformation to an image.
 
static void warpPerspective (Mat src, Mat dst, Mat M, Size dsize, int flags)
 Applies a perspective transformation to an image.
 
static void warpPerspective (Mat src, Mat dst, Mat M, Size dsize, int flags, int borderMode)
 Applies a perspective transformation to an image.
 
static void warpPerspective (Mat src, Mat dst, Mat M, Size dsize, int flags, int borderMode, Scalar borderValue)
 Applies a perspective transformation to an image.
 
static void warpPolar (Mat src, Mat dst, in Vec2d dsize, in Vec2d center, double maxRadius, int flags)
 Remaps an image to polar or semilog-polar coordinates space.
 
static void warpPolar (Mat src, Mat dst, in(double width, double height) dsize, in(double x, double y) center, double maxRadius, int flags)
 Remaps an image to polar or semilog-polar coordinates space.
 
static void warpPolar (Mat src, Mat dst, Size dsize, Point center, double maxRadius, int flags)
 Remaps an image to polar or semilog-polar coordinates space.
 
static void watershed (Mat image, Mat markers)
 Performs a marker-based image segmentation using the watershed algorithm.
 

Static Public Attributes

const int ADAPTIVE_THRESH_GAUSSIAN_C = 1
 
const int ADAPTIVE_THRESH_MEAN_C = 0
 
const int CC_STAT_AREA = 4
 
const int CC_STAT_HEIGHT = 3
 
const int CC_STAT_LEFT = 0
 
const int CC_STAT_MAX = 5
 
const int CC_STAT_TOP = 1
 
const int CC_STAT_WIDTH = 2
 
const int CCL_BBDT = 4
 
const int CCL_BOLELLI = 2
 
const int CCL_DEFAULT = -1
 
const int CCL_GRANA = 1
 
const int CCL_SAUF = 3
 
const int CCL_SPAGHETTI = 5
 
const int CCL_WU = 0
 
const int CHAIN_APPROX_NONE = 1
 
const int CHAIN_APPROX_SIMPLE = 2
 
const int CHAIN_APPROX_TC89_KCOS = 4
 
const int CHAIN_APPROX_TC89_L1 = 3
 
const int COLOR_BayerBG2BGR = 46
 
const int COLOR_BayerBG2BGR_EA = 135
 
const int COLOR_BayerBG2BGR_VNG = 62
 
const int COLOR_BayerBG2BGRA = 139
 
const int COLOR_BayerBG2GRAY = 86
 
const int COLOR_BayerBG2RGB = COLOR_BayerRG2BGR
 
const int COLOR_BayerBG2RGB_EA = COLOR_BayerRG2BGR_EA
 
const int COLOR_BayerBG2RGB_VNG = COLOR_BayerRG2BGR_VNG
 
const int COLOR_BayerBG2RGBA = COLOR_BayerRG2BGRA
 
const int COLOR_BayerBGGR2BGR = COLOR_BayerRG2BGR
 
const int COLOR_BayerBGGR2BGR_EA = COLOR_BayerRG2BGR_EA
 
const int COLOR_BayerBGGR2BGR_VNG = COLOR_BayerRG2BGR_VNG
 
const int COLOR_BayerBGGR2BGRA = COLOR_BayerRG2BGRA
 
const int COLOR_BayerBGGR2GRAY = COLOR_BayerRG2GRAY
 
const int COLOR_BayerBGGR2RGB = COLOR_BayerRGGB2BGR
 
const int COLOR_BayerBGGR2RGB_EA = COLOR_BayerRGGB2BGR_EA
 
const int COLOR_BayerBGGR2RGB_VNG = COLOR_BayerRGGB2BGR_VNG
 
const int COLOR_BayerBGGR2RGBA = COLOR_BayerRGGB2BGRA
 
const int COLOR_BayerGB2BGR = 47
 
const int COLOR_BayerGB2BGR_EA = 136
 
const int COLOR_BayerGB2BGR_VNG = 63
 
const int COLOR_BayerGB2BGRA = 140
 
const int COLOR_BayerGB2GRAY = 87
 
const int COLOR_BayerGB2RGB = COLOR_BayerGR2BGR
 
const int COLOR_BayerGB2RGB_EA = COLOR_BayerGR2BGR_EA
 
const int COLOR_BayerGB2RGB_VNG = COLOR_BayerGR2BGR_VNG
 
const int COLOR_BayerGB2RGBA = COLOR_BayerGR2BGRA
 
const int COLOR_BayerGBRG2BGR = COLOR_BayerGR2BGR
 
const int COLOR_BayerGBRG2BGR_EA = COLOR_BayerGR2BGR_EA
 
const int COLOR_BayerGBRG2BGR_VNG = COLOR_BayerGR2BGR_VNG
 
const int COLOR_BayerGBRG2BGRA = COLOR_BayerGR2BGRA
 
const int COLOR_BayerGBRG2GRAY = COLOR_BayerGR2GRAY
 
const int COLOR_BayerGBRG2RGB = COLOR_BayerGRBG2BGR
 
const int COLOR_BayerGBRG2RGB_EA = COLOR_BayerGRBG2BGR_EA
 
const int COLOR_BayerGBRG2RGB_VNG = COLOR_BayerGRBG2BGR_VNG
 
const int COLOR_BayerGBRG2RGBA = COLOR_BayerGRBG2BGRA
 
const int COLOR_BayerGR2BGR = 49
 
const int COLOR_BayerGR2BGR_EA = 138
 
const int COLOR_BayerGR2BGR_VNG = 65
 
const int COLOR_BayerGR2BGRA = 142
 
const int COLOR_BayerGR2GRAY = 89
 
const int COLOR_BayerGR2RGB = COLOR_BayerGB2BGR
 
const int COLOR_BayerGR2RGB_EA = COLOR_BayerGB2BGR_EA
 
const int COLOR_BayerGR2RGB_VNG = COLOR_BayerGB2BGR_VNG
 
const int COLOR_BayerGR2RGBA = COLOR_BayerGB2BGRA
 
const int COLOR_BayerGRBG2BGR = COLOR_BayerGB2BGR
 
const int COLOR_BayerGRBG2BGR_EA = COLOR_BayerGB2BGR_EA
 
const int COLOR_BayerGRBG2BGR_VNG = COLOR_BayerGB2BGR_VNG
 
const int COLOR_BayerGRBG2BGRA = COLOR_BayerGB2BGRA
 
const int COLOR_BayerGRBG2GRAY = COLOR_BayerGB2GRAY
 
const int COLOR_BayerGRBG2RGB = COLOR_BayerGBRG2BGR
 
const int COLOR_BayerGRBG2RGB_EA = COLOR_BayerGBRG2BGR_EA
 
const int COLOR_BayerGRBG2RGB_VNG = COLOR_BayerGBRG2BGR_VNG
 
const int COLOR_BayerGRBG2RGBA = COLOR_BayerGBRG2BGRA
 
const int COLOR_BayerRG2BGR = 48
 
const int COLOR_BayerRG2BGR_EA = 137
 
const int COLOR_BayerRG2BGR_VNG = 64
 
const int COLOR_BayerRG2BGRA = 141
 
const int COLOR_BayerRG2GRAY = 88
 
const int COLOR_BayerRG2RGB = COLOR_BayerBG2BGR
 
const int COLOR_BayerRG2RGB_EA = COLOR_BayerBG2BGR_EA
 
const int COLOR_BayerRG2RGB_VNG = COLOR_BayerBG2BGR_VNG
 
const int COLOR_BayerRG2RGBA = COLOR_BayerBG2BGRA
 
const int COLOR_BayerRGGB2BGR = COLOR_BayerBG2BGR
 
const int COLOR_BayerRGGB2BGR_EA = COLOR_BayerBG2BGR_EA
 
const int COLOR_BayerRGGB2BGR_VNG = COLOR_BayerBG2BGR_VNG
 
const int COLOR_BayerRGGB2BGRA = COLOR_BayerBG2BGRA
 
const int COLOR_BayerRGGB2GRAY = COLOR_BayerBG2GRAY
 
const int COLOR_BayerRGGB2RGB = COLOR_BayerBGGR2BGR
 
const int COLOR_BayerRGGB2RGB_EA = COLOR_BayerBGGR2BGR_EA
 
const int COLOR_BayerRGGB2RGB_VNG = COLOR_BayerBGGR2BGR_VNG
 
const int COLOR_BayerRGGB2RGBA = COLOR_BayerBGGR2BGRA
 
const int COLOR_BGR2BGR555 = 22
 
const int COLOR_BGR2BGR565 = 12
 
const int COLOR_BGR2BGRA = 0
 
const int COLOR_BGR2GRAY = 6
 
const int COLOR_BGR2HLS = 52
 
const int COLOR_BGR2HLS_FULL = 68
 
const int COLOR_BGR2HSV = 40
 
const int COLOR_BGR2HSV_FULL = 66
 
const int COLOR_BGR2Lab = 44
 
const int COLOR_BGR2Luv = 50
 
const int COLOR_BGR2RGB = 4
 
const int COLOR_BGR2RGBA = 2
 
const int COLOR_BGR2XYZ = 32
 
const int COLOR_BGR2YCrCb = 36
 
const int COLOR_BGR2YUV = 82
 
const int COLOR_BGR2YUV_I420 = 128
 
const int COLOR_BGR2YUV_IYUV = COLOR_BGR2YUV_I420
 
const int COLOR_BGR2YUV_UYNV = COLOR_BGR2YUV_UYVY
 
const int COLOR_BGR2YUV_UYVY = 144
 
const int COLOR_BGR2YUV_Y422 = COLOR_BGR2YUV_UYVY
 
const int COLOR_BGR2YUV_YUNV = COLOR_BGR2YUV_YUY2
 
const int COLOR_BGR2YUV_YUY2 = 148
 
const int COLOR_BGR2YUV_YUYV = COLOR_BGR2YUV_YUY2
 
const int COLOR_BGR2YUV_YV12 = 132
 
const int COLOR_BGR2YUV_YVYU = 150
 
const int COLOR_BGR5552BGR = 24
 
const int COLOR_BGR5552BGRA = 28
 
const int COLOR_BGR5552GRAY = 31
 
const int COLOR_BGR5552RGB = 25
 
const int COLOR_BGR5552RGBA = 29
 
const int COLOR_BGR5652BGR = 14
 
const int COLOR_BGR5652BGRA = 18
 
const int COLOR_BGR5652GRAY = 21
 
const int COLOR_BGR5652RGB = 15
 
const int COLOR_BGR5652RGBA = 19
 
const int COLOR_BGRA2BGR = 1
 
const int COLOR_BGRA2BGR555 = 26
 
const int COLOR_BGRA2BGR565 = 16
 
const int COLOR_BGRA2GRAY = 10
 
const int COLOR_BGRA2RGB = COLOR_RGBA2BGR
 
const int COLOR_BGRA2RGBA = 5
 
const int COLOR_BGRA2YUV_I420 = 130
 
const int COLOR_BGRA2YUV_IYUV = COLOR_BGRA2YUV_I420
 
const int COLOR_BGRA2YUV_UYNV = COLOR_BGRA2YUV_UYVY
 
const int COLOR_BGRA2YUV_UYVY = 146
 
const int COLOR_BGRA2YUV_Y422 = COLOR_BGRA2YUV_UYVY
 
const int COLOR_BGRA2YUV_YUNV = COLOR_BGRA2YUV_YUY2
 
const int COLOR_BGRA2YUV_YUY2 = 152
 
const int COLOR_BGRA2YUV_YUYV = COLOR_BGRA2YUV_YUY2
 
const int COLOR_BGRA2YUV_YV12 = 134
 
const int COLOR_BGRA2YUV_YVYU = 154
 
const int COLOR_COLORCVT_MAX = 155
 
const int COLOR_GRAY2BGR = 8
 
const int COLOR_GRAY2BGR555 = 30
 
const int COLOR_GRAY2BGR565 = 20
 
const int COLOR_GRAY2BGRA = 9
 
const int COLOR_GRAY2RGB = COLOR_GRAY2BGR
 
const int COLOR_GRAY2RGBA = COLOR_GRAY2BGRA
 
const int COLOR_HLS2BGR = 60
 
const int COLOR_HLS2BGR_FULL = 72
 
const int COLOR_HLS2RGB = 61
 
const int COLOR_HLS2RGB_FULL = 73
 
const int COLOR_HSV2BGR = 54
 
const int COLOR_HSV2BGR_FULL = 70
 
const int COLOR_HSV2RGB = 55
 
const int COLOR_HSV2RGB_FULL = 71
 
const int COLOR_Lab2BGR = 56
 
const int COLOR_Lab2LBGR = 78
 
const int COLOR_Lab2LRGB = 79
 
const int COLOR_Lab2RGB = 57
 
const int COLOR_LBGR2Lab = 74
 
const int COLOR_LBGR2Luv = 76
 
const int COLOR_LRGB2Lab = 75
 
const int COLOR_LRGB2Luv = 77
 
const int COLOR_Luv2BGR = 58
 
const int COLOR_Luv2LBGR = 80
 
const int COLOR_Luv2LRGB = 81
 
const int COLOR_Luv2RGB = 59
 
const int COLOR_mRGBA2RGBA = 126
 
const int COLOR_RGB2BGR = COLOR_BGR2RGB
 
const int COLOR_RGB2BGR555 = 23
 
const int COLOR_RGB2BGR565 = 13
 
const int COLOR_RGB2BGRA = COLOR_BGR2RGBA
 
const int COLOR_RGB2GRAY = 7
 
const int COLOR_RGB2HLS = 53
 
const int COLOR_RGB2HLS_FULL = 69
 
const int COLOR_RGB2HSV = 41
 
const int COLOR_RGB2HSV_FULL = 67
 
const int COLOR_RGB2Lab = 45
 
const int COLOR_RGB2Luv = 51
 
const int COLOR_RGB2RGBA = COLOR_BGR2BGRA
 
const int COLOR_RGB2XYZ = 33
 
const int COLOR_RGB2YCrCb = 37
 
const int COLOR_RGB2YUV = 83
 
const int COLOR_RGB2YUV_I420 = 127
 
const int COLOR_RGB2YUV_IYUV = COLOR_RGB2YUV_I420
 
const int COLOR_RGB2YUV_UYNV = COLOR_RGB2YUV_UYVY
 
const int COLOR_RGB2YUV_UYVY = 143
 
const int COLOR_RGB2YUV_Y422 = COLOR_RGB2YUV_UYVY
 
const int COLOR_RGB2YUV_YUNV = COLOR_RGB2YUV_YUY2
 
const int COLOR_RGB2YUV_YUY2 = 147
 
const int COLOR_RGB2YUV_YUYV = COLOR_RGB2YUV_YUY2
 
const int COLOR_RGB2YUV_YV12 = 131
 
const int COLOR_RGB2YUV_YVYU = 149
 
const int COLOR_RGBA2BGR = 3
 
const int COLOR_RGBA2BGR555 = 27
 
const int COLOR_RGBA2BGR565 = 17
 
const int COLOR_RGBA2BGRA = COLOR_BGRA2RGBA
 
const int COLOR_RGBA2GRAY = 11
 
const int COLOR_RGBA2mRGBA = 125
 
const int COLOR_RGBA2RGB = COLOR_BGRA2BGR
 
const int COLOR_RGBA2YUV_I420 = 129
 
const int COLOR_RGBA2YUV_IYUV = COLOR_RGBA2YUV_I420
 
const int COLOR_RGBA2YUV_UYNV = COLOR_RGBA2YUV_UYVY
 
const int COLOR_RGBA2YUV_UYVY = 145
 
const int COLOR_RGBA2YUV_Y422 = COLOR_RGBA2YUV_UYVY
 
const int COLOR_RGBA2YUV_YUNV = COLOR_RGBA2YUV_YUY2
 
const int COLOR_RGBA2YUV_YUY2 = 151
 
const int COLOR_RGBA2YUV_YUYV = COLOR_RGBA2YUV_YUY2
 
const int COLOR_RGBA2YUV_YV12 = 133
 
const int COLOR_RGBA2YUV_YVYU = 153
 
const int COLOR_XYZ2BGR = 34
 
const int COLOR_XYZ2RGB = 35
 
const int COLOR_YCrCb2BGR = 38
 
const int COLOR_YCrCb2RGB = 39
 
const int COLOR_YUV2BGR = 84
 
const int COLOR_YUV2BGR_I420 = COLOR_YUV2BGR_IYUV
 
const int COLOR_YUV2BGR_IYUV = 101
 
const int COLOR_YUV2BGR_NV12 = 91
 
const int COLOR_YUV2BGR_NV21 = 93
 
const int COLOR_YUV2BGR_UYNV = COLOR_YUV2BGR_UYVY
 
const int COLOR_YUV2BGR_UYVY = 108
 
const int COLOR_YUV2BGR_Y422 = COLOR_YUV2BGR_UYVY
 
const int COLOR_YUV2BGR_YUNV = COLOR_YUV2BGR_YUY2
 
const int COLOR_YUV2BGR_YUY2 = 116
 
const int COLOR_YUV2BGR_YUYV = COLOR_YUV2BGR_YUY2
 
const int COLOR_YUV2BGR_YV12 = 99
 
const int COLOR_YUV2BGR_YVYU = 118
 
const int COLOR_YUV2BGRA_I420 = COLOR_YUV2BGRA_IYUV
 
const int COLOR_YUV2BGRA_IYUV = 105
 
const int COLOR_YUV2BGRA_NV12 = 95
 
const int COLOR_YUV2BGRA_NV21 = 97
 
const int COLOR_YUV2BGRA_UYNV = COLOR_YUV2BGRA_UYVY
 
const int COLOR_YUV2BGRA_UYVY = 112
 
const int COLOR_YUV2BGRA_Y422 = COLOR_YUV2BGRA_UYVY
 
const int COLOR_YUV2BGRA_YUNV = COLOR_YUV2BGRA_YUY2
 
const int COLOR_YUV2BGRA_YUY2 = 120
 
const int COLOR_YUV2BGRA_YUYV = COLOR_YUV2BGRA_YUY2
 
const int COLOR_YUV2BGRA_YV12 = 103
 
const int COLOR_YUV2BGRA_YVYU = 122
 
const int COLOR_YUV2GRAY_420 = 106
 
const int COLOR_YUV2GRAY_I420 = COLOR_YUV2GRAY_420
 
const int COLOR_YUV2GRAY_IYUV = COLOR_YUV2GRAY_420
 
const int COLOR_YUV2GRAY_NV12 = COLOR_YUV2GRAY_420
 
const int COLOR_YUV2GRAY_NV21 = COLOR_YUV2GRAY_420
 
const int COLOR_YUV2GRAY_UYNV = COLOR_YUV2GRAY_UYVY
 
const int COLOR_YUV2GRAY_UYVY = 123
 
const int COLOR_YUV2GRAY_Y422 = COLOR_YUV2GRAY_UYVY
 
const int COLOR_YUV2GRAY_YUNV = COLOR_YUV2GRAY_YUY2
 
const int COLOR_YUV2GRAY_YUY2 = 124
 
const int COLOR_YUV2GRAY_YUYV = COLOR_YUV2GRAY_YUY2
 
const int COLOR_YUV2GRAY_YV12 = COLOR_YUV2GRAY_420
 
const int COLOR_YUV2GRAY_YVYU = COLOR_YUV2GRAY_YUY2
 
const int COLOR_YUV2RGB = 85
 
const int COLOR_YUV2RGB_I420 = COLOR_YUV2RGB_IYUV
 
const int COLOR_YUV2RGB_IYUV = 100
 
const int COLOR_YUV2RGB_NV12 = 90
 
const int COLOR_YUV2RGB_NV21 = 92
 
const int COLOR_YUV2RGB_UYNV = COLOR_YUV2RGB_UYVY
 
const int COLOR_YUV2RGB_UYVY = 107
 
const int COLOR_YUV2RGB_Y422 = COLOR_YUV2RGB_UYVY
 
const int COLOR_YUV2RGB_YUNV = COLOR_YUV2RGB_YUY2
 
const int COLOR_YUV2RGB_YUY2 = 115
 
const int COLOR_YUV2RGB_YUYV = COLOR_YUV2RGB_YUY2
 
const int COLOR_YUV2RGB_YV12 = 98
 
const int COLOR_YUV2RGB_YVYU = 117
 
const int COLOR_YUV2RGBA_I420 = COLOR_YUV2RGBA_IYUV
 
const int COLOR_YUV2RGBA_IYUV = 104
 
const int COLOR_YUV2RGBA_NV12 = 94
 
const int COLOR_YUV2RGBA_NV21 = 96
 
const int COLOR_YUV2RGBA_UYNV = COLOR_YUV2RGBA_UYVY
 
const int COLOR_YUV2RGBA_UYVY = 111
 
const int COLOR_YUV2RGBA_Y422 = COLOR_YUV2RGBA_UYVY
 
const int COLOR_YUV2RGBA_YUNV = COLOR_YUV2RGBA_YUY2
 
const int COLOR_YUV2RGBA_YUY2 = 119
 
const int COLOR_YUV2RGBA_YUYV = COLOR_YUV2RGBA_YUY2
 
const int COLOR_YUV2RGBA_YV12 = 102
 
const int COLOR_YUV2RGBA_YVYU = 121
 
const int COLOR_YUV420p2BGR = COLOR_YUV2BGR_YV12
 
const int COLOR_YUV420p2BGRA = COLOR_YUV2BGRA_YV12
 
const int COLOR_YUV420p2GRAY = COLOR_YUV2GRAY_420
 
const int COLOR_YUV420p2RGB = COLOR_YUV2RGB_YV12
 
const int COLOR_YUV420p2RGBA = COLOR_YUV2RGBA_YV12
 
const int COLOR_YUV420sp2BGR = COLOR_YUV2BGR_NV21
 
const int COLOR_YUV420sp2BGRA = COLOR_YUV2BGRA_NV21
 
const int COLOR_YUV420sp2GRAY = COLOR_YUV2GRAY_420
 
const int COLOR_YUV420sp2RGB = COLOR_YUV2RGB_NV21
 
const int COLOR_YUV420sp2RGBA = COLOR_YUV2RGBA_NV21
 
const int COLORMAP_AUTUMN = 0
 
const int COLORMAP_BONE = 1
 
const int COLORMAP_CIVIDIS = 17
 
const int COLORMAP_COOL = 8
 
const int COLORMAP_DEEPGREEN = 21
 
const int COLORMAP_HOT = 11
 
const int COLORMAP_HSV = 9
 
const int COLORMAP_INFERNO = 14
 
const int COLORMAP_JET = 2
 
const int COLORMAP_MAGMA = 13
 
const int COLORMAP_OCEAN = 5
 
const int COLORMAP_PARULA = 12
 
const int COLORMAP_PINK = 10
 
const int COLORMAP_PLASMA = 15
 
const int COLORMAP_RAINBOW = 4
 
const int COLORMAP_SPRING = 7
 
const int COLORMAP_SUMMER = 6
 
const int COLORMAP_TURBO = 20
 
const int COLORMAP_TWILIGHT = 18
 
const int COLORMAP_TWILIGHT_SHIFTED = 19
 
const int COLORMAP_VIRIDIS = 16
 
const int COLORMAP_WINTER = 3
 
const int CONTOURS_MATCH_I1 = 1
 
const int CONTOURS_MATCH_I2 = 2
 
const int CONTOURS_MATCH_I3 = 3
 
const int CV_BILATERAL = 4
 
const int CV_BLUR = 1
 
const int CV_BLUR_NO_SCALE = 0
 
const int CV_CANNY_L2_GRADIENT = (1 << 31)
 
const int CV_CHAIN_CODE = 0
 
const int CV_CLOCKWISE = 1
 
const int CV_COMP_BHATTACHARYYA = 3
 
const int CV_COMP_CHISQR = 1
 
const int CV_COMP_CHISQR_ALT = 4
 
const int CV_COMP_CORREL = 0
 
const int CV_COMP_HELLINGER = CV_COMP_BHATTACHARYYA
 
const int CV_COMP_INTERSECT = 2
 
const int CV_COMP_KL_DIV = 5
 
const int CV_CONTOURS_MATCH_I1 = 1
 
const int CV_CONTOURS_MATCH_I2 = 2
 
const int CV_CONTOURS_MATCH_I3 = 3
 
const int CV_COUNTER_CLOCKWISE = 2
 
const int CV_DIST_C = 3
 
const int CV_DIST_FAIR = 5
 
const int CV_DIST_HUBER = 7
 
const int CV_DIST_L1 = 1
 
const int CV_DIST_L12 = 4
 
const int CV_DIST_L2 = 2
 
const int CV_DIST_LABEL_CCOMP = 0
 
const int CV_DIST_LABEL_PIXEL = 1
 
const int CV_DIST_MASK_3 = 3
 
const int CV_DIST_MASK_5 = 5
 
const int CV_DIST_MASK_PRECISE = 0
 
const int CV_DIST_USER = -1
 
const int CV_DIST_WELSCH = 6
 
const int CV_GAUSSIAN = 2
 
const int CV_GAUSSIAN_5x5 = 7
 
const int CV_HOUGH_GRADIENT = 3
 
const int CV_HOUGH_MULTI_SCALE = 2
 
const int CV_HOUGH_PROBABILISTIC = 1
 
const int CV_HOUGH_STANDARD = 0
 
const int CV_LINK_RUNS = 5
 
const int CV_MAX_SOBEL_KSIZE = 7
 
const int CV_MEDIAN = 3
 
const int CV_mRGBA2RGBA = 126
 
const int CV_POLY_APPROX_DP = 0
 
const int CV_RGBA2mRGBA = 125
 
const int CV_SCHARR = -1
 
const int CV_SHAPE_CROSS = 1
 
const int CV_SHAPE_CUSTOM = 100
 
const int CV_SHAPE_ELLIPSE = 2
 
const int CV_SHAPE_RECT = 0
 
const int CV_WARP_FILL_OUTLIERS = 8
 
const int CV_WARP_INVERSE_MAP = 16
 
const int CV_WARP_RELATIVE_MAP = 32
 
const int DIST_C = 3
 
const int DIST_FAIR = 5
 
const int DIST_HUBER = 7
 
const int DIST_L1 = 1
 
const int DIST_L12 = 4
 
const int DIST_L2 = 2
 
const int DIST_LABEL_CCOMP = 0
 
const int DIST_LABEL_PIXEL = 1
 
const int DIST_MASK_3 = 3
 
const int DIST_MASK_5 = 5
 
const int DIST_MASK_PRECISE = 0
 
const int DIST_USER = -1
 
const int DIST_WELSCH = 6
 
const int FILLED = -1
 
const int FILTER_SCHARR = -1
 
const int FLOODFILL_FIXED_RANGE = 1 << 16
 
const int FLOODFILL_MASK_ONLY = 1 << 17
 
const int FONT_HERSHEY_COMPLEX = 3
 
const int FONT_HERSHEY_COMPLEX_SMALL = 5
 
const int FONT_HERSHEY_DUPLEX = 2
 
const int FONT_HERSHEY_PLAIN = 1
 
const int FONT_HERSHEY_SCRIPT_COMPLEX = 7
 
const int FONT_HERSHEY_SCRIPT_SIMPLEX = 6
 
const int FONT_HERSHEY_SIMPLEX = 0
 
const int FONT_HERSHEY_TRIPLEX = 4
 
const int FONT_ITALIC = 16
 
const int GC_BGD = 0
 
const int GC_EVAL = 2
 
const int GC_EVAL_FREEZE_MODEL = 3
 
const int GC_FGD = 1
 
const int GC_INIT_WITH_MASK = 1
 
const int GC_INIT_WITH_RECT = 0
 
const int GC_PR_BGD = 2
 
const int GC_PR_FGD = 3
 
static double double double double height
 
const int HISTCMP_BHATTACHARYYA = 3
 
const int HISTCMP_CHISQR = 1
 
const int HISTCMP_CHISQR_ALT = 4
 
const int HISTCMP_CORREL = 0
 
const int HISTCMP_HELLINGER = HISTCMP_BHATTACHARYYA
 
const int HISTCMP_INTERSECT = 2
 
const int HISTCMP_KL_DIV = 5
 
const int HOUGH_GRADIENT = 3
 
const int HOUGH_GRADIENT_ALT = 4
 
const int HOUGH_MULTI_SCALE = 2
 
const int HOUGH_PROBABILISTIC = 1
 
const int HOUGH_STANDARD = 0
 
const int INTER_AREA = 3
 
const int INTER_BITS = 5
 
const int INTER_BITS2 = INTER_BITS * 2
 
const int INTER_CUBIC = 2
 
const int INTER_LANCZOS4 = 4
 
const int INTER_LINEAR = 1
 
const int INTER_LINEAR_EXACT = 5
 
const int INTER_MAX = 7
 
const int INTER_NEAREST = 0
 
const int INTER_NEAREST_EXACT = 6
 
const int INTER_TAB_SIZE = 1 << INTER_BITS
 
const int INTER_TAB_SIZE2 = INTER_TAB_SIZE * INTER_TAB_SIZE
 
const int INTERSECT_FULL = 2
 
const int INTERSECT_NONE = 0
 
const int INTERSECT_PARTIAL = 1
 
const int LINE_4 = 4
 
const int LINE_8 = 8
 
const int LINE_AA = 16
 
const int LSD_REFINE_ADV = 2
 
const int LSD_REFINE_NONE = 0
 
const int LSD_REFINE_STD = 1
 
static double m00
 Calculates all of the moments up to the third order of a polygon or rasterized shape.
 
static double double double m01
 
static double double double double double double m02
 
static double double m10
 
static double double double double double m11
 
static double double double double double double double double double m12
 
static double double double double m20
 
static double double double double double double double double m21
 
static double double double double double double double m30
 
const int MARKER_CROSS = 0
 
const int MARKER_DIAMOND = 3
 
const int MARKER_SQUARE = 4
 
const int MARKER_STAR = 2
 
const int MARKER_TILTED_CROSS = 1
 
const int MARKER_TRIANGLE_DOWN = 6
 
const int MARKER_TRIANGLE_UP = 5
 
const int MORPH_BLACKHAT = 6
 
const int MORPH_CLOSE = 3
 
const int MORPH_CROSS = 1
 
const int MORPH_DILATE = 1
 
const int MORPH_ELLIPSE = 2
 
const int MORPH_ERODE = 0
 
const int MORPH_GRADIENT = 4
 
const int MORPH_HITMISS = 7
 
const int MORPH_OPEN = 2
 
const int MORPH_RECT = 0
 
const int MORPH_TOPHAT = 5
 
const int RETR_CCOMP = 2
 
const int RETR_EXTERNAL = 0
 
const int RETR_FLOODFILL = 4
 
const int RETR_LIST = 1
 
const int RETR_TREE = 3
 
const int THRESH_BINARY = 0
 
const int THRESH_BINARY_INV = 1
 
const int THRESH_MASK = 7
 
const int THRESH_OTSU = 8
 
const int THRESH_TOZERO = 3
 
const int THRESH_TOZERO_INV = 4
 
const int THRESH_TRIANGLE = 16
 
const int THRESH_TRUNC = 2
 
const int TM_CCOEFF = 4
 
const int TM_CCOEFF_NORMED = 5
 
const int TM_CCORR = 2
 
const int TM_CCORR_NORMED = 3
 
const int TM_SQDIFF = 0
 
const int TM_SQDIFF_NORMED = 1
 
const int WARP_FILL_OUTLIERS = 8
 
const int WARP_INVERSE_MAP = 16
 
const int WARP_POLAR_LINEAR = 0
 
const int WARP_POLAR_LOG = 256
 
const int WARP_RELATIVE_MAP = 32
 
static int int int width
 
static double double double width
 
static double width
 
static double x
 The function is used to detect translational shifts that occur between two images.
 
static int x
 Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image.
 
static int int y
 
static double double y
 

Member Function Documentation

◆ accumulate() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.accumulate ( Mat src,
Mat dst )
static

Adds an image to the accumulator image.

The function adds src or some of its elements to dst :

\[\texttt{dst} (x,y) \leftarrow \texttt{dst} (x,y) + \texttt{src} (x,y) \quad \text{if} \quad \texttt{mask} (x,y) \ne 0\]

The function supports multi-channel images. Each channel is processed independently.

The function cv::accumulate can be used, for example, to collect statistics of a scene background viewed by a still camera and for the further foreground-background segmentation.

Parameters
srcInput image of type CV_8UC(n), CV_16UC(n), CV_32FC(n) or CV_64FC(n), where n is a positive integer.
dstAccumulator image with the same number of channels as input image, and a depth of CV_32F or CV_64F.
maskOptional operation mask.
See also
accumulateSquare, accumulateProduct, accumulateWeighted

◆ accumulate() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.accumulate ( Mat src,
Mat dst,
Mat mask )
static

Adds an image to the accumulator image.

The function adds src or some of its elements to dst :

\[\texttt{dst} (x,y) \leftarrow \texttt{dst} (x,y) + \texttt{src} (x,y) \quad \text{if} \quad \texttt{mask} (x,y) \ne 0\]

The function supports multi-channel images. Each channel is processed independently.

The function cv::accumulate can be used, for example, to collect statistics of a scene background viewed by a still camera and for the further foreground-background segmentation.

Parameters
srcInput image of type CV_8UC(n), CV_16UC(n), CV_32FC(n) or CV_64FC(n), where n is a positive integer.
dstAccumulator image with the same number of channels as input image, and a depth of CV_32F or CV_64F.
maskOptional operation mask.
See also
accumulateSquare, accumulateProduct, accumulateWeighted

◆ accumulateProduct() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.accumulateProduct ( Mat src1,
Mat src2,
Mat dst )
static

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

The function adds the product of two images or their selected regions to the accumulator dst :

\[\texttt{dst} (x,y) \leftarrow \texttt{dst} (x,y) + \texttt{src1} (x,y) \cdot \texttt{src2} (x,y) \quad \text{if} \quad \texttt{mask} (x,y) \ne 0\]

The function supports multi-channel images. Each channel is processed independently.

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 image with the same number of channels as input images, 32-bit or 64-bit floating-point.
maskOptional operation mask.
See also
accumulate, accumulateSquare, accumulateWeighted

◆ accumulateProduct() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.accumulateProduct ( Mat src1,
Mat src2,
Mat dst,
Mat mask )
static

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

The function adds the product of two images or their selected regions to the accumulator dst :

\[\texttt{dst} (x,y) \leftarrow \texttt{dst} (x,y) + \texttt{src1} (x,y) \cdot \texttt{src2} (x,y) \quad \text{if} \quad \texttt{mask} (x,y) \ne 0\]

The function supports multi-channel images. Each channel is processed independently.

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 image with the same number of channels as input images, 32-bit or 64-bit floating-point.
maskOptional operation mask.
See also
accumulate, accumulateSquare, accumulateWeighted

◆ accumulateSquare() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.accumulateSquare ( Mat src,
Mat dst )
static

Adds the square of a source image to the accumulator image.

The function adds the input image src or its selected region, raised to a power of 2, to the accumulator dst :

\[\texttt{dst} (x,y) \leftarrow \texttt{dst} (x,y) + \texttt{src} (x,y)^2 \quad \text{if} \quad \texttt{mask} (x,y) \ne 0\]

The function supports multi-channel images. Each channel is processed independently.

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.
See also
accumulateSquare, accumulateProduct, accumulateWeighted

◆ accumulateSquare() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.accumulateSquare ( Mat src,
Mat dst,
Mat mask )
static

Adds the square of a source image to the accumulator image.

The function adds the input image src or its selected region, raised to a power of 2, to the accumulator dst :

\[\texttt{dst} (x,y) \leftarrow \texttt{dst} (x,y) + \texttt{src} (x,y)^2 \quad \text{if} \quad \texttt{mask} (x,y) \ne 0\]

The function supports multi-channel images. Each channel is processed independently.

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.
See also
accumulateSquare, accumulateProduct, accumulateWeighted

◆ accumulateWeighted() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.accumulateWeighted ( Mat src,
Mat dst,
double alpha )
static

Updates a running average.

The function calculates the weighted sum of the input image src and the accumulator dst so that dst becomes a running average of a frame sequence:

\[\texttt{dst} (x,y) \leftarrow (1- \texttt{alpha} ) \cdot \texttt{dst} (x,y) + \texttt{alpha} \cdot \texttt{src} (x,y) \quad \text{if} \quad \texttt{mask} (x,y) \ne 0\]

That is, alpha regulates the update speed (how fast the accumulator "forgets" about earlier images). The function supports multi-channel images. Each channel is processed independently.

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.
See also
accumulate, accumulateSquare, accumulateProduct

◆ accumulateWeighted() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.accumulateWeighted ( Mat src,
Mat dst,
double alpha,
Mat mask )
static

Updates a running average.

The function calculates the weighted sum of the input image src and the accumulator dst so that dst becomes a running average of a frame sequence:

\[\texttt{dst} (x,y) \leftarrow (1- \texttt{alpha} ) \cdot \texttt{dst} (x,y) + \texttt{alpha} \cdot \texttt{src} (x,y) \quad \text{if} \quad \texttt{mask} (x,y) \ne 0\]

That is, alpha regulates the update speed (how fast the accumulator "forgets" about earlier images). The function supports multi-channel images. Each channel is processed independently.

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.
See also
accumulate, accumulateSquare, accumulateProduct

◆ adaptiveThreshold()

static void OpenCVForUnity.ImgprocModule.Imgproc.adaptiveThreshold ( Mat src,
Mat dst,
double maxValue,
int adaptiveMethod,
int thresholdType,
int blockSize,
double C )
static

Applies an adaptive threshold to an array.

The function transforms a grayscale image to a binary image according to the formulae:

  • THRESH_BINARY

    \[dst(x,y) = \fork{\texttt{maxValue}}{if \(src(x,y) > T(x,y)\)}{0}{otherwise}\]

  • THRESH_BINARY_INV

    \[dst(x,y) = \fork{0}{if \(src(x,y) > T(x,y)\)}{\texttt{maxValue}}{otherwise}\]

    where \(T(x,y)\) is a threshold calculated individually for each pixel (see adaptiveMethod parameter).

The function can process the image in-place.

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
adaptiveMethodAdaptive thresholding algorithm to use, see #AdaptiveThresholdTypes. The #BORDER_REPLICATE | #BORDER_ISOLATED is used to process boundaries.
thresholdTypeThresholding type that must be either THRESH_BINARY or THRESH_BINARY_INV, see #ThresholdTypes.
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.
See also
threshold, blur, GaussianBlur

◆ applyColorMap() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.applyColorMap ( Mat src,
Mat dst,
int colormap )
static

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

Parameters
srcThe source image, grayscale or colored of type CV_8UC1 or CV_8UC3. If CV_8UC3, then the CV_8UC1 image is generated internally using cv::COLOR_BGR2GRAY.
dstThe result is the colormapped source image. Note: Mat.create is called on dst.
colormapThe colormap to apply, see #ColormapTypes

◆ applyColorMap() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.applyColorMap ( Mat src,
Mat dst,
Mat userColor )
static

Applies a user colormap on a given image.

Parameters
srcThe source image, grayscale or colored of type CV_8UC1 or CV_8UC3. If CV_8UC3, then the CV_8UC1 image is generated internally using cv::COLOR_BGR2GRAY.
dstThe result is the colormapped source image of the same number of channels as userColor. Note: Mat.create is called on dst.
userColorThe colormap to apply of type CV_8UC1 or CV_8UC3 and size 256

◆ approxPolyDP()

static void OpenCVForUnity.ImgprocModule.Imgproc.approxPolyDP ( MatOfPoint2f curve,
MatOfPoint2f approxCurve,
double epsilon,
bool closed )
static

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

The function cv::approxPolyDP approximates a curve or a polygon with another curve/polygon with less vertices so that the distance between them is less or equal to the specified precision. It uses the Douglas-Peucker algorithm <http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm&gt;

Parameters
curveInput vector of a 2D point stored in std::vector or Mat
approxCurveResult of the approximation. The type should match the type of the input curve.
epsilonParameter specifying the approximation accuracy. This is the maximum distance between the original curve and its approximation.
closedIf true, the approximated curve is closed (its first and last vertices are connected). Otherwise, it is not closed.

◆ arcLength()

static double OpenCVForUnity.ImgprocModule.Imgproc.arcLength ( MatOfPoint2f curve,
bool closed )
static

Calculates a contour perimeter or a curve length.

The function computes a curve length or a closed contour perimeter.

Parameters
curveInput vector of 2D points, stored in std::vector or Mat.
closedFlag indicating whether the curve is closed or not.

◆ arrowedLine() [1/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
in Vec2d pt1,
in Vec2d pt2,
in Vec4d color )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ arrowedLine() [2/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
in Vec2d pt1,
in Vec2d pt2,
in Vec4d color,
int thickness )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ arrowedLine() [3/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
in Vec2d pt1,
in Vec2d pt2,
in Vec4d color,
int thickness,
int line_type )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ arrowedLine() [4/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
in Vec2d pt1,
in Vec2d pt2,
in Vec4d color,
int thickness,
int line_type,
int shift )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ arrowedLine() [5/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
in Vec2d pt1,
in Vec2d pt2,
in Vec4d color,
int thickness,
int line_type,
int shift,
double tipLength )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ arrowedLine() [6/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
in(double x, double y) pt1,
in(double x, double y) pt2,
in(double v0, double v1, double v2, double v3) color )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ arrowedLine() [7/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
in(double x, double y) pt1,
in(double x, double y) pt2,
in(double v0, double v1, double v2, double v3) color,
int thickness )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ arrowedLine() [8/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
in(double x, double y) pt1,
in(double x, double y) pt2,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int line_type )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ arrowedLine() [9/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
in(double x, double y) pt1,
in(double x, double y) pt2,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int line_type,
int shift )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ arrowedLine() [10/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
in(double x, double y) pt1,
in(double x, double y) pt2,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int line_type,
int shift,
double tipLength )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ arrowedLine() [11/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
Point pt1,
Point pt2,
Scalar color )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ arrowedLine() [12/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
Point pt1,
Point pt2,
Scalar color,
int thickness )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ arrowedLine() [13/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
Point pt1,
Point pt2,
Scalar color,
int thickness,
int line_type )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ arrowedLine() [14/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
Point pt1,
Point pt2,
Scalar color,
int thickness,
int line_type,
int shift )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ arrowedLine() [15/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.arrowedLine ( Mat img,
Point pt1,
Point pt2,
Scalar color,
int thickness,
int line_type,
int shift,
double tipLength )
static

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

The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also line.

Parameters
imgImage.
pt1The point the arrow starts from.
pt2The point the arrow points to.
colorLine color.
thicknessLine thickness.
line_typeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.
tipLengthThe length of the arrow tip in relation to the arrow length

◆ bilateralFilter() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.bilateralFilter ( Mat src,
Mat dst,
int d,
double sigmaColor,
double sigmaSpace )
static

Applies the bilateral filter to an image.

The function applies bilateral filtering to the input image, as described in http://www.dai.ed.ac.uk/CVonline/LOCAL_COPIES/MANDUCHI1/Bilateral_Filtering.html bilateralFilter can reduce unwanted noise very well while keeping edges fairly sharp. However, it is very slow compared to most filters.

Sigma values: For simplicity, you can set the 2 sigma values to be the same. If they are small (< 10), the filter will not have much effect, whereas if they are large (> 150), they will have a very strong effect, making the image look "cartoonish".

Filter size: Large filters (d > 5) are very slow, so it is recommended to use d=5 for real-time applications, and perhaps d=9 for offline applications that need heavy noise filtering.

This filter does not work inplace.

Parameters
srcSource 8-bit or floating-point, 1-channel or 3-channel image.
dstDestination image of the same size and type as src .
dDiameter of each pixel neighborhood that is used during filtering. If it is non-positive, it is computed from sigmaSpace.
sigmaColorFilter sigma in the color space. A larger value of the parameter means that farther colors within the pixel neighborhood (see sigmaSpace) will be mixed together, resulting in larger areas of semi-equal color.
sigmaSpaceFilter sigma in the coordinate space. A larger value of the parameter means that farther pixels will influence each other as long as their colors are close enough (see sigmaColor ). When d>0, it specifies the neighborhood size regardless of sigmaSpace. Otherwise, d is proportional to sigmaSpace.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes

◆ bilateralFilter() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.bilateralFilter ( Mat src,
Mat dst,
int d,
double sigmaColor,
double sigmaSpace,
int borderType )
static

Applies the bilateral filter to an image.

The function applies bilateral filtering to the input image, as described in http://www.dai.ed.ac.uk/CVonline/LOCAL_COPIES/MANDUCHI1/Bilateral_Filtering.html bilateralFilter can reduce unwanted noise very well while keeping edges fairly sharp. However, it is very slow compared to most filters.

Sigma values: For simplicity, you can set the 2 sigma values to be the same. If they are small (< 10), the filter will not have much effect, whereas if they are large (> 150), they will have a very strong effect, making the image look "cartoonish".

Filter size: Large filters (d > 5) are very slow, so it is recommended to use d=5 for real-time applications, and perhaps d=9 for offline applications that need heavy noise filtering.

This filter does not work inplace.

Parameters
srcSource 8-bit or floating-point, 1-channel or 3-channel image.
dstDestination image of the same size and type as src .
dDiameter of each pixel neighborhood that is used during filtering. If it is non-positive, it is computed from sigmaSpace.
sigmaColorFilter sigma in the color space. A larger value of the parameter means that farther colors within the pixel neighborhood (see sigmaSpace) will be mixed together, resulting in larger areas of semi-equal color.
sigmaSpaceFilter sigma in the coordinate space. A larger value of the parameter means that farther pixels will influence each other as long as their colors are close enough (see sigmaColor ). When d>0, it specifies the neighborhood size regardless of sigmaSpace. Otherwise, d is proportional to sigmaSpace.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes

◆ blendLinear()

static void OpenCVForUnity.ImgprocModule.Imgproc.blendLinear ( Mat src1,
Mat src2,
Mat weights1,
Mat weights2,
Mat dst )
static

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

variant without mask parameter

◆ blur() [1/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.blur ( Mat src,
Mat dst,
in Vec2d ksize )
static

Blurs an image using the normalized box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \frac{1}{\texttt{ksize.width*ksize.height}} \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \end{bmatrix}\]

The call blur(src, dst, ksize, anchor, borderType) is equivalent to boxFilter(src, dst, src.type(), ksize, / anchor, true, borderType).

Parameters
srcinput image; it 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.
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter, bilateralFilter, GaussianBlur, medianBlur

◆ blur() [2/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.blur ( Mat src,
Mat dst,
in Vec2d ksize,
in Vec2d anchor )
static

Blurs an image using the normalized box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \frac{1}{\texttt{ksize.width*ksize.height}} \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \end{bmatrix}\]

The call blur(src, dst, ksize, anchor, borderType) is equivalent to boxFilter(src, dst, src.type(), ksize, / anchor, true, borderType).

Parameters
srcinput image; it 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.
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter, bilateralFilter, GaussianBlur, medianBlur

◆ blur() [3/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.blur ( Mat src,
Mat dst,
in Vec2d ksize,
in Vec2d anchor,
int borderType )
static

Blurs an image using the normalized box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \frac{1}{\texttt{ksize.width*ksize.height}} \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \end{bmatrix}\]

The call blur(src, dst, ksize, anchor, borderType) is equivalent to boxFilter(src, dst, src.type(), ksize, / anchor, true, borderType).

Parameters
srcinput image; it 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.
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter, bilateralFilter, GaussianBlur, medianBlur

◆ blur() [4/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.blur ( Mat src,
Mat dst,
in(double width, double height) ksize )
static

Blurs an image using the normalized box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \frac{1}{\texttt{ksize.width*ksize.height}} \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \end{bmatrix}\]

The call blur(src, dst, ksize, anchor, borderType) is equivalent to boxFilter(src, dst, src.type(), ksize, / anchor, true, borderType).

Parameters
srcinput image; it 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.
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter, bilateralFilter, GaussianBlur, medianBlur

◆ blur() [5/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.blur ( Mat src,
Mat dst,
in(double width, double height) ksize,
in(double x, double y) anchor )
static

Blurs an image using the normalized box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \frac{1}{\texttt{ksize.width*ksize.height}} \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \end{bmatrix}\]

The call blur(src, dst, ksize, anchor, borderType) is equivalent to boxFilter(src, dst, src.type(), ksize, / anchor, true, borderType).

Parameters
srcinput image; it 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.
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter, bilateralFilter, GaussianBlur, medianBlur

◆ blur() [6/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.blur ( Mat src,
Mat dst,
in(double width, double height) ksize,
in(double x, double y) anchor,
int borderType )
static

Blurs an image using the normalized box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \frac{1}{\texttt{ksize.width*ksize.height}} \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \end{bmatrix}\]

The call blur(src, dst, ksize, anchor, borderType) is equivalent to boxFilter(src, dst, src.type(), ksize, / anchor, true, borderType).

Parameters
srcinput image; it 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.
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter, bilateralFilter, GaussianBlur, medianBlur

◆ blur() [7/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.blur ( Mat src,
Mat dst,
Size ksize )
static

Blurs an image using the normalized box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \frac{1}{\texttt{ksize.width*ksize.height}} \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \end{bmatrix}\]

The call blur(src, dst, ksize, anchor, borderType) is equivalent to boxFilter(src, dst, src.type(), ksize, / anchor, true, borderType).

Parameters
srcinput image; it 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.
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter, bilateralFilter, GaussianBlur, medianBlur

◆ blur() [8/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.blur ( Mat src,
Mat dst,
Size ksize,
Point anchor )
static

Blurs an image using the normalized box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \frac{1}{\texttt{ksize.width*ksize.height}} \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \end{bmatrix}\]

The call blur(src, dst, ksize, anchor, borderType) is equivalent to boxFilter(src, dst, src.type(), ksize, / anchor, true, borderType).

Parameters
srcinput image; it 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.
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter, bilateralFilter, GaussianBlur, medianBlur

◆ blur() [9/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.blur ( Mat src,
Mat dst,
Size ksize,
Point anchor,
int borderType )
static

Blurs an image using the normalized box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \frac{1}{\texttt{ksize.width*ksize.height}} \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \end{bmatrix}\]

The call blur(src, dst, ksize, anchor, borderType) is equivalent to boxFilter(src, dst, src.type(), ksize, / anchor, true, borderType).

Parameters
srcinput image; it 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.
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter, bilateralFilter, GaussianBlur, medianBlur

◆ boundingRect()

static Rect OpenCVForUnity.ImgprocModule.Imgproc.boundingRect ( Mat array)
static

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

The function calculates and returns the minimal up-right bounding rectangle for the specified point set or non-zero pixels of gray-scale image.

Parameters
arrayInput gray-scale image or 2D point set, stored in std::vector or Mat.

◆ boundingRectAsValueTuple()

static int int int int height OpenCVForUnity.ImgprocModule.Imgproc.boundingRectAsValueTuple ( Mat array)
static

◆ boundingRectAsVec4i()

static Vec4i OpenCVForUnity.ImgprocModule.Imgproc.boundingRectAsVec4i ( Mat array)
static

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

The function calculates and returns the minimal up-right bounding rectangle for the specified point set or non-zero pixels of gray-scale image.

Parameters
arrayInput gray-scale image or 2D point set, stored in std::vector or Mat.

◆ boxFilter() [1/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxFilter ( Mat src,
Mat dst,
int ddepth,
in Vec2d ksize )
static

Blurs an image using the box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \alpha \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \end{bmatrix}\]

where

\[\alpha = \begin{cases} \frac{1}{\texttt{ksize.width*ksize.height}} & \texttt{when } \texttt{normalize=true} \\1 & \texttt{otherwise}\end{cases}\]

Unnormalized box filter is useful for computing various integral characteristics over each pixel neighborhood, such as covariance matrices of image derivatives (used in dense optical flow algorithms, and so on). If you need to compute pixel sums over variable-size windows, use integral.

Parameters
srcinput image.
dstoutput image of the same size and type as src.
ddepththe output image depth (-1 to use src.depth()).
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is normalized by its area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

blur, bilateralFilter, GaussianBlur, medianBlur, integral

◆ boxFilter() [2/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxFilter ( Mat src,
Mat dst,
int ddepth,
in Vec2d ksize,
in Vec2d anchor )
static

Blurs an image using the box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \alpha \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \end{bmatrix}\]

where

\[\alpha = \begin{cases} \frac{1}{\texttt{ksize.width*ksize.height}} & \texttt{when } \texttt{normalize=true} \\1 & \texttt{otherwise}\end{cases}\]

Unnormalized box filter is useful for computing various integral characteristics over each pixel neighborhood, such as covariance matrices of image derivatives (used in dense optical flow algorithms, and so on). If you need to compute pixel sums over variable-size windows, use integral.

Parameters
srcinput image.
dstoutput image of the same size and type as src.
ddepththe output image depth (-1 to use src.depth()).
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is normalized by its area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

blur, bilateralFilter, GaussianBlur, medianBlur, integral

◆ boxFilter() [3/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxFilter ( Mat src,
Mat dst,
int ddepth,
in Vec2d ksize,
in Vec2d anchor,
bool normalize )
static

Blurs an image using the box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \alpha \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \end{bmatrix}\]

where

\[\alpha = \begin{cases} \frac{1}{\texttt{ksize.width*ksize.height}} & \texttt{when } \texttt{normalize=true} \\1 & \texttt{otherwise}\end{cases}\]

Unnormalized box filter is useful for computing various integral characteristics over each pixel neighborhood, such as covariance matrices of image derivatives (used in dense optical flow algorithms, and so on). If you need to compute pixel sums over variable-size windows, use integral.

Parameters
srcinput image.
dstoutput image of the same size and type as src.
ddepththe output image depth (-1 to use src.depth()).
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is normalized by its area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

blur, bilateralFilter, GaussianBlur, medianBlur, integral

◆ boxFilter() [4/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxFilter ( Mat src,
Mat dst,
int ddepth,
in Vec2d ksize,
in Vec2d anchor,
bool normalize,
int borderType )
static

Blurs an image using the box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \alpha \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \end{bmatrix}\]

where

\[\alpha = \begin{cases} \frac{1}{\texttt{ksize.width*ksize.height}} & \texttt{when } \texttt{normalize=true} \\1 & \texttt{otherwise}\end{cases}\]

Unnormalized box filter is useful for computing various integral characteristics over each pixel neighborhood, such as covariance matrices of image derivatives (used in dense optical flow algorithms, and so on). If you need to compute pixel sums over variable-size windows, use integral.

Parameters
srcinput image.
dstoutput image of the same size and type as src.
ddepththe output image depth (-1 to use src.depth()).
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is normalized by its area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

blur, bilateralFilter, GaussianBlur, medianBlur, integral

◆ boxFilter() [5/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxFilter ( Mat src,
Mat dst,
int ddepth,
in(double width, double height) ksize )
static

Blurs an image using the box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \alpha \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \end{bmatrix}\]

where

\[\alpha = \begin{cases} \frac{1}{\texttt{ksize.width*ksize.height}} & \texttt{when } \texttt{normalize=true} \\1 & \texttt{otherwise}\end{cases}\]

Unnormalized box filter is useful for computing various integral characteristics over each pixel neighborhood, such as covariance matrices of image derivatives (used in dense optical flow algorithms, and so on). If you need to compute pixel sums over variable-size windows, use integral.

Parameters
srcinput image.
dstoutput image of the same size and type as src.
ddepththe output image depth (-1 to use src.depth()).
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is normalized by its area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

blur, bilateralFilter, GaussianBlur, medianBlur, integral

◆ boxFilter() [6/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxFilter ( Mat src,
Mat dst,
int ddepth,
in(double width, double height) ksize,
in(double x, double y) anchor )
static

Blurs an image using the box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \alpha \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \end{bmatrix}\]

where

\[\alpha = \begin{cases} \frac{1}{\texttt{ksize.width*ksize.height}} & \texttt{when } \texttt{normalize=true} \\1 & \texttt{otherwise}\end{cases}\]

Unnormalized box filter is useful for computing various integral characteristics over each pixel neighborhood, such as covariance matrices of image derivatives (used in dense optical flow algorithms, and so on). If you need to compute pixel sums over variable-size windows, use integral.

Parameters
srcinput image.
dstoutput image of the same size and type as src.
ddepththe output image depth (-1 to use src.depth()).
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is normalized by its area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

blur, bilateralFilter, GaussianBlur, medianBlur, integral

◆ boxFilter() [7/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxFilter ( Mat src,
Mat dst,
int ddepth,
in(double width, double height) ksize,
in(double x, double y) anchor,
bool normalize )
static

Blurs an image using the box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \alpha \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \end{bmatrix}\]

where

\[\alpha = \begin{cases} \frac{1}{\texttt{ksize.width*ksize.height}} & \texttt{when } \texttt{normalize=true} \\1 & \texttt{otherwise}\end{cases}\]

Unnormalized box filter is useful for computing various integral characteristics over each pixel neighborhood, such as covariance matrices of image derivatives (used in dense optical flow algorithms, and so on). If you need to compute pixel sums over variable-size windows, use integral.

Parameters
srcinput image.
dstoutput image of the same size and type as src.
ddepththe output image depth (-1 to use src.depth()).
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is normalized by its area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

blur, bilateralFilter, GaussianBlur, medianBlur, integral

◆ boxFilter() [8/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxFilter ( Mat src,
Mat dst,
int ddepth,
in(double width, double height) ksize,
in(double x, double y) anchor,
bool normalize,
int borderType )
static

Blurs an image using the box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \alpha \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \end{bmatrix}\]

where

\[\alpha = \begin{cases} \frac{1}{\texttt{ksize.width*ksize.height}} & \texttt{when } \texttt{normalize=true} \\1 & \texttt{otherwise}\end{cases}\]

Unnormalized box filter is useful for computing various integral characteristics over each pixel neighborhood, such as covariance matrices of image derivatives (used in dense optical flow algorithms, and so on). If you need to compute pixel sums over variable-size windows, use integral.

Parameters
srcinput image.
dstoutput image of the same size and type as src.
ddepththe output image depth (-1 to use src.depth()).
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is normalized by its area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

blur, bilateralFilter, GaussianBlur, medianBlur, integral

◆ boxFilter() [9/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxFilter ( Mat src,
Mat dst,
int ddepth,
Size ksize )
static

Blurs an image using the box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \alpha \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \end{bmatrix}\]

where

\[\alpha = \begin{cases} \frac{1}{\texttt{ksize.width*ksize.height}} & \texttt{when } \texttt{normalize=true} \\1 & \texttt{otherwise}\end{cases}\]

Unnormalized box filter is useful for computing various integral characteristics over each pixel neighborhood, such as covariance matrices of image derivatives (used in dense optical flow algorithms, and so on). If you need to compute pixel sums over variable-size windows, use integral.

Parameters
srcinput image.
dstoutput image of the same size and type as src.
ddepththe output image depth (-1 to use src.depth()).
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is normalized by its area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

blur, bilateralFilter, GaussianBlur, medianBlur, integral

◆ boxFilter() [10/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxFilter ( Mat src,
Mat dst,
int ddepth,
Size ksize,
Point anchor )
static

Blurs an image using the box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \alpha \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \end{bmatrix}\]

where

\[\alpha = \begin{cases} \frac{1}{\texttt{ksize.width*ksize.height}} & \texttt{when } \texttt{normalize=true} \\1 & \texttt{otherwise}\end{cases}\]

Unnormalized box filter is useful for computing various integral characteristics over each pixel neighborhood, such as covariance matrices of image derivatives (used in dense optical flow algorithms, and so on). If you need to compute pixel sums over variable-size windows, use integral.

Parameters
srcinput image.
dstoutput image of the same size and type as src.
ddepththe output image depth (-1 to use src.depth()).
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is normalized by its area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

blur, bilateralFilter, GaussianBlur, medianBlur, integral

◆ boxFilter() [11/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxFilter ( Mat src,
Mat dst,
int ddepth,
Size ksize,
Point anchor,
bool normalize )
static

Blurs an image using the box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \alpha \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \end{bmatrix}\]

where

\[\alpha = \begin{cases} \frac{1}{\texttt{ksize.width*ksize.height}} & \texttt{when } \texttt{normalize=true} \\1 & \texttt{otherwise}\end{cases}\]

Unnormalized box filter is useful for computing various integral characteristics over each pixel neighborhood, such as covariance matrices of image derivatives (used in dense optical flow algorithms, and so on). If you need to compute pixel sums over variable-size windows, use integral.

Parameters
srcinput image.
dstoutput image of the same size and type as src.
ddepththe output image depth (-1 to use src.depth()).
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is normalized by its area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

blur, bilateralFilter, GaussianBlur, medianBlur, integral

◆ boxFilter() [12/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxFilter ( Mat src,
Mat dst,
int ddepth,
Size ksize,
Point anchor,
bool normalize,
int borderType )
static

Blurs an image using the box filter.

The function smooths an image using the kernel:

\[\texttt{K} = \alpha \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \hdotsfor{6} \\ 1 & 1 & 1 & \cdots & 1 & 1 \end{bmatrix}\]

where

\[\alpha = \begin{cases} \frac{1}{\texttt{ksize.width*ksize.height}} & \texttt{when } \texttt{normalize=true} \\1 & \texttt{otherwise}\end{cases}\]

Unnormalized box filter is useful for computing various integral characteristics over each pixel neighborhood, such as covariance matrices of image derivatives (used in dense optical flow algorithms, and so on). If you need to compute pixel sums over variable-size windows, use integral.

Parameters
srcinput image.
dstoutput image of the same size and type as src.
ddepththe output image depth (-1 to use src.depth()).
ksizeblurring kernel size.
anchoranchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is normalized by its area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

blur, bilateralFilter, GaussianBlur, medianBlur, integral

◆ boxPoints() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxPoints ( in Vec5d box,
Mat points )
static

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

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

Parameters
boxThe input rotated rectangle. It may be the output of minAreaRect.
pointsThe output array of four vertices of rectangles.

◆ boxPoints() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxPoints ( in(double x, double y, double width, double height, double angle) box,
Mat points )
static

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

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

Parameters
boxThe input rotated rectangle. It may be the output of minAreaRect.
pointsThe output array of four vertices of rectangles.

◆ boxPoints() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.boxPoints ( RotatedRect box,
Mat points )
static

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

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

Parameters
boxThe input rotated rectangle. It may be the output of minAreaRect.
pointsThe output array of four vertices of rectangles.

◆ calcBackProject()

static void OpenCVForUnity.ImgprocModule.Imgproc.calcBackProject ( List< Mat > images,
MatOfInt channels,
Mat hist,
Mat dst,
MatOfFloat ranges,
double scale )
static

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

◆ calcHist() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.calcHist ( List< Mat > images,
MatOfInt channels,
Mat mask,
Mat hist,
MatOfInt histSize,
MatOfFloat ranges )
static

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

this variant supports only uniform histograms.

ranges argument is either empty vector or a flattened vector of histSize.size()*2 elements (histSize.size() element pairs). The first and second elements of each pair specify the lower and upper boundaries.

◆ calcHist() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.calcHist ( List< Mat > images,
MatOfInt channels,
Mat mask,
Mat hist,
MatOfInt histSize,
MatOfFloat ranges,
bool accumulate )
static

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

this variant supports only uniform histograms.

ranges argument is either empty vector or a flattened vector of histSize.size()*2 elements (histSize.size() element pairs). The first and second elements of each pair specify the lower and upper boundaries.

◆ Canny() [1/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Canny ( Mat dx,
Mat dy,
Mat edges,
double threshold1,
double threshold2 )
static

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

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

Parameters
dx16-bit x derivative of input image (CV_16SC1 or CV_16SC3).
dy16-bit y derivative of input image (same type as dx).
edgesoutput edge map; single channels 8-bit image, which has the same size as image .
threshold1first threshold for the hysteresis procedure.
threshold2second threshold for the hysteresis procedure.
L2gradienta flag, indicating whether a more accurate \(L_2\) norm \(=\sqrt{(dI/dx)^2 + (dI/dy)^2}\) should be used to calculate the image gradient magnitude ( L2gradient=true ), or whether the default \(L_1\) norm \(=|dI/dx|+|dI/dy|\) is enough ( L2gradient=false ).

◆ Canny() [2/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Canny ( Mat dx,
Mat dy,
Mat edges,
double threshold1,
double threshold2,
bool L2gradient )
static

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

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

Parameters
dx16-bit x derivative of input image (CV_16SC1 or CV_16SC3).
dy16-bit y derivative of input image (same type as dx).
edgesoutput edge map; single channels 8-bit image, which has the same size as image .
threshold1first threshold for the hysteresis procedure.
threshold2second threshold for the hysteresis procedure.
L2gradienta flag, indicating whether a more accurate \(L_2\) norm \(=\sqrt{(dI/dx)^2 + (dI/dy)^2}\) should be used to calculate the image gradient magnitude ( L2gradient=true ), or whether the default \(L_1\) norm \(=|dI/dx|+|dI/dy|\) is enough ( L2gradient=false ).

◆ Canny() [3/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Canny ( Mat image,
Mat edges,
double threshold1,
double threshold2 )
static

Finds edges in an image using the Canny algorithm [Canny86] .

The function finds edges in the input image and marks them in the output map edges using the Canny algorithm. The smallest value between threshold1 and threshold2 is used for edge linking. The largest value is used to find initial segments of strong edges. See <http://en.wikipedia.org/wiki/Canny_edge_detector&gt;

Parameters
image8-bit input image.
edgesoutput edge map; single channels 8-bit image, which has the same size as image .
threshold1first threshold for the hysteresis procedure.
threshold2second threshold for the hysteresis procedure.
apertureSizeaperture size for the Sobel operator.
L2gradienta flag, indicating whether a more accurate \(L_2\) norm \(=\sqrt{(dI/dx)^2 + (dI/dy)^2}\) should be used to calculate the image gradient magnitude ( L2gradient=true ), or whether the default \(L_1\) norm \(=|dI/dx|+|dI/dy|\) is enough ( L2gradient=false ).

◆ Canny() [4/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Canny ( Mat image,
Mat edges,
double threshold1,
double threshold2,
int apertureSize )
static

Finds edges in an image using the Canny algorithm [Canny86] .

The function finds edges in the input image and marks them in the output map edges using the Canny algorithm. The smallest value between threshold1 and threshold2 is used for edge linking. The largest value is used to find initial segments of strong edges. See <http://en.wikipedia.org/wiki/Canny_edge_detector&gt;

Parameters
image8-bit input image.
edgesoutput edge map; single channels 8-bit image, which has the same size as image .
threshold1first threshold for the hysteresis procedure.
threshold2second threshold for the hysteresis procedure.
apertureSizeaperture size for the Sobel operator.
L2gradienta flag, indicating whether a more accurate \(L_2\) norm \(=\sqrt{(dI/dx)^2 + (dI/dy)^2}\) should be used to calculate the image gradient magnitude ( L2gradient=true ), or whether the default \(L_1\) norm \(=|dI/dx|+|dI/dy|\) is enough ( L2gradient=false ).

◆ Canny() [5/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Canny ( Mat image,
Mat edges,
double threshold1,
double threshold2,
int apertureSize,
bool L2gradient )
static

Finds edges in an image using the Canny algorithm [Canny86] .

The function finds edges in the input image and marks them in the output map edges using the Canny algorithm. The smallest value between threshold1 and threshold2 is used for edge linking. The largest value is used to find initial segments of strong edges. See <http://en.wikipedia.org/wiki/Canny_edge_detector&gt;

Parameters
image8-bit input image.
edgesoutput edge map; single channels 8-bit image, which has the same size as image .
threshold1first threshold for the hysteresis procedure.
threshold2second threshold for the hysteresis procedure.
apertureSizeaperture size for the Sobel operator.
L2gradienta flag, indicating whether a more accurate \(L_2\) norm \(=\sqrt{(dI/dx)^2 + (dI/dy)^2}\) should be used to calculate the image gradient magnitude ( L2gradient=true ), or whether the default \(L_1\) norm \(=|dI/dx|+|dI/dy|\) is enough ( L2gradient=false ).

◆ circle() [1/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.circle ( Mat img,
in Vec2d center,
int radius,
in Vec4d color )
static

Draws a circle.

The function cv::circle draws a simple or filled circle with a given center and radius.

Parameters
imgImage where the circle is drawn.
centerCenter of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline, if positive. Negative values, like FILLED, mean that a filled circle is to be drawn.
lineTypeType of the circle boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and in the radius value.

◆ circle() [2/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.circle ( Mat img,
in Vec2d center,
int radius,
in Vec4d color,
int thickness )
static

Draws a circle.

The function cv::circle draws a simple or filled circle with a given center and radius.

Parameters
imgImage where the circle is drawn.
centerCenter of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline, if positive. Negative values, like FILLED, mean that a filled circle is to be drawn.
lineTypeType of the circle boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and in the radius value.

◆ circle() [3/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.circle ( Mat img,
in Vec2d center,
int radius,
in Vec4d color,
int thickness,
int lineType )
static

Draws a circle.

The function cv::circle draws a simple or filled circle with a given center and radius.

Parameters
imgImage where the circle is drawn.
centerCenter of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline, if positive. Negative values, like FILLED, mean that a filled circle is to be drawn.
lineTypeType of the circle boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and in the radius value.

◆ circle() [4/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.circle ( Mat img,
in Vec2d center,
int radius,
in Vec4d color,
int thickness,
int lineType,
int shift )
static

Draws a circle.

The function cv::circle draws a simple or filled circle with a given center and radius.

Parameters
imgImage where the circle is drawn.
centerCenter of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline, if positive. Negative values, like FILLED, mean that a filled circle is to be drawn.
lineTypeType of the circle boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and in the radius value.

◆ circle() [5/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.circle ( Mat img,
in(double x, double y) center,
int radius,
in(double v0, double v1, double v2, double v3) color )
static

Draws a circle.

The function cv::circle draws a simple or filled circle with a given center and radius.

Parameters
imgImage where the circle is drawn.
centerCenter of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline, if positive. Negative values, like FILLED, mean that a filled circle is to be drawn.
lineTypeType of the circle boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and in the radius value.

◆ circle() [6/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.circle ( Mat img,
in(double x, double y) center,
int radius,
in(double v0, double v1, double v2, double v3) color,
int thickness )
static

Draws a circle.

The function cv::circle draws a simple or filled circle with a given center and radius.

Parameters
imgImage where the circle is drawn.
centerCenter of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline, if positive. Negative values, like FILLED, mean that a filled circle is to be drawn.
lineTypeType of the circle boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and in the radius value.

◆ circle() [7/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.circle ( Mat img,
in(double x, double y) center,
int radius,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType )
static

Draws a circle.

The function cv::circle draws a simple or filled circle with a given center and radius.

Parameters
imgImage where the circle is drawn.
centerCenter of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline, if positive. Negative values, like FILLED, mean that a filled circle is to be drawn.
lineTypeType of the circle boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and in the radius value.

◆ circle() [8/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.circle ( Mat img,
in(double x, double y) center,
int radius,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType,
int shift )
static

Draws a circle.

The function cv::circle draws a simple or filled circle with a given center and radius.

Parameters
imgImage where the circle is drawn.
centerCenter of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline, if positive. Negative values, like FILLED, mean that a filled circle is to be drawn.
lineTypeType of the circle boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and in the radius value.

◆ circle() [9/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.circle ( Mat img,
Point center,
int radius,
Scalar color )
static

Draws a circle.

The function cv::circle draws a simple or filled circle with a given center and radius.

Parameters
imgImage where the circle is drawn.
centerCenter of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline, if positive. Negative values, like FILLED, mean that a filled circle is to be drawn.
lineTypeType of the circle boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and in the radius value.

◆ circle() [10/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.circle ( Mat img,
Point center,
int radius,
Scalar color,
int thickness )
static

Draws a circle.

The function cv::circle draws a simple or filled circle with a given center and radius.

Parameters
imgImage where the circle is drawn.
centerCenter of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline, if positive. Negative values, like FILLED, mean that a filled circle is to be drawn.
lineTypeType of the circle boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and in the radius value.

◆ circle() [11/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.circle ( Mat img,
Point center,
int radius,
Scalar color,
int thickness,
int lineType )
static

Draws a circle.

The function cv::circle draws a simple or filled circle with a given center and radius.

Parameters
imgImage where the circle is drawn.
centerCenter of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline, if positive. Negative values, like FILLED, mean that a filled circle is to be drawn.
lineTypeType of the circle boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and in the radius value.

◆ circle() [12/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.circle ( Mat img,
Point center,
int radius,
Scalar color,
int thickness,
int lineType,
int shift )
static

Draws a circle.

The function cv::circle draws a simple or filled circle with a given center and radius.

Parameters
imgImage where the circle is drawn.
centerCenter of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline, if positive. Negative values, like FILLED, mean that a filled circle is to be drawn.
lineTypeType of the circle boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and in the radius value.

◆ clipLine() [1/3]

static bool OpenCVForUnity.ImgprocModule.Imgproc.clipLine ( in Vec4i imgRect,
ref Vec2d pt1,
ref Vec2d pt2 )
static

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

Parameters
imgRectImage rectangle.
pt1First line point.
pt2Second line point.

◆ clipLine() [2/3]

static bool OpenCVForUnity.ImgprocModule.Imgproc.clipLine ( in(int x, int y, int width, int height) imgRect,
ref(double x, double y) pt1,
ref(double x, double y) pt2 )
static

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

Parameters
imgRectImage rectangle.
pt1First line point.
pt2Second line point.

◆ clipLine() [3/3]

static bool OpenCVForUnity.ImgprocModule.Imgproc.clipLine ( Rect imgRect,
Point pt1,
Point pt2 )
static

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

Parameters
imgRectImage rectangle.
pt1First line point.
pt2Second line point.

◆ compareHist()

static double OpenCVForUnity.ImgprocModule.Imgproc.compareHist ( Mat H1,
Mat H2,
int method )
static

Compares two histograms.

The function cv::compareHist compares two dense or two sparse histograms using the specified method.

The function returns \(d(H_1, H_2)\) .

While the function works well with 1-, 2-, 3-dimensional dense histograms, it may not be suitable for high-dimensional sparse histograms. In such histograms, because of aliasing and sampling problems, the coordinates of non-zero histogram bins can slightly shift. To compare such histograms or more general sparse configurations of weighted points, consider using the EMD function.

Parameters
H1First compared histogram.
H2Second compared histogram of the same size as H1 .
methodComparison method, see #HistCompMethods

◆ connectedComponents() [1/3]

static int OpenCVForUnity.ImgprocModule.Imgproc.connectedComponents ( Mat image,
Mat labels )
static

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

Parameters
imagethe 8-bit single-channel 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.

◆ connectedComponents() [2/3]

static int OpenCVForUnity.ImgprocModule.Imgproc.connectedComponents ( Mat image,
Mat labels,
int connectivity )
static

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

Parameters
imagethe 8-bit single-channel 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.

◆ connectedComponents() [3/3]

static int OpenCVForUnity.ImgprocModule.Imgproc.connectedComponents ( Mat image,
Mat labels,
int connectivity,
int ltype )
static

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

Parameters
imagethe 8-bit single-channel 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.

◆ connectedComponentsWithAlgorithm()

static int OpenCVForUnity.ImgprocModule.Imgproc.connectedComponentsWithAlgorithm ( Mat image,
Mat labels,
int connectivity,
int ltype,
int ccltype )
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. ccltype specifies the connected components labeling algorithm to use, currently Bolelli (Spaghetti) [Bolelli2019], Grana (BBDT) [Grana2010] and Wu's (SAUF) [Wu2009] algorithms are supported, see the #ConnectedComponentsAlgorithmsTypes for details. Note that SAUF algorithm forces a row major ordering of labels while Spaghetti and BBDT do not. This function uses parallel version of the algorithms if at least one allowed parallel framework is enabled and if the rows of the image are at least twice the number returned by #getNumberOfCPUs.

Parameters
imagethe 8-bit single-channel 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.
ccltypeconnected components algorithm type (see the #ConnectedComponentsAlgorithmsTypes).

◆ connectedComponentsWithStats() [1/3]

static int OpenCVForUnity.ImgprocModule.Imgproc.connectedComponentsWithStats ( Mat image,
Mat labels,
Mat stats,
Mat centroids )
static

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

Parameters
imagethe 8-bit single-channel image to be labeled
labelsdestination labeled image
statsstatistics output for each label, including the background label. Statistics are accessed via stats(label, COLUMN) where COLUMN is one of #ConnectedComponentsTypes, selecting the statistic. The data type is CV_32S.
centroidscentroid output for each label, including the background label. Centroids are accessed via centroids(label, 0) for x and centroids(label, 1) for y. The data type CV_64F.
connectivity8 or 4 for 8-way or 4-way connectivity respectively
ltypeoutput image label type. Currently CV_32S and CV_16U are supported.

◆ connectedComponentsWithStats() [2/3]

static int OpenCVForUnity.ImgprocModule.Imgproc.connectedComponentsWithStats ( Mat image,
Mat labels,
Mat stats,
Mat centroids,
int connectivity )
static

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

Parameters
imagethe 8-bit single-channel image to be labeled
labelsdestination labeled image
statsstatistics output for each label, including the background label. Statistics are accessed via stats(label, COLUMN) where COLUMN is one of #ConnectedComponentsTypes, selecting the statistic. The data type is CV_32S.
centroidscentroid output for each label, including the background label. Centroids are accessed via centroids(label, 0) for x and centroids(label, 1) for y. The data type CV_64F.
connectivity8 or 4 for 8-way or 4-way connectivity respectively
ltypeoutput image label type. Currently CV_32S and CV_16U are supported.

◆ connectedComponentsWithStats() [3/3]

static int OpenCVForUnity.ImgprocModule.Imgproc.connectedComponentsWithStats ( Mat image,
Mat labels,
Mat stats,
Mat centroids,
int connectivity,
int ltype )
static

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

Parameters
imagethe 8-bit single-channel image to be labeled
labelsdestination labeled image
statsstatistics output for each label, including the background label. Statistics are accessed via stats(label, COLUMN) where COLUMN is one of #ConnectedComponentsTypes, selecting the statistic. The data type is CV_32S.
centroidscentroid output for each label, including the background label. Centroids are accessed via centroids(label, 0) for x and centroids(label, 1) for y. The data type CV_64F.
connectivity8 or 4 for 8-way or 4-way connectivity respectively
ltypeoutput image label type. Currently CV_32S and CV_16U are supported.

◆ connectedComponentsWithStatsWithAlgorithm()

static int OpenCVForUnity.ImgprocModule.Imgproc.connectedComponentsWithStatsWithAlgorithm ( Mat image,
Mat labels,
Mat stats,
Mat centroids,
int connectivity,
int ltype,
int ccltype )
static

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

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

Parameters
imagethe 8-bit single-channel image to be labeled
labelsdestination labeled image
statsstatistics output for each label, including the background label. Statistics are accessed via stats(label, COLUMN) where COLUMN is one of #ConnectedComponentsTypes, selecting the statistic. The data type is CV_32S.
centroidscentroid output for each label, including the background label. Centroids are accessed via centroids(label, 0) for x and centroids(label, 1) for y. The data type CV_64F.
connectivity8 or 4 for 8-way or 4-way connectivity respectively
ltypeoutput image label type. Currently CV_32S and CV_16U are supported.
ccltypeconnected components algorithm type (see #ConnectedComponentsAlgorithmsTypes).

◆ contourArea() [1/2]

static double OpenCVForUnity.ImgprocModule.Imgproc.contourArea ( Mat contour)
static

Calculates a contour area.

The function computes a contour area. Similarly to moments , the area is computed using the Green formula. Thus, the returned area and the number of non-zero pixels, if you draw the contour using drawContours or fillPoly , can be different. Also, the function will most certainly give a wrong results for contours with self-intersections.

Example:

vector<Point> contour;
contour.push_back(Point2f(0, 0));
contour.push_back(Point2f(10, 0));
contour.push_back(Point2f(10, 10));
contour.push_back(Point2f(5, 4));
double area0 = contourArea(contour);
vector<Point> approx;
approxPolyDP(contour, approx, 5, true);
double area1 = contourArea(approx);
cout << "area0 =" << area0 << endl <<
"area1 =" << area1 << endl <<
"approx poly vertices" << approx.size() << endl;
static void approxPolyDP(MatOfPoint2f curve, MatOfPoint2f approxCurve, double epsilon, bool closed)
Approximates a polygonal curve(s) with the specified precision.
Definition Imgproc.cs:11553
static double contourArea(Mat contour, bool oriented)
Calculates a contour area.
Definition Imgproc.cs:11657
Parameters
contourInput vector of 2D points (contour vertices), stored in std::vector or Mat.
orientedOriented area flag. If it is true, the function returns a signed area value, depending on the contour orientation (clockwise or counter-clockwise). Using this feature you can determine orientation of a contour by taking the sign of an area. By default, the parameter is false, which means that the absolute value is returned.

◆ contourArea() [2/2]

static double OpenCVForUnity.ImgprocModule.Imgproc.contourArea ( Mat contour,
bool oriented )
static

Calculates a contour area.

The function computes a contour area. Similarly to moments , the area is computed using the Green formula. Thus, the returned area and the number of non-zero pixels, if you draw the contour using drawContours or fillPoly , can be different. Also, the function will most certainly give a wrong results for contours with self-intersections.

Example:

vector<Point> contour;
contour.push_back(Point2f(0, 0));
contour.push_back(Point2f(10, 0));
contour.push_back(Point2f(10, 10));
contour.push_back(Point2f(5, 4));
double area0 = contourArea(contour);
vector<Point> approx;
approxPolyDP(contour, approx, 5, true);
double area1 = contourArea(approx);
cout << "area0 =" << area0 << endl <<
"area1 =" << area1 << endl <<
"approx poly vertices" << approx.size() << endl;
Parameters
contourInput vector of 2D points (contour vertices), stored in std::vector or Mat.
orientedOriented area flag. If it is true, the function returns a signed area value, depending on the contour orientation (clockwise or counter-clockwise). Using this feature you can determine orientation of a contour by taking the sign of an area. By default, the parameter is false, which means that the absolute value is returned.

◆ convertMaps() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.convertMaps ( Mat map1,
Mat map2,
Mat dstmap1,
Mat dstmap2,
int dstmap1type )
static

Converts image transformation maps from one representation to another.

The function converts a pair of maps for remap from one representation to another. The following options ( (map1.type(), map2.type()) \(\rightarrow\) (dstmap1.type(), dstmap2.type()) ) are supported:

  • \(\texttt{(CV_32FC1, CV_32FC1)} \rightarrow \texttt{(CV_16SC2, CV_16UC1)}\). This is the most frequently used conversion operation, in which the original floating-point maps (see remap) are converted to a more compact and much faster fixed-point representation. The first output array contains the rounded coordinates and the second array (created only when nninterpolation=false ) contains indices in the interpolation tables.
  • \(\texttt{(CV_32FC2)} \rightarrow \texttt{(CV_16SC2, CV_16UC1)}\). The same as above but the original maps are stored in one 2-channel matrix.
  • Reverse conversion. Obviously, the reconstructed floating-point maps will not be exactly the same as the originals.
Parameters
map1The first input map of type CV_16SC2, CV_32FC1, or CV_32FC2 .
map2The second input map of type CV_16UC1, CV_32FC1, or none (empty matrix), respectively.
dstmap1The first output map that has the type dstmap1type and the same size as src .
dstmap2The second output map.
dstmap1typeType of the first output map that should be CV_16SC2, CV_32FC1, or CV_32FC2 .
nninterpolationFlag indicating whether the fixed-point maps are used for the nearest-neighbor or for a more complex interpolation.
See also
remap, undistort, initUndistortRectifyMap

◆ convertMaps() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.convertMaps ( Mat map1,
Mat map2,
Mat dstmap1,
Mat dstmap2,
int dstmap1type,
bool nninterpolation )
static

Converts image transformation maps from one representation to another.

The function converts a pair of maps for remap from one representation to another. The following options ( (map1.type(), map2.type()) \(\rightarrow\) (dstmap1.type(), dstmap2.type()) ) are supported:

  • \(\texttt{(CV_32FC1, CV_32FC1)} \rightarrow \texttt{(CV_16SC2, CV_16UC1)}\). This is the most frequently used conversion operation, in which the original floating-point maps (see remap) are converted to a more compact and much faster fixed-point representation. The first output array contains the rounded coordinates and the second array (created only when nninterpolation=false ) contains indices in the interpolation tables.
  • \(\texttt{(CV_32FC2)} \rightarrow \texttt{(CV_16SC2, CV_16UC1)}\). The same as above but the original maps are stored in one 2-channel matrix.
  • Reverse conversion. Obviously, the reconstructed floating-point maps will not be exactly the same as the originals.
Parameters
map1The first input map of type CV_16SC2, CV_32FC1, or CV_32FC2 .
map2The second input map of type CV_16UC1, CV_32FC1, or none (empty matrix), respectively.
dstmap1The first output map that has the type dstmap1type and the same size as src .
dstmap2The second output map.
dstmap1typeType of the first output map that should be CV_16SC2, CV_32FC1, or CV_32FC2 .
nninterpolationFlag indicating whether the fixed-point maps are used for the nearest-neighbor or for a more complex interpolation.
See also
remap, undistort, initUndistortRectifyMap

◆ convexHull() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.convexHull ( MatOfPoint points,
MatOfInt hull )
static

Finds the convex hull of a point set.

The function cv::convexHull finds the convex hull of a 2D point set using the Sklansky's algorithm [Sklansky82] that has O(N logN) complexity in the current implementation.

Parameters
pointsInput 2D point set, stored in std::vector or Mat.
hullOutput convex hull. It is either an integer vector of indices or vector of points. In the first case, the hull elements are 0-based indices of the convex hull points in the original array (since the set of convex hull points is a subset of the original point set). In the second case, hull elements are the convex hull points themselves.
clockwiseOrientation flag. If it is true, the output convex hull is oriented clockwise. Otherwise, it is oriented counter-clockwise. The assumed coordinate system has its X axis pointing to the right, and its Y axis pointing upwards.
returnPointsOperation flag. In case of a matrix, when the flag is true, the function returns convex hull points. Otherwise, it returns indices of the convex hull points. When the output array is std::vector, the flag is ignored, and the output depends on the type of the vector: std::vector<int> implies returnPoints=false, std::vector<Point> implies returnPoints=true.
Note
points and hull should be different arrays, inplace processing isn't supported.

Check the corresponding tutorial for more details.

useful links:

https://www.learnopencv.com/convex-hull-using-opencv-in-python-and-c/

◆ convexHull() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.convexHull ( MatOfPoint points,
MatOfInt hull,
bool clockwise )
static

Finds the convex hull of a point set.

The function cv::convexHull finds the convex hull of a 2D point set using the Sklansky's algorithm [Sklansky82] that has O(N logN) complexity in the current implementation.

Parameters
pointsInput 2D point set, stored in std::vector or Mat.
hullOutput convex hull. It is either an integer vector of indices or vector of points. In the first case, the hull elements are 0-based indices of the convex hull points in the original array (since the set of convex hull points is a subset of the original point set). In the second case, hull elements are the convex hull points themselves.
clockwiseOrientation flag. If it is true, the output convex hull is oriented clockwise. Otherwise, it is oriented counter-clockwise. The assumed coordinate system has its X axis pointing to the right, and its Y axis pointing upwards.
returnPointsOperation flag. In case of a matrix, when the flag is true, the function returns convex hull points. Otherwise, it returns indices of the convex hull points. When the output array is std::vector, the flag is ignored, and the output depends on the type of the vector: std::vector<int> implies returnPoints=false, std::vector<Point> implies returnPoints=true.
Note
points and hull should be different arrays, inplace processing isn't supported.

Check the corresponding tutorial for more details.

useful links:

https://www.learnopencv.com/convex-hull-using-opencv-in-python-and-c/

◆ convexityDefects()

static void OpenCVForUnity.ImgprocModule.Imgproc.convexityDefects ( MatOfPoint contour,
MatOfInt convexhull,
MatOfInt4 convexityDefects )
static

Finds the convexity defects of a contour.

The figure below displays convexity defects of a hand contour:

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. In C++ and the new Python/Java interface each convexity defect is represented as 4-element integer vector (a.k.a. #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.

◆ cornerEigenValsAndVecs() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.cornerEigenValsAndVecs ( Mat src,
Mat dst,
int blockSize,
int ksize )
static

Calculates eigenvalues and eigenvectors of image blocks for corner detection.

For every pixel \(p\) , the function cornerEigenValsAndVecs considers a blockSize \(\times\) blockSize neighborhood \(S(p)\) . It calculates the covariation matrix of derivatives over the neighborhood as:

\[M = \begin{bmatrix} \sum _{S(p)}(dI/dx)^2 & \sum _{S(p)}dI/dx dI/dy \\ \sum _{S(p)}dI/dx dI/dy & \sum _{S(p)}(dI/dy)^2 \end{bmatrix}\]

where the derivatives are computed using the Sobel operator.

After that, it finds eigenvectors and eigenvalues of \(M\) and stores them in the destination image as \((\lambda_1, \lambda_2, x_1, y_1, x_2, y_2)\) where

  • \(\lambda_1, \lambda_2\) are the non-sorted eigenvalues of \(M\)
  • \(x_1, y_1\) are the eigenvectors corresponding to \(\lambda_1\)
  • \(x_2, y_2\) are the eigenvectors corresponding to \(\lambda_2\)

The output of the function can be used for robust edge or corner detection.

Parameters
srcInput single-channel 8-bit or floating-point image.
dstImage to store the results. It has the same size as src and the type CV_32FC(6) .
blockSizeNeighborhood size (see details below).
ksizeAperture parameter for the Sobel operator.
borderTypePixel extrapolation method. See #BorderTypes. #BORDER_WRAP is not supported.
See also
cornerMinEigenVal, cornerHarris, preCornerDetect

◆ cornerEigenValsAndVecs() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.cornerEigenValsAndVecs ( Mat src,
Mat dst,
int blockSize,
int ksize,
int borderType )
static

Calculates eigenvalues and eigenvectors of image blocks for corner detection.

For every pixel \(p\) , the function cornerEigenValsAndVecs considers a blockSize \(\times\) blockSize neighborhood \(S(p)\) . It calculates the covariation matrix of derivatives over the neighborhood as:

\[M = \begin{bmatrix} \sum _{S(p)}(dI/dx)^2 & \sum _{S(p)}dI/dx dI/dy \\ \sum _{S(p)}dI/dx dI/dy & \sum _{S(p)}(dI/dy)^2 \end{bmatrix}\]

where the derivatives are computed using the Sobel operator.

After that, it finds eigenvectors and eigenvalues of \(M\) and stores them in the destination image as \((\lambda_1, \lambda_2, x_1, y_1, x_2, y_2)\) where

  • \(\lambda_1, \lambda_2\) are the non-sorted eigenvalues of \(M\)
  • \(x_1, y_1\) are the eigenvectors corresponding to \(\lambda_1\)
  • \(x_2, y_2\) are the eigenvectors corresponding to \(\lambda_2\)

The output of the function can be used for robust edge or corner detection.

Parameters
srcInput single-channel 8-bit or floating-point image.
dstImage to store the results. It has the same size as src and the type CV_32FC(6) .
blockSizeNeighborhood size (see details below).
ksizeAperture parameter for the Sobel operator.
borderTypePixel extrapolation method. See #BorderTypes. #BORDER_WRAP is not supported.
See also
cornerMinEigenVal, cornerHarris, preCornerDetect

◆ cornerHarris() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.cornerHarris ( Mat src,
Mat dst,
int blockSize,
int ksize,
double k )
static

Harris corner detector.

The function runs the Harris corner detector on the image. Similarly to cornerMinEigenVal and cornerEigenValsAndVecs , for each pixel \((x, y)\) it calculates a \(2\times2\) gradient covariance matrix \(M^{(x,y)}\) over a \(\texttt{blockSize} \times \texttt{blockSize}\) neighborhood. Then, it computes the following characteristic:

\[\texttt{dst} (x,y) = \mathrm{det} M^{(x,y)} - k \cdot \left ( \mathrm{tr} M^{(x,y)} \right )^2\]

Corners in the image can be found as the local maxima of this response map.

Parameters
srcInput single-channel 8-bit or floating-point image.
dstImage to store the Harris detector responses. It has the type CV_32FC1 and the same size as src .
blockSizeNeighborhood size (see the details on cornerEigenValsAndVecs ).
ksizeAperture parameter for the Sobel operator.
kHarris detector free parameter. See the formula above.
borderTypePixel extrapolation method. See #BorderTypes. #BORDER_WRAP is not supported.

◆ cornerHarris() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.cornerHarris ( Mat src,
Mat dst,
int blockSize,
int ksize,
double k,
int borderType )
static

Harris corner detector.

The function runs the Harris corner detector on the image. Similarly to cornerMinEigenVal and cornerEigenValsAndVecs , for each pixel \((x, y)\) it calculates a \(2\times2\) gradient covariance matrix \(M^{(x,y)}\) over a \(\texttt{blockSize} \times \texttt{blockSize}\) neighborhood. Then, it computes the following characteristic:

\[\texttt{dst} (x,y) = \mathrm{det} M^{(x,y)} - k \cdot \left ( \mathrm{tr} M^{(x,y)} \right )^2\]

Corners in the image can be found as the local maxima of this response map.

Parameters
srcInput single-channel 8-bit or floating-point image.
dstImage to store the Harris detector responses. It has the type CV_32FC1 and the same size as src .
blockSizeNeighborhood size (see the details on cornerEigenValsAndVecs ).
ksizeAperture parameter for the Sobel operator.
kHarris detector free parameter. See the formula above.
borderTypePixel extrapolation method. See #BorderTypes. #BORDER_WRAP is not supported.

◆ cornerMinEigenVal() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.cornerMinEigenVal ( Mat src,
Mat dst,
int blockSize )
static

Calculates the minimal eigenvalue of gradient matrices for corner detection.

The function is similar to cornerEigenValsAndVecs but it calculates and stores only the minimal eigenvalue of the covariance matrix of derivatives, that is, \(\min(\lambda_1, \lambda_2)\) in terms of the formulae in the cornerEigenValsAndVecs description.

Parameters
srcInput single-channel 8-bit or floating-point image.
dstImage to store the minimal eigenvalues. It has the type CV_32FC1 and the same size as src .
blockSizeNeighborhood size (see the details on cornerEigenValsAndVecs ).
ksizeAperture parameter for the Sobel operator.
borderTypePixel extrapolation method. See #BorderTypes. #BORDER_WRAP is not supported.

◆ cornerMinEigenVal() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.cornerMinEigenVal ( Mat src,
Mat dst,
int blockSize,
int ksize )
static

Calculates the minimal eigenvalue of gradient matrices for corner detection.

The function is similar to cornerEigenValsAndVecs but it calculates and stores only the minimal eigenvalue of the covariance matrix of derivatives, that is, \(\min(\lambda_1, \lambda_2)\) in terms of the formulae in the cornerEigenValsAndVecs description.

Parameters
srcInput single-channel 8-bit or floating-point image.
dstImage to store the minimal eigenvalues. It has the type CV_32FC1 and the same size as src .
blockSizeNeighborhood size (see the details on cornerEigenValsAndVecs ).
ksizeAperture parameter for the Sobel operator.
borderTypePixel extrapolation method. See #BorderTypes. #BORDER_WRAP is not supported.

◆ cornerMinEigenVal() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.cornerMinEigenVal ( Mat src,
Mat dst,
int blockSize,
int ksize,
int borderType )
static

Calculates the minimal eigenvalue of gradient matrices for corner detection.

The function is similar to cornerEigenValsAndVecs but it calculates and stores only the minimal eigenvalue of the covariance matrix of derivatives, that is, \(\min(\lambda_1, \lambda_2)\) in terms of the formulae in the cornerEigenValsAndVecs description.

Parameters
srcInput single-channel 8-bit or floating-point image.
dstImage to store the minimal eigenvalues. It has the type CV_32FC1 and the same size as src .
blockSizeNeighborhood size (see the details on cornerEigenValsAndVecs ).
ksizeAperture parameter for the Sobel operator.
borderTypePixel extrapolation method. See #BorderTypes. #BORDER_WRAP is not supported.

◆ cornerSubPix() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.cornerSubPix ( Mat image,
Mat corners,
in Vec2d winSize,
in Vec2d zeroZone,
in Vec3d criteria )
static

Refines the corner locations.

The function iterates to find the sub-pixel accurate location of corners or radial saddle points as described in [forstner1987fast], and as shown on the figure below.

image

Sub-pixel accurate corner locator is based on the observation that every vector from the center \(q\) to a point \(p\) located within a neighborhood of \(q\) is orthogonal to the image gradient at \(p\) subject to image and measurement noise. Consider the expression:

\[\epsilon _i = {DI_{p_i}}^T \cdot (q - p_i)\]

where \({DI_{p_i}}\) is an image gradient at one of the points \(p_i\) in a neighborhood of \(q\) . The value of \(q\) is to be found so that \(\epsilon_i\) is minimized. A system of equations may be set up with \(\epsilon_i\) set to zero:

\[\sum _i(DI_{p_i} \cdot {DI_{p_i}}^T) \cdot q - \sum _i(DI_{p_i} \cdot {DI_{p_i}}^T \cdot p_i)\]

where the gradients are summed within a neighborhood ("search window") of \(q\) . Calling the first gradient term \(G\) and the second gradient term \(b\) gives:

\[q = G^{-1} \cdot b\]

The algorithm sets the center of the neighborhood window at this new center \(q\) and then iterates until the center stays within a set threshold.

Parameters
imageInput single-channel, 8-bit or float image.
cornersInitial coordinates of the input corners and refined coordinates provided for output.
winSizeHalf of the side length of the search window. For example, if winSize=Size(5,5) , then a \((5*2+1) \times (5*2+1) = 11 \times 11\) search window is used.
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.

◆ cornerSubPix() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.cornerSubPix ( Mat image,
Mat corners,
in(double width, double height) winSize,
in(double width, double height) zeroZone,
in(double type, double maxCount, double epsilon) criteria )
static

Refines the corner locations.

The function iterates to find the sub-pixel accurate location of corners or radial saddle points as described in [forstner1987fast], and as shown on the figure below.

image

Sub-pixel accurate corner locator is based on the observation that every vector from the center \(q\) to a point \(p\) located within a neighborhood of \(q\) is orthogonal to the image gradient at \(p\) subject to image and measurement noise. Consider the expression:

\[\epsilon _i = {DI_{p_i}}^T \cdot (q - p_i)\]

where \({DI_{p_i}}\) is an image gradient at one of the points \(p_i\) in a neighborhood of \(q\) . The value of \(q\) is to be found so that \(\epsilon_i\) is minimized. A system of equations may be set up with \(\epsilon_i\) set to zero:

\[\sum _i(DI_{p_i} \cdot {DI_{p_i}}^T) \cdot q - \sum _i(DI_{p_i} \cdot {DI_{p_i}}^T \cdot p_i)\]

where the gradients are summed within a neighborhood ("search window") of \(q\) . Calling the first gradient term \(G\) and the second gradient term \(b\) gives:

\[q = G^{-1} \cdot b\]

The algorithm sets the center of the neighborhood window at this new center \(q\) and then iterates until the center stays within a set threshold.

Parameters
imageInput single-channel, 8-bit or float image.
cornersInitial coordinates of the input corners and refined coordinates provided for output.
winSizeHalf of the side length of the search window. For example, if winSize=Size(5,5) , then a \((5*2+1) \times (5*2+1) = 11 \times 11\) search window is used.
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.

◆ cornerSubPix() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.cornerSubPix ( Mat image,
Mat corners,
Size winSize,
Size zeroZone,
TermCriteria criteria )
static

Refines the corner locations.

The function iterates to find the sub-pixel accurate location of corners or radial saddle points as described in [forstner1987fast], and as shown on the figure below.

image

Sub-pixel accurate corner locator is based on the observation that every vector from the center \(q\) to a point \(p\) located within a neighborhood of \(q\) is orthogonal to the image gradient at \(p\) subject to image and measurement noise. Consider the expression:

\[\epsilon _i = {DI_{p_i}}^T \cdot (q - p_i)\]

where \({DI_{p_i}}\) is an image gradient at one of the points \(p_i\) in a neighborhood of \(q\) . The value of \(q\) is to be found so that \(\epsilon_i\) is minimized. A system of equations may be set up with \(\epsilon_i\) set to zero:

\[\sum _i(DI_{p_i} \cdot {DI_{p_i}}^T) \cdot q - \sum _i(DI_{p_i} \cdot {DI_{p_i}}^T \cdot p_i)\]

where the gradients are summed within a neighborhood ("search window") of \(q\) . Calling the first gradient term \(G\) and the second gradient term \(b\) gives:

\[q = G^{-1} \cdot b\]

The algorithm sets the center of the neighborhood window at this new center \(q\) and then iterates until the center stays within a set threshold.

Parameters
imageInput single-channel, 8-bit or float image.
cornersInitial coordinates of the input corners and refined coordinates provided for output.
winSizeHalf of the side length of the search window. For example, if winSize=Size(5,5) , then a \((5*2+1) \times (5*2+1) = 11 \times 11\) search window is used.
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.

◆ createCLAHE() [1/5]

static CLAHE OpenCVForUnity.ImgprocModule.Imgproc.createCLAHE ( )
static

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

Parameters
clipLimitThreshold for contrast limiting.
tileGridSizeSize of grid for histogram equalization. Input image will be divided into equally sized rectangular tiles. tileGridSize defines the number of tiles in row and column.

◆ createCLAHE() [2/5]

static CLAHE OpenCVForUnity.ImgprocModule.Imgproc.createCLAHE ( double clipLimit)
static

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

Parameters
clipLimitThreshold for contrast limiting.
tileGridSizeSize of grid for histogram equalization. Input image will be divided into equally sized rectangular tiles. tileGridSize defines the number of tiles in row and column.

◆ createCLAHE() [3/5]

static CLAHE OpenCVForUnity.ImgprocModule.Imgproc.createCLAHE ( double clipLimit,
in Vec2d tileGridSize )
static

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

Parameters
clipLimitThreshold for contrast limiting.
tileGridSizeSize of grid for histogram equalization. Input image will be divided into equally sized rectangular tiles. tileGridSize defines the number of tiles in row and column.

◆ createCLAHE() [4/5]

static CLAHE OpenCVForUnity.ImgprocModule.Imgproc.createCLAHE ( double clipLimit,
in(double width, double height) tileGridSize )
static

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

Parameters
clipLimitThreshold for contrast limiting.
tileGridSizeSize of grid for histogram equalization. Input image will be divided into equally sized rectangular tiles. tileGridSize defines the number of tiles in row and column.

◆ createCLAHE() [5/5]

static CLAHE OpenCVForUnity.ImgprocModule.Imgproc.createCLAHE ( double clipLimit,
Size tileGridSize )
static

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

Parameters
clipLimitThreshold for contrast limiting.
tileGridSizeSize of grid for histogram equalization. Input image will be divided into equally sized rectangular tiles. tileGridSize defines the number of tiles in row and column.

◆ createGeneralizedHoughBallard()

static GeneralizedHoughBallard OpenCVForUnity.ImgprocModule.Imgproc.createGeneralizedHoughBallard ( )
static

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

◆ createGeneralizedHoughGuil()

static GeneralizedHoughGuil OpenCVForUnity.ImgprocModule.Imgproc.createGeneralizedHoughGuil ( )
static

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

◆ createHanningWindow() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.createHanningWindow ( Mat dst,
in Vec2d winSize,
int type )
static

This function computes a Hanning window coefficients in two dimensions.

See (http://en.wikipedia.org/wiki/Hann_function) and (http://en.wikipedia.org/wiki/Window_function) for more information.

An example is shown below:

// create hanning window of size 100x100 and type CV_32F
Mat hann;
createHanningWindow(hann, Size(100, 100), CV_32F);
n-dimensional dense array class
Definition Mat_ValueTuple.cs:11
Template class for specifying the size of an image or rectangle.
Definition Size_Ex.cs:7
static void createHanningWindow(Mat dst, Size winSize, int type)
This function computes a Hanning window coefficients in two dimensions.
Definition Imgproc.cs:8727
Parameters
dstDestination array to place Hann coefficients in
winSizeThe window size specifications (both width and height must be > 1)
typeCreated array type

◆ createHanningWindow() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.createHanningWindow ( Mat dst,
in(double width, double height) winSize,
int type )
static

This function computes a Hanning window coefficients in two dimensions.

See (http://en.wikipedia.org/wiki/Hann_function) and (http://en.wikipedia.org/wiki/Window_function) for more information.

An example is shown below:

// create hanning window of size 100x100 and type CV_32F
Mat hann;
createHanningWindow(hann, Size(100, 100), CV_32F);
Parameters
dstDestination array to place Hann coefficients in
winSizeThe window size specifications (both width and height must be > 1)
typeCreated array type

◆ createHanningWindow() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.createHanningWindow ( Mat dst,
Size winSize,
int type )
static

This function computes a Hanning window coefficients in two dimensions.

See (http://en.wikipedia.org/wiki/Hann_function) and (http://en.wikipedia.org/wiki/Window_function) for more information.

An example is shown below:

// create hanning window of size 100x100 and type CV_32F
Mat hann;
createHanningWindow(hann, Size(100, 100), CV_32F);
Parameters
dstDestination array to place Hann coefficients in
winSizeThe window size specifications (both width and height must be > 1)
typeCreated array type

◆ createLineSegmentDetector() [1/9]

static LineSegmentDetector OpenCVForUnity.ImgprocModule.Imgproc.createLineSegmentDetector ( )
static

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

The LineSegmentDetector algorithm is defined using the standard values. Only advanced users may want to edit those, as to tailor it for their own application.

Parameters
refineThe way found lines will be refined, see #LineSegmentDetectorModes
scaleThe scale of the image that will be used to find the lines. Range (0..1].
sigma_scaleSigma for Gaussian filter. It is computed as sigma = sigma_scale/scale.
quantBound to the quantization error on the gradient norm.
ang_thGradient angle tolerance in degrees.
log_epsDetection threshold: -log10(NFA) > log_eps. Used only when advance refinement is chosen.
density_thMinimal density of aligned region points in the enclosing rectangle.
n_binsNumber of bins in pseudo-ordering of gradient modulus.

◆ createLineSegmentDetector() [2/9]

static LineSegmentDetector OpenCVForUnity.ImgprocModule.Imgproc.createLineSegmentDetector ( int refine)
static

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

The LineSegmentDetector algorithm is defined using the standard values. Only advanced users may want to edit those, as to tailor it for their own application.

Parameters
refineThe way found lines will be refined, see #LineSegmentDetectorModes
scaleThe scale of the image that will be used to find the lines. Range (0..1].
sigma_scaleSigma for Gaussian filter. It is computed as sigma = sigma_scale/scale.
quantBound to the quantization error on the gradient norm.
ang_thGradient angle tolerance in degrees.
log_epsDetection threshold: -log10(NFA) > log_eps. Used only when advance refinement is chosen.
density_thMinimal density of aligned region points in the enclosing rectangle.
n_binsNumber of bins in pseudo-ordering of gradient modulus.

◆ createLineSegmentDetector() [3/9]

static LineSegmentDetector OpenCVForUnity.ImgprocModule.Imgproc.createLineSegmentDetector ( int refine,
double scale )
static

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

The LineSegmentDetector algorithm is defined using the standard values. Only advanced users may want to edit those, as to tailor it for their own application.

Parameters
refineThe way found lines will be refined, see #LineSegmentDetectorModes
scaleThe scale of the image that will be used to find the lines. Range (0..1].
sigma_scaleSigma for Gaussian filter. It is computed as sigma = sigma_scale/scale.
quantBound to the quantization error on the gradient norm.
ang_thGradient angle tolerance in degrees.
log_epsDetection threshold: -log10(NFA) > log_eps. Used only when advance refinement is chosen.
density_thMinimal density of aligned region points in the enclosing rectangle.
n_binsNumber of bins in pseudo-ordering of gradient modulus.

◆ createLineSegmentDetector() [4/9]

static LineSegmentDetector OpenCVForUnity.ImgprocModule.Imgproc.createLineSegmentDetector ( int refine,
double scale,
double sigma_scale )
static

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

The LineSegmentDetector algorithm is defined using the standard values. Only advanced users may want to edit those, as to tailor it for their own application.

Parameters
refineThe way found lines will be refined, see #LineSegmentDetectorModes
scaleThe scale of the image that will be used to find the lines. Range (0..1].
sigma_scaleSigma for Gaussian filter. It is computed as sigma = sigma_scale/scale.
quantBound to the quantization error on the gradient norm.
ang_thGradient angle tolerance in degrees.
log_epsDetection threshold: -log10(NFA) > log_eps. Used only when advance refinement is chosen.
density_thMinimal density of aligned region points in the enclosing rectangle.
n_binsNumber of bins in pseudo-ordering of gradient modulus.

◆ createLineSegmentDetector() [5/9]

static LineSegmentDetector OpenCVForUnity.ImgprocModule.Imgproc.createLineSegmentDetector ( int refine,
double scale,
double sigma_scale,
double quant )
static

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

The LineSegmentDetector algorithm is defined using the standard values. Only advanced users may want to edit those, as to tailor it for their own application.

Parameters
refineThe way found lines will be refined, see #LineSegmentDetectorModes
scaleThe scale of the image that will be used to find the lines. Range (0..1].
sigma_scaleSigma for Gaussian filter. It is computed as sigma = sigma_scale/scale.
quantBound to the quantization error on the gradient norm.
ang_thGradient angle tolerance in degrees.
log_epsDetection threshold: -log10(NFA) > log_eps. Used only when advance refinement is chosen.
density_thMinimal density of aligned region points in the enclosing rectangle.
n_binsNumber of bins in pseudo-ordering of gradient modulus.

◆ createLineSegmentDetector() [6/9]

static LineSegmentDetector OpenCVForUnity.ImgprocModule.Imgproc.createLineSegmentDetector ( int refine,
double scale,
double sigma_scale,
double quant,
double ang_th )
static

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

The LineSegmentDetector algorithm is defined using the standard values. Only advanced users may want to edit those, as to tailor it for their own application.

Parameters
refineThe way found lines will be refined, see #LineSegmentDetectorModes
scaleThe scale of the image that will be used to find the lines. Range (0..1].
sigma_scaleSigma for Gaussian filter. It is computed as sigma = sigma_scale/scale.
quantBound to the quantization error on the gradient norm.
ang_thGradient angle tolerance in degrees.
log_epsDetection threshold: -log10(NFA) > log_eps. Used only when advance refinement is chosen.
density_thMinimal density of aligned region points in the enclosing rectangle.
n_binsNumber of bins in pseudo-ordering of gradient modulus.

◆ createLineSegmentDetector() [7/9]

static LineSegmentDetector OpenCVForUnity.ImgprocModule.Imgproc.createLineSegmentDetector ( int refine,
double scale,
double sigma_scale,
double quant,
double ang_th,
double log_eps )
static

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

The LineSegmentDetector algorithm is defined using the standard values. Only advanced users may want to edit those, as to tailor it for their own application.

Parameters
refineThe way found lines will be refined, see #LineSegmentDetectorModes
scaleThe scale of the image that will be used to find the lines. Range (0..1].
sigma_scaleSigma for Gaussian filter. It is computed as sigma = sigma_scale/scale.
quantBound to the quantization error on the gradient norm.
ang_thGradient angle tolerance in degrees.
log_epsDetection threshold: -log10(NFA) > log_eps. Used only when advance refinement is chosen.
density_thMinimal density of aligned region points in the enclosing rectangle.
n_binsNumber of bins in pseudo-ordering of gradient modulus.

◆ createLineSegmentDetector() [8/9]

static LineSegmentDetector OpenCVForUnity.ImgprocModule.Imgproc.createLineSegmentDetector ( int refine,
double scale,
double sigma_scale,
double quant,
double ang_th,
double log_eps,
double density_th )
static

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

The LineSegmentDetector algorithm is defined using the standard values. Only advanced users may want to edit those, as to tailor it for their own application.

Parameters
refineThe way found lines will be refined, see #LineSegmentDetectorModes
scaleThe scale of the image that will be used to find the lines. Range (0..1].
sigma_scaleSigma for Gaussian filter. It is computed as sigma = sigma_scale/scale.
quantBound to the quantization error on the gradient norm.
ang_thGradient angle tolerance in degrees.
log_epsDetection threshold: -log10(NFA) > log_eps. Used only when advance refinement is chosen.
density_thMinimal density of aligned region points in the enclosing rectangle.
n_binsNumber of bins in pseudo-ordering of gradient modulus.

◆ createLineSegmentDetector() [9/9]

static LineSegmentDetector OpenCVForUnity.ImgprocModule.Imgproc.createLineSegmentDetector ( int refine,
double scale,
double sigma_scale,
double quant,
double ang_th,
double log_eps,
double density_th,
int n_bins )
static

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

The LineSegmentDetector algorithm is defined using the standard values. Only advanced users may want to edit those, as to tailor it for their own application.

Parameters
refineThe way found lines will be refined, see #LineSegmentDetectorModes
scaleThe scale of the image that will be used to find the lines. Range (0..1].
sigma_scaleSigma for Gaussian filter. It is computed as sigma = sigma_scale/scale.
quantBound to the quantization error on the gradient norm.
ang_thGradient angle tolerance in degrees.
log_epsDetection threshold: -log10(NFA) > log_eps. Used only when advance refinement is chosen.
density_thMinimal density of aligned region points in the enclosing rectangle.
n_binsNumber of bins in pseudo-ordering of gradient modulus.

◆ cvtColor() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.cvtColor ( Mat src,
Mat dst,
int code )
static

Converts an image from one color space to another.

The function converts an input image from one color space to another. In case of a transformation to-from RGB color space, the order of the channels should be specified explicitly (RGB or BGR). Note that the default color format in OpenCV is often referred to as RGB but it is actually BGR (the bytes are reversed). So the first byte in a standard (24-bit) color image will be an 8-bit Blue component, the second byte will be Green, and the third byte will be Red. The fourth, fifth, and sixth bytes would then be the second pixel (Blue, then Green, then Red), and so on.

The conventional ranges for R, G, and B channel values are:

  • 0 to 255 for CV_8U images
  • 0 to 65535 for CV_16U images
  • 0 to 1 for CV_32F images

In case of linear transformations, the range does not matter. But in case of a non-linear transformation, an input RGB image should be normalized to the proper value range to get the correct results, for example, for RGB \(\rightarrow\) L*u*v* transformation. For example, if you have a 32-bit floating-point image directly converted from an 8-bit image without any scaling, then it will have the 0..255 value range instead of 0..1 assumed by the function. So, before calling cvtColor , you need first to scale the image down:

img *= 1./255;
static void cvtColor(Mat src, Mat dst, int code, int dstCn)
Converts an image from one color space to another.
Definition Imgproc.cs:10678
const int COLOR_BGR2Luv
Definition Imgproc.cs:160

If you use cvtColor with 8-bit images, the conversion will have some information lost. For many applications, this will not be noticeable but it is recommended to use 32-bit images in applications that need the full range of colors or that convert an image before an operation and then convert back.

If conversion adds the alpha channel, its value will set to the maximum of corresponding channel range: 255 for CV_8U, 65535 for CV_16U, 1 for CV_32F.

Parameters
srcinput image: 8-bit unsigned, 16-bit unsigned ( CV_16UC... ), or single-precision floating-point.
dstoutput image of the same size and depth as src.
codecolor space conversion code (see #ColorConversionCodes).
dstCnnumber of channels in the destination image; if the parameter is 0, the number of the channels is derived automatically from src and code.
See also
imgproc_color_conversions

◆ cvtColor() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.cvtColor ( Mat src,
Mat dst,
int code,
int dstCn )
static

Converts an image from one color space to another.

The function converts an input image from one color space to another. In case of a transformation to-from RGB color space, the order of the channels should be specified explicitly (RGB or BGR). Note that the default color format in OpenCV is often referred to as RGB but it is actually BGR (the bytes are reversed). So the first byte in a standard (24-bit) color image will be an 8-bit Blue component, the second byte will be Green, and the third byte will be Red. The fourth, fifth, and sixth bytes would then be the second pixel (Blue, then Green, then Red), and so on.

The conventional ranges for R, G, and B channel values are:

  • 0 to 255 for CV_8U images
  • 0 to 65535 for CV_16U images
  • 0 to 1 for CV_32F images

In case of linear transformations, the range does not matter. But in case of a non-linear transformation, an input RGB image should be normalized to the proper value range to get the correct results, for example, for RGB \(\rightarrow\) L*u*v* transformation. For example, if you have a 32-bit floating-point image directly converted from an 8-bit image without any scaling, then it will have the 0..255 value range instead of 0..1 assumed by the function. So, before calling cvtColor , you need first to scale the image down:

img *= 1./255;

If you use cvtColor with 8-bit images, the conversion will have some information lost. For many applications, this will not be noticeable but it is recommended to use 32-bit images in applications that need the full range of colors or that convert an image before an operation and then convert back.

If conversion adds the alpha channel, its value will set to the maximum of corresponding channel range: 255 for CV_8U, 65535 for CV_16U, 1 for CV_32F.

Parameters
srcinput image: 8-bit unsigned, 16-bit unsigned ( CV_16UC... ), or single-precision floating-point.
dstoutput image of the same size and depth as src.
codecolor space conversion code (see #ColorConversionCodes).
dstCnnumber of channels in the destination image; if the parameter is 0, the number of the channels is derived automatically from src and code.
See also
imgproc_color_conversions

◆ cvtColorTwoPlane()

static void OpenCVForUnity.ImgprocModule.Imgproc.cvtColorTwoPlane ( Mat src1,
Mat src2,
Mat dst,
int code )
static

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

This function only supports YUV420 to RGB conversion as of now.

Parameters
src18-bit image (#CV_8U) of the Y plane.
src2image containing interleaved U/V plane.
dstoutput image.
codeSpecifies the type of conversion. It can take any of the following values:

◆ demosaicing() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.demosaicing ( Mat src,
Mat dst,
int code )
static

main function for all demosaicing processes

Parameters
srcinput image: 8-bit unsigned or 16-bit unsigned.
dstoutput image of the same size and depth as src.
codeColor space conversion code (see the description below).
dstCnnumber of channels in the destination image; if the parameter is 0, the number of the channels is derived automatically from src and code.

The function can do the following transformations:

See also
cvtColor

◆ demosaicing() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.demosaicing ( Mat src,
Mat dst,
int code,
int dstCn )
static

main function for all demosaicing processes

Parameters
srcinput image: 8-bit unsigned or 16-bit unsigned.
dstoutput image of the same size and depth as src.
codeColor space conversion code (see the description below).
dstCnnumber of channels in the destination image; if the parameter is 0, the number of the channels is derived automatically from src and code.

The function can do the following transformations:

See also
cvtColor

◆ dilate() [1/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.dilate ( Mat src,
Mat dst,
Mat kernel )
static

Dilates an image by using a specific structuring element.

The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:

\[\texttt{dst} (x,y) = \max _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for dilation; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times dilation is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not suported.
borderValueborder value in case of a constant border

erode, morphologyEx, getStructuringElement

◆ dilate() [2/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.dilate ( Mat src,
Mat dst,
Mat kernel,
in Vec2d anchor )
static

Dilates an image by using a specific structuring element.

The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:

\[\texttt{dst} (x,y) = \max _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for dilation; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times dilation is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not suported.
borderValueborder value in case of a constant border

erode, morphologyEx, getStructuringElement

◆ dilate() [3/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.dilate ( Mat src,
Mat dst,
Mat kernel,
in Vec2d anchor,
int iterations )
static

Dilates an image by using a specific structuring element.

The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:

\[\texttt{dst} (x,y) = \max _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for dilation; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times dilation is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not suported.
borderValueborder value in case of a constant border

erode, morphologyEx, getStructuringElement

◆ dilate() [4/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.dilate ( Mat src,
Mat dst,
Mat kernel,
in Vec2d anchor,
int iterations,
int borderType )
static

Dilates an image by using a specific structuring element.

The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:

\[\texttt{dst} (x,y) = \max _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for dilation; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times dilation is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not suported.
borderValueborder value in case of a constant border

erode, morphologyEx, getStructuringElement

◆ dilate() [5/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.dilate ( Mat src,
Mat dst,
Mat kernel,
in Vec2d anchor,
int iterations,
int borderType,
in Vec4d borderValue )
static

Dilates an image by using a specific structuring element.

The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:

\[\texttt{dst} (x,y) = \max _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for dilation; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times dilation is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not suported.
borderValueborder value in case of a constant border

erode, morphologyEx, getStructuringElement

◆ dilate() [6/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.dilate ( Mat src,
Mat dst,
Mat kernel,
in(double x, double y) anchor )
static

Dilates an image by using a specific structuring element.

The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:

\[\texttt{dst} (x,y) = \max _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for dilation; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times dilation is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not suported.
borderValueborder value in case of a constant border

erode, morphologyEx, getStructuringElement

◆ dilate() [7/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.dilate ( Mat src,
Mat dst,
Mat kernel,
in(double x, double y) anchor,
int iterations )
static

Dilates an image by using a specific structuring element.

The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:

\[\texttt{dst} (x,y) = \max _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for dilation; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times dilation is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not suported.
borderValueborder value in case of a constant border

erode, morphologyEx, getStructuringElement

◆ dilate() [8/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.dilate ( Mat src,
Mat dst,
Mat kernel,
in(double x, double y) anchor,
int iterations,
int borderType )
static

Dilates an image by using a specific structuring element.

The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:

\[\texttt{dst} (x,y) = \max _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for dilation; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times dilation is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not suported.
borderValueborder value in case of a constant border

erode, morphologyEx, getStructuringElement

◆ dilate() [9/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.dilate ( Mat src,
Mat dst,
Mat kernel,
in(double x, double y) anchor,
int iterations,
int borderType,
in(double v0, double v1, double v2, double v3) borderValue )
static

Dilates an image by using a specific structuring element.

The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:

\[\texttt{dst} (x,y) = \max _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for dilation; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times dilation is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not suported.
borderValueborder value in case of a constant border

erode, morphologyEx, getStructuringElement

◆ dilate() [10/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.dilate ( Mat src,
Mat dst,
Mat kernel,
Point anchor )
static

Dilates an image by using a specific structuring element.

The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:

\[\texttt{dst} (x,y) = \max _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for dilation; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times dilation is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not suported.
borderValueborder value in case of a constant border

erode, morphologyEx, getStructuringElement

◆ dilate() [11/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.dilate ( Mat src,
Mat dst,
Mat kernel,
Point anchor,
int iterations )
static

Dilates an image by using a specific structuring element.

The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:

\[\texttt{dst} (x,y) = \max _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for dilation; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times dilation is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not suported.
borderValueborder value in case of a constant border

erode, morphologyEx, getStructuringElement

◆ dilate() [12/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.dilate ( Mat src,
Mat dst,
Mat kernel,
Point anchor,
int iterations,
int borderType )
static

Dilates an image by using a specific structuring element.

The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:

\[\texttt{dst} (x,y) = \max _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for dilation; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times dilation is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not suported.
borderValueborder value in case of a constant border

erode, morphologyEx, getStructuringElement

◆ dilate() [13/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.dilate ( Mat src,
Mat dst,
Mat kernel,
Point anchor,
int iterations,
int borderType,
Scalar borderValue )
static

Dilates an image by using a specific structuring element.

The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:

\[\texttt{dst} (x,y) = \max _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for dilation; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times dilation is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not suported.
borderValueborder value in case of a constant border

erode, morphologyEx, getStructuringElement

◆ distanceTransform() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.distanceTransform ( Mat src,
Mat dst,
int distanceType,
int maskSize )
static

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

Parameters
src8-bit, single-channel (binary) source image.
dstOutput image with calculated distances. It is a 8-bit or 32-bit floating-point, single-channel image of the same size as src .
distanceTypeType of distance, see #DistanceTypes
maskSizeSize of the distance transform mask, see #DistanceTransformMasks. In case of the DIST_L1 or DIST_C distance type, the parameter is forced to 3 because a \(3\times 3\) mask gives the same result as \(5\times 5\) or any larger aperture.
dstTypeType of output image. It can be CV_8U or CV_32F. Type CV_8U can be used only for the first variant of the function and distanceType == DIST_L1.

◆ distanceTransform() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.distanceTransform ( Mat src,
Mat dst,
int distanceType,
int maskSize,
int dstType )
static

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

Parameters
src8-bit, single-channel (binary) source image.
dstOutput image with calculated distances. It is a 8-bit or 32-bit floating-point, single-channel image of the same size as src .
distanceTypeType of distance, see #DistanceTypes
maskSizeSize of the distance transform mask, see #DistanceTransformMasks. In case of the DIST_L1 or DIST_C distance type, the parameter is forced to 3 because a \(3\times 3\) mask gives the same result as \(5\times 5\) or any larger aperture.
dstTypeType of output image. It can be CV_8U or CV_32F. Type CV_8U can be used only for the first variant of the function and distanceType == DIST_L1.

◆ distanceTransformWithLabels() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.distanceTransformWithLabels ( Mat src,
Mat dst,
Mat labels,
int distanceType,
int maskSize )
static

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

The function cv::distanceTransform calculates the approximate or precise distance from every binary image pixel to the nearest zero pixel. For zero image pixels, the distance will obviously be zero.

When maskSize == DIST_MASK_PRECISE and distanceType == DIST_L2 , the function runs the algorithm described in [Felzenszwalb04] . This algorithm is parallelized with the TBB library.

In other cases, the algorithm [Borgefors86] is used. This means that for a pixel the function finds the shortest path to the nearest zero pixel consisting of basic shifts: horizontal, vertical, diagonal, or knight's move (the latest is available for a \(5\times 5\) mask). The overall distance is calculated as a sum of these basic distances. Since the distance function should be symmetric, all of the horizontal and vertical shifts must have the same cost (denoted as a ), all the diagonal shifts must have the same cost (denoted as b), and all knight's moves must have the same cost (denoted as c). For the DIST_C and DIST_L1 types, the distance is calculated precisely, whereas for DIST_L2 (Euclidean distance) the distance can be calculated only with a relative error (a \(5\times 5\) mask gives more accurate results). For a,b, and c, OpenCV uses the values suggested in the original paper:

  • DIST_L1: a = 1, b = 2
  • DIST_L2:
    • 3 x 3: a=0.955, b=1.3693
    • 5 x 5: a=1, b=1.4, c=2.1969
  • DIST_C: a = 1, b = 1

Typically, for a fast, coarse distance estimation DIST_L2, a \(3\times 3\) mask is used. For a more accurate distance estimation DIST_L2, a \(5\times 5\) mask or the precise algorithm is used. Note that both the precise and the approximate algorithms are linear on the number of pixels.

This variant of the function does not only compute the minimum distance for each pixel \((x, y)\) but also identifies the nearest connected component consisting of zero pixels (labelType==DIST_LABEL_CCOMP) or the nearest zero pixel (labelType==DIST_LABEL_PIXEL). Index of the component/pixel is stored in labels(x, y). When labelType==DIST_LABEL_CCOMP, the function automatically finds connected components of zero pixels in the input image and marks them with distinct labels. When labelType==DIST_LABEL_PIXEL, the function scans through the input image and marks all the zero pixels with distinct labels.

In this mode, the complexity is still linear. That is, the function provides a very fast way to compute the Voronoi diagram for a binary image. Currently, the second variant can use only the approximate distance transform algorithm, i.e. maskSize=DIST_MASK_PRECISE is not supported yet.

Parameters
src8-bit, single-channel (binary) source image.
dstOutput image with calculated distances. It is a 8-bit or 32-bit floating-point, single-channel image of the same size as src.
labelsOutput 2D array of labels (the discrete Voronoi diagram). It has the type CV_32SC1 and the same size as src.
distanceTypeType of distance, see #DistanceTypes
maskSizeSize of the distance transform mask, see #DistanceTransformMasks. DIST_MASK_PRECISE is not supported by this variant. In case of the DIST_L1 or DIST_C distance type, the parameter is forced to 3 because a \(3\times 3\) mask gives the same result as \(5\times 5\) or any larger aperture.
labelTypeType of the label array to build, see #DistanceTransformLabelTypes.

◆ distanceTransformWithLabels() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.distanceTransformWithLabels ( Mat src,
Mat dst,
Mat labels,
int distanceType,
int maskSize,
int labelType )
static

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

The function cv::distanceTransform calculates the approximate or precise distance from every binary image pixel to the nearest zero pixel. For zero image pixels, the distance will obviously be zero.

When maskSize == DIST_MASK_PRECISE and distanceType == DIST_L2 , the function runs the algorithm described in [Felzenszwalb04] . This algorithm is parallelized with the TBB library.

In other cases, the algorithm [Borgefors86] is used. This means that for a pixel the function finds the shortest path to the nearest zero pixel consisting of basic shifts: horizontal, vertical, diagonal, or knight's move (the latest is available for a \(5\times 5\) mask). The overall distance is calculated as a sum of these basic distances. Since the distance function should be symmetric, all of the horizontal and vertical shifts must have the same cost (denoted as a ), all the diagonal shifts must have the same cost (denoted as b), and all knight's moves must have the same cost (denoted as c). For the DIST_C and DIST_L1 types, the distance is calculated precisely, whereas for DIST_L2 (Euclidean distance) the distance can be calculated only with a relative error (a \(5\times 5\) mask gives more accurate results). For a,b, and c, OpenCV uses the values suggested in the original paper:

  • DIST_L1: a = 1, b = 2
  • DIST_L2:
    • 3 x 3: a=0.955, b=1.3693
    • 5 x 5: a=1, b=1.4, c=2.1969
  • DIST_C: a = 1, b = 1

Typically, for a fast, coarse distance estimation DIST_L2, a \(3\times 3\) mask is used. For a more accurate distance estimation DIST_L2, a \(5\times 5\) mask or the precise algorithm is used. Note that both the precise and the approximate algorithms are linear on the number of pixels.

This variant of the function does not only compute the minimum distance for each pixel \((x, y)\) but also identifies the nearest connected component consisting of zero pixels (labelType==DIST_LABEL_CCOMP) or the nearest zero pixel (labelType==DIST_LABEL_PIXEL). Index of the component/pixel is stored in labels(x, y). When labelType==DIST_LABEL_CCOMP, the function automatically finds connected components of zero pixels in the input image and marks them with distinct labels. When labelType==DIST_LABEL_PIXEL, the function scans through the input image and marks all the zero pixels with distinct labels.

In this mode, the complexity is still linear. That is, the function provides a very fast way to compute the Voronoi diagram for a binary image. Currently, the second variant can use only the approximate distance transform algorithm, i.e. maskSize=DIST_MASK_PRECISE is not supported yet.

Parameters
src8-bit, single-channel (binary) source image.
dstOutput image with calculated distances. It is a 8-bit or 32-bit floating-point, single-channel image of the same size as src.
labelsOutput 2D array of labels (the discrete Voronoi diagram). It has the type CV_32SC1 and the same size as src.
distanceTypeType of distance, see #DistanceTypes
maskSizeSize of the distance transform mask, see #DistanceTransformMasks. DIST_MASK_PRECISE is not supported by this variant. In case of the DIST_L1 or DIST_C distance type, the parameter is forced to 3 because a \(3\times 3\) mask gives the same result as \(5\times 5\) or any larger aperture.
labelTypeType of the label array to build, see #DistanceTransformLabelTypes.

◆ divSpectrums() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.divSpectrums ( Mat a,
Mat b,
Mat c,
int flags )
static

Performs the per-element division of the first Fourier spectrum by the second Fourier spectrum.

The function cv::divSpectrums performs the per-element division of the first array by the second array. The arrays are CCS-packed or complex matrices that are results of a real or complex Fourier transform.

Parameters
afirst input array.
bsecond input array of the same size and type as src1 .
coutput array of the same size and type as src1 .
flagsoperation flags; currently, the only supported flag is cv::DFT_ROWS, which indicates that each row of src1 and src2 is an independent 1D Fourier spectrum. If you do not want to use this flag, then simply add a 0 as value.
conjBoptional flag that conjugates the second input array before the multiplication (true) or not (false).

◆ divSpectrums() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.divSpectrums ( Mat a,
Mat b,
Mat c,
int flags,
bool conjB )
static

Performs the per-element division of the first Fourier spectrum by the second Fourier spectrum.

The function cv::divSpectrums performs the per-element division of the first array by the second array. The arrays are CCS-packed or complex matrices that are results of a real or complex Fourier transform.

Parameters
afirst input array.
bsecond input array of the same size and type as src1 .
coutput array of the same size and type as src1 .
flagsoperation flags; currently, the only supported flag is cv::DFT_ROWS, which indicates that each row of src1 and src2 is an independent 1D Fourier spectrum. If you do not want to use this flag, then simply add a 0 as value.
conjBoptional flag that conjugates the second input array before the multiplication (true) or not (false).

◆ drawContours() [1/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
in Vec4d color )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [2/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
in Vec4d color,
int thickness )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [3/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
in Vec4d color,
int thickness,
int lineType )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [4/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
in Vec4d color,
int thickness,
int lineType,
Mat hierarchy )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [5/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
in Vec4d color,
int thickness,
int lineType,
Mat hierarchy,
int maxLevel )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [6/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
in Vec4d color,
int thickness,
int lineType,
Mat hierarchy,
int maxLevel,
in Vec2d offset )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [7/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
in(double v0, double v1, double v2, double v3) color )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [8/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
in(double v0, double v1, double v2, double v3) color,
int thickness )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [9/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [10/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType,
Mat hierarchy )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [11/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType,
Mat hierarchy,
int maxLevel )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [12/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType,
Mat hierarchy,
int maxLevel,
in(double x, double y) offset )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [13/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
Scalar color )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [14/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
Scalar color,
int thickness )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [15/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
Scalar color,
int thickness,
int lineType )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [16/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
Scalar color,
int thickness,
int lineType,
Mat hierarchy )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [17/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
Scalar color,
int thickness,
int lineType,
Mat hierarchy,
int maxLevel )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawContours() [18/18]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawContours ( Mat image,
List< MatOfPoint > contours,
int contourIdx,
Scalar color,
int thickness,
int lineType,
Mat hierarchy,
int maxLevel,
Point offset )
static

Draws contours outlines or filled contours.

The function draws contour outlines in the image if \(\texttt{thickness} \ge 0\) or fills the area bounded by the contours if \(\texttt{thickness}<0\) . The example below shows how to retrieve connected components from the binary image and label them: :

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=FILLED ), the contour interiors are drawn.
lineTypeLine connectivity. See #LineTypes
hierarchyOptional information about hierarchy. It is only needed if you want to draw only some of the contours (see maxLevel ).
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 \(\texttt{offset}=(dx,dy)\) .

When thickness=FILLED, the function is designed to handle connected components with holes correctly even when no hierarchy data is provided. This is done by analyzing all the outlines together using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved contours. In order to solve this problem, you need to call drawContours separately for each sub-group of contours, or iterate over the collection using contourIdx parameter.

◆ drawMarker() [1/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
in Vec2d position,
in Vec4d color )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ drawMarker() [2/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
in Vec2d position,
in Vec4d color,
int markerType )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ drawMarker() [3/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
in Vec2d position,
in Vec4d color,
int markerType,
int markerSize )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ drawMarker() [4/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
in Vec2d position,
in Vec4d color,
int markerType,
int markerSize,
int thickness )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ drawMarker() [5/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
in Vec2d position,
in Vec4d color,
int markerType,
int markerSize,
int thickness,
int line_type )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ drawMarker() [6/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
in(double x, double y) position,
in(double v0, double v1, double v2, double v3) color )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ drawMarker() [7/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
in(double x, double y) position,
in(double v0, double v1, double v2, double v3) color,
int markerType )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ drawMarker() [8/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
in(double x, double y) position,
in(double v0, double v1, double v2, double v3) color,
int markerType,
int markerSize )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ drawMarker() [9/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
in(double x, double y) position,
in(double v0, double v1, double v2, double v3) color,
int markerType,
int markerSize,
int thickness )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ drawMarker() [10/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
in(double x, double y) position,
in(double v0, double v1, double v2, double v3) color,
int markerType,
int markerSize,
int thickness,
int line_type )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ drawMarker() [11/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
Point position,
Scalar color )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ drawMarker() [12/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
Point position,
Scalar color,
int markerType )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ drawMarker() [13/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
Point position,
Scalar color,
int markerType,
int markerSize )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ drawMarker() [14/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
Point position,
Scalar color,
int markerType,
int markerSize,
int thickness )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ drawMarker() [15/15]

static void OpenCVForUnity.ImgprocModule.Imgproc.drawMarker ( Mat img,
Point position,
Scalar color,
int markerType,
int markerSize,
int thickness,
int line_type )
static

Draws a marker on a predefined position in an image.

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

Parameters
imgImage.
positionThe point where the crosshair is positioned.
colorLine color.
markerTypeThe specific type of marker you want to use, see #MarkerTypes
thicknessLine thickness.
line_typeType of the line, See #LineTypes
markerSizeThe length of the marker axis [default = 20 pixels]

◆ ellipse() [1/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
in Vec2d center,
in Vec2d axes,
double angle,
double startAngle,
double endAngle,
in Vec4d color )
static

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

The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic arc, or a filled ellipse sector. The drawing code uses general parametric form. A piecewise-linear curve is used to approximate the elliptic arc boundary. If you need more control of the ellipse rendering, you can retrieve the curve using ellipse2Poly and then render it with polylines or fill it with fillPoly. If you use the first variant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0 and endAngle=360. If startAngle is greater than endAngle, they are swapped. The figure below explains the meaning of the parameters to draw the blue arc.

Parameters
imgImage.
centerCenter of the ellipse.
axesHalf of the size of the ellipse main axes.
angleEllipse rotation angle in degrees.
startAngleStarting angle of the elliptic arc in degrees.
endAngleEnding angle of the elliptic arc in degrees.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and values of axes.

◆ ellipse() [2/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
in Vec2d center,
in Vec2d axes,
double angle,
double startAngle,
double endAngle,
in Vec4d color,
int thickness )
static

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

The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic arc, or a filled ellipse sector. The drawing code uses general parametric form. A piecewise-linear curve is used to approximate the elliptic arc boundary. If you need more control of the ellipse rendering, you can retrieve the curve using ellipse2Poly and then render it with polylines or fill it with fillPoly. If you use the first variant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0 and endAngle=360. If startAngle is greater than endAngle, they are swapped. The figure below explains the meaning of the parameters to draw the blue arc.

Parameters
imgImage.
centerCenter of the ellipse.
axesHalf of the size of the ellipse main axes.
angleEllipse rotation angle in degrees.
startAngleStarting angle of the elliptic arc in degrees.
endAngleEnding angle of the elliptic arc in degrees.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and values of axes.

◆ ellipse() [3/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
in Vec2d center,
in Vec2d axes,
double angle,
double startAngle,
double endAngle,
in Vec4d color,
int thickness,
int lineType )
static

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

The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic arc, or a filled ellipse sector. The drawing code uses general parametric form. A piecewise-linear curve is used to approximate the elliptic arc boundary. If you need more control of the ellipse rendering, you can retrieve the curve using ellipse2Poly and then render it with polylines or fill it with fillPoly. If you use the first variant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0 and endAngle=360. If startAngle is greater than endAngle, they are swapped. The figure below explains the meaning of the parameters to draw the blue arc.

Parameters
imgImage.
centerCenter of the ellipse.
axesHalf of the size of the ellipse main axes.
angleEllipse rotation angle in degrees.
startAngleStarting angle of the elliptic arc in degrees.
endAngleEnding angle of the elliptic arc in degrees.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and values of axes.

◆ ellipse() [4/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
in Vec2d center,
in Vec2d axes,
double angle,
double startAngle,
double endAngle,
in Vec4d color,
int thickness,
int lineType,
int shift )
static

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

The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic arc, or a filled ellipse sector. The drawing code uses general parametric form. A piecewise-linear curve is used to approximate the elliptic arc boundary. If you need more control of the ellipse rendering, you can retrieve the curve using ellipse2Poly and then render it with polylines or fill it with fillPoly. If you use the first variant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0 and endAngle=360. If startAngle is greater than endAngle, they are swapped. The figure below explains the meaning of the parameters to draw the blue arc.

Parameters
imgImage.
centerCenter of the ellipse.
axesHalf of the size of the ellipse main axes.
angleEllipse rotation angle in degrees.
startAngleStarting angle of the elliptic arc in degrees.
endAngleEnding angle of the elliptic arc in degrees.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and values of axes.

◆ ellipse() [5/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
in Vec5d box,
in Vec4d color )
static

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

Parameters
imgImage.
boxAlternative ellipse representation via RotatedRect. This means that the function draws an ellipse inscribed in the rotated rectangle.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes

◆ ellipse() [6/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
in Vec5d box,
in Vec4d color,
int thickness )
static

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

Parameters
imgImage.
boxAlternative ellipse representation via RotatedRect. This means that the function draws an ellipse inscribed in the rotated rectangle.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes

◆ ellipse() [7/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
in Vec5d box,
in Vec4d color,
int thickness,
int lineType )
static

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

Parameters
imgImage.
boxAlternative ellipse representation via RotatedRect. This means that the function draws an ellipse inscribed in the rotated rectangle.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes

◆ ellipse() [8/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
in(double x, double y) center,
in(double width, double height) axes,
double angle,
double startAngle,
double endAngle,
in(double v0, double v1, double v2, double v3) color )
static

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

The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic arc, or a filled ellipse sector. The drawing code uses general parametric form. A piecewise-linear curve is used to approximate the elliptic arc boundary. If you need more control of the ellipse rendering, you can retrieve the curve using ellipse2Poly and then render it with polylines or fill it with fillPoly. If you use the first variant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0 and endAngle=360. If startAngle is greater than endAngle, they are swapped. The figure below explains the meaning of the parameters to draw the blue arc.

Parameters
imgImage.
centerCenter of the ellipse.
axesHalf of the size of the ellipse main axes.
angleEllipse rotation angle in degrees.
startAngleStarting angle of the elliptic arc in degrees.
endAngleEnding angle of the elliptic arc in degrees.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and values of axes.

◆ ellipse() [9/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
in(double x, double y) center,
in(double width, double height) axes,
double angle,
double startAngle,
double endAngle,
in(double v0, double v1, double v2, double v3) color,
int thickness )
static

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

The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic arc, or a filled ellipse sector. The drawing code uses general parametric form. A piecewise-linear curve is used to approximate the elliptic arc boundary. If you need more control of the ellipse rendering, you can retrieve the curve using ellipse2Poly and then render it with polylines or fill it with fillPoly. If you use the first variant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0 and endAngle=360. If startAngle is greater than endAngle, they are swapped. The figure below explains the meaning of the parameters to draw the blue arc.

Parameters
imgImage.
centerCenter of the ellipse.
axesHalf of the size of the ellipse main axes.
angleEllipse rotation angle in degrees.
startAngleStarting angle of the elliptic arc in degrees.
endAngleEnding angle of the elliptic arc in degrees.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and values of axes.

◆ ellipse() [10/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
in(double x, double y) center,
in(double width, double height) axes,
double angle,
double startAngle,
double endAngle,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType )
static

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

The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic arc, or a filled ellipse sector. The drawing code uses general parametric form. A piecewise-linear curve is used to approximate the elliptic arc boundary. If you need more control of the ellipse rendering, you can retrieve the curve using ellipse2Poly and then render it with polylines or fill it with fillPoly. If you use the first variant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0 and endAngle=360. If startAngle is greater than endAngle, they are swapped. The figure below explains the meaning of the parameters to draw the blue arc.

Parameters
imgImage.
centerCenter of the ellipse.
axesHalf of the size of the ellipse main axes.
angleEllipse rotation angle in degrees.
startAngleStarting angle of the elliptic arc in degrees.
endAngleEnding angle of the elliptic arc in degrees.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and values of axes.

◆ ellipse() [11/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
in(double x, double y) center,
in(double width, double height) axes,
double angle,
double startAngle,
double endAngle,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType,
int shift )
static

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

The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic arc, or a filled ellipse sector. The drawing code uses general parametric form. A piecewise-linear curve is used to approximate the elliptic arc boundary. If you need more control of the ellipse rendering, you can retrieve the curve using ellipse2Poly and then render it with polylines or fill it with fillPoly. If you use the first variant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0 and endAngle=360. If startAngle is greater than endAngle, they are swapped. The figure below explains the meaning of the parameters to draw the blue arc.

Parameters
imgImage.
centerCenter of the ellipse.
axesHalf of the size of the ellipse main axes.
angleEllipse rotation angle in degrees.
startAngleStarting angle of the elliptic arc in degrees.
endAngleEnding angle of the elliptic arc in degrees.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and values of axes.

◆ ellipse() [12/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
in(double x, double y, double width, double height, double angle) box,
in(double v0, double v1, double v2, double v3) color )
static

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

Parameters
imgImage.
boxAlternative ellipse representation via RotatedRect. This means that the function draws an ellipse inscribed in the rotated rectangle.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes

◆ ellipse() [13/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
in(double x, double y, double width, double height, double angle) box,
in(double v0, double v1, double v2, double v3) color,
int thickness )
static

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

Parameters
imgImage.
boxAlternative ellipse representation via RotatedRect. This means that the function draws an ellipse inscribed in the rotated rectangle.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes

◆ ellipse() [14/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
in(double x, double y, double width, double height, double angle) box,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType )
static

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

Parameters
imgImage.
boxAlternative ellipse representation via RotatedRect. This means that the function draws an ellipse inscribed in the rotated rectangle.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes

◆ ellipse() [15/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
Point center,
Size axes,
double angle,
double startAngle,
double endAngle,
Scalar color )
static

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

The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic arc, or a filled ellipse sector. The drawing code uses general parametric form. A piecewise-linear curve is used to approximate the elliptic arc boundary. If you need more control of the ellipse rendering, you can retrieve the curve using ellipse2Poly and then render it with polylines or fill it with fillPoly. If you use the first variant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0 and endAngle=360. If startAngle is greater than endAngle, they are swapped. The figure below explains the meaning of the parameters to draw the blue arc.

Parameters
imgImage.
centerCenter of the ellipse.
axesHalf of the size of the ellipse main axes.
angleEllipse rotation angle in degrees.
startAngleStarting angle of the elliptic arc in degrees.
endAngleEnding angle of the elliptic arc in degrees.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and values of axes.

◆ ellipse() [16/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
Point center,
Size axes,
double angle,
double startAngle,
double endAngle,
Scalar color,
int thickness )
static

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

The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic arc, or a filled ellipse sector. The drawing code uses general parametric form. A piecewise-linear curve is used to approximate the elliptic arc boundary. If you need more control of the ellipse rendering, you can retrieve the curve using ellipse2Poly and then render it with polylines or fill it with fillPoly. If you use the first variant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0 and endAngle=360. If startAngle is greater than endAngle, they are swapped. The figure below explains the meaning of the parameters to draw the blue arc.

Parameters
imgImage.
centerCenter of the ellipse.
axesHalf of the size of the ellipse main axes.
angleEllipse rotation angle in degrees.
startAngleStarting angle of the elliptic arc in degrees.
endAngleEnding angle of the elliptic arc in degrees.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and values of axes.

◆ ellipse() [17/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
Point center,
Size axes,
double angle,
double startAngle,
double endAngle,
Scalar color,
int thickness,
int lineType )
static

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

The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic arc, or a filled ellipse sector. The drawing code uses general parametric form. A piecewise-linear curve is used to approximate the elliptic arc boundary. If you need more control of the ellipse rendering, you can retrieve the curve using ellipse2Poly and then render it with polylines or fill it with fillPoly. If you use the first variant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0 and endAngle=360. If startAngle is greater than endAngle, they are swapped. The figure below explains the meaning of the parameters to draw the blue arc.

Parameters
imgImage.
centerCenter of the ellipse.
axesHalf of the size of the ellipse main axes.
angleEllipse rotation angle in degrees.
startAngleStarting angle of the elliptic arc in degrees.
endAngleEnding angle of the elliptic arc in degrees.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and values of axes.

◆ ellipse() [18/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
Point center,
Size axes,
double angle,
double startAngle,
double endAngle,
Scalar color,
int thickness,
int lineType,
int shift )
static

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

The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic arc, or a filled ellipse sector. The drawing code uses general parametric form. A piecewise-linear curve is used to approximate the elliptic arc boundary. If you need more control of the ellipse rendering, you can retrieve the curve using ellipse2Poly and then render it with polylines or fill it with fillPoly. If you use the first variant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0 and endAngle=360. If startAngle is greater than endAngle, they are swapped. The figure below explains the meaning of the parameters to draw the blue arc.

Parameters
imgImage.
centerCenter of the ellipse.
axesHalf of the size of the ellipse main axes.
angleEllipse rotation angle in degrees.
startAngleStarting angle of the elliptic arc in degrees.
endAngleEnding angle of the elliptic arc in degrees.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes
shiftNumber of fractional bits in the coordinates of the center and values of axes.

◆ ellipse() [19/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
RotatedRect box,
Scalar color )
static

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

Parameters
imgImage.
boxAlternative ellipse representation via RotatedRect. This means that the function draws an ellipse inscribed in the rotated rectangle.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes

◆ ellipse() [20/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
RotatedRect box,
Scalar color,
int thickness )
static

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

Parameters
imgImage.
boxAlternative ellipse representation via RotatedRect. This means that the function draws an ellipse inscribed in the rotated rectangle.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes

◆ ellipse() [21/21]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse ( Mat img,
RotatedRect box,
Scalar color,
int thickness,
int lineType )
static

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

Parameters
imgImage.
boxAlternative ellipse representation via RotatedRect. This means that the function draws an ellipse inscribed in the rotated rectangle.
colorEllipse color.
thicknessThickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn.
lineTypeType of the ellipse boundary. See #LineTypes

◆ ellipse2Poly() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse2Poly ( in Vec2d center,
in Vec2d axes,
int angle,
int arcStart,
int arcEnd,
int delta,
MatOfPoint pts )
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 ellipse. If arcStart is greater than arcEnd, they are swapped.

Parameters
centerCenter of the arc.
axesHalf of the size of the ellipse main axes. See ellipse for details.
angleRotation angle of the ellipse in degrees. See 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 accuracy.
ptsOutput vector of polyline vertices.

◆ ellipse2Poly() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse2Poly ( in(double x, double y) center,
in(double width, double height) axes,
int angle,
int arcStart,
int arcEnd,
int delta,
MatOfPoint pts )
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 ellipse. If arcStart is greater than arcEnd, they are swapped.

Parameters
centerCenter of the arc.
axesHalf of the size of the ellipse main axes. See ellipse for details.
angleRotation angle of the ellipse in degrees. See 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 accuracy.
ptsOutput vector of polyline vertices.

◆ ellipse2Poly() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.ellipse2Poly ( Point center,
Size axes,
int angle,
int arcStart,
int arcEnd,
int delta,
MatOfPoint pts )
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 ellipse. If arcStart is greater than arcEnd, they are swapped.

Parameters
centerCenter of the arc.
axesHalf of the size of the ellipse main axes. See ellipse for details.
angleRotation angle of the ellipse in degrees. See 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 accuracy.
ptsOutput vector of polyline vertices.

◆ EMD() [1/3]

static float OpenCVForUnity.ImgprocModule.Imgproc.EMD ( Mat signature1,
Mat signature2,
int distType )
static

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

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

Parameters
signature1First signature, a \(\texttt{size1}\times \texttt{dims}+1\) floating-point matrix. Each row stores the point weight followed by the point coordinates. The matrix is allowed to have a single column (weights only) if the user-defined cost matrix is used. The weights must be non-negative and have at least one non-zero value.
signature2Second signature of the same format as signature1 , though the number of rows may be different. The total weights may be different. In this case an extra "dummy" point is added to either signature1 or signature2. The weights must be non-negative and have at least one non-zero value.
distTypeUsed metric. See #DistanceTypes.
costUser-defined \(\texttt{size1}\times \texttt{size2}\) cost matrix. Also, if a cost matrix is used, lower boundary lowerBound cannot be calculated because it needs a metric function.
lowerBoundOptional input/output parameter: lower boundary of a distance between the two signatures that is a distance between mass centers. The lower boundary may not be calculated if the user-defined cost matrix is used, the total weights of point configurations are not equal, or if the signatures consist of weights only (the signature matrices have a single column). You *must** initialize *lowerBound . If the calculated distance between mass centers is greater or equal to *lowerBound (it means that the signatures are far enough), the function does not calculate EMD. In any case *lowerBound is set to the calculated distance between mass centers on return. Thus, if you want to calculate both distance between mass centers and EMD, *lowerBound should be set to 0.
flowResultant \(\texttt{size1} \times \texttt{size2}\) flow matrix: \(\texttt{flow}_{i,j}\) is a flow from \(i\) -th point of signature1 to \(j\) -th point of signature2 .

◆ EMD() [2/3]

static float OpenCVForUnity.ImgprocModule.Imgproc.EMD ( Mat signature1,
Mat signature2,
int distType,
Mat cost )
static

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

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

Parameters
signature1First signature, a \(\texttt{size1}\times \texttt{dims}+1\) floating-point matrix. Each row stores the point weight followed by the point coordinates. The matrix is allowed to have a single column (weights only) if the user-defined cost matrix is used. The weights must be non-negative and have at least one non-zero value.
signature2Second signature of the same format as signature1 , though the number of rows may be different. The total weights may be different. In this case an extra "dummy" point is added to either signature1 or signature2. The weights must be non-negative and have at least one non-zero value.
distTypeUsed metric. See #DistanceTypes.
costUser-defined \(\texttt{size1}\times \texttt{size2}\) cost matrix. Also, if a cost matrix is used, lower boundary lowerBound cannot be calculated because it needs a metric function.
lowerBoundOptional input/output parameter: lower boundary of a distance between the two signatures that is a distance between mass centers. The lower boundary may not be calculated if the user-defined cost matrix is used, the total weights of point configurations are not equal, or if the signatures consist of weights only (the signature matrices have a single column). You *must** initialize *lowerBound . If the calculated distance between mass centers is greater or equal to *lowerBound (it means that the signatures are far enough), the function does not calculate EMD. In any case *lowerBound is set to the calculated distance between mass centers on return. Thus, if you want to calculate both distance between mass centers and EMD, *lowerBound should be set to 0.
flowResultant \(\texttt{size1} \times \texttt{size2}\) flow matrix: \(\texttt{flow}_{i,j}\) is a flow from \(i\) -th point of signature1 to \(j\) -th point of signature2 .

◆ EMD() [3/3]

static float OpenCVForUnity.ImgprocModule.Imgproc.EMD ( Mat signature1,
Mat signature2,
int distType,
Mat cost,
Mat flow )
static

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

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

Parameters
signature1First signature, a \(\texttt{size1}\times \texttt{dims}+1\) floating-point matrix. Each row stores the point weight followed by the point coordinates. The matrix is allowed to have a single column (weights only) if the user-defined cost matrix is used. The weights must be non-negative and have at least one non-zero value.
signature2Second signature of the same format as signature1 , though the number of rows may be different. The total weights may be different. In this case an extra "dummy" point is added to either signature1 or signature2. The weights must be non-negative and have at least one non-zero value.
distTypeUsed metric. See #DistanceTypes.
costUser-defined \(\texttt{size1}\times \texttt{size2}\) cost matrix. Also, if a cost matrix is used, lower boundary lowerBound cannot be calculated because it needs a metric function.
lowerBoundOptional input/output parameter: lower boundary of a distance between the two signatures that is a distance between mass centers. The lower boundary may not be calculated if the user-defined cost matrix is used, the total weights of point configurations are not equal, or if the signatures consist of weights only (the signature matrices have a single column). You *must** initialize *lowerBound . If the calculated distance between mass centers is greater or equal to *lowerBound (it means that the signatures are far enough), the function does not calculate EMD. In any case *lowerBound is set to the calculated distance between mass centers on return. Thus, if you want to calculate both distance between mass centers and EMD, *lowerBound should be set to 0.
flowResultant \(\texttt{size1} \times \texttt{size2}\) flow matrix: \(\texttt{flow}_{i,j}\) is a flow from \(i\) -th point of signature1 to \(j\) -th point of signature2 .

◆ equalizeHist()

static void OpenCVForUnity.ImgprocModule.Imgproc.equalizeHist ( Mat src,
Mat dst )
static

Equalizes the histogram of a grayscale image.

The function equalizes the histogram of the input image using the following algorithm:

  • Calculate the histogram \(H\) for src .
  • Normalize the histogram so that the sum of histogram bins is 255.
  • Compute the integral of the histogram:

    \[H'_i = \sum _{0 \le j < i} H(j)\]

  • Transform the image using \(H'\) as a look-up table: \(\texttt{dst}(x,y) = H'(\texttt{src}(x,y))\)

The algorithm normalizes the brightness and increases the contrast of the image.

Parameters
srcSource 8-bit single channel image.
dstDestination image of the same size and type as src .

◆ erode() [1/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.erode ( Mat src,
Mat dst,
Mat kernel )
static

Erodes an image by using a specific structuring element.

The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:

\[\texttt{dst} (x,y) = \min _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for erosion; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement.
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times erosion is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueborder value in case of a constant border

dilate, morphologyEx, getStructuringElement

◆ erode() [2/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.erode ( Mat src,
Mat dst,
Mat kernel,
in Vec2d anchor )
static

Erodes an image by using a specific structuring element.

The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:

\[\texttt{dst} (x,y) = \min _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for erosion; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement.
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times erosion is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueborder value in case of a constant border

dilate, morphologyEx, getStructuringElement

◆ erode() [3/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.erode ( Mat src,
Mat dst,
Mat kernel,
in Vec2d anchor,
int iterations )
static

Erodes an image by using a specific structuring element.

The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:

\[\texttt{dst} (x,y) = \min _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for erosion; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement.
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times erosion is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueborder value in case of a constant border

dilate, morphologyEx, getStructuringElement

◆ erode() [4/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.erode ( Mat src,
Mat dst,
Mat kernel,
in Vec2d anchor,
int iterations,
int borderType )
static

Erodes an image by using a specific structuring element.

The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:

\[\texttt{dst} (x,y) = \min _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for erosion; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement.
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times erosion is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueborder value in case of a constant border

dilate, morphologyEx, getStructuringElement

◆ erode() [5/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.erode ( Mat src,
Mat dst,
Mat kernel,
in Vec2d anchor,
int iterations,
int borderType,
in Vec4d borderValue )
static

Erodes an image by using a specific structuring element.

The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:

\[\texttt{dst} (x,y) = \min _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for erosion; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement.
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times erosion is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueborder value in case of a constant border

dilate, morphologyEx, getStructuringElement

◆ erode() [6/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.erode ( Mat src,
Mat dst,
Mat kernel,
in(double x, double y) anchor )
static

Erodes an image by using a specific structuring element.

The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:

\[\texttt{dst} (x,y) = \min _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for erosion; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement.
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times erosion is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueborder value in case of a constant border

dilate, morphologyEx, getStructuringElement

◆ erode() [7/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.erode ( Mat src,
Mat dst,
Mat kernel,
in(double x, double y) anchor,
int iterations )
static

Erodes an image by using a specific structuring element.

The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:

\[\texttt{dst} (x,y) = \min _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for erosion; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement.
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times erosion is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueborder value in case of a constant border

dilate, morphologyEx, getStructuringElement

◆ erode() [8/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.erode ( Mat src,
Mat dst,
Mat kernel,
in(double x, double y) anchor,
int iterations,
int borderType )
static

Erodes an image by using a specific structuring element.

The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:

\[\texttt{dst} (x,y) = \min _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for erosion; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement.
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times erosion is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueborder value in case of a constant border

dilate, morphologyEx, getStructuringElement

◆ erode() [9/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.erode ( Mat src,
Mat dst,
Mat kernel,
in(double x, double y) anchor,
int iterations,
int borderType,
in(double v0, double v1, double v2, double v3) borderValue )
static

Erodes an image by using a specific structuring element.

The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:

\[\texttt{dst} (x,y) = \min _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for erosion; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement.
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times erosion is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueborder value in case of a constant border

dilate, morphologyEx, getStructuringElement

◆ erode() [10/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.erode ( Mat src,
Mat dst,
Mat kernel,
Point anchor )
static

Erodes an image by using a specific structuring element.

The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:

\[\texttt{dst} (x,y) = \min _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for erosion; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement.
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times erosion is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueborder value in case of a constant border

dilate, morphologyEx, getStructuringElement

◆ erode() [11/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.erode ( Mat src,
Mat dst,
Mat kernel,
Point anchor,
int iterations )
static

Erodes an image by using a specific structuring element.

The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:

\[\texttt{dst} (x,y) = \min _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for erosion; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement.
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times erosion is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueborder value in case of a constant border

dilate, morphologyEx, getStructuringElement

◆ erode() [12/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.erode ( Mat src,
Mat dst,
Mat kernel,
Point anchor,
int iterations,
int borderType )
static

Erodes an image by using a specific structuring element.

The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:

\[\texttt{dst} (x,y) = \min _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for erosion; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement.
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times erosion is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueborder value in case of a constant border

dilate, morphologyEx, getStructuringElement

◆ erode() [13/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.erode ( Mat src,
Mat dst,
Mat kernel,
Point anchor,
int iterations,
int borderType,
Scalar borderValue )
static

Erodes an image by using a specific structuring element.

The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:

\[\texttt{dst} (x,y) = \min _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')\]

The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In case of multi-channel images, each channel is processed independently.

Parameters
srcinput image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstoutput image of the same size and type as src.
kernelstructuring element used for erosion; if element=Mat(), a 3 x 3 rectangular structuring element is used. Kernel can be created using getStructuringElement.
anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times erosion is applied.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueborder value in case of a constant border

dilate, morphologyEx, getStructuringElement

◆ fillConvexPoly() [1/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillConvexPoly ( Mat img,
MatOfPoint points,
in Vec4d color )
static

Fills a convex polygon.

The function cv::fillConvexPoly draws a filled convex polygon. This function is much faster than the function fillPoly . It can fill not only convex polygons but any monotonic polygon without self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line) twice at the most (though, its top-most and/or the bottom edge could be horizontal).

Parameters
imgImage.
pointsPolygon vertices.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

◆ fillConvexPoly() [2/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillConvexPoly ( Mat img,
MatOfPoint points,
in Vec4d color,
int lineType )
static

Fills a convex polygon.

The function cv::fillConvexPoly draws a filled convex polygon. This function is much faster than the function fillPoly . It can fill not only convex polygons but any monotonic polygon without self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line) twice at the most (though, its top-most and/or the bottom edge could be horizontal).

Parameters
imgImage.
pointsPolygon vertices.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

◆ fillConvexPoly() [3/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillConvexPoly ( Mat img,
MatOfPoint points,
in Vec4d color,
int lineType,
int shift )
static

Fills a convex polygon.

The function cv::fillConvexPoly draws a filled convex polygon. This function is much faster than the function fillPoly . It can fill not only convex polygons but any monotonic polygon without self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line) twice at the most (though, its top-most and/or the bottom edge could be horizontal).

Parameters
imgImage.
pointsPolygon vertices.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

◆ fillConvexPoly() [4/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillConvexPoly ( Mat img,
MatOfPoint points,
in(double v0, double v1, double v2, double v3) color )
static

Fills a convex polygon.

The function cv::fillConvexPoly draws a filled convex polygon. This function is much faster than the function fillPoly . It can fill not only convex polygons but any monotonic polygon without self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line) twice at the most (though, its top-most and/or the bottom edge could be horizontal).

Parameters
imgImage.
pointsPolygon vertices.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

◆ fillConvexPoly() [5/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillConvexPoly ( Mat img,
MatOfPoint points,
in(double v0, double v1, double v2, double v3) color,
int lineType )
static

Fills a convex polygon.

The function cv::fillConvexPoly draws a filled convex polygon. This function is much faster than the function fillPoly . It can fill not only convex polygons but any monotonic polygon without self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line) twice at the most (though, its top-most and/or the bottom edge could be horizontal).

Parameters
imgImage.
pointsPolygon vertices.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

◆ fillConvexPoly() [6/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillConvexPoly ( Mat img,
MatOfPoint points,
in(double v0, double v1, double v2, double v3) color,
int lineType,
int shift )
static

Fills a convex polygon.

The function cv::fillConvexPoly draws a filled convex polygon. This function is much faster than the function fillPoly . It can fill not only convex polygons but any monotonic polygon without self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line) twice at the most (though, its top-most and/or the bottom edge could be horizontal).

Parameters
imgImage.
pointsPolygon vertices.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

◆ fillConvexPoly() [7/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillConvexPoly ( Mat img,
MatOfPoint points,
Scalar color )
static

Fills a convex polygon.

The function cv::fillConvexPoly draws a filled convex polygon. This function is much faster than the function fillPoly . It can fill not only convex polygons but any monotonic polygon without self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line) twice at the most (though, its top-most and/or the bottom edge could be horizontal).

Parameters
imgImage.
pointsPolygon vertices.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

◆ fillConvexPoly() [8/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillConvexPoly ( Mat img,
MatOfPoint points,
Scalar color,
int lineType )
static

Fills a convex polygon.

The function cv::fillConvexPoly draws a filled convex polygon. This function is much faster than the function fillPoly . It can fill not only convex polygons but any monotonic polygon without self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line) twice at the most (though, its top-most and/or the bottom edge could be horizontal).

Parameters
imgImage.
pointsPolygon vertices.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

◆ fillConvexPoly() [9/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillConvexPoly ( Mat img,
MatOfPoint points,
Scalar color,
int lineType,
int shift )
static

Fills a convex polygon.

The function cv::fillConvexPoly draws a filled convex polygon. This function is much faster than the function fillPoly . It can fill not only convex polygons but any monotonic polygon without self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line) twice at the most (though, its top-most and/or the bottom edge could be horizontal).

Parameters
imgImage.
pointsPolygon vertices.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

◆ fillPoly() [1/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillPoly ( Mat img,
List< MatOfPoint > pts,
in Vec4d color )
static

Fills the area bounded by one or more polygons.

The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.

Parameters
imgImage.
ptsArray of polygons where each polygon is represented as an array of points.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.
offsetOptional offset of all points of the contours.

◆ fillPoly() [2/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillPoly ( Mat img,
List< MatOfPoint > pts,
in Vec4d color,
int lineType )
static

Fills the area bounded by one or more polygons.

The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.

Parameters
imgImage.
ptsArray of polygons where each polygon is represented as an array of points.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.
offsetOptional offset of all points of the contours.

◆ fillPoly() [3/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillPoly ( Mat img,
List< MatOfPoint > pts,
in Vec4d color,
int lineType,
int shift )
static

Fills the area bounded by one or more polygons.

The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.

Parameters
imgImage.
ptsArray of polygons where each polygon is represented as an array of points.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.
offsetOptional offset of all points of the contours.

◆ fillPoly() [4/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillPoly ( Mat img,
List< MatOfPoint > pts,
in Vec4d color,
int lineType,
int shift,
in Vec2d offset )
static

Fills the area bounded by one or more polygons.

The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.

Parameters
imgImage.
ptsArray of polygons where each polygon is represented as an array of points.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.
offsetOptional offset of all points of the contours.

◆ fillPoly() [5/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillPoly ( Mat img,
List< MatOfPoint > pts,
in(double v0, double v1, double v2, double v3) color )
static

Fills the area bounded by one or more polygons.

The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.

Parameters
imgImage.
ptsArray of polygons where each polygon is represented as an array of points.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.
offsetOptional offset of all points of the contours.

◆ fillPoly() [6/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillPoly ( Mat img,
List< MatOfPoint > pts,
in(double v0, double v1, double v2, double v3) color,
int lineType )
static

Fills the area bounded by one or more polygons.

The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.

Parameters
imgImage.
ptsArray of polygons where each polygon is represented as an array of points.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.
offsetOptional offset of all points of the contours.

◆ fillPoly() [7/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillPoly ( Mat img,
List< MatOfPoint > pts,
in(double v0, double v1, double v2, double v3) color,
int lineType,
int shift )
static

Fills the area bounded by one or more polygons.

The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.

Parameters
imgImage.
ptsArray of polygons where each polygon is represented as an array of points.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.
offsetOptional offset of all points of the contours.

◆ fillPoly() [8/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillPoly ( Mat img,
List< MatOfPoint > pts,
in(double v0, double v1, double v2, double v3) color,
int lineType,
int shift,
in(double x, double y) offset )
static

Fills the area bounded by one or more polygons.

The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.

Parameters
imgImage.
ptsArray of polygons where each polygon is represented as an array of points.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.
offsetOptional offset of all points of the contours.

◆ fillPoly() [9/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillPoly ( Mat img,
List< MatOfPoint > pts,
Scalar color )
static

Fills the area bounded by one or more polygons.

The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.

Parameters
imgImage.
ptsArray of polygons where each polygon is represented as an array of points.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.
offsetOptional offset of all points of the contours.

◆ fillPoly() [10/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillPoly ( Mat img,
List< MatOfPoint > pts,
Scalar color,
int lineType )
static

Fills the area bounded by one or more polygons.

The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.

Parameters
imgImage.
ptsArray of polygons where each polygon is represented as an array of points.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.
offsetOptional offset of all points of the contours.

◆ fillPoly() [11/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillPoly ( Mat img,
List< MatOfPoint > pts,
Scalar color,
int lineType,
int shift )
static

Fills the area bounded by one or more polygons.

The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.

Parameters
imgImage.
ptsArray of polygons where each polygon is represented as an array of points.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.
offsetOptional offset of all points of the contours.

◆ fillPoly() [12/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.fillPoly ( Mat img,
List< MatOfPoint > pts,
Scalar color,
int lineType,
int shift,
Point offset )
static

Fills the area bounded by one or more polygons.

The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.

Parameters
imgImage.
ptsArray of polygons where each polygon is represented as an array of points.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.
offsetOptional offset of all points of the contours.

◆ filter2D() [1/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.filter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernel )
static

Convolves an image with the kernel.

The function applies an arbitrary linear filter to an image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode.

The function does actually compute correlation, not the convolution:

\[\texttt{dst} (x,y) = \sum _{ \substack{0\leq x' < \texttt{kernel.cols}\\{0\leq y' < \texttt{kernel.rows}}}} \texttt{kernel} (x',y')* \texttt{src} (x+x'- \texttt{anchor.x} ,y+y'- \texttt{anchor.y} )\]

That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip the kernel using #flip and set the new anchor to (kernel.cols - anchor.x - 1, kernel.rows - / anchor.y - 1).

         The function uses the DFT-based algorithm in case of sufficiently large kernels (~`11 x 11` or
         larger) and the direct algorithm for small kernels.
        </remarks>
        <param name="src">
        input image.
        </param>
        <param name="dst">
        output image of the same size and the same number of channels as src.
        </param>
        <param name="ddepth">
        desired depth of the destination image, see @ref filter_depths "combinations"
        </param>
        <param name="kernel">
        convolution kernel (or rather a correlation kernel), a single-channel floating point
         matrix; if you want to apply different kernels to different channels, split the image into
         separate color planes using split and process them individually.
        </param>
        <param name="anchor">
        anchor of the kernel that indicates the relative position of a filtered point within
         the kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor
         is at the kernel center.
        </param>
        <param name="delta">
        optional value added to the filtered pixels before storing them in dst.
        </param>
        <param name="borderType">
        pixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
         @sa  sepFilter2D, dft, matchTemplate
        </param> 

◆ filter2D() [2/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.filter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernel,
in Vec2d anchor )
static

Convolves an image with the kernel.

The function applies an arbitrary linear filter to an image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode.

The function does actually compute correlation, not the convolution:

\[\texttt{dst} (x,y) = \sum _{ \substack{0\leq x' < \texttt{kernel.cols}\\{0\leq y' < \texttt{kernel.rows}}}} \texttt{kernel} (x',y')* \texttt{src} (x+x'- \texttt{anchor.x} ,y+y'- \texttt{anchor.y} )\]

That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip the kernel using #flip and set the new anchor to (kernel.cols - anchor.x - 1, kernel.rows - / anchor.y - 1).

         The function uses the DFT-based algorithm in case of sufficiently large kernels (~`11 x 11` or
         larger) and the direct algorithm for small kernels.
        </remarks>
        <param name="src">
        input image.
        </param>
        <param name="dst">
        output image of the same size and the same number of channels as src.
        </param>
        <param name="ddepth">
        desired depth of the destination image, see @ref filter_depths "combinations"
        </param>
        <param name="kernel">
        convolution kernel (or rather a correlation kernel), a single-channel floating point
         matrix; if you want to apply different kernels to different channels, split the image into
         separate color planes using split and process them individually.
        </param>
        <param name="anchor">
        anchor of the kernel that indicates the relative position of a filtered point within
         the kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor
         is at the kernel center.
        </param>
        <param name="delta">
        optional value added to the filtered pixels before storing them in dst.
        </param>
        <param name="borderType">
        pixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
         @sa  sepFilter2D, dft, matchTemplate
        </param> 

◆ filter2D() [3/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.filter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernel,
in Vec2d anchor,
double delta )
static

Convolves an image with the kernel.

The function applies an arbitrary linear filter to an image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode.

The function does actually compute correlation, not the convolution:

\[\texttt{dst} (x,y) = \sum _{ \substack{0\leq x' < \texttt{kernel.cols}\\{0\leq y' < \texttt{kernel.rows}}}} \texttt{kernel} (x',y')* \texttt{src} (x+x'- \texttt{anchor.x} ,y+y'- \texttt{anchor.y} )\]

That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip the kernel using #flip and set the new anchor to (kernel.cols - anchor.x - 1, kernel.rows - / anchor.y - 1).

         The function uses the DFT-based algorithm in case of sufficiently large kernels (~`11 x 11` or
         larger) and the direct algorithm for small kernels.
        </remarks>
        <param name="src">
        input image.
        </param>
        <param name="dst">
        output image of the same size and the same number of channels as src.
        </param>
        <param name="ddepth">
        desired depth of the destination image, see @ref filter_depths "combinations"
        </param>
        <param name="kernel">
        convolution kernel (or rather a correlation kernel), a single-channel floating point
         matrix; if you want to apply different kernels to different channels, split the image into
         separate color planes using split and process them individually.
        </param>
        <param name="anchor">
        anchor of the kernel that indicates the relative position of a filtered point within
         the kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor
         is at the kernel center.
        </param>
        <param name="delta">
        optional value added to the filtered pixels before storing them in dst.
        </param>
        <param name="borderType">
        pixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
         @sa  sepFilter2D, dft, matchTemplate
        </param> 

◆ filter2D() [4/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.filter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernel,
in Vec2d anchor,
double delta,
int borderType )
static

Convolves an image with the kernel.

The function applies an arbitrary linear filter to an image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode.

The function does actually compute correlation, not the convolution:

\[\texttt{dst} (x,y) = \sum _{ \substack{0\leq x' < \texttt{kernel.cols}\\{0\leq y' < \texttt{kernel.rows}}}} \texttt{kernel} (x',y')* \texttt{src} (x+x'- \texttt{anchor.x} ,y+y'- \texttt{anchor.y} )\]

That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip the kernel using #flip and set the new anchor to (kernel.cols - anchor.x - 1, kernel.rows - / anchor.y - 1).

         The function uses the DFT-based algorithm in case of sufficiently large kernels (~`11 x 11` or
         larger) and the direct algorithm for small kernels.
        </remarks>
        <param name="src">
        input image.
        </param>
        <param name="dst">
        output image of the same size and the same number of channels as src.
        </param>
        <param name="ddepth">
        desired depth of the destination image, see @ref filter_depths "combinations"
        </param>
        <param name="kernel">
        convolution kernel (or rather a correlation kernel), a single-channel floating point
         matrix; if you want to apply different kernels to different channels, split the image into
         separate color planes using split and process them individually.
        </param>
        <param name="anchor">
        anchor of the kernel that indicates the relative position of a filtered point within
         the kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor
         is at the kernel center.
        </param>
        <param name="delta">
        optional value added to the filtered pixels before storing them in dst.
        </param>
        <param name="borderType">
        pixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
         @sa  sepFilter2D, dft, matchTemplate
        </param> 

◆ filter2D() [5/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.filter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernel,
in(double x, double y) anchor )
static

Convolves an image with the kernel.

The function applies an arbitrary linear filter to an image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode.

The function does actually compute correlation, not the convolution:

\[\texttt{dst} (x,y) = \sum _{ \substack{0\leq x' < \texttt{kernel.cols}\\{0\leq y' < \texttt{kernel.rows}}}} \texttt{kernel} (x',y')* \texttt{src} (x+x'- \texttt{anchor.x} ,y+y'- \texttt{anchor.y} )\]

That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip the kernel using #flip and set the new anchor to (kernel.cols - anchor.x - 1, kernel.rows - / anchor.y - 1).

         The function uses the DFT-based algorithm in case of sufficiently large kernels (~`11 x 11` or
         larger) and the direct algorithm for small kernels.
        </remarks>
        <param name="src">
        input image.
        </param>
        <param name="dst">
        output image of the same size and the same number of channels as src.
        </param>
        <param name="ddepth">
        desired depth of the destination image, see @ref filter_depths "combinations"
        </param>
        <param name="kernel">
        convolution kernel (or rather a correlation kernel), a single-channel floating point
         matrix; if you want to apply different kernels to different channels, split the image into
         separate color planes using split and process them individually.
        </param>
        <param name="anchor">
        anchor of the kernel that indicates the relative position of a filtered point within
         the kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor
         is at the kernel center.
        </param>
        <param name="delta">
        optional value added to the filtered pixels before storing them in dst.
        </param>
        <param name="borderType">
        pixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
         @sa  sepFilter2D, dft, matchTemplate
        </param> 

◆ filter2D() [6/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.filter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernel,
in(double x, double y) anchor,
double delta )
static

Convolves an image with the kernel.

The function applies an arbitrary linear filter to an image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode.

The function does actually compute correlation, not the convolution:

\[\texttt{dst} (x,y) = \sum _{ \substack{0\leq x' < \texttt{kernel.cols}\\{0\leq y' < \texttt{kernel.rows}}}} \texttt{kernel} (x',y')* \texttt{src} (x+x'- \texttt{anchor.x} ,y+y'- \texttt{anchor.y} )\]

That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip the kernel using #flip and set the new anchor to (kernel.cols - anchor.x - 1, kernel.rows - / anchor.y - 1).

         The function uses the DFT-based algorithm in case of sufficiently large kernels (~`11 x 11` or
         larger) and the direct algorithm for small kernels.
        </remarks>
        <param name="src">
        input image.
        </param>
        <param name="dst">
        output image of the same size and the same number of channels as src.
        </param>
        <param name="ddepth">
        desired depth of the destination image, see @ref filter_depths "combinations"
        </param>
        <param name="kernel">
        convolution kernel (or rather a correlation kernel), a single-channel floating point
         matrix; if you want to apply different kernels to different channels, split the image into
         separate color planes using split and process them individually.
        </param>
        <param name="anchor">
        anchor of the kernel that indicates the relative position of a filtered point within
         the kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor
         is at the kernel center.
        </param>
        <param name="delta">
        optional value added to the filtered pixels before storing them in dst.
        </param>
        <param name="borderType">
        pixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
         @sa  sepFilter2D, dft, matchTemplate
        </param> 

◆ filter2D() [7/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.filter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernel,
in(double x, double y) anchor,
double delta,
int borderType )
static

Convolves an image with the kernel.

The function applies an arbitrary linear filter to an image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode.

The function does actually compute correlation, not the convolution:

\[\texttt{dst} (x,y) = \sum _{ \substack{0\leq x' < \texttt{kernel.cols}\\{0\leq y' < \texttt{kernel.rows}}}} \texttt{kernel} (x',y')* \texttt{src} (x+x'- \texttt{anchor.x} ,y+y'- \texttt{anchor.y} )\]

That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip the kernel using #flip and set the new anchor to (kernel.cols - anchor.x - 1, kernel.rows - / anchor.y - 1).

         The function uses the DFT-based algorithm in case of sufficiently large kernels (~`11 x 11` or
         larger) and the direct algorithm for small kernels.
        </remarks>
        <param name="src">
        input image.
        </param>
        <param name="dst">
        output image of the same size and the same number of channels as src.
        </param>
        <param name="ddepth">
        desired depth of the destination image, see @ref filter_depths "combinations"
        </param>
        <param name="kernel">
        convolution kernel (or rather a correlation kernel), a single-channel floating point
         matrix; if you want to apply different kernels to different channels, split the image into
         separate color planes using split and process them individually.
        </param>
        <param name="anchor">
        anchor of the kernel that indicates the relative position of a filtered point within
         the kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor
         is at the kernel center.
        </param>
        <param name="delta">
        optional value added to the filtered pixels before storing them in dst.
        </param>
        <param name="borderType">
        pixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
         @sa  sepFilter2D, dft, matchTemplate
        </param> 

◆ filter2D() [8/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.filter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernel,
Point anchor )
static

Convolves an image with the kernel.

The function applies an arbitrary linear filter to an image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode.

The function does actually compute correlation, not the convolution:

\[\texttt{dst} (x,y) = \sum _{ \substack{0\leq x' < \texttt{kernel.cols}\\{0\leq y' < \texttt{kernel.rows}}}} \texttt{kernel} (x',y')* \texttt{src} (x+x'- \texttt{anchor.x} ,y+y'- \texttt{anchor.y} )\]

That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip the kernel using #flip and set the new anchor to (kernel.cols - anchor.x - 1, kernel.rows - / anchor.y - 1).

         The function uses the DFT-based algorithm in case of sufficiently large kernels (~`11 x 11` or
         larger) and the direct algorithm for small kernels.
        </remarks>
        <param name="src">
        input image.
        </param>
        <param name="dst">
        output image of the same size and the same number of channels as src.
        </param>
        <param name="ddepth">
        desired depth of the destination image, see @ref filter_depths "combinations"
        </param>
        <param name="kernel">
        convolution kernel (or rather a correlation kernel), a single-channel floating point
         matrix; if you want to apply different kernels to different channels, split the image into
         separate color planes using split and process them individually.
        </param>
        <param name="anchor">
        anchor of the kernel that indicates the relative position of a filtered point within
         the kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor
         is at the kernel center.
        </param>
        <param name="delta">
        optional value added to the filtered pixels before storing them in dst.
        </param>
        <param name="borderType">
        pixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
         @sa  sepFilter2D, dft, matchTemplate
        </param> 

◆ filter2D() [9/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.filter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernel,
Point anchor,
double delta )
static

Convolves an image with the kernel.

The function applies an arbitrary linear filter to an image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode.

The function does actually compute correlation, not the convolution:

\[\texttt{dst} (x,y) = \sum _{ \substack{0\leq x' < \texttt{kernel.cols}\\{0\leq y' < \texttt{kernel.rows}}}} \texttt{kernel} (x',y')* \texttt{src} (x+x'- \texttt{anchor.x} ,y+y'- \texttt{anchor.y} )\]

That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip the kernel using #flip and set the new anchor to (kernel.cols - anchor.x - 1, kernel.rows - / anchor.y - 1).

         The function uses the DFT-based algorithm in case of sufficiently large kernels (~`11 x 11` or
         larger) and the direct algorithm for small kernels.
        </remarks>
        <param name="src">
        input image.
        </param>
        <param name="dst">
        output image of the same size and the same number of channels as src.
        </param>
        <param name="ddepth">
        desired depth of the destination image, see @ref filter_depths "combinations"
        </param>
        <param name="kernel">
        convolution kernel (or rather a correlation kernel), a single-channel floating point
         matrix; if you want to apply different kernels to different channels, split the image into
         separate color planes using split and process them individually.
        </param>
        <param name="anchor">
        anchor of the kernel that indicates the relative position of a filtered point within
         the kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor
         is at the kernel center.
        </param>
        <param name="delta">
        optional value added to the filtered pixels before storing them in dst.
        </param>
        <param name="borderType">
        pixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
         @sa  sepFilter2D, dft, matchTemplate
        </param> 

◆ filter2D() [10/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.filter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernel,
Point anchor,
double delta,
int borderType )
static

Convolves an image with the kernel.

The function applies an arbitrary linear filter to an image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode.

The function does actually compute correlation, not the convolution:

\[\texttt{dst} (x,y) = \sum _{ \substack{0\leq x' < \texttt{kernel.cols}\\{0\leq y' < \texttt{kernel.rows}}}} \texttt{kernel} (x',y')* \texttt{src} (x+x'- \texttt{anchor.x} ,y+y'- \texttt{anchor.y} )\]

That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip the kernel using #flip and set the new anchor to (kernel.cols - anchor.x - 1, kernel.rows - / anchor.y - 1).

         The function uses the DFT-based algorithm in case of sufficiently large kernels (~`11 x 11` or
         larger) and the direct algorithm for small kernels.
        </remarks>
        <param name="src">
        input image.
        </param>
        <param name="dst">
        output image of the same size and the same number of channels as src.
        </param>
        <param name="ddepth">
        desired depth of the destination image, see @ref filter_depths "combinations"
        </param>
        <param name="kernel">
        convolution kernel (or rather a correlation kernel), a single-channel floating point
         matrix; if you want to apply different kernels to different channels, split the image into
         separate color planes using split and process them individually.
        </param>
        <param name="anchor">
        anchor of the kernel that indicates the relative position of a filtered point within
         the kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor
         is at the kernel center.
        </param>
        <param name="delta">
        optional value added to the filtered pixels before storing them in dst.
        </param>
        <param name="borderType">
        pixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
         @sa  sepFilter2D, dft, matchTemplate
        </param> 

◆ findContours() [1/4]

static void OpenCVForUnity.ImgprocModule.Imgproc.findContours ( Mat image,
List< MatOfPoint > contours,
Mat hierarchy,
int mode,
int method )
static

Finds contours in a binary image.

The function retrieves contours from the binary image using the algorithm [Suzuki85] . The contours are a useful tool for shape analysis and object detection and recognition. See squares.cpp in the OpenCV sample directory.

Note
Since opencv 3.2 source image is not modified by this function.
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 . You can use #compare, #inRange, threshold , adaptiveThreshold, Canny, and others to create a binary image out of a grayscale or color one. If mode equals to RETR_CCOMP or RETR_FLOODFILL, the input can also be a 32-bit integer image of labels (CV_32SC1).
contoursDetected contours. Each contour is stored as a vector of points (e.g. std::vector<std::vector<cv::Point> >).
hierarchyOptional output vector (e.g. std::vector<cv::Vec4i>), containing information about the image topology. It has as many elements as the number of contours. For each i-th contour contours[i], the elements hierarchy[i][0] , hierarchy[i][1] , hierarchy[i][2] , and hierarchy[i][3] 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.

In Python, hierarchy is nested inside a top level array. Use hierarchy[0][i] to access hierarchical elements of i-th contour.

Parameters
modeContour retrieval mode, see #RetrievalModes
methodContour approximation method, see #ContourApproximationModes
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/4]

static void OpenCVForUnity.ImgprocModule.Imgproc.findContours ( Mat image,
List< MatOfPoint > contours,
Mat hierarchy,
int mode,
int method,
in Vec2d offset )
static

Finds contours in a binary image.

The function retrieves contours from the binary image using the algorithm [Suzuki85] . The contours are a useful tool for shape analysis and object detection and recognition. See squares.cpp in the OpenCV sample directory.

Note
Since opencv 3.2 source image is not modified by this function.
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 . You can use #compare, #inRange, threshold , adaptiveThreshold, Canny, and others to create a binary image out of a grayscale or color one. If mode equals to RETR_CCOMP or RETR_FLOODFILL, the input can also be a 32-bit integer image of labels (CV_32SC1).
contoursDetected contours. Each contour is stored as a vector of points (e.g. std::vector<std::vector<cv::Point> >).
hierarchyOptional output vector (e.g. std::vector<cv::Vec4i>), containing information about the image topology. It has as many elements as the number of contours. For each i-th contour contours[i], the elements hierarchy[i][0] , hierarchy[i][1] , hierarchy[i][2] , and hierarchy[i][3] 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.

In Python, hierarchy is nested inside a top level array. Use hierarchy[0][i] to access hierarchical elements of i-th contour.

Parameters
modeContour retrieval mode, see #RetrievalModes
methodContour approximation method, see #ContourApproximationModes
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() [3/4]

static void OpenCVForUnity.ImgprocModule.Imgproc.findContours ( Mat image,
List< MatOfPoint > contours,
Mat hierarchy,
int mode,
int method,
in(double x, double y) offset )
static

Finds contours in a binary image.

The function retrieves contours from the binary image using the algorithm [Suzuki85] . The contours are a useful tool for shape analysis and object detection and recognition. See squares.cpp in the OpenCV sample directory.

Note
Since opencv 3.2 source image is not modified by this function.
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 . You can use #compare, #inRange, threshold , adaptiveThreshold, Canny, and others to create a binary image out of a grayscale or color one. If mode equals to RETR_CCOMP or RETR_FLOODFILL, the input can also be a 32-bit integer image of labels (CV_32SC1).
contoursDetected contours. Each contour is stored as a vector of points (e.g. std::vector<std::vector<cv::Point> >).
hierarchyOptional output vector (e.g. std::vector<cv::Vec4i>), containing information about the image topology. It has as many elements as the number of contours. For each i-th contour contours[i], the elements hierarchy[i][0] , hierarchy[i][1] , hierarchy[i][2] , and hierarchy[i][3] 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.

In Python, hierarchy is nested inside a top level array. Use hierarchy[0][i] to access hierarchical elements of i-th contour.

Parameters
modeContour retrieval mode, see #RetrievalModes
methodContour approximation method, see #ContourApproximationModes
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() [4/4]

static void OpenCVForUnity.ImgprocModule.Imgproc.findContours ( Mat image,
List< MatOfPoint > contours,
Mat hierarchy,
int mode,
int method,
Point offset )
static

Finds contours in a binary image.

The function retrieves contours from the binary image using the algorithm [Suzuki85] . The contours are a useful tool for shape analysis and object detection and recognition. See squares.cpp in the OpenCV sample directory.

Note
Since opencv 3.2 source image is not modified by this function.
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 . You can use #compare, #inRange, threshold , adaptiveThreshold, Canny, and others to create a binary image out of a grayscale or color one. If mode equals to RETR_CCOMP or RETR_FLOODFILL, the input can also be a 32-bit integer image of labels (CV_32SC1).
contoursDetected contours. Each contour is stored as a vector of points (e.g. std::vector<std::vector<cv::Point> >).
hierarchyOptional output vector (e.g. std::vector<cv::Vec4i>), containing information about the image topology. It has as many elements as the number of contours. For each i-th contour contours[i], the elements hierarchy[i][0] , hierarchy[i][1] , hierarchy[i][2] , and hierarchy[i][3] 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.

In Python, hierarchy is nested inside a top level array. Use hierarchy[0][i] to access hierarchical elements of i-th contour.

Parameters
modeContour retrieval mode, see #RetrievalModes
methodContour approximation method, see #ContourApproximationModes
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.

◆ findContoursLinkRuns() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.findContoursLinkRuns ( Mat image,
List< Mat > contours )
static

◆ findContoursLinkRuns() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.findContoursLinkRuns ( Mat image,
List< Mat > contours,
Mat hierarchy )
static

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

◆ fitEllipse()

static RotatedRect OpenCVForUnity.ImgprocModule.Imgproc.fitEllipse ( MatOfPoint2f points)
static

Fits an ellipse around a set of 2D points.

The function calculates the ellipse that fits (in a least-squares sense) a set of 2D points best of all. It returns the rotated rectangle in which the ellipse is inscribed. The first algorithm described by [Fitzgibbon95] is used. Developer should keep in mind that it is possible that the returned ellipse/rotatedRect data contains negative indices, due to the data points being close to the border of the containing Mat element.

Parameters
pointsInput 2D point set, stored in std::vector<> or Mat

◆ fitEllipseAMS()

static RotatedRect OpenCVForUnity.ImgprocModule.Imgproc.fitEllipseAMS ( Mat points)
static

Fits an ellipse around a set of 2D points.

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

For an ellipse, this basis set is \( \chi= \left(x^2, x y, y^2, x, y, 1\right) \), which is a set of six free coefficients \( A^T=\left\{A_{\text{xx}},A_{\text{xy}},A_{\text{yy}},A_x,A_y,A_0\right\} \). However, to specify an ellipse, all that is needed is five numbers; the major and minor axes lengths \( (a,b) \), the position \( (x_0,y_0) \), and the orientation \( \theta \). This is because the basis set includes lines, quadratics, parabolic and hyperbolic functions as well as elliptical functions as possible fits. If the fit is found to be a parabolic or hyperbolic function then the standard fitEllipse method is used. The AMS method restricts the fit to parabolic, hyperbolic and elliptical curves by imposing the condition that \( A^T ( D_x^T D_x + D_y^T D_y) A = 1 \) where the matrices \( Dx \) and \( Dy \) are the partial derivatives of the design matrix \( D \) with respect to x and y. The matrices are formed row by row applying the following to each of the points in the set:

\begin{align*} D(i,:)&=\left\{x_i^2, x_i y_i, y_i^2, x_i, y_i, 1\right\} & D_x(i,:)&=\left\{2 x_i,y_i,0,1,0,0\right\} & D_y(i,:)&=\left\{0,x_i,2 y_i,0,1,0\right\} \end{align*}

The AMS method minimizes the cost function

\begin{equation*} \epsilon ^2=\frac{ A^T D^T D A }{ A^T (D_x^T D_x + D_y^T D_y) A^T } \end{equation*}

The minimum cost is found by solving the generalized eigenvalue problem.

\begin{equation*} D^T D A = \lambda \left( D_x^T D_x + D_y^T D_y\right) A \end{equation*}

Parameters
pointsInput 2D point set, stored in std::vector<> or Mat

◆ fitEllipseAMSAsValueTuple()

static double double double double double angle OpenCVForUnity.ImgprocModule.Imgproc.fitEllipseAMSAsValueTuple ( Mat points)
static

◆ fitEllipseAMSAsVec5d()

static Vec5d OpenCVForUnity.ImgprocModule.Imgproc.fitEllipseAMSAsVec5d ( Mat points)
static

Fits an ellipse around a set of 2D points.

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

For an ellipse, this basis set is \( \chi= \left(x^2, x y, y^2, x, y, 1\right) \), which is a set of six free coefficients \( A^T=\left\{A_{\text{xx}},A_{\text{xy}},A_{\text{yy}},A_x,A_y,A_0\right\} \). However, to specify an ellipse, all that is needed is five numbers; the major and minor axes lengths \( (a,b) \), the position \( (x_0,y_0) \), and the orientation \( \theta \). This is because the basis set includes lines, quadratics, parabolic and hyperbolic functions as well as elliptical functions as possible fits. If the fit is found to be a parabolic or hyperbolic function then the standard fitEllipse method is used. The AMS method restricts the fit to parabolic, hyperbolic and elliptical curves by imposing the condition that \( A^T ( D_x^T D_x + D_y^T D_y) A = 1 \) where the matrices \( Dx \) and \( Dy \) are the partial derivatives of the design matrix \( D \) with respect to x and y. The matrices are formed row by row applying the following to each of the points in the set:

\begin{align*} D(i,:)&=\left\{x_i^2, x_i y_i, y_i^2, x_i, y_i, 1\right\} & D_x(i,:)&=\left\{2 x_i,y_i,0,1,0,0\right\} & D_y(i,:)&=\left\{0,x_i,2 y_i,0,1,0\right\} \end{align*}

The AMS method minimizes the cost function

\begin{equation*} \epsilon ^2=\frac{ A^T D^T D A }{ A^T (D_x^T D_x + D_y^T D_y) A^T } \end{equation*}

The minimum cost is found by solving the generalized eigenvalue problem.

\begin{equation*} D^T D A = \lambda \left( D_x^T D_x + D_y^T D_y\right) A \end{equation*}

Parameters
pointsInput 2D point set, stored in std::vector<> or Mat

◆ fitEllipseAsValueTuple()

static double double double double double angle OpenCVForUnity.ImgprocModule.Imgproc.fitEllipseAsValueTuple ( MatOfPoint2f points)
static

◆ fitEllipseAsVec5d()

static Vec5d OpenCVForUnity.ImgprocModule.Imgproc.fitEllipseAsVec5d ( MatOfPoint2f points)
static

Fits an ellipse around a set of 2D points.

The function calculates the ellipse that fits (in a least-squares sense) a set of 2D points best of all. It returns the rotated rectangle in which the ellipse is inscribed. The first algorithm described by [Fitzgibbon95] is used. Developer should keep in mind that it is possible that the returned ellipse/rotatedRect data contains negative indices, due to the data points being close to the border of the containing Mat element.

Parameters
pointsInput 2D point set, stored in std::vector<> or Mat

◆ fitEllipseDirect()

static RotatedRect OpenCVForUnity.ImgprocModule.Imgproc.fitEllipseDirect ( Mat points)
static

Fits an ellipse around a set of 2D points.

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

For an ellipse, this basis set is \( \chi= \left(x^2, x y, y^2, x, y, 1\right) \), which is a set of six free coefficients \( A^T=\left\{A_{\text{xx}},A_{\text{xy}},A_{\text{yy}},A_x,A_y,A_0\right\} \). However, to specify an ellipse, all that is needed is five numbers; the major and minor axes lengths \( (a,b) \), the position \( (x_0,y_0) \), and the orientation \( \theta \). This is because the basis set includes lines, quadratics, parabolic and hyperbolic functions as well as elliptical functions as possible fits. The Direct method confines the fit to ellipses by ensuring that \( 4 A_{xx} A_{yy}- A_{xy}^2 > 0 \). The condition imposed is that \( 4 A_{xx} A_{yy}- A_{xy}^2=1 \) which satisfies the inequality and as the coefficients can be arbitrarily scaled is not overly restrictive.

\begin{equation*} \epsilon ^2= A^T D^T D A \quad \text{with} \quad A^T C A =1 \quad \text{and} \quad C=\left(\begin{matrix} 0 & 0 & 2 & 0 & 0 & 0 \\ 0 & -1 & 0 & 0 & 0 & 0 \\ 2 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{matrix} \right) \end{equation*}

The minimum cost is found by solving the generalized eigenvalue problem.

\begin{equation*} D^T D A = \lambda \left( C\right) A \end{equation*}

The system produces only one positive eigenvalue \( \lambda\) which is chosen as the solution with its eigenvector \(\mathbf{u}\). These are used to find the coefficients

\begin{equation*} A = \sqrt{\frac{1}{\mathbf{u}^T C \mathbf{u}}} \mathbf{u} \end{equation*}

The scaling factor guarantees that \(A^T C A =1\).

Parameters
pointsInput 2D point set, stored in std::vector<> or Mat

◆ fitEllipseDirectAsValueTuple()

static double double double double double angle OpenCVForUnity.ImgprocModule.Imgproc.fitEllipseDirectAsValueTuple ( Mat points)
static

◆ fitEllipseDirectAsVec5d()

static Vec5d OpenCVForUnity.ImgprocModule.Imgproc.fitEllipseDirectAsVec5d ( Mat points)
static

Fits an ellipse around a set of 2D points.

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

For an ellipse, this basis set is \( \chi= \left(x^2, x y, y^2, x, y, 1\right) \), which is a set of six free coefficients \( A^T=\left\{A_{\text{xx}},A_{\text{xy}},A_{\text{yy}},A_x,A_y,A_0\right\} \). However, to specify an ellipse, all that is needed is five numbers; the major and minor axes lengths \( (a,b) \), the position \( (x_0,y_0) \), and the orientation \( \theta \). This is because the basis set includes lines, quadratics, parabolic and hyperbolic functions as well as elliptical functions as possible fits. The Direct method confines the fit to ellipses by ensuring that \( 4 A_{xx} A_{yy}- A_{xy}^2 > 0 \). The condition imposed is that \( 4 A_{xx} A_{yy}- A_{xy}^2=1 \) which satisfies the inequality and as the coefficients can be arbitrarily scaled is not overly restrictive.

\begin{equation*} \epsilon ^2= A^T D^T D A \quad \text{with} \quad A^T C A =1 \quad \text{and} \quad C=\left(\begin{matrix} 0 & 0 & 2 & 0 & 0 & 0 \\ 0 & -1 & 0 & 0 & 0 & 0 \\ 2 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{matrix} \right) \end{equation*}

The minimum cost is found by solving the generalized eigenvalue problem.

\begin{equation*} D^T D A = \lambda \left( C\right) A \end{equation*}

The system produces only one positive eigenvalue \( \lambda\) which is chosen as the solution with its eigenvector \(\mathbf{u}\). These are used to find the coefficients

\begin{equation*} A = \sqrt{\frac{1}{\mathbf{u}^T C \mathbf{u}}} \mathbf{u} \end{equation*}

The scaling factor guarantees that \(A^T C A =1\).

Parameters
pointsInput 2D point set, stored in std::vector<> or Mat

◆ fitLine()

static void OpenCVForUnity.ImgprocModule.Imgproc.fitLine ( Mat points,
Mat line,
int distType,
double param,
double reps,
double aeps )
static

Fits a line to a 2D or 3D point set.

The function fitLine fits a line to a 2D or 3D point set by minimizing \(\sum_i \rho(r_i)\) where \(r_i\) is a distance between the \(i^{th}\) point, the line and \(\rho(r)\) is a distance function, one of the following:

  • DIST_L2

    \[\rho (r) = r^2/2 \quad \text{(the simplest and the fastest least-squares method)}\]

  • DIST_L1

    \[\rho (r) = r\]

  • DIST_L12

    \[\rho (r) = 2 \cdot ( \sqrt{1 + \frac{r^2}{2}} - 1)\]

  • DIST_FAIR

    \[\rho \left (r \right ) = C^2 \cdot \left ( \frac{r}{C} - \log{\left(1 + \frac{r}{C}\right)} \right ) \quad \text{where} \quad C=1.3998\]

  • DIST_WELSCH

    \[\rho \left (r \right ) = \frac{C^2}{2} \cdot \left ( 1 - \exp{\left(-\left(\frac{r}{C}\right)^2\right)} \right ) \quad \text{where} \quad C=2.9846\]

  • DIST_HUBER

    \[\rho (r) = \fork{r^2/2}{if \(r < C\)}{C \cdot (r-C/2)}{otherwise} \quad \text{where} \quad C=1.345\]

The algorithm is based on the M-estimator ( <http://en.wikipedia.org/wiki/M-estimator&gt; ) technique that iteratively fits the line using the weighted least-squares algorithm. After each iteration the weights \(w_i\) are adjusted to be inversely proportional to \(\rho(r_i)\) .

Parameters
pointsInput vector of 2D or 3D points, stored in std::vector<> or Mat.
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, see #DistanceTypes
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.

◆ floodFill() [1/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
in Vec2d seedPoint,
in Vec4d newVal )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ floodFill() [2/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
in Vec2d seedPoint,
in Vec4d newVal,
out Vec4i rect )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ floodFill() [3/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
in Vec2d seedPoint,
in Vec4d newVal,
out Vec4i rect,
in Vec4d loDiff )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ floodFill() [4/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
in Vec2d seedPoint,
in Vec4d newVal,
out Vec4i rect,
in Vec4d loDiff,
in Vec4d upDiff )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ floodFill() [5/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
in Vec2d seedPoint,
in Vec4d newVal,
out Vec4i rect,
in Vec4d loDiff,
in Vec4d upDiff,
int flags )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ floodFill() [6/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
in(double x, double y) seedPoint,
in(double v0, double v1, double v2, double v3) newVal )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ floodFill() [7/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
in(double x, double y) seedPoint,
in(double v0, double v1, double v2, double v3) newVal,
out(int x, int y, int width, int height) rect )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ floodFill() [8/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
in(double x, double y) seedPoint,
in(double v0, double v1, double v2, double v3) newVal,
out(int x, int y, int width, int height) rect,
in(double v0, double v1, double v2, double v3) loDiff )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ floodFill() [9/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
in(double x, double y) seedPoint,
in(double v0, double v1, double v2, double v3) newVal,
out(int x, int y, int width, int height) rect,
in(double v0, double v1, double v2, double v3) loDiff,
in(double v0, double v1, double v2, double v3) upDiff )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ floodFill() [10/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
in(double x, double y) seedPoint,
in(double v0, double v1, double v2, double v3) newVal,
out(int x, int y, int width, int height) rect,
in(double v0, double v1, double v2, double v3) loDiff,
in(double v0, double v1, double v2, double v3) upDiff,
int flags )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ floodFill() [11/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
Point seedPoint,
Scalar newVal )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ floodFill() [12/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
Point seedPoint,
Scalar newVal,
Rect rect )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ floodFill() [13/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
Point seedPoint,
Scalar newVal,
Rect rect,
Scalar loDiff )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ floodFill() [14/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
Point seedPoint,
Scalar newVal,
Rect rect,
Scalar loDiff,
Scalar upDiff )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ floodFill() [15/15]

static int OpenCVForUnity.ImgprocModule.Imgproc.floodFill ( Mat image,
Mat mask,
Point seedPoint,
Scalar newVal,
Rect rect,
Scalar loDiff,
Scalar upDiff,
int flags )
static

Fills a connected component with the given color.

The function cv::floodFill fills a connected component starting from the seed point with the specified color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The pixel at \((x,y)\) is considered to belong to the repainted domain if:

  • in case of a grayscale image and floating range

    \[\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} (x',y')+ \texttt{upDiff}\]

  • in case of a grayscale image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y) \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}\]

  • in case of a color image and floating range

    \[\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b\]

  • in case of a color image and fixed range

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,\]

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g\]

    and

    \[\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b\]

where \(src(x',y')\) is the value of one of pixel neighbors that is already known to belong to the component. That is, to be added to the connected component, a color/brightness of the pixel should be close enough to:

  • Color/brightness of one of its neighbors that already belong to the connected component in case of a floating range.
  • Color/brightness of the seed point in case of a fixed range.

Use these functions to either mark a connected component with the specified color in-place, or build a mask and then extract the contour, or copy the region to another image, and so on.

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.
maskOperation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller than image. If an empty Mat is passed it will be created automatically. Since this is both an input and output parameter, you must take responsibility of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example, an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the mask corresponding to filled pixels in the image are set to 1 or to the specified value in flags as described below. Additionally, the function fills the border of the mask with ones to simplify internal processing. It is therefore possible to use the same mask in multiple calls to the function to make sure the filled areas do not overlap.
seedPointStarting point.
newValNew value of the repainted domain pixels.
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.
rectOptional output parameter set by the function to the minimum bounding rectangle of the repainted domain.
flagsOperation flags. The first 8 bits contain a connectivity value. The default value of 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner) will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill the mask (the default value is 1). For example, 4 | ( 255 << 8 ) will consider 4 nearest neighbours and fill the mask with a value of 255. The following additional options occupy higher bits and therefore may be further combined with the connectivity and mask fill values using bit-wise or (|), see #FloodFillFlags.
Note
Since the mask is larger than the filled image, a pixel \((x, y)\) in image corresponds to the pixel \((x+1, y+1)\) in the mask .
See also
findContours

◆ GaussianBlur() [1/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.GaussianBlur ( Mat src,
Mat dst,
in Vec2d ksize,
double sigmaX )
static

Blurs an image using a Gaussian filter.

The function convolves the source image with the specified Gaussian kernel. In-place filtering is supported.

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, see #BorderTypes. #BORDER_WRAP is not supported.
See also
sepFilter2D, filter2D, blur, boxFilter, bilateralFilter, medianBlur

◆ GaussianBlur() [2/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.GaussianBlur ( Mat src,
Mat dst,
in Vec2d ksize,
double sigmaX,
double sigmaY )
static

Blurs an image using a Gaussian filter.

The function convolves the source image with the specified Gaussian kernel. In-place filtering is supported.

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, see #BorderTypes. #BORDER_WRAP is not supported.
See also
sepFilter2D, filter2D, blur, boxFilter, bilateralFilter, medianBlur

◆ GaussianBlur() [3/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.GaussianBlur ( Mat src,
Mat dst,
in Vec2d ksize,
double sigmaX,
double sigmaY,
int borderType )
static

Blurs an image using a Gaussian filter.

The function convolves the source image with the specified Gaussian kernel. In-place filtering is supported.

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, see #BorderTypes. #BORDER_WRAP is not supported.
See also
sepFilter2D, filter2D, blur, boxFilter, bilateralFilter, medianBlur

◆ GaussianBlur() [4/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.GaussianBlur ( Mat src,
Mat dst,
in(double width, double height) ksize,
double sigmaX )
static

Blurs an image using a Gaussian filter.

The function convolves the source image with the specified Gaussian kernel. In-place filtering is supported.

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, see #BorderTypes. #BORDER_WRAP is not supported.
See also
sepFilter2D, filter2D, blur, boxFilter, bilateralFilter, medianBlur

◆ GaussianBlur() [5/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.GaussianBlur ( Mat src,
Mat dst,
in(double width, double height) ksize,
double sigmaX,
double sigmaY )
static

Blurs an image using a Gaussian filter.

The function convolves the source image with the specified Gaussian kernel. In-place filtering is supported.

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, see #BorderTypes. #BORDER_WRAP is not supported.
See also
sepFilter2D, filter2D, blur, boxFilter, bilateralFilter, medianBlur

◆ GaussianBlur() [6/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.GaussianBlur ( Mat src,
Mat dst,
in(double width, double height) ksize,
double sigmaX,
double sigmaY,
int borderType )
static

Blurs an image using a Gaussian filter.

The function convolves the source image with the specified Gaussian kernel. In-place filtering is supported.

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, see #BorderTypes. #BORDER_WRAP is not supported.
See also
sepFilter2D, filter2D, blur, boxFilter, bilateralFilter, medianBlur

◆ GaussianBlur() [7/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.GaussianBlur ( Mat src,
Mat dst,
Size ksize,
double sigmaX )
static

Blurs an image using a Gaussian filter.

The function convolves the source image with the specified Gaussian kernel. In-place filtering is supported.

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, see #BorderTypes. #BORDER_WRAP is not supported.
See also
sepFilter2D, filter2D, blur, boxFilter, bilateralFilter, medianBlur

◆ GaussianBlur() [8/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.GaussianBlur ( Mat src,
Mat dst,
Size ksize,
double sigmaX,
double sigmaY )
static

Blurs an image using a Gaussian filter.

The function convolves the source image with the specified Gaussian kernel. In-place filtering is supported.

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, see #BorderTypes. #BORDER_WRAP is not supported.
See also
sepFilter2D, filter2D, blur, boxFilter, bilateralFilter, medianBlur

◆ GaussianBlur() [9/9]

static void OpenCVForUnity.ImgprocModule.Imgproc.GaussianBlur ( Mat src,
Mat dst,
Size ksize,
double sigmaX,
double sigmaY,
int borderType )
static

Blurs an image using a Gaussian filter.

The function convolves the source image with the specified Gaussian kernel. In-place filtering is supported.

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, see #BorderTypes. #BORDER_WRAP is not supported.
See also
sepFilter2D, filter2D, blur, boxFilter, bilateralFilter, medianBlur

◆ getAffineTransform()

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getAffineTransform ( MatOfPoint2f src,
MatOfPoint2f dst )
static

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

◆ getDerivKernels() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.getDerivKernels ( Mat kx,
Mat ky,
int dx,
int dy,
int ksize )
static

Returns filter coefficients for computing spatial image derivatives.

The function computes and returns the filter coefficients for spatial image derivatives. When ksize=FILTER_SCHARR, the Scharr \(3 \times 3\) kernels are generated (see Scharr). Otherwise, Sobel kernels are generated (see Sobel). The filters are normally passed to sepFilter2D or to

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 FILTER_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 .

◆ getDerivKernels() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.getDerivKernels ( Mat kx,
Mat ky,
int dx,
int dy,
int ksize,
bool normalize )
static

Returns filter coefficients for computing spatial image derivatives.

The function computes and returns the filter coefficients for spatial image derivatives. When ksize=FILTER_SCHARR, the Scharr \(3 \times 3\) kernels are generated (see Scharr). Otherwise, Sobel kernels are generated (see Sobel). The filters are normally passed to sepFilter2D or to

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 FILTER_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 .

◆ getDerivKernels() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.getDerivKernels ( Mat kx,
Mat ky,
int dx,
int dy,
int ksize,
bool normalize,
int ktype )
static

Returns filter coefficients for computing spatial image derivatives.

The function computes and returns the filter coefficients for spatial image derivatives. When ksize=FILTER_SCHARR, the Scharr \(3 \times 3\) kernels are generated (see Scharr). Otherwise, Sobel kernels are generated (see Sobel). The filters are normally passed to sepFilter2D or to

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 FILTER_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 .

◆ getFontScaleFromHeight() [1/2]

static double OpenCVForUnity.ImgprocModule.Imgproc.getFontScaleFromHeight ( int fontFace,
int pixelHeight )
static

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

Parameters
fontFaceFont to use, see cv::HersheyFonts.
pixelHeightPixel height to compute the fontScale for
thicknessThickness of lines used to render the text.See putText for details.
Returns
The fontSize to use for cv::putText
See also
cv::putText

◆ getFontScaleFromHeight() [2/2]

static double OpenCVForUnity.ImgprocModule.Imgproc.getFontScaleFromHeight ( int fontFace,
int pixelHeight,
int thickness )
static

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

Parameters
fontFaceFont to use, see cv::HersheyFonts.
pixelHeightPixel height to compute the fontScale for
thicknessThickness of lines used to render the text.See putText for details.
Returns
The fontSize to use for cv::putText
See also
cv::putText

◆ getGaborKernel() [1/9]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getGaborKernel ( in Vec2d ksize,
double sigma,
double theta,
double lambd,
double gamma )
static

Returns Gabor filter coefficients.

For more details about gabor filter equations and parameters, see: Gabor Filter.

Parameters
ksizeSize of the filter returned.
sigmaStandard deviation of the gaussian envelope.
thetaOrientation of the normal to the parallel stripes of a Gabor function.
lambdWavelength of the sinusoidal factor.
gammaSpatial aspect ratio.
psiPhase offset.
ktypeType of filter coefficients. It can be CV_32F or CV_64F .

◆ getGaborKernel() [2/9]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getGaborKernel ( in Vec2d ksize,
double sigma,
double theta,
double lambd,
double gamma,
double psi )
static

Returns Gabor filter coefficients.

For more details about gabor filter equations and parameters, see: Gabor Filter.

Parameters
ksizeSize of the filter returned.
sigmaStandard deviation of the gaussian envelope.
thetaOrientation of the normal to the parallel stripes of a Gabor function.
lambdWavelength of the sinusoidal factor.
gammaSpatial aspect ratio.
psiPhase offset.
ktypeType of filter coefficients. It can be CV_32F or CV_64F .

◆ getGaborKernel() [3/9]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getGaborKernel ( in Vec2d ksize,
double sigma,
double theta,
double lambd,
double gamma,
double psi,
int ktype )
static

Returns Gabor filter coefficients.

For more details about gabor filter equations and parameters, see: Gabor Filter.

Parameters
ksizeSize of the filter returned.
sigmaStandard deviation of the gaussian envelope.
thetaOrientation of the normal to the parallel stripes of a Gabor function.
lambdWavelength of the sinusoidal factor.
gammaSpatial aspect ratio.
psiPhase offset.
ktypeType of filter coefficients. It can be CV_32F or CV_64F .

◆ getGaborKernel() [4/9]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getGaborKernel ( in(double width, double height) ksize,
double sigma,
double theta,
double lambd,
double gamma )
static

Returns Gabor filter coefficients.

For more details about gabor filter equations and parameters, see: Gabor Filter.

Parameters
ksizeSize of the filter returned.
sigmaStandard deviation of the gaussian envelope.
thetaOrientation of the normal to the parallel stripes of a Gabor function.
lambdWavelength of the sinusoidal factor.
gammaSpatial aspect ratio.
psiPhase offset.
ktypeType of filter coefficients. It can be CV_32F or CV_64F .

◆ getGaborKernel() [5/9]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getGaborKernel ( in(double width, double height) ksize,
double sigma,
double theta,
double lambd,
double gamma,
double psi )
static

Returns Gabor filter coefficients.

For more details about gabor filter equations and parameters, see: Gabor Filter.

Parameters
ksizeSize of the filter returned.
sigmaStandard deviation of the gaussian envelope.
thetaOrientation of the normal to the parallel stripes of a Gabor function.
lambdWavelength of the sinusoidal factor.
gammaSpatial aspect ratio.
psiPhase offset.
ktypeType of filter coefficients. It can be CV_32F or CV_64F .

◆ getGaborKernel() [6/9]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getGaborKernel ( in(double width, double height) ksize,
double sigma,
double theta,
double lambd,
double gamma,
double psi,
int ktype )
static

Returns Gabor filter coefficients.

For more details about gabor filter equations and parameters, see: Gabor Filter.

Parameters
ksizeSize of the filter returned.
sigmaStandard deviation of the gaussian envelope.
thetaOrientation of the normal to the parallel stripes of a Gabor function.
lambdWavelength of the sinusoidal factor.
gammaSpatial aspect ratio.
psiPhase offset.
ktypeType of filter coefficients. It can be CV_32F or CV_64F .

◆ getGaborKernel() [7/9]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getGaborKernel ( Size ksize,
double sigma,
double theta,
double lambd,
double gamma )
static

Returns Gabor filter coefficients.

For more details about gabor filter equations and parameters, see: Gabor Filter.

Parameters
ksizeSize of the filter returned.
sigmaStandard deviation of the gaussian envelope.
thetaOrientation of the normal to the parallel stripes of a Gabor function.
lambdWavelength of the sinusoidal factor.
gammaSpatial aspect ratio.
psiPhase offset.
ktypeType of filter coefficients. It can be CV_32F or CV_64F .

◆ getGaborKernel() [8/9]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getGaborKernel ( Size ksize,
double sigma,
double theta,
double lambd,
double gamma,
double psi )
static

Returns Gabor filter coefficients.

For more details about gabor filter equations and parameters, see: Gabor Filter.

Parameters
ksizeSize of the filter returned.
sigmaStandard deviation of the gaussian envelope.
thetaOrientation of the normal to the parallel stripes of a Gabor function.
lambdWavelength of the sinusoidal factor.
gammaSpatial aspect ratio.
psiPhase offset.
ktypeType of filter coefficients. It can be CV_32F or CV_64F .

◆ getGaborKernel() [9/9]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getGaborKernel ( Size ksize,
double sigma,
double theta,
double lambd,
double gamma,
double psi,
int ktype )
static

Returns Gabor filter coefficients.

For more details about gabor filter equations and parameters, see: Gabor Filter.

Parameters
ksizeSize of the filter returned.
sigmaStandard deviation of the gaussian envelope.
thetaOrientation of the normal to the parallel stripes of a Gabor function.
lambdWavelength of the sinusoidal factor.
gammaSpatial aspect ratio.
psiPhase offset.
ktypeType of filter coefficients. It can be CV_32F or CV_64F .

◆ getGaussianKernel() [1/2]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getGaussianKernel ( int ksize,
double sigma )
static

Returns Gaussian filter coefficients.

The function computes and returns the \(\texttt{ksize} \times 1\) matrix of Gaussian filter coefficients:

\[G_i= \alpha *e^{-(i-( \texttt{ksize} -1)/2)^2/(2* \texttt{sigma}^2)},\]

where \(i=0..\texttt{ksize}-1\) and \(\alpha\) is the scale factor chosen so that \(\sum_i G_i=1\).

Two of such generated kernels can be passed to sepFilter2D. Those functions automatically recognize smoothing kernels (a symmetrical kernel with sum of weights equal to 1) and handle them accordingly. You may also use the higher-level GaussianBlur.

Parameters
ksizeAperture size. It should be odd ( \(\texttt{ksize} \mod 2 = 1\) ) 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 .

sepFilter2D, getDerivKernels, getStructuringElement, GaussianBlur

◆ getGaussianKernel() [2/2]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getGaussianKernel ( int ksize,
double sigma,
int ktype )
static

Returns Gaussian filter coefficients.

The function computes and returns the \(\texttt{ksize} \times 1\) matrix of Gaussian filter coefficients:

\[G_i= \alpha *e^{-(i-( \texttt{ksize} -1)/2)^2/(2* \texttt{sigma}^2)},\]

where \(i=0..\texttt{ksize}-1\) and \(\alpha\) is the scale factor chosen so that \(\sum_i G_i=1\).

Two of such generated kernels can be passed to sepFilter2D. Those functions automatically recognize smoothing kernels (a symmetrical kernel with sum of weights equal to 1) and handle them accordingly. You may also use the higher-level GaussianBlur.

Parameters
ksizeAperture size. It should be odd ( \(\texttt{ksize} \mod 2 = 1\) ) 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 .

sepFilter2D, getDerivKernels, getStructuringElement, GaussianBlur

◆ getPerspectiveTransform() [1/2]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getPerspectiveTransform ( Mat src,
Mat dst )
static

Calculates a perspective transform from four pairs of the corresponding points.

The function calculates the \(3 \times 3\) matrix of a perspective transform so that:

\[\begin{bmatrix} t_i x'_i \\ t_i y'_i \\ t_i \end{bmatrix} = \texttt{map_matrix} \cdot \begin{bmatrix} x_i \\ y_i \\ 1 \end{bmatrix}\]

where

\[dst(i)=(x'_i,y'_i), src(i)=(x_i, y_i), i=0,1,2,3\]

Parameters
srcCoordinates of quadrangle vertices in the source image.
dstCoordinates of the corresponding quadrangle vertices in the destination image.
solveMethodmethod passed to cv::solve (#DecompTypes)
See also
findHomography, warpPerspective, perspectiveTransform

◆ getPerspectiveTransform() [2/2]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getPerspectiveTransform ( Mat src,
Mat dst,
int solveMethod )
static

Calculates a perspective transform from four pairs of the corresponding points.

The function calculates the \(3 \times 3\) matrix of a perspective transform so that:

\[\begin{bmatrix} t_i x'_i \\ t_i y'_i \\ t_i \end{bmatrix} = \texttt{map_matrix} \cdot \begin{bmatrix} x_i \\ y_i \\ 1 \end{bmatrix}\]

where

\[dst(i)=(x'_i,y'_i), src(i)=(x_i, y_i), i=0,1,2,3\]

Parameters
srcCoordinates of quadrangle vertices in the source image.
dstCoordinates of the corresponding quadrangle vertices in the destination image.
solveMethodmethod passed to cv::solve (#DecompTypes)
See also
findHomography, warpPerspective, perspectiveTransform

◆ getRectSubPix() [1/6]

static void OpenCVForUnity.ImgprocModule.Imgproc.getRectSubPix ( Mat image,
in Vec2d patchSize,
in Vec2d center,
Mat patch )
static

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

The function getRectSubPix extracts pixels from src:

\[patch(x, y) = src(x + \texttt{center.x} - ( \texttt{dst.cols} -1)*0.5, y + \texttt{center.y} - ( \texttt{dst.rows} -1)*0.5)\]

where the values of the pixels at non-integer coordinates are retrieved using bilinear interpolation. Every channel of multi-channel images is processed independently. Also the image should be a single channel or three channel image. While the center of the rectangle must be inside the image, parts of the rectangle may be outside.

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 .
See also
warpAffine, warpPerspective

◆ getRectSubPix() [2/6]

static void OpenCVForUnity.ImgprocModule.Imgproc.getRectSubPix ( Mat image,
in Vec2d patchSize,
in Vec2d center,
Mat patch,
int patchType )
static

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

The function getRectSubPix extracts pixels from src:

\[patch(x, y) = src(x + \texttt{center.x} - ( \texttt{dst.cols} -1)*0.5, y + \texttt{center.y} - ( \texttt{dst.rows} -1)*0.5)\]

where the values of the pixels at non-integer coordinates are retrieved using bilinear interpolation. Every channel of multi-channel images is processed independently. Also the image should be a single channel or three channel image. While the center of the rectangle must be inside the image, parts of the rectangle may be outside.

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 .
See also
warpAffine, warpPerspective

◆ getRectSubPix() [3/6]

static void OpenCVForUnity.ImgprocModule.Imgproc.getRectSubPix ( Mat image,
in(double width, double height) patchSize,
in(double x, double y) center,
Mat patch )
static

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

The function getRectSubPix extracts pixels from src:

\[patch(x, y) = src(x + \texttt{center.x} - ( \texttt{dst.cols} -1)*0.5, y + \texttt{center.y} - ( \texttt{dst.rows} -1)*0.5)\]

where the values of the pixels at non-integer coordinates are retrieved using bilinear interpolation. Every channel of multi-channel images is processed independently. Also the image should be a single channel or three channel image. While the center of the rectangle must be inside the image, parts of the rectangle may be outside.

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 .
See also
warpAffine, warpPerspective

◆ getRectSubPix() [4/6]

static void OpenCVForUnity.ImgprocModule.Imgproc.getRectSubPix ( Mat image,
in(double width, double height) patchSize,
in(double x, double y) center,
Mat patch,
int patchType )
static

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

The function getRectSubPix extracts pixels from src:

\[patch(x, y) = src(x + \texttt{center.x} - ( \texttt{dst.cols} -1)*0.5, y + \texttt{center.y} - ( \texttt{dst.rows} -1)*0.5)\]

where the values of the pixels at non-integer coordinates are retrieved using bilinear interpolation. Every channel of multi-channel images is processed independently. Also the image should be a single channel or three channel image. While the center of the rectangle must be inside the image, parts of the rectangle may be outside.

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 .
See also
warpAffine, warpPerspective

◆ getRectSubPix() [5/6]

static void OpenCVForUnity.ImgprocModule.Imgproc.getRectSubPix ( Mat image,
Size patchSize,
Point center,
Mat patch )
static

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

The function getRectSubPix extracts pixels from src:

\[patch(x, y) = src(x + \texttt{center.x} - ( \texttt{dst.cols} -1)*0.5, y + \texttt{center.y} - ( \texttt{dst.rows} -1)*0.5)\]

where the values of the pixels at non-integer coordinates are retrieved using bilinear interpolation. Every channel of multi-channel images is processed independently. Also the image should be a single channel or three channel image. While the center of the rectangle must be inside the image, parts of the rectangle may be outside.

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 .
See also
warpAffine, warpPerspective

◆ getRectSubPix() [6/6]

static void OpenCVForUnity.ImgprocModule.Imgproc.getRectSubPix ( Mat image,
Size patchSize,
Point center,
Mat patch,
int patchType )
static

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

The function getRectSubPix extracts pixels from src:

\[patch(x, y) = src(x + \texttt{center.x} - ( \texttt{dst.cols} -1)*0.5, y + \texttt{center.y} - ( \texttt{dst.rows} -1)*0.5)\]

where the values of the pixels at non-integer coordinates are retrieved using bilinear interpolation. Every channel of multi-channel images is processed independently. Also the image should be a single channel or three channel image. While the center of the rectangle must be inside the image, parts of the rectangle may be outside.

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 .
See also
warpAffine, warpPerspective

◆ getRotationMatrix2D() [1/3]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getRotationMatrix2D ( in Vec2d center,
double angle,
double scale )
static

Calculates an affine matrix of 2D rotation.

The function calculates the following matrix:

\[\begin{bmatrix} \alpha & \beta & (1- \alpha ) \cdot \texttt{center.x} - \beta \cdot \texttt{center.y} \\ - \beta & \alpha & \beta \cdot \texttt{center.x} + (1- \alpha ) \cdot \texttt{center.y} \end{bmatrix}\]

where

\[\begin{array}{l} \alpha = \texttt{scale} \cdot \cos \texttt{angle} , \\ \beta = \texttt{scale} \cdot \sin \texttt{angle} \end{array}\]

The transformation maps the rotation center to itself. If this is not the target, adjust the shift.

Parameters
centerCenter of the rotation in the source image.
angleRotation angle in degrees. Positive values mean counter-clockwise rotation (the coordinate origin is assumed to be the top-left corner).
scaleIsotropic scale factor.
See also
getAffineTransform, warpAffine, transform

◆ getRotationMatrix2D() [2/3]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getRotationMatrix2D ( in(double x, double y) center,
double angle,
double scale )
static

Calculates an affine matrix of 2D rotation.

The function calculates the following matrix:

\[\begin{bmatrix} \alpha & \beta & (1- \alpha ) \cdot \texttt{center.x} - \beta \cdot \texttt{center.y} \\ - \beta & \alpha & \beta \cdot \texttt{center.x} + (1- \alpha ) \cdot \texttt{center.y} \end{bmatrix}\]

where

\[\begin{array}{l} \alpha = \texttt{scale} \cdot \cos \texttt{angle} , \\ \beta = \texttt{scale} \cdot \sin \texttt{angle} \end{array}\]

The transformation maps the rotation center to itself. If this is not the target, adjust the shift.

Parameters
centerCenter of the rotation in the source image.
angleRotation angle in degrees. Positive values mean counter-clockwise rotation (the coordinate origin is assumed to be the top-left corner).
scaleIsotropic scale factor.
See also
getAffineTransform, warpAffine, transform

◆ getRotationMatrix2D() [3/3]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getRotationMatrix2D ( Point center,
double angle,
double scale )
static

Calculates an affine matrix of 2D rotation.

The function calculates the following matrix:

\[\begin{bmatrix} \alpha & \beta & (1- \alpha ) \cdot \texttt{center.x} - \beta \cdot \texttt{center.y} \\ - \beta & \alpha & \beta \cdot \texttt{center.x} + (1- \alpha ) \cdot \texttt{center.y} \end{bmatrix}\]

where

\[\begin{array}{l} \alpha = \texttt{scale} \cdot \cos \texttt{angle} , \\ \beta = \texttt{scale} \cdot \sin \texttt{angle} \end{array}\]

The transformation maps the rotation center to itself. If this is not the target, adjust the shift.

Parameters
centerCenter of the rotation in the source image.
angleRotation angle in degrees. Positive values mean counter-clockwise rotation (the coordinate origin is assumed to be the top-left corner).
scaleIsotropic scale factor.
See also
getAffineTransform, warpAffine, transform

◆ getStructuringElement() [1/6]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getStructuringElement ( int shape,
in Vec2d ksize )
static

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

The function constructs and returns the structuring element that can be further passed to erode, dilate or morphologyEx. But you can also construct an arbitrary binary mask yourself and use it as the structuring element.

Parameters
shapeElement shape that could be one of #MorphShapes
ksizeSize of the structuring element.
anchorAnchor position within the element. The default value \((-1, -1)\) means that the anchor is at the center. Note that only the shape of a cross-shaped element depends on the anchor position. In other cases the anchor just regulates how much the result of the morphological operation is shifted.

◆ getStructuringElement() [2/6]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getStructuringElement ( int shape,
in Vec2d ksize,
in Vec2d anchor )
static

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

The function constructs and returns the structuring element that can be further passed to erode, dilate or morphologyEx. But you can also construct an arbitrary binary mask yourself and use it as the structuring element.

Parameters
shapeElement shape that could be one of #MorphShapes
ksizeSize of the structuring element.
anchorAnchor position within the element. The default value \((-1, -1)\) means that the anchor is at the center. Note that only the shape of a cross-shaped element depends on the anchor position. In other cases the anchor just regulates how much the result of the morphological operation is shifted.

◆ getStructuringElement() [3/6]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getStructuringElement ( int shape,
in(double width, double height) ksize )
static

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

The function constructs and returns the structuring element that can be further passed to erode, dilate or morphologyEx. But you can also construct an arbitrary binary mask yourself and use it as the structuring element.

Parameters
shapeElement shape that could be one of #MorphShapes
ksizeSize of the structuring element.
anchorAnchor position within the element. The default value \((-1, -1)\) means that the anchor is at the center. Note that only the shape of a cross-shaped element depends on the anchor position. In other cases the anchor just regulates how much the result of the morphological operation is shifted.

◆ getStructuringElement() [4/6]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getStructuringElement ( int shape,
in(double width, double height) ksize,
in(double x, double y) anchor )
static

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

The function constructs and returns the structuring element that can be further passed to erode, dilate or morphologyEx. But you can also construct an arbitrary binary mask yourself and use it as the structuring element.

Parameters
shapeElement shape that could be one of #MorphShapes
ksizeSize of the structuring element.
anchorAnchor position within the element. The default value \((-1, -1)\) means that the anchor is at the center. Note that only the shape of a cross-shaped element depends on the anchor position. In other cases the anchor just regulates how much the result of the morphological operation is shifted.

◆ getStructuringElement() [5/6]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getStructuringElement ( int shape,
Size ksize )
static

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

The function constructs and returns the structuring element that can be further passed to erode, dilate or morphologyEx. But you can also construct an arbitrary binary mask yourself and use it as the structuring element.

Parameters
shapeElement shape that could be one of #MorphShapes
ksizeSize of the structuring element.
anchorAnchor position within the element. The default value \((-1, -1)\) means that the anchor is at the center. Note that only the shape of a cross-shaped element depends on the anchor position. In other cases the anchor just regulates how much the result of the morphological operation is shifted.

◆ getStructuringElement() [6/6]

static Mat OpenCVForUnity.ImgprocModule.Imgproc.getStructuringElement ( int shape,
Size ksize,
Point anchor )
static

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

The function constructs and returns the structuring element that can be further passed to erode, dilate or morphologyEx. But you can also construct an arbitrary binary mask yourself and use it as the structuring element.

Parameters
shapeElement shape that could be one of #MorphShapes
ksizeSize of the structuring element.
anchorAnchor position within the element. The default value \((-1, -1)\) means that the anchor is at the center. Note that only the shape of a cross-shaped element depends on the anchor position. In other cases the anchor just regulates how much the result of the morphological operation is shifted.

◆ getTextSize()

static Size OpenCVForUnity.ImgprocModule.Imgproc.getTextSize ( string text,
int fontFace,
double fontScale,
int thickness,
int[] baseLine )
static

◆ getTextSizeAsValueTuple()

static double double height OpenCVForUnity.ImgprocModule.Imgproc.getTextSizeAsValueTuple ( string text,
int fontFace,
double fontScale,
int thickness,
int[] baseLine )
static

◆ getTextSizeAsVec2d()

static Vec2d OpenCVForUnity.ImgprocModule.Imgproc.getTextSizeAsVec2d ( string text,
int fontFace,
double fontScale,
int thickness,
int[] baseLine )
static

◆ goodFeaturesToTrack() [1/8]

static void OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrack ( Mat image,
MatOfPoint corners,
int maxCorners,
double qualityLevel,
double minDistance )
static

Determines strong corners on an image.

The function finds the most prominent corners in the image or in the specified image region, as described in [Shi94]

  • Function calculates the corner quality measure at every source image pixel using the cornerMinEigenVal or cornerHarris .
  • Function performs a non-maximum suppression (the local maximums in 3 x 3 neighborhood are retained).
  • The corners with the minimal eigenvalue less than \(\texttt{qualityLevel} \cdot \max_{x,y} qualityMeasureMap(x,y)\) are rejected.
  • The remaining corners are sorted by the quality measure in the descending order.
  • Function throws away each corner for which there is a stronger corner at a distance less than maxDistance.

The function can be used to initialize a point-based tracker of an object.

Note
If the function is called with different values A and B of the parameter qualityLevel , and A > B, the vector of returned corners with qualityLevel=A will be the prefix of the output vector with qualityLevel=B .
Parameters
imageInput 8-bit or floating-point 32-bit, single-channel image.
cornersOutput vector of detected corners.
maxCornersMaximum number of corners to return. If there are more corners than are found, the strongest of them is returned. maxCorners &lt;= 0 implies that no limit on the maximum is set and all detected corners are 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 (see cornerMinEigenVal ) 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. See cornerEigenValsAndVecs .
useHarrisDetectorParameter indicating whether to use a Harris detector (see cornerHarris) or cornerMinEigenVal.
kFree parameter of the Harris detector.
See also
cornerMinEigenVal, cornerHarris, calcOpticalFlowPyrLK, estimateRigidTransform,

◆ goodFeaturesToTrack() [2/8]

static void OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrack ( Mat image,
MatOfPoint corners,
int maxCorners,
double qualityLevel,
double minDistance,
Mat mask )
static

Determines strong corners on an image.

The function finds the most prominent corners in the image or in the specified image region, as described in [Shi94]

  • Function calculates the corner quality measure at every source image pixel using the cornerMinEigenVal or cornerHarris .
  • Function performs a non-maximum suppression (the local maximums in 3 x 3 neighborhood are retained).
  • The corners with the minimal eigenvalue less than \(\texttt{qualityLevel} \cdot \max_{x,y} qualityMeasureMap(x,y)\) are rejected.
  • The remaining corners are sorted by the quality measure in the descending order.
  • Function throws away each corner for which there is a stronger corner at a distance less than maxDistance.

The function can be used to initialize a point-based tracker of an object.

Note
If the function is called with different values A and B of the parameter qualityLevel , and A > B, the vector of returned corners with qualityLevel=A will be the prefix of the output vector with qualityLevel=B .
Parameters
imageInput 8-bit or floating-point 32-bit, single-channel image.
cornersOutput vector of detected corners.
maxCornersMaximum number of corners to return. If there are more corners than are found, the strongest of them is returned. maxCorners &lt;= 0 implies that no limit on the maximum is set and all detected corners are 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 (see cornerMinEigenVal ) 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. See cornerEigenValsAndVecs .
useHarrisDetectorParameter indicating whether to use a Harris detector (see cornerHarris) or cornerMinEigenVal.
kFree parameter of the Harris detector.
See also
cornerMinEigenVal, cornerHarris, calcOpticalFlowPyrLK, estimateRigidTransform,

◆ goodFeaturesToTrack() [3/8]

static void OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrack ( Mat image,
MatOfPoint corners,
int maxCorners,
double qualityLevel,
double minDistance,
Mat mask,
int blockSize )
static

Determines strong corners on an image.

The function finds the most prominent corners in the image or in the specified image region, as described in [Shi94]

  • Function calculates the corner quality measure at every source image pixel using the cornerMinEigenVal or cornerHarris .
  • Function performs a non-maximum suppression (the local maximums in 3 x 3 neighborhood are retained).
  • The corners with the minimal eigenvalue less than \(\texttt{qualityLevel} \cdot \max_{x,y} qualityMeasureMap(x,y)\) are rejected.
  • The remaining corners are sorted by the quality measure in the descending order.
  • Function throws away each corner for which there is a stronger corner at a distance less than maxDistance.

The function can be used to initialize a point-based tracker of an object.

Note
If the function is called with different values A and B of the parameter qualityLevel , and A > B, the vector of returned corners with qualityLevel=A will be the prefix of the output vector with qualityLevel=B .
Parameters
imageInput 8-bit or floating-point 32-bit, single-channel image.
cornersOutput vector of detected corners.
maxCornersMaximum number of corners to return. If there are more corners than are found, the strongest of them is returned. maxCorners &lt;= 0 implies that no limit on the maximum is set and all detected corners are 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 (see cornerMinEigenVal ) 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. See cornerEigenValsAndVecs .
useHarrisDetectorParameter indicating whether to use a Harris detector (see cornerHarris) or cornerMinEigenVal.
kFree parameter of the Harris detector.
See also
cornerMinEigenVal, cornerHarris, calcOpticalFlowPyrLK, estimateRigidTransform,

◆ goodFeaturesToTrack() [4/8]

static void OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrack ( Mat image,
MatOfPoint corners,
int maxCorners,
double qualityLevel,
double minDistance,
Mat mask,
int blockSize,
bool useHarrisDetector )
static

Determines strong corners on an image.

The function finds the most prominent corners in the image or in the specified image region, as described in [Shi94]

  • Function calculates the corner quality measure at every source image pixel using the cornerMinEigenVal or cornerHarris .
  • Function performs a non-maximum suppression (the local maximums in 3 x 3 neighborhood are retained).
  • The corners with the minimal eigenvalue less than \(\texttt{qualityLevel} \cdot \max_{x,y} qualityMeasureMap(x,y)\) are rejected.
  • The remaining corners are sorted by the quality measure in the descending order.
  • Function throws away each corner for which there is a stronger corner at a distance less than maxDistance.

The function can be used to initialize a point-based tracker of an object.

Note
If the function is called with different values A and B of the parameter qualityLevel , and A > B, the vector of returned corners with qualityLevel=A will be the prefix of the output vector with qualityLevel=B .
Parameters
imageInput 8-bit or floating-point 32-bit, single-channel image.
cornersOutput vector of detected corners.
maxCornersMaximum number of corners to return. If there are more corners than are found, the strongest of them is returned. maxCorners &lt;= 0 implies that no limit on the maximum is set and all detected corners are 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 (see cornerMinEigenVal ) 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. See cornerEigenValsAndVecs .
useHarrisDetectorParameter indicating whether to use a Harris detector (see cornerHarris) or cornerMinEigenVal.
kFree parameter of the Harris detector.
See also
cornerMinEigenVal, cornerHarris, calcOpticalFlowPyrLK, estimateRigidTransform,

◆ goodFeaturesToTrack() [5/8]

static void OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrack ( Mat image,
MatOfPoint corners,
int maxCorners,
double qualityLevel,
double minDistance,
Mat mask,
int blockSize,
bool useHarrisDetector,
double k )
static

Determines strong corners on an image.

The function finds the most prominent corners in the image or in the specified image region, as described in [Shi94]

  • Function calculates the corner quality measure at every source image pixel using the cornerMinEigenVal or cornerHarris .
  • Function performs a non-maximum suppression (the local maximums in 3 x 3 neighborhood are retained).
  • The corners with the minimal eigenvalue less than \(\texttt{qualityLevel} \cdot \max_{x,y} qualityMeasureMap(x,y)\) are rejected.
  • The remaining corners are sorted by the quality measure in the descending order.
  • Function throws away each corner for which there is a stronger corner at a distance less than maxDistance.

The function can be used to initialize a point-based tracker of an object.

Note
If the function is called with different values A and B of the parameter qualityLevel , and A > B, the vector of returned corners with qualityLevel=A will be the prefix of the output vector with qualityLevel=B .
Parameters
imageInput 8-bit or floating-point 32-bit, single-channel image.
cornersOutput vector of detected corners.
maxCornersMaximum number of corners to return. If there are more corners than are found, the strongest of them is returned. maxCorners &lt;= 0 implies that no limit on the maximum is set and all detected corners are 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 (see cornerMinEigenVal ) 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. See cornerEigenValsAndVecs .
useHarrisDetectorParameter indicating whether to use a Harris detector (see cornerHarris) or cornerMinEigenVal.
kFree parameter of the Harris detector.
See also
cornerMinEigenVal, cornerHarris, calcOpticalFlowPyrLK, estimateRigidTransform,

◆ goodFeaturesToTrack() [6/8]

static void OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrack ( Mat image,
MatOfPoint corners,
int maxCorners,
double qualityLevel,
double minDistance,
Mat mask,
int blockSize,
int gradientSize )
static

◆ goodFeaturesToTrack() [7/8]

static void OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrack ( Mat image,
MatOfPoint corners,
int maxCorners,
double qualityLevel,
double minDistance,
Mat mask,
int blockSize,
int gradientSize,
bool useHarrisDetector )
static

◆ goodFeaturesToTrack() [8/8]

static void OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrack ( Mat image,
MatOfPoint corners,
int maxCorners,
double qualityLevel,
double minDistance,
Mat mask,
int blockSize,
int gradientSize,
bool useHarrisDetector,
double k )
static

◆ goodFeaturesToTrackWithQuality() [1/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrackWithQuality ( Mat image,
Mat corners,
int maxCorners,
double qualityLevel,
double minDistance,
Mat mask,
Mat cornersQuality )
static

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

Parameters
imageInput 8-bit or floating-point 32-bit, single-channel image.
cornersOutput vector of detected corners.
maxCornersMaximum number of corners to return. If there are more corners than are found, the strongest of them is returned. maxCorners &lt;= 0 implies that no limit on the maximum is set and all detected corners are 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 (see cornerMinEigenVal ) 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.
maskRegion 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.
cornersQualityOutput vector of quality measure of the detected corners.
blockSizeSize of an average block for computing a derivative covariation matrix over each pixel neighborhood. See cornerEigenValsAndVecs .
gradientSizeAperture parameter for the Sobel operator used for derivatives computation. See cornerEigenValsAndVecs .
useHarrisDetectorParameter indicating whether to use a Harris detector (see cornerHarris) or cornerMinEigenVal.
kFree parameter of the Harris detector.

◆ goodFeaturesToTrackWithQuality() [2/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrackWithQuality ( Mat image,
Mat corners,
int maxCorners,
double qualityLevel,
double minDistance,
Mat mask,
Mat cornersQuality,
int blockSize )
static

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

Parameters
imageInput 8-bit or floating-point 32-bit, single-channel image.
cornersOutput vector of detected corners.
maxCornersMaximum number of corners to return. If there are more corners than are found, the strongest of them is returned. maxCorners &lt;= 0 implies that no limit on the maximum is set and all detected corners are 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 (see cornerMinEigenVal ) 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.
maskRegion 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.
cornersQualityOutput vector of quality measure of the detected corners.
blockSizeSize of an average block for computing a derivative covariation matrix over each pixel neighborhood. See cornerEigenValsAndVecs .
gradientSizeAperture parameter for the Sobel operator used for derivatives computation. See cornerEigenValsAndVecs .
useHarrisDetectorParameter indicating whether to use a Harris detector (see cornerHarris) or cornerMinEigenVal.
kFree parameter of the Harris detector.

◆ goodFeaturesToTrackWithQuality() [3/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrackWithQuality ( Mat image,
Mat corners,
int maxCorners,
double qualityLevel,
double minDistance,
Mat mask,
Mat cornersQuality,
int blockSize,
int gradientSize )
static

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

Parameters
imageInput 8-bit or floating-point 32-bit, single-channel image.
cornersOutput vector of detected corners.
maxCornersMaximum number of corners to return. If there are more corners than are found, the strongest of them is returned. maxCorners &lt;= 0 implies that no limit on the maximum is set and all detected corners are 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 (see cornerMinEigenVal ) 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.
maskRegion 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.
cornersQualityOutput vector of quality measure of the detected corners.
blockSizeSize of an average block for computing a derivative covariation matrix over each pixel neighborhood. See cornerEigenValsAndVecs .
gradientSizeAperture parameter for the Sobel operator used for derivatives computation. See cornerEigenValsAndVecs .
useHarrisDetectorParameter indicating whether to use a Harris detector (see cornerHarris) or cornerMinEigenVal.
kFree parameter of the Harris detector.

◆ goodFeaturesToTrackWithQuality() [4/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrackWithQuality ( Mat image,
Mat corners,
int maxCorners,
double qualityLevel,
double minDistance,
Mat mask,
Mat cornersQuality,
int blockSize,
int gradientSize,
bool useHarrisDetector )
static

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

Parameters
imageInput 8-bit or floating-point 32-bit, single-channel image.
cornersOutput vector of detected corners.
maxCornersMaximum number of corners to return. If there are more corners than are found, the strongest of them is returned. maxCorners &lt;= 0 implies that no limit on the maximum is set and all detected corners are 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 (see cornerMinEigenVal ) 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.
maskRegion 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.
cornersQualityOutput vector of quality measure of the detected corners.
blockSizeSize of an average block for computing a derivative covariation matrix over each pixel neighborhood. See cornerEigenValsAndVecs .
gradientSizeAperture parameter for the Sobel operator used for derivatives computation. See cornerEigenValsAndVecs .
useHarrisDetectorParameter indicating whether to use a Harris detector (see cornerHarris) or cornerMinEigenVal.
kFree parameter of the Harris detector.

◆ goodFeaturesToTrackWithQuality() [5/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.goodFeaturesToTrackWithQuality ( Mat image,
Mat corners,
int maxCorners,
double qualityLevel,
double minDistance,
Mat mask,
Mat cornersQuality,
int blockSize,
int gradientSize,
bool useHarrisDetector,
double k )
static

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

Parameters
imageInput 8-bit or floating-point 32-bit, single-channel image.
cornersOutput vector of detected corners.
maxCornersMaximum number of corners to return. If there are more corners than are found, the strongest of them is returned. maxCorners &lt;= 0 implies that no limit on the maximum is set and all detected corners are 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 (see cornerMinEigenVal ) 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.
maskRegion 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.
cornersQualityOutput vector of quality measure of the detected corners.
blockSizeSize of an average block for computing a derivative covariation matrix over each pixel neighborhood. See cornerEigenValsAndVecs .
gradientSizeAperture parameter for the Sobel operator used for derivatives computation. See cornerEigenValsAndVecs .
useHarrisDetectorParameter indicating whether to use a Harris detector (see cornerHarris) or cornerMinEigenVal.
kFree parameter of the Harris detector.

◆ grabCut() [1/6]

static void OpenCVForUnity.ImgprocModule.Imgproc.grabCut ( Mat img,
Mat mask,
in Vec4i rect,
Mat bgdModel,
Mat fgdModel,
int iterCount )
static

Runs the GrabCut algorithm.

The function implements the GrabCut image segmentation 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 one of the #GrabCutClasses.
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 the #GrabCutModes

◆ grabCut() [2/6]

static void OpenCVForUnity.ImgprocModule.Imgproc.grabCut ( Mat img,
Mat mask,
in Vec4i rect,
Mat bgdModel,
Mat fgdModel,
int iterCount,
int mode )
static

Runs the GrabCut algorithm.

The function implements the GrabCut image segmentation 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 one of the #GrabCutClasses.
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 the #GrabCutModes

◆ grabCut() [3/6]

static void OpenCVForUnity.ImgprocModule.Imgproc.grabCut ( Mat img,
Mat mask,
in(int x, int y, int width, int height) rect,
Mat bgdModel,
Mat fgdModel,
int iterCount )
static

Runs the GrabCut algorithm.

The function implements the GrabCut image segmentation 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 one of the #GrabCutClasses.
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 the #GrabCutModes

◆ grabCut() [4/6]

static void OpenCVForUnity.ImgprocModule.Imgproc.grabCut ( Mat img,
Mat mask,
in(int x, int y, int width, int height) rect,
Mat bgdModel,
Mat fgdModel,
int iterCount,
int mode )
static

Runs the GrabCut algorithm.

The function implements the GrabCut image segmentation 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 one of the #GrabCutClasses.
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 the #GrabCutModes

◆ grabCut() [5/6]

static void OpenCVForUnity.ImgprocModule.Imgproc.grabCut ( Mat img,
Mat mask,
Rect rect,
Mat bgdModel,
Mat fgdModel,
int iterCount )
static

Runs the GrabCut algorithm.

The function implements the GrabCut image segmentation 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 one of the #GrabCutClasses.
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 the #GrabCutModes

◆ grabCut() [6/6]

static void OpenCVForUnity.ImgprocModule.Imgproc.grabCut ( Mat img,
Mat mask,
Rect rect,
Mat bgdModel,
Mat fgdModel,
int iterCount,
int mode )
static

Runs the GrabCut algorithm.

The function implements the GrabCut image segmentation 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 one of the #GrabCutClasses.
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 the #GrabCutModes

◆ HoughCircles() [1/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughCircles ( Mat image,
Mat circles,
int method,
double dp,
double minDist )
static

Finds circles in a grayscale image using the Hough transform.

The function finds circles in a grayscale image using a modification of the Hough transform.

Example: :

Note
Usually the function detects the centers of circles well. However, it may fail to find correct radii. You can assist to the function by specifying the radius range ( minRadius and maxRadius ) if you know it. Or, in the case of HOUGH_GRADIENT method you may set maxRadius to a negative number to return centers only without radius search, and find the correct radius using an additional procedure.

It also helps to smooth image a bit unless it's already soft. For example, GaussianBlur() with 7x7 kernel and 1.5x1.5 sigma or similar blurring may help.

Parameters
image8-bit, single-channel, grayscale input image.
circlesOutput vector of found circles. Each vector is encoded as 3 or 4 element floating-point vector \((x, y, radius)\) or \((x, y, radius, votes)\) .
methodDetection method, see #HoughModes. The available methods are HOUGH_GRADIENT and HOUGH_GRADIENT_ALT.
dpInverse ratio of the accumulator resolution to the image resolution. For example, if dp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has half as big width and height. For HOUGH_GRADIENT_ALT the recommended value is dp=1.5, unless some small very circles need to be detected.
minDistMinimum distance between the centers of the detected circles. If the parameter is too small, multiple neighbor circles may be falsely detected in addition to a true one. If it is too large, some circles may be missed.
param1First method-specific parameter. In case of HOUGH_GRADIENT and HOUGH_GRADIENT_ALT, it is the higher threshold of the two passed to the Canny edge detector (the lower one is twice smaller). Note that HOUGH_GRADIENT_ALT uses Scharr algorithm to compute image derivatives, so the threshold value should normally be higher, such as 300 or normally exposed and contrasty images.
param2Second method-specific parameter. In case of HOUGH_GRADIENT, it is the accumulator threshold for the circle centers at the detection stage. The smaller it is, the more false circles may be detected. Circles, corresponding to the larger accumulator values, will be returned first. In the case of HOUGH_GRADIENT_ALT algorithm, this is the circle "perfectness" measure. The closer it to 1, the better shaped circles algorithm selects. In most cases 0.9 should be fine. If you want get better detection of small circles, you may decrease it to 0.85, 0.8 or even less. But then also try to limit the search range [minRadius, maxRadius] to avoid many false circles.
minRadiusMinimum circle radius.
maxRadiusMaximum circle radius. If <= 0, uses the maximum image dimension. If < 0, HOUGH_GRADIENT returns centers without finding the radius. HOUGH_GRADIENT_ALT always computes circle radiuses.
See also
fitEllipse, minEnclosingCircle

◆ HoughCircles() [2/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughCircles ( Mat image,
Mat circles,
int method,
double dp,
double minDist,
double param1 )
static

Finds circles in a grayscale image using the Hough transform.

The function finds circles in a grayscale image using a modification of the Hough transform.

Example: :

Note
Usually the function detects the centers of circles well. However, it may fail to find correct radii. You can assist to the function by specifying the radius range ( minRadius and maxRadius ) if you know it. Or, in the case of HOUGH_GRADIENT method you may set maxRadius to a negative number to return centers only without radius search, and find the correct radius using an additional procedure.

It also helps to smooth image a bit unless it's already soft. For example, GaussianBlur() with 7x7 kernel and 1.5x1.5 sigma or similar blurring may help.

Parameters
image8-bit, single-channel, grayscale input image.
circlesOutput vector of found circles. Each vector is encoded as 3 or 4 element floating-point vector \((x, y, radius)\) or \((x, y, radius, votes)\) .
methodDetection method, see #HoughModes. The available methods are HOUGH_GRADIENT and HOUGH_GRADIENT_ALT.
dpInverse ratio of the accumulator resolution to the image resolution. For example, if dp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has half as big width and height. For HOUGH_GRADIENT_ALT the recommended value is dp=1.5, unless some small very circles need to be detected.
minDistMinimum distance between the centers of the detected circles. If the parameter is too small, multiple neighbor circles may be falsely detected in addition to a true one. If it is too large, some circles may be missed.
param1First method-specific parameter. In case of HOUGH_GRADIENT and HOUGH_GRADIENT_ALT, it is the higher threshold of the two passed to the Canny edge detector (the lower one is twice smaller). Note that HOUGH_GRADIENT_ALT uses Scharr algorithm to compute image derivatives, so the threshold value should normally be higher, such as 300 or normally exposed and contrasty images.
param2Second method-specific parameter. In case of HOUGH_GRADIENT, it is the accumulator threshold for the circle centers at the detection stage. The smaller it is, the more false circles may be detected. Circles, corresponding to the larger accumulator values, will be returned first. In the case of HOUGH_GRADIENT_ALT algorithm, this is the circle "perfectness" measure. The closer it to 1, the better shaped circles algorithm selects. In most cases 0.9 should be fine. If you want get better detection of small circles, you may decrease it to 0.85, 0.8 or even less. But then also try to limit the search range [minRadius, maxRadius] to avoid many false circles.
minRadiusMinimum circle radius.
maxRadiusMaximum circle radius. If <= 0, uses the maximum image dimension. If < 0, HOUGH_GRADIENT returns centers without finding the radius. HOUGH_GRADIENT_ALT always computes circle radiuses.
See also
fitEllipse, minEnclosingCircle

◆ HoughCircles() [3/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughCircles ( Mat image,
Mat circles,
int method,
double dp,
double minDist,
double param1,
double param2 )
static

Finds circles in a grayscale image using the Hough transform.

The function finds circles in a grayscale image using a modification of the Hough transform.

Example: :

Note
Usually the function detects the centers of circles well. However, it may fail to find correct radii. You can assist to the function by specifying the radius range ( minRadius and maxRadius ) if you know it. Or, in the case of HOUGH_GRADIENT method you may set maxRadius to a negative number to return centers only without radius search, and find the correct radius using an additional procedure.

It also helps to smooth image a bit unless it's already soft. For example, GaussianBlur() with 7x7 kernel and 1.5x1.5 sigma or similar blurring may help.

Parameters
image8-bit, single-channel, grayscale input image.
circlesOutput vector of found circles. Each vector is encoded as 3 or 4 element floating-point vector \((x, y, radius)\) or \((x, y, radius, votes)\) .
methodDetection method, see #HoughModes. The available methods are HOUGH_GRADIENT and HOUGH_GRADIENT_ALT.
dpInverse ratio of the accumulator resolution to the image resolution. For example, if dp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has half as big width and height. For HOUGH_GRADIENT_ALT the recommended value is dp=1.5, unless some small very circles need to be detected.
minDistMinimum distance between the centers of the detected circles. If the parameter is too small, multiple neighbor circles may be falsely detected in addition to a true one. If it is too large, some circles may be missed.
param1First method-specific parameter. In case of HOUGH_GRADIENT and HOUGH_GRADIENT_ALT, it is the higher threshold of the two passed to the Canny edge detector (the lower one is twice smaller). Note that HOUGH_GRADIENT_ALT uses Scharr algorithm to compute image derivatives, so the threshold value should normally be higher, such as 300 or normally exposed and contrasty images.
param2Second method-specific parameter. In case of HOUGH_GRADIENT, it is the accumulator threshold for the circle centers at the detection stage. The smaller it is, the more false circles may be detected. Circles, corresponding to the larger accumulator values, will be returned first. In the case of HOUGH_GRADIENT_ALT algorithm, this is the circle "perfectness" measure. The closer it to 1, the better shaped circles algorithm selects. In most cases 0.9 should be fine. If you want get better detection of small circles, you may decrease it to 0.85, 0.8 or even less. But then also try to limit the search range [minRadius, maxRadius] to avoid many false circles.
minRadiusMinimum circle radius.
maxRadiusMaximum circle radius. If <= 0, uses the maximum image dimension. If < 0, HOUGH_GRADIENT returns centers without finding the radius. HOUGH_GRADIENT_ALT always computes circle radiuses.
See also
fitEllipse, minEnclosingCircle

◆ HoughCircles() [4/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughCircles ( Mat image,
Mat circles,
int method,
double dp,
double minDist,
double param1,
double param2,
int minRadius )
static

Finds circles in a grayscale image using the Hough transform.

The function finds circles in a grayscale image using a modification of the Hough transform.

Example: :

Note
Usually the function detects the centers of circles well. However, it may fail to find correct radii. You can assist to the function by specifying the radius range ( minRadius and maxRadius ) if you know it. Or, in the case of HOUGH_GRADIENT method you may set maxRadius to a negative number to return centers only without radius search, and find the correct radius using an additional procedure.

It also helps to smooth image a bit unless it's already soft. For example, GaussianBlur() with 7x7 kernel and 1.5x1.5 sigma or similar blurring may help.

Parameters
image8-bit, single-channel, grayscale input image.
circlesOutput vector of found circles. Each vector is encoded as 3 or 4 element floating-point vector \((x, y, radius)\) or \((x, y, radius, votes)\) .
methodDetection method, see #HoughModes. The available methods are HOUGH_GRADIENT and HOUGH_GRADIENT_ALT.
dpInverse ratio of the accumulator resolution to the image resolution. For example, if dp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has half as big width and height. For HOUGH_GRADIENT_ALT the recommended value is dp=1.5, unless some small very circles need to be detected.
minDistMinimum distance between the centers of the detected circles. If the parameter is too small, multiple neighbor circles may be falsely detected in addition to a true one. If it is too large, some circles may be missed.
param1First method-specific parameter. In case of HOUGH_GRADIENT and HOUGH_GRADIENT_ALT, it is the higher threshold of the two passed to the Canny edge detector (the lower one is twice smaller). Note that HOUGH_GRADIENT_ALT uses Scharr algorithm to compute image derivatives, so the threshold value should normally be higher, such as 300 or normally exposed and contrasty images.
param2Second method-specific parameter. In case of HOUGH_GRADIENT, it is the accumulator threshold for the circle centers at the detection stage. The smaller it is, the more false circles may be detected. Circles, corresponding to the larger accumulator values, will be returned first. In the case of HOUGH_GRADIENT_ALT algorithm, this is the circle "perfectness" measure. The closer it to 1, the better shaped circles algorithm selects. In most cases 0.9 should be fine. If you want get better detection of small circles, you may decrease it to 0.85, 0.8 or even less. But then also try to limit the search range [minRadius, maxRadius] to avoid many false circles.
minRadiusMinimum circle radius.
maxRadiusMaximum circle radius. If <= 0, uses the maximum image dimension. If < 0, HOUGH_GRADIENT returns centers without finding the radius. HOUGH_GRADIENT_ALT always computes circle radiuses.
See also
fitEllipse, minEnclosingCircle

◆ HoughCircles() [5/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughCircles ( Mat image,
Mat circles,
int method,
double dp,
double minDist,
double param1,
double param2,
int minRadius,
int maxRadius )
static

Finds circles in a grayscale image using the Hough transform.

The function finds circles in a grayscale image using a modification of the Hough transform.

Example: :

Note
Usually the function detects the centers of circles well. However, it may fail to find correct radii. You can assist to the function by specifying the radius range ( minRadius and maxRadius ) if you know it. Or, in the case of HOUGH_GRADIENT method you may set maxRadius to a negative number to return centers only without radius search, and find the correct radius using an additional procedure.

It also helps to smooth image a bit unless it's already soft. For example, GaussianBlur() with 7x7 kernel and 1.5x1.5 sigma or similar blurring may help.

Parameters
image8-bit, single-channel, grayscale input image.
circlesOutput vector of found circles. Each vector is encoded as 3 or 4 element floating-point vector \((x, y, radius)\) or \((x, y, radius, votes)\) .
methodDetection method, see #HoughModes. The available methods are HOUGH_GRADIENT and HOUGH_GRADIENT_ALT.
dpInverse ratio of the accumulator resolution to the image resolution. For example, if dp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has half as big width and height. For HOUGH_GRADIENT_ALT the recommended value is dp=1.5, unless some small very circles need to be detected.
minDistMinimum distance between the centers of the detected circles. If the parameter is too small, multiple neighbor circles may be falsely detected in addition to a true one. If it is too large, some circles may be missed.
param1First method-specific parameter. In case of HOUGH_GRADIENT and HOUGH_GRADIENT_ALT, it is the higher threshold of the two passed to the Canny edge detector (the lower one is twice smaller). Note that HOUGH_GRADIENT_ALT uses Scharr algorithm to compute image derivatives, so the threshold value should normally be higher, such as 300 or normally exposed and contrasty images.
param2Second method-specific parameter. In case of HOUGH_GRADIENT, it is the accumulator threshold for the circle centers at the detection stage. The smaller it is, the more false circles may be detected. Circles, corresponding to the larger accumulator values, will be returned first. In the case of HOUGH_GRADIENT_ALT algorithm, this is the circle "perfectness" measure. The closer it to 1, the better shaped circles algorithm selects. In most cases 0.9 should be fine. If you want get better detection of small circles, you may decrease it to 0.85, 0.8 or even less. But then also try to limit the search range [minRadius, maxRadius] to avoid many false circles.
minRadiusMinimum circle radius.
maxRadiusMaximum circle radius. If <= 0, uses the maximum image dimension. If < 0, HOUGH_GRADIENT returns centers without finding the radius. HOUGH_GRADIENT_ALT always computes circle radiuses.
See also
fitEllipse, minEnclosingCircle

◆ HoughLines() [1/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughLines ( Mat image,
Mat lines,
double rho,
double theta,
int threshold )
static

Finds lines in a binary image using the standard Hough transform.

The function implements the standard or standard multi-scale Hough transform algorithm for line detection. See <http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm&gt; for a good explanation of Hough transform.

Parameters
image8-bit, single-channel binary source image. The image may be modified by the function.
linesOutput vector of lines. Each line is represented by a 2 or 3 element vector \((\rho, \theta)\) or \((\rho, \theta, \textrm{votes})\), where \(\rho\) is the distance from the coordinate origin \((0,0)\) (top-left corner of the image), \(\theta\) is the line rotation angle in radians ( \(0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}\) ), and \(\textrm{votes}\) is the value of accumulator.
rhoDistance resolution of the accumulator in pixels.
thetaAngle resolution of the accumulator in radians.
thresholdAccumulator threshold parameter. Only those lines are returned that get enough votes ( \(>\texttt{threshold}\) ).
srnFor the multi-scale Hough transform, it is a divisor for the distance resolution rho. The coarse accumulator distance resolution is rho and the accurate accumulator resolution is rho/srn. If both srn=0 and stn=0, the classical Hough transform is used. Otherwise, both these parameters should be positive.
stnFor the multi-scale Hough transform, it is a divisor for the distance resolution theta.
min_thetaFor standard and multi-scale Hough transform, minimum angle to check for lines. Must fall between 0 and max_theta.
max_thetaFor standard and multi-scale Hough transform, an upper bound for the angle. Must fall between min_theta and CV_PI. The actual maximum angle in the accumulator may be slightly less than max_theta, depending on the parameters min_theta and theta.

◆ HoughLines() [2/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughLines ( Mat image,
Mat lines,
double rho,
double theta,
int threshold,
double srn )
static

Finds lines in a binary image using the standard Hough transform.

The function implements the standard or standard multi-scale Hough transform algorithm for line detection. See <http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm&gt; for a good explanation of Hough transform.

Parameters
image8-bit, single-channel binary source image. The image may be modified by the function.
linesOutput vector of lines. Each line is represented by a 2 or 3 element vector \((\rho, \theta)\) or \((\rho, \theta, \textrm{votes})\), where \(\rho\) is the distance from the coordinate origin \((0,0)\) (top-left corner of the image), \(\theta\) is the line rotation angle in radians ( \(0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}\) ), and \(\textrm{votes}\) is the value of accumulator.
rhoDistance resolution of the accumulator in pixels.
thetaAngle resolution of the accumulator in radians.
thresholdAccumulator threshold parameter. Only those lines are returned that get enough votes ( \(>\texttt{threshold}\) ).
srnFor the multi-scale Hough transform, it is a divisor for the distance resolution rho. The coarse accumulator distance resolution is rho and the accurate accumulator resolution is rho/srn. If both srn=0 and stn=0, the classical Hough transform is used. Otherwise, both these parameters should be positive.
stnFor the multi-scale Hough transform, it is a divisor for the distance resolution theta.
min_thetaFor standard and multi-scale Hough transform, minimum angle to check for lines. Must fall between 0 and max_theta.
max_thetaFor standard and multi-scale Hough transform, an upper bound for the angle. Must fall between min_theta and CV_PI. The actual maximum angle in the accumulator may be slightly less than max_theta, depending on the parameters min_theta and theta.

◆ HoughLines() [3/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughLines ( Mat image,
Mat lines,
double rho,
double theta,
int threshold,
double srn,
double stn )
static

Finds lines in a binary image using the standard Hough transform.

The function implements the standard or standard multi-scale Hough transform algorithm for line detection. See <http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm&gt; for a good explanation of Hough transform.

Parameters
image8-bit, single-channel binary source image. The image may be modified by the function.
linesOutput vector of lines. Each line is represented by a 2 or 3 element vector \((\rho, \theta)\) or \((\rho, \theta, \textrm{votes})\), where \(\rho\) is the distance from the coordinate origin \((0,0)\) (top-left corner of the image), \(\theta\) is the line rotation angle in radians ( \(0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}\) ), and \(\textrm{votes}\) is the value of accumulator.
rhoDistance resolution of the accumulator in pixels.
thetaAngle resolution of the accumulator in radians.
thresholdAccumulator threshold parameter. Only those lines are returned that get enough votes ( \(>\texttt{threshold}\) ).
srnFor the multi-scale Hough transform, it is a divisor for the distance resolution rho. The coarse accumulator distance resolution is rho and the accurate accumulator resolution is rho/srn. If both srn=0 and stn=0, the classical Hough transform is used. Otherwise, both these parameters should be positive.
stnFor the multi-scale Hough transform, it is a divisor for the distance resolution theta.
min_thetaFor standard and multi-scale Hough transform, minimum angle to check for lines. Must fall between 0 and max_theta.
max_thetaFor standard and multi-scale Hough transform, an upper bound for the angle. Must fall between min_theta and CV_PI. The actual maximum angle in the accumulator may be slightly less than max_theta, depending on the parameters min_theta and theta.

◆ HoughLines() [4/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughLines ( Mat image,
Mat lines,
double rho,
double theta,
int threshold,
double srn,
double stn,
double min_theta )
static

Finds lines in a binary image using the standard Hough transform.

The function implements the standard or standard multi-scale Hough transform algorithm for line detection. See <http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm&gt; for a good explanation of Hough transform.

Parameters
image8-bit, single-channel binary source image. The image may be modified by the function.
linesOutput vector of lines. Each line is represented by a 2 or 3 element vector \((\rho, \theta)\) or \((\rho, \theta, \textrm{votes})\), where \(\rho\) is the distance from the coordinate origin \((0,0)\) (top-left corner of the image), \(\theta\) is the line rotation angle in radians ( \(0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}\) ), and \(\textrm{votes}\) is the value of accumulator.
rhoDistance resolution of the accumulator in pixels.
thetaAngle resolution of the accumulator in radians.
thresholdAccumulator threshold parameter. Only those lines are returned that get enough votes ( \(>\texttt{threshold}\) ).
srnFor the multi-scale Hough transform, it is a divisor for the distance resolution rho. The coarse accumulator distance resolution is rho and the accurate accumulator resolution is rho/srn. If both srn=0 and stn=0, the classical Hough transform is used. Otherwise, both these parameters should be positive.
stnFor the multi-scale Hough transform, it is a divisor for the distance resolution theta.
min_thetaFor standard and multi-scale Hough transform, minimum angle to check for lines. Must fall between 0 and max_theta.
max_thetaFor standard and multi-scale Hough transform, an upper bound for the angle. Must fall between min_theta and CV_PI. The actual maximum angle in the accumulator may be slightly less than max_theta, depending on the parameters min_theta and theta.

◆ HoughLines() [5/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughLines ( Mat image,
Mat lines,
double rho,
double theta,
int threshold,
double srn,
double stn,
double min_theta,
double max_theta )
static

Finds lines in a binary image using the standard Hough transform.

The function implements the standard or standard multi-scale Hough transform algorithm for line detection. See <http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm&gt; for a good explanation of Hough transform.

Parameters
image8-bit, single-channel binary source image. The image may be modified by the function.
linesOutput vector of lines. Each line is represented by a 2 or 3 element vector \((\rho, \theta)\) or \((\rho, \theta, \textrm{votes})\), where \(\rho\) is the distance from the coordinate origin \((0,0)\) (top-left corner of the image), \(\theta\) is the line rotation angle in radians ( \(0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}\) ), and \(\textrm{votes}\) is the value of accumulator.
rhoDistance resolution of the accumulator in pixels.
thetaAngle resolution of the accumulator in radians.
thresholdAccumulator threshold parameter. Only those lines are returned that get enough votes ( \(>\texttt{threshold}\) ).
srnFor the multi-scale Hough transform, it is a divisor for the distance resolution rho. The coarse accumulator distance resolution is rho and the accurate accumulator resolution is rho/srn. If both srn=0 and stn=0, the classical Hough transform is used. Otherwise, both these parameters should be positive.
stnFor the multi-scale Hough transform, it is a divisor for the distance resolution theta.
min_thetaFor standard and multi-scale Hough transform, minimum angle to check for lines. Must fall between 0 and max_theta.
max_thetaFor standard and multi-scale Hough transform, an upper bound for the angle. Must fall between min_theta and CV_PI. The actual maximum angle in the accumulator may be slightly less than max_theta, depending on the parameters min_theta and theta.

◆ HoughLinesP() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughLinesP ( Mat image,
Mat lines,
double rho,
double theta,
int threshold )
static

Finds line segments in a binary image using the probabilistic Hough transform.

The function implements the probabilistic Hough transform algorithm for line detection, described in [Matas00]

See the line detection example below:

This is a sample picture the function parameters have been tuned for:

image

And this is the output of the above program in case of the probabilistic Hough transform:

Parameters
image8-bit, single-channel binary source image. The image may be modified by the function.
linesOutput vector of lines. Each line is represented by a 4-element vector \((x_1, y_1, x_2, y_2)\) , where \((x_1,y_1)\) and \((x_2, y_2)\) are the ending points of each detected line segment.
rhoDistance resolution of the accumulator in pixels.
thetaAngle resolution of the accumulator in radians.
thresholdAccumulator threshold parameter. Only those lines are returned that get enough votes ( \(>\texttt{threshold}\) ).
minLineLengthMinimum line length. Line segments shorter than that are rejected.
maxLineGapMaximum allowed gap between points on the same line to link them.
See also
LineSegmentDetector

◆ HoughLinesP() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughLinesP ( Mat image,
Mat lines,
double rho,
double theta,
int threshold,
double minLineLength )
static

Finds line segments in a binary image using the probabilistic Hough transform.

The function implements the probabilistic Hough transform algorithm for line detection, described in [Matas00]

See the line detection example below:

This is a sample picture the function parameters have been tuned for:

image

And this is the output of the above program in case of the probabilistic Hough transform:

Parameters
image8-bit, single-channel binary source image. The image may be modified by the function.
linesOutput vector of lines. Each line is represented by a 4-element vector \((x_1, y_1, x_2, y_2)\) , where \((x_1,y_1)\) and \((x_2, y_2)\) are the ending points of each detected line segment.
rhoDistance resolution of the accumulator in pixels.
thetaAngle resolution of the accumulator in radians.
thresholdAccumulator threshold parameter. Only those lines are returned that get enough votes ( \(>\texttt{threshold}\) ).
minLineLengthMinimum line length. Line segments shorter than that are rejected.
maxLineGapMaximum allowed gap between points on the same line to link them.
See also
LineSegmentDetector

◆ HoughLinesP() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughLinesP ( Mat image,
Mat lines,
double rho,
double theta,
int threshold,
double minLineLength,
double maxLineGap )
static

Finds line segments in a binary image using the probabilistic Hough transform.

The function implements the probabilistic Hough transform algorithm for line detection, described in [Matas00]

See the line detection example below:

This is a sample picture the function parameters have been tuned for:

image

And this is the output of the above program in case of the probabilistic Hough transform:

Parameters
image8-bit, single-channel binary source image. The image may be modified by the function.
linesOutput vector of lines. Each line is represented by a 4-element vector \((x_1, y_1, x_2, y_2)\) , where \((x_1,y_1)\) and \((x_2, y_2)\) are the ending points of each detected line segment.
rhoDistance resolution of the accumulator in pixels.
thetaAngle resolution of the accumulator in radians.
thresholdAccumulator threshold parameter. Only those lines are returned that get enough votes ( \(>\texttt{threshold}\) ).
minLineLengthMinimum line length. Line segments shorter than that are rejected.
maxLineGapMaximum allowed gap between points on the same line to link them.
See also
LineSegmentDetector

◆ HoughLinesPointSet()

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughLinesPointSet ( Mat point,
Mat lines,
int lines_max,
int threshold,
double min_rho,
double max_rho,
double rho_step,
double min_theta,
double max_theta,
double theta_step )
static

Finds lines in a set of points using the standard Hough transform.

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

Parameters
pointInput vector of points. Each vector must be encoded as a Point vector \((x,y)\). Type must be CV_32FC2 or CV_32SC2.
linesOutput vector of found lines. Each vector is encoded as a vector<Vec3d> \((votes, rho, theta)\). The larger the value of 'votes', the higher the reliability of the Hough line.
lines_maxMax count of Hough lines.
thresholdAccumulator threshold parameter. Only those lines are returned that get enough votes ( \(>\texttt{threshold}\) ).
min_rhoMinimum value for \(\rho\) for the accumulator (Note: \(\rho\) can be negative. The absolute value \(|\rho|\) is the distance of a line to the origin.).
max_rhoMaximum value for \(\rho\) for the accumulator.
rho_stepDistance resolution of the accumulator.
min_thetaMinimum angle value of the accumulator in radians.
max_thetaUpper bound for the angle value of the accumulator in radians. The actual maximum angle may be slightly less than max_theta, depending on the parameters min_theta and theta_step.
theta_stepAngle resolution of the accumulator in radians.

◆ HoughLinesWithAccumulator() [1/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughLinesWithAccumulator ( Mat image,
Mat lines,
double rho,
double theta,
int threshold )
static

Finds lines in a binary image using the standard Hough transform and get accumulator.

Note
This function is for bindings use only. Use original function in C++ code
See also
HoughLines

◆ HoughLinesWithAccumulator() [2/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughLinesWithAccumulator ( Mat image,
Mat lines,
double rho,
double theta,
int threshold,
double srn )
static

Finds lines in a binary image using the standard Hough transform and get accumulator.

Note
This function is for bindings use only. Use original function in C++ code
See also
HoughLines

◆ HoughLinesWithAccumulator() [3/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughLinesWithAccumulator ( Mat image,
Mat lines,
double rho,
double theta,
int threshold,
double srn,
double stn )
static

Finds lines in a binary image using the standard Hough transform and get accumulator.

Note
This function is for bindings use only. Use original function in C++ code
See also
HoughLines

◆ HoughLinesWithAccumulator() [4/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughLinesWithAccumulator ( Mat image,
Mat lines,
double rho,
double theta,
int threshold,
double srn,
double stn,
double min_theta )
static

Finds lines in a binary image using the standard Hough transform and get accumulator.

Note
This function is for bindings use only. Use original function in C++ code
See also
HoughLines

◆ HoughLinesWithAccumulator() [5/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.HoughLinesWithAccumulator ( Mat image,
Mat lines,
double rho,
double theta,
int threshold,
double srn,
double stn,
double min_theta,
double max_theta )
static

Finds lines in a binary image using the standard Hough transform and get accumulator.

Note
This function is for bindings use only. Use original function in C++ code
See also
HoughLines

◆ HuMoments() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.HuMoments ( in Vec10d m,
Mat hu )
static

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

◆ HuMoments() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.HuMoments ( in(double m00, double m10, double m01, double m20, double m11, double m02, double m30, double m21, double m12, double m03) m,
Mat hu )
static

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

◆ HuMoments() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.HuMoments ( Moments m,
Mat hu )
static

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

◆ integral() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.integral ( Mat src,
Mat sum )
static

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

◆ integral() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.integral ( Mat src,
Mat sum,
int sdepth )
static

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

◆ integral2() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.integral2 ( Mat src,
Mat sum,
Mat sqsum )
static

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

◆ integral2() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.integral2 ( Mat src,
Mat sum,
Mat sqsum,
int sdepth )
static

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

◆ integral2() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.integral2 ( Mat src,
Mat sum,
Mat sqsum,
int sdepth,
int sqdepth )
static

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

◆ integral3() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.integral3 ( Mat src,
Mat sum,
Mat sqsum,
Mat tilted )
static

Calculates the integral of an image.

The function calculates one or more integral images for the source image as follows:

\[\texttt{sum} (X,Y) = \sum _{x<X,y<Y} \texttt{image} (x,y)\]

\[\texttt{sqsum} (X,Y) = \sum _{x<X,y<Y} \texttt{image} (x,y)^2\]

\[\texttt{tilted} (X,Y) = \sum _{y<Y,abs(x-X+1) \leq Y-y-1} \texttt{image} (x,y)\]

Using these integral images, you can calculate sum, mean, and standard deviation over a specific up-right or rotated rectangular region of the image in a constant time, for example:

\[\sum _{x_1 \leq x < x_2, \, y_1 \leq y < y_2} \texttt{image} (x,y) = \texttt{sum} (x_2,y_2)- \texttt{sum} (x_1,y_2)- \texttt{sum} (x_2,y_1)+ \texttt{sum} (x_1,y_1)\]

It makes possible to do a fast blurring or fast block correlation with a variable window size, for example. In case of multi-channel images, sums for each channel are accumulated independently.

As a practical example, the next figure shows the calculation of the integral of a straight rectangle Rect(4,4,3,2) and of a tilted rectangle Rect(5,1,2,3) . The selected pixels in the original image are shown, as well as the relative pixels in the integral images sum and tilted .

Parameters
srcinput image as \(W \times H\), 8-bit or floating-point (32f or 64f).
sumintegral image as \((W+1)\times (H+1)\) , 32-bit integer or floating-point (32f or 64f).
sqsumintegral image for squared pixel values; it is \((W+1)\times (H+1)\), double-precision floating-point (64f) array.
tiltedintegral for the image rotated by 45 degrees; it is \((W+1)\times (H+1)\) array with the same data type as sum.
sdepthdesired depth of the integral and the tilted integral images, CV_32S, CV_32F, or CV_64F.
sqdepthdesired depth of the integral image of squared pixel values, CV_32F or CV_64F.

◆ integral3() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.integral3 ( Mat src,
Mat sum,
Mat sqsum,
Mat tilted,
int sdepth )
static

Calculates the integral of an image.

The function calculates one or more integral images for the source image as follows:

\[\texttt{sum} (X,Y) = \sum _{x<X,y<Y} \texttt{image} (x,y)\]

\[\texttt{sqsum} (X,Y) = \sum _{x<X,y<Y} \texttt{image} (x,y)^2\]

\[\texttt{tilted} (X,Y) = \sum _{y<Y,abs(x-X+1) \leq Y-y-1} \texttt{image} (x,y)\]

Using these integral images, you can calculate sum, mean, and standard deviation over a specific up-right or rotated rectangular region of the image in a constant time, for example:

\[\sum _{x_1 \leq x < x_2, \, y_1 \leq y < y_2} \texttt{image} (x,y) = \texttt{sum} (x_2,y_2)- \texttt{sum} (x_1,y_2)- \texttt{sum} (x_2,y_1)+ \texttt{sum} (x_1,y_1)\]

It makes possible to do a fast blurring or fast block correlation with a variable window size, for example. In case of multi-channel images, sums for each channel are accumulated independently.

As a practical example, the next figure shows the calculation of the integral of a straight rectangle Rect(4,4,3,2) and of a tilted rectangle Rect(5,1,2,3) . The selected pixels in the original image are shown, as well as the relative pixels in the integral images sum and tilted .

Parameters
srcinput image as \(W \times H\), 8-bit or floating-point (32f or 64f).
sumintegral image as \((W+1)\times (H+1)\) , 32-bit integer or floating-point (32f or 64f).
sqsumintegral image for squared pixel values; it is \((W+1)\times (H+1)\), double-precision floating-point (64f) array.
tiltedintegral for the image rotated by 45 degrees; it is \((W+1)\times (H+1)\) array with the same data type as sum.
sdepthdesired depth of the integral and the tilted integral images, CV_32S, CV_32F, or CV_64F.
sqdepthdesired depth of the integral image of squared pixel values, CV_32F or CV_64F.

◆ integral3() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.integral3 ( Mat src,
Mat sum,
Mat sqsum,
Mat tilted,
int sdepth,
int sqdepth )
static

Calculates the integral of an image.

The function calculates one or more integral images for the source image as follows:

\[\texttt{sum} (X,Y) = \sum _{x<X,y<Y} \texttt{image} (x,y)\]

\[\texttt{sqsum} (X,Y) = \sum _{x<X,y<Y} \texttt{image} (x,y)^2\]

\[\texttt{tilted} (X,Y) = \sum _{y<Y,abs(x-X+1) \leq Y-y-1} \texttt{image} (x,y)\]

Using these integral images, you can calculate sum, mean, and standard deviation over a specific up-right or rotated rectangular region of the image in a constant time, for example:

\[\sum _{x_1 \leq x < x_2, \, y_1 \leq y < y_2} \texttt{image} (x,y) = \texttt{sum} (x_2,y_2)- \texttt{sum} (x_1,y_2)- \texttt{sum} (x_2,y_1)+ \texttt{sum} (x_1,y_1)\]

It makes possible to do a fast blurring or fast block correlation with a variable window size, for example. In case of multi-channel images, sums for each channel are accumulated independently.

As a practical example, the next figure shows the calculation of the integral of a straight rectangle Rect(4,4,3,2) and of a tilted rectangle Rect(5,1,2,3) . The selected pixels in the original image are shown, as well as the relative pixels in the integral images sum and tilted .

Parameters
srcinput image as \(W \times H\), 8-bit or floating-point (32f or 64f).
sumintegral image as \((W+1)\times (H+1)\) , 32-bit integer or floating-point (32f or 64f).
sqsumintegral image for squared pixel values; it is \((W+1)\times (H+1)\), double-precision floating-point (64f) array.
tiltedintegral for the image rotated by 45 degrees; it is \((W+1)\times (H+1)\) array with the same data type as sum.
sdepthdesired depth of the integral and the tilted integral images, CV_32S, CV_32F, or CV_64F.
sqdepthdesired depth of the integral image of squared pixel values, CV_32F or CV_64F.

◆ intersectConvexConvex() [1/2]

static float OpenCVForUnity.ImgprocModule.Imgproc.intersectConvexConvex ( Mat p1,
Mat p2,
Mat p12 )
static

Finds intersection of two convex polygons.

Parameters
p1First polygon
p2Second polygon
p12Output polygon describing the intersecting area
handleNestedWhen true, an intersection is found if one of the polygons is fully enclosed in the other. When false, no intersection is found. If the polygons share a side or the vertex of one polygon lies on an edge of the other, they are not considered nested and an intersection will be found regardless of the value of handleNested.
Returns
Absolute value of area of intersecting polygon
Note
intersectConvexConvex doesn't confirm that both polygons are convex and will return invalid results if they aren't.

◆ intersectConvexConvex() [2/2]

static float OpenCVForUnity.ImgprocModule.Imgproc.intersectConvexConvex ( Mat p1,
Mat p2,
Mat p12,
bool handleNested )
static

Finds intersection of two convex polygons.

Parameters
p1First polygon
p2Second polygon
p12Output polygon describing the intersecting area
handleNestedWhen true, an intersection is found if one of the polygons is fully enclosed in the other. When false, no intersection is found. If the polygons share a side or the vertex of one polygon lies on an edge of the other, they are not considered nested and an intersection will be found regardless of the value of handleNested.
Returns
Absolute value of area of intersecting polygon
Note
intersectConvexConvex doesn't confirm that both polygons are convex and will return invalid results if they aren't.

◆ invertAffineTransform()

static void OpenCVForUnity.ImgprocModule.Imgproc.invertAffineTransform ( Mat M,
Mat iM )
static

Inverts an affine transformation.

The function computes an inverse affine transformation represented by \(2 \times 3\) matrix M:

\[\begin{bmatrix} a_{11} & a_{12} & b_1 \\ a_{21} & a_{22} & b_2 \end{bmatrix}\]

The result is also a \(2 \times 3\) matrix of the same type as M.

Parameters
MOriginal affine transformation.
iMOutput reverse affine transformation.

◆ isContourConvex()

static bool OpenCVForUnity.ImgprocModule.Imgproc.isContourConvex ( MatOfPoint contour)
static

Tests a contour convexity.

The function tests whether the input contour is convex or not. The contour must be simple, that is, without self-intersections. Otherwise, the function output is undefined.

Parameters
contourInput vector of 2D points, stored in std::vector<> or Mat

◆ Laplacian() [1/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Laplacian ( Mat src,
Mat dst,
int ddepth )
static

Calculates the Laplacian of an image.

The function calculates the Laplacian of the source image by adding up the second x and y derivatives calculated using the Sobel operator:

\[\texttt{dst} = \Delta \texttt{src} = \frac{\partial^2 \texttt{src}}{\partial x^2} + \frac{\partial^2 \texttt{src}}{\partial y^2}\]

This is done when ksize &gt; 1. When ksize == 1, the Laplacian is computed by filtering the image with the following \(3 \times 3\) aperture:

\[\vecthreethree {0}{1}{0}{1}{-4}{1}{0}{1}{0}\]

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDesired depth of the destination image, see combinations.
ksizeAperture size used to compute the second-derivative filters. See getDerivKernels for details. The size must be positive and odd.
scaleOptional scale factor for the computed Laplacian values. By default, no scaling is applied. See getDerivKernels for details.
deltaOptional delta value that is added to the results prior to storing them in dst .
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

Sobel, Scharr

◆ Laplacian() [2/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Laplacian ( Mat src,
Mat dst,
int ddepth,
int ksize )
static

Calculates the Laplacian of an image.

The function calculates the Laplacian of the source image by adding up the second x and y derivatives calculated using the Sobel operator:

\[\texttt{dst} = \Delta \texttt{src} = \frac{\partial^2 \texttt{src}}{\partial x^2} + \frac{\partial^2 \texttt{src}}{\partial y^2}\]

This is done when ksize &gt; 1. When ksize == 1, the Laplacian is computed by filtering the image with the following \(3 \times 3\) aperture:

\[\vecthreethree {0}{1}{0}{1}{-4}{1}{0}{1}{0}\]

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDesired depth of the destination image, see combinations.
ksizeAperture size used to compute the second-derivative filters. See getDerivKernels for details. The size must be positive and odd.
scaleOptional scale factor for the computed Laplacian values. By default, no scaling is applied. See getDerivKernels for details.
deltaOptional delta value that is added to the results prior to storing them in dst .
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

Sobel, Scharr

◆ Laplacian() [3/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Laplacian ( Mat src,
Mat dst,
int ddepth,
int ksize,
double scale )
static

Calculates the Laplacian of an image.

The function calculates the Laplacian of the source image by adding up the second x and y derivatives calculated using the Sobel operator:

\[\texttt{dst} = \Delta \texttt{src} = \frac{\partial^2 \texttt{src}}{\partial x^2} + \frac{\partial^2 \texttt{src}}{\partial y^2}\]

This is done when ksize &gt; 1. When ksize == 1, the Laplacian is computed by filtering the image with the following \(3 \times 3\) aperture:

\[\vecthreethree {0}{1}{0}{1}{-4}{1}{0}{1}{0}\]

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDesired depth of the destination image, see combinations.
ksizeAperture size used to compute the second-derivative filters. See getDerivKernels for details. The size must be positive and odd.
scaleOptional scale factor for the computed Laplacian values. By default, no scaling is applied. See getDerivKernels for details.
deltaOptional delta value that is added to the results prior to storing them in dst .
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

Sobel, Scharr

◆ Laplacian() [4/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Laplacian ( Mat src,
Mat dst,
int ddepth,
int ksize,
double scale,
double delta )
static

Calculates the Laplacian of an image.

The function calculates the Laplacian of the source image by adding up the second x and y derivatives calculated using the Sobel operator:

\[\texttt{dst} = \Delta \texttt{src} = \frac{\partial^2 \texttt{src}}{\partial x^2} + \frac{\partial^2 \texttt{src}}{\partial y^2}\]

This is done when ksize &gt; 1. When ksize == 1, the Laplacian is computed by filtering the image with the following \(3 \times 3\) aperture:

\[\vecthreethree {0}{1}{0}{1}{-4}{1}{0}{1}{0}\]

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDesired depth of the destination image, see combinations.
ksizeAperture size used to compute the second-derivative filters. See getDerivKernels for details. The size must be positive and odd.
scaleOptional scale factor for the computed Laplacian values. By default, no scaling is applied. See getDerivKernels for details.
deltaOptional delta value that is added to the results prior to storing them in dst .
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

Sobel, Scharr

◆ Laplacian() [5/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Laplacian ( Mat src,
Mat dst,
int ddepth,
int ksize,
double scale,
double delta,
int borderType )
static

Calculates the Laplacian of an image.

The function calculates the Laplacian of the source image by adding up the second x and y derivatives calculated using the Sobel operator:

\[\texttt{dst} = \Delta \texttt{src} = \frac{\partial^2 \texttt{src}}{\partial x^2} + \frac{\partial^2 \texttt{src}}{\partial y^2}\]

This is done when ksize &gt; 1. When ksize == 1, the Laplacian is computed by filtering the image with the following \(3 \times 3\) aperture:

\[\vecthreethree {0}{1}{0}{1}{-4}{1}{0}{1}{0}\]

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDesired depth of the destination image, see combinations.
ksizeAperture size used to compute the second-derivative filters. See getDerivKernels for details. The size must be positive and odd.
scaleOptional scale factor for the computed Laplacian values. By default, no scaling is applied. See getDerivKernels for details.
deltaOptional delta value that is added to the results prior to storing them in dst .
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

Sobel, Scharr

◆ line() [1/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.line ( Mat img,
in Vec2d pt1,
in Vec2d pt2,
in Vec4d color )
static

Draws a line segment connecting two points.

The function line draws the line segment between pt1 and pt2 points in the image. The line is clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering.

Parameters
imgImage.
pt1First point of the line segment.
pt2Second point of the line segment.
colorLine color.
thicknessLine thickness.
lineTypeType of the line. See #LineTypes.
shiftNumber of fractional bits in the point coordinates.

◆ line() [2/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.line ( Mat img,
in Vec2d pt1,
in Vec2d pt2,
in Vec4d color,
int thickness )
static

Draws a line segment connecting two points.

The function line draws the line segment between pt1 and pt2 points in the image. The line is clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering.

Parameters
imgImage.
pt1First point of the line segment.
pt2Second point of the line segment.
colorLine color.
thicknessLine thickness.
lineTypeType of the line. See #LineTypes.
shiftNumber of fractional bits in the point coordinates.

◆ line() [3/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.line ( Mat img,
in Vec2d pt1,
in Vec2d pt2,
in Vec4d color,
int thickness,
int lineType )
static

Draws a line segment connecting two points.

The function line draws the line segment between pt1 and pt2 points in the image. The line is clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering.

Parameters
imgImage.
pt1First point of the line segment.
pt2Second point of the line segment.
colorLine color.
thicknessLine thickness.
lineTypeType of the line. See #LineTypes.
shiftNumber of fractional bits in the point coordinates.

◆ line() [4/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.line ( Mat img,
in Vec2d pt1,
in Vec2d pt2,
in Vec4d color,
int thickness,
int lineType,
int shift )
static

Draws a line segment connecting two points.

The function line draws the line segment between pt1 and pt2 points in the image. The line is clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering.

Parameters
imgImage.
pt1First point of the line segment.
pt2Second point of the line segment.
colorLine color.
thicknessLine thickness.
lineTypeType of the line. See #LineTypes.
shiftNumber of fractional bits in the point coordinates.

◆ line() [5/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.line ( Mat img,
in(double x, double y) pt1,
in(double x, double y) pt2,
in(double v0, double v1, double v2, double v3) color )
static

Draws a line segment connecting two points.

The function line draws the line segment between pt1 and pt2 points in the image. The line is clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering.

Parameters
imgImage.
pt1First point of the line segment.
pt2Second point of the line segment.
colorLine color.
thicknessLine thickness.
lineTypeType of the line. See #LineTypes.
shiftNumber of fractional bits in the point coordinates.

◆ line() [6/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.line ( Mat img,
in(double x, double y) pt1,
in(double x, double y) pt2,
in(double v0, double v1, double v2, double v3) color,
int thickness )
static

Draws a line segment connecting two points.

The function line draws the line segment between pt1 and pt2 points in the image. The line is clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering.

Parameters
imgImage.
pt1First point of the line segment.
pt2Second point of the line segment.
colorLine color.
thicknessLine thickness.
lineTypeType of the line. See #LineTypes.
shiftNumber of fractional bits in the point coordinates.

◆ line() [7/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.line ( Mat img,
in(double x, double y) pt1,
in(double x, double y) pt2,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType )
static

Draws a line segment connecting two points.

The function line draws the line segment between pt1 and pt2 points in the image. The line is clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering.

Parameters
imgImage.
pt1First point of the line segment.
pt2Second point of the line segment.
colorLine color.
thicknessLine thickness.
lineTypeType of the line. See #LineTypes.
shiftNumber of fractional bits in the point coordinates.

◆ line() [8/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.line ( Mat img,
in(double x, double y) pt1,
in(double x, double y) pt2,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType,
int shift )
static

Draws a line segment connecting two points.

The function line draws the line segment between pt1 and pt2 points in the image. The line is clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering.

Parameters
imgImage.
pt1First point of the line segment.
pt2Second point of the line segment.
colorLine color.
thicknessLine thickness.
lineTypeType of the line. See #LineTypes.
shiftNumber of fractional bits in the point coordinates.

◆ line() [9/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.line ( Mat img,
Point pt1,
Point pt2,
Scalar color )
static

Draws a line segment connecting two points.

The function line draws the line segment between pt1 and pt2 points in the image. The line is clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering.

Parameters
imgImage.
pt1First point of the line segment.
pt2Second point of the line segment.
colorLine color.
thicknessLine thickness.
lineTypeType of the line. See #LineTypes.
shiftNumber of fractional bits in the point coordinates.

◆ line() [10/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.line ( Mat img,
Point pt1,
Point pt2,
Scalar color,
int thickness )
static

Draws a line segment connecting two points.

The function line draws the line segment between pt1 and pt2 points in the image. The line is clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering.

Parameters
imgImage.
pt1First point of the line segment.
pt2Second point of the line segment.
colorLine color.
thicknessLine thickness.
lineTypeType of the line. See #LineTypes.
shiftNumber of fractional bits in the point coordinates.

◆ line() [11/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.line ( Mat img,
Point pt1,
Point pt2,
Scalar color,
int thickness,
int lineType )
static

Draws a line segment connecting two points.

The function line draws the line segment between pt1 and pt2 points in the image. The line is clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering.

Parameters
imgImage.
pt1First point of the line segment.
pt2Second point of the line segment.
colorLine color.
thicknessLine thickness.
lineTypeType of the line. See #LineTypes.
shiftNumber of fractional bits in the point coordinates.

◆ line() [12/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.line ( Mat img,
Point pt1,
Point pt2,
Scalar color,
int thickness,
int lineType,
int shift )
static

Draws a line segment connecting two points.

The function line draws the line segment between pt1 and pt2 points in the image. The line is clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering.

Parameters
imgImage.
pt1First point of the line segment.
pt2Second point of the line segment.
colorLine color.
thicknessLine thickness.
lineTypeType of the line. See #LineTypes.
shiftNumber of fractional bits in the point coordinates.

◆ linearPolar() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.linearPolar ( Mat src,
Mat dst,
in Vec2d center,
double maxRadius,
int flags )
static

Remaps an image to polar coordinates space.

Deprecated
This function produces same result as cv::warpPolar(src, dst, src.size(), center, maxRadius, flags)

◆ linearPolar() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.linearPolar ( Mat src,
Mat dst,
in(double x, double y) center,
double maxRadius,
int flags )
static

Remaps an image to polar coordinates space.

Deprecated
This function produces same result as cv::warpPolar(src, dst, src.size(), center, maxRadius, flags)

◆ linearPolar() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.linearPolar ( Mat src,
Mat dst,
Point center,
double maxRadius,
int flags )
static

Remaps an image to polar coordinates space.

Deprecated
This function produces same result as cv::warpPolar(src, dst, src.size(), center, maxRadius, flags)

◆ logPolar() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.logPolar ( Mat src,
Mat dst,
in Vec2d center,
double M,
int flags )
static

Remaps an image to semilog-polar coordinates space.

Deprecated
This function produces same result as cv::warpPolar(src, dst, src.size(), center, maxRadius, flags+WARP_POLAR_LOG);

◆ logPolar() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.logPolar ( Mat src,
Mat dst,
in(double x, double y) center,
double M,
int flags )
static

Remaps an image to semilog-polar coordinates space.

Deprecated
This function produces same result as cv::warpPolar(src, dst, src.size(), center, maxRadius, flags+WARP_POLAR_LOG);

◆ logPolar() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.logPolar ( Mat src,
Mat dst,
Point center,
double M,
int flags )
static

Remaps an image to semilog-polar coordinates space.

Deprecated
This function produces same result as cv::warpPolar(src, dst, src.size(), center, maxRadius, flags+WARP_POLAR_LOG);

◆ matchShapes()

static double OpenCVForUnity.ImgprocModule.Imgproc.matchShapes ( Mat contour1,
Mat contour2,
int method,
double parameter )
static

Compares two shapes.

The function compares two shapes. All three implemented methods use the Hu invariants (see HuMoments)

Parameters
contour1First contour or grayscale image.
contour2Second contour or grayscale image.
methodComparison method, see #ShapeMatchModes
parameterMethod-specific parameter (not supported now).

◆ matchTemplate() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.matchTemplate ( Mat image,
Mat templ,
Mat result,
int method )
static

Compares a template against overlapped image regions.

The function slides through image , compares the overlapped patches of size \(w \times h\) against templ using the specified method and stores the comparison results in result . #TemplateMatchModes describes the formulae for the available comparison methods ( \(I\) denotes image, \(T\) template, \(R\) result, \(M\) the optional mask ). The summation is done over template and/or the image patch: \(x' = 0...w-1, y' = 0...h-1\)

After the function finishes the comparison, the best matches can be found as global minimums (when TM_SQDIFF was used) or maximums (when TM_CCORR or TM_CCOEFF was used) using the #minMaxLoc function. In case of a color image, template summation in the numerator and each sum in the denominator is done over all of the channels and separate mean values are used for each channel. That is, the function can take a color template and a color image. The result will still be a single-channel image, which is easier to analyze.

Parameters
imageImage where the search is running. It must be 8-bit or 32-bit floating-point.
templSearched template. It must be not greater than the source image and have the same data type.
resultMap of comparison results. It must be single-channel 32-bit floating-point. If image is \(W \times H\) and templ is \(w \times h\) , then result is \((W-w+1) \times (H-h+1)\) .
methodParameter specifying the comparison method, see #TemplateMatchModes
maskOptional mask. It must have the same size as templ. It must either have the same number of channels as template or only one channel, which is then used for all template and image channels. If the data type is #CV_8U, the mask is interpreted as a binary mask, meaning only elements where mask is nonzero are used and are kept unchanged independent of the actual mask value (weight equals 1). For data tpye #CV_32F, the mask values are used as weights. The exact formulas are documented in #TemplateMatchModes.

◆ matchTemplate() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.matchTemplate ( Mat image,
Mat templ,
Mat result,
int method,
Mat mask )
static

Compares a template against overlapped image regions.

The function slides through image , compares the overlapped patches of size \(w \times h\) against templ using the specified method and stores the comparison results in result . #TemplateMatchModes describes the formulae for the available comparison methods ( \(I\) denotes image, \(T\) template, \(R\) result, \(M\) the optional mask ). The summation is done over template and/or the image patch: \(x' = 0...w-1, y' = 0...h-1\)

After the function finishes the comparison, the best matches can be found as global minimums (when TM_SQDIFF was used) or maximums (when TM_CCORR or TM_CCOEFF was used) using the #minMaxLoc function. In case of a color image, template summation in the numerator and each sum in the denominator is done over all of the channels and separate mean values are used for each channel. That is, the function can take a color template and a color image. The result will still be a single-channel image, which is easier to analyze.

Parameters
imageImage where the search is running. It must be 8-bit or 32-bit floating-point.
templSearched template. It must be not greater than the source image and have the same data type.
resultMap of comparison results. It must be single-channel 32-bit floating-point. If image is \(W \times H\) and templ is \(w \times h\) , then result is \((W-w+1) \times (H-h+1)\) .
methodParameter specifying the comparison method, see #TemplateMatchModes
maskOptional mask. It must have the same size as templ. It must either have the same number of channels as template or only one channel, which is then used for all template and image channels. If the data type is #CV_8U, the mask is interpreted as a binary mask, meaning only elements where mask is nonzero are used and are kept unchanged independent of the actual mask value (weight equals 1). For data tpye #CV_32F, the mask values are used as weights. The exact formulas are documented in #TemplateMatchModes.

◆ medianBlur()

static void OpenCVForUnity.ImgprocModule.Imgproc.medianBlur ( Mat src,
Mat dst,
int ksize )
static

Blurs an image using the median filter.

The function smoothes an image using the median filter with the \(\texttt{ksize} \times \texttt{ksize}\) aperture. Each channel of a multi-channel image is processed independently. In-place operation is supported.

Note
The median filter uses #BORDER_REPLICATE internally to cope with border pixels, see #BorderTypes
Parameters
srcinput 1-, 3-, or 4-channel image; when ksize is 3 or 5, the image depth should be CV_8U, CV_16U, or CV_32F, for larger aperture sizes, it can only be CV_8U.
dstdestination array of the same size and type as src.
ksizeaperture linear size; it must be odd and greater than 1, for example: 3, 5, 7 ...

bilateralFilter, blur, boxFilter, GaussianBlur

◆ minAreaRect()

static RotatedRect OpenCVForUnity.ImgprocModule.Imgproc.minAreaRect ( MatOfPoint2f points)
static

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

The function calculates and returns the minimum-area bounding rectangle (possibly rotated) for a specified point set. Developer should keep in mind that the returned RotatedRect can contain negative indices when data is close to the containing Mat element boundary.

Parameters
pointsInput vector of 2D points, stored in std::vector<> or Mat

◆ minAreaRectAsValueTuple()

static double double double double double angle OpenCVForUnity.ImgprocModule.Imgproc.minAreaRectAsValueTuple ( MatOfPoint2f points)
static

◆ minAreaRectAsVec5d()

static Vec5d OpenCVForUnity.ImgprocModule.Imgproc.minAreaRectAsVec5d ( MatOfPoint2f points)
static

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

The function calculates and returns the minimum-area bounding rectangle (possibly rotated) for a specified point set. Developer should keep in mind that the returned RotatedRect can contain negative indices when data is close to the containing Mat element boundary.

Parameters
pointsInput vector of 2D points, stored in std::vector<> or Mat

◆ minEnclosingCircle() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.minEnclosingCircle ( MatOfPoint2f points,
out Vec2d center,
float[] radius )
static

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

The function finds the minimal enclosing circle of a 2D point set using an iterative algorithm.

Parameters
pointsInput vector of 2D points, stored in std::vector<> or Mat
centerOutput center of the circle.
radiusOutput radius of the circle.

◆ minEnclosingCircle() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.minEnclosingCircle ( MatOfPoint2f points,
out(double x, double y) center,
float[] radius )
static

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

The function finds the minimal enclosing circle of a 2D point set using an iterative algorithm.

Parameters
pointsInput vector of 2D points, stored in std::vector<> or Mat
centerOutput center of the circle.
radiusOutput radius of the circle.

◆ minEnclosingCircle() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.minEnclosingCircle ( MatOfPoint2f points,
Point center,
float[] radius )
static

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

The function finds the minimal enclosing circle of a 2D point set using an iterative algorithm.

Parameters
pointsInput vector of 2D points, stored in std::vector<> or Mat
centerOutput center of the circle.
radiusOutput radius of the circle.

◆ minEnclosingTriangle()

static double OpenCVForUnity.ImgprocModule.Imgproc.minEnclosingTriangle ( Mat points,
Mat triangle )
static

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

The function finds a triangle of minimum area enclosing the given set of 2D points and returns its area. The output for a given 2D point set is shown in the image below. 2D points are depicted in red* and the enclosing triangle in yellow.

Sample output of the minimum enclosing triangle function

The implementation of the algorithm is based on O'Rourke's [ORourke86] and Klee and Laskowski's [KleeLaskowski85] papers. O'Rourke provides a \(\theta(n)\) algorithm for finding the minimal enclosing triangle of a 2D convex polygon with n vertices. Since the minEnclosingTriangle function takes a 2D point set as input an additional preprocessing step of computing the convex hull of the 2D point set is required. The complexity of the convexHull function is \(O(n log(n))\) which is higher than \(\theta(n)\). Thus the overall complexity of the function is \(O(n log(n))\).

Parameters
pointsInput vector of 2D points with depth CV_32S or CV_32F, stored in std::vector<> or Mat
triangleOutput vector of three 2D points defining the vertices of the triangle. The depth of the OutputArray must be CV_32F.

◆ moments() [1/2]

static Moments OpenCVForUnity.ImgprocModule.Imgproc.moments ( Mat array)
static

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

The function computes moments, up to the 3rd order, of a vector shape or a rasterized shape. The results are returned in the structure cv::Moments.

Parameters
arraySingle chanel raster image (CV_8U, CV_16U, CV_16S, CV_32F, CV_64F) or an array ( \(1 \times N\) or \(N \times 1\) ) of 2D points (Point or Point2f).
binaryImageIf it is true, all non-zero image pixels are treated as 1's. The parameter is used for images only.
Returns
moments.
Note
Only applicable to contour moments calculations from Python bindings: Note that the numpy type for the input array should be either np.int32 or np.float32.
See also
contourArea, arcLength

◆ moments() [2/2]

static Moments OpenCVForUnity.ImgprocModule.Imgproc.moments ( Mat array,
bool binaryImage )
static

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

The function computes moments, up to the 3rd order, of a vector shape or a rasterized shape. The results are returned in the structure cv::Moments.

Parameters
arraySingle chanel raster image (CV_8U, CV_16U, CV_16S, CV_32F, CV_64F) or an array ( \(1 \times N\) or \(N \times 1\) ) of 2D points (Point or Point2f).
binaryImageIf it is true, all non-zero image pixels are treated as 1's. The parameter is used for images only.
Returns
moments.
Note
Only applicable to contour moments calculations from Python bindings: Note that the numpy type for the input array should be either np.int32 or np.float32.
See also
contourArea, arcLength

◆ momentsAsValueTuple() [1/2]

static double double double double double double double double double double m03 OpenCVForUnity.ImgprocModule.Imgproc.momentsAsValueTuple ( Mat array)
static

◆ momentsAsValueTuple() [2/2]

static double double double double double double double double double double m03 OpenCVForUnity.ImgprocModule.Imgproc.momentsAsValueTuple ( Mat array,
bool binaryImage )
static

◆ momentsAsVec10d() [1/2]

static Vec10d OpenCVForUnity.ImgprocModule.Imgproc.momentsAsVec10d ( Mat array)
static

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

The function computes moments, up to the 3rd order, of a vector shape or a rasterized shape. The results are returned in the structure cv::Moments.

Parameters
arraySingle chanel raster image (CV_8U, CV_16U, CV_16S, CV_32F, CV_64F) or an array ( \(1 \times N\) or \(N \times 1\) ) of 2D points (Point or Point2f).
binaryImageIf it is true, all non-zero image pixels are treated as 1's. The parameter is used for images only.
Returns
moments.
Note
Only applicable to contour moments calculations from Python bindings: Note that the numpy type for the input array should be either np.int32 or np.float32.
See also
contourArea, arcLength

◆ momentsAsVec10d() [2/2]

static Vec10d OpenCVForUnity.ImgprocModule.Imgproc.momentsAsVec10d ( Mat array,
bool binaryImage )
static

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

The function computes moments, up to the 3rd order, of a vector shape or a rasterized shape. The results are returned in the structure cv::Moments.

Parameters
arraySingle chanel raster image (CV_8U, CV_16U, CV_16S, CV_32F, CV_64F) or an array ( \(1 \times N\) or \(N \times 1\) ) of 2D points (Point or Point2f).
binaryImageIf it is true, all non-zero image pixels are treated as 1's. The parameter is used for images only.
Returns
moments.
Note
Only applicable to contour moments calculations from Python bindings: Note that the numpy type for the input array should be either np.int32 or np.float32.
See also
contourArea, arcLength

◆ morphologyEx() [1/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.morphologyEx ( Mat src,
Mat dst,
int op,
Mat kernel )
static

Performs advanced morphological transformations.

The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as basic operations.

Any of the operations can be done in-place. In case of multi-channel images, each channel is processed independently.

Parameters
srcSource image. The number of channels can be arbitrary. The depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstDestination image of the same size and type as source image.
opType of a morphological operation, see #MorphTypes
kernelStructuring element. It can be created using getStructuringElement.
anchorAnchor position with the kernel. Negative values mean that the anchor is at the kernel center.
iterationsNumber of times erosion and dilation are applied.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueBorder value in case of a constant border. The default value has a special meaning.

dilate, erode, getStructuringElement

Note
The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).

◆ morphologyEx() [2/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.morphologyEx ( Mat src,
Mat dst,
int op,
Mat kernel,
in Vec2d anchor )
static

Performs advanced morphological transformations.

The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as basic operations.

Any of the operations can be done in-place. In case of multi-channel images, each channel is processed independently.

Parameters
srcSource image. The number of channels can be arbitrary. The depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstDestination image of the same size and type as source image.
opType of a morphological operation, see #MorphTypes
kernelStructuring element. It can be created using getStructuringElement.
anchorAnchor position with the kernel. Negative values mean that the anchor is at the kernel center.
iterationsNumber of times erosion and dilation are applied.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueBorder value in case of a constant border. The default value has a special meaning.

dilate, erode, getStructuringElement

Note
The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).

◆ morphologyEx() [3/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.morphologyEx ( Mat src,
Mat dst,
int op,
Mat kernel,
in Vec2d anchor,
int iterations )
static

Performs advanced morphological transformations.

The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as basic operations.

Any of the operations can be done in-place. In case of multi-channel images, each channel is processed independently.

Parameters
srcSource image. The number of channels can be arbitrary. The depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstDestination image of the same size and type as source image.
opType of a morphological operation, see #MorphTypes
kernelStructuring element. It can be created using getStructuringElement.
anchorAnchor position with the kernel. Negative values mean that the anchor is at the kernel center.
iterationsNumber of times erosion and dilation are applied.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueBorder value in case of a constant border. The default value has a special meaning.

dilate, erode, getStructuringElement

Note
The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).

◆ morphologyEx() [4/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.morphologyEx ( Mat src,
Mat dst,
int op,
Mat kernel,
in Vec2d anchor,
int iterations,
int borderType )
static

Performs advanced morphological transformations.

The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as basic operations.

Any of the operations can be done in-place. In case of multi-channel images, each channel is processed independently.

Parameters
srcSource image. The number of channels can be arbitrary. The depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstDestination image of the same size and type as source image.
opType of a morphological operation, see #MorphTypes
kernelStructuring element. It can be created using getStructuringElement.
anchorAnchor position with the kernel. Negative values mean that the anchor is at the kernel center.
iterationsNumber of times erosion and dilation are applied.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueBorder value in case of a constant border. The default value has a special meaning.

dilate, erode, getStructuringElement

Note
The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).

◆ morphologyEx() [5/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.morphologyEx ( Mat src,
Mat dst,
int op,
Mat kernel,
in Vec2d anchor,
int iterations,
int borderType,
in Vec4d borderValue )
static

Performs advanced morphological transformations.

The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as basic operations.

Any of the operations can be done in-place. In case of multi-channel images, each channel is processed independently.

Parameters
srcSource image. The number of channels can be arbitrary. The depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstDestination image of the same size and type as source image.
opType of a morphological operation, see #MorphTypes
kernelStructuring element. It can be created using getStructuringElement.
anchorAnchor position with the kernel. Negative values mean that the anchor is at the kernel center.
iterationsNumber of times erosion and dilation are applied.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueBorder value in case of a constant border. The default value has a special meaning.

dilate, erode, getStructuringElement

Note
The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).

◆ morphologyEx() [6/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.morphologyEx ( Mat src,
Mat dst,
int op,
Mat kernel,
in(double x, double y) anchor )
static

Performs advanced morphological transformations.

The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as basic operations.

Any of the operations can be done in-place. In case of multi-channel images, each channel is processed independently.

Parameters
srcSource image. The number of channels can be arbitrary. The depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstDestination image of the same size and type as source image.
opType of a morphological operation, see #MorphTypes
kernelStructuring element. It can be created using getStructuringElement.
anchorAnchor position with the kernel. Negative values mean that the anchor is at the kernel center.
iterationsNumber of times erosion and dilation are applied.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueBorder value in case of a constant border. The default value has a special meaning.

dilate, erode, getStructuringElement

Note
The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).

◆ morphologyEx() [7/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.morphologyEx ( Mat src,
Mat dst,
int op,
Mat kernel,
in(double x, double y) anchor,
int iterations )
static

Performs advanced morphological transformations.

The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as basic operations.

Any of the operations can be done in-place. In case of multi-channel images, each channel is processed independently.

Parameters
srcSource image. The number of channels can be arbitrary. The depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstDestination image of the same size and type as source image.
opType of a morphological operation, see #MorphTypes
kernelStructuring element. It can be created using getStructuringElement.
anchorAnchor position with the kernel. Negative values mean that the anchor is at the kernel center.
iterationsNumber of times erosion and dilation are applied.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueBorder value in case of a constant border. The default value has a special meaning.

dilate, erode, getStructuringElement

Note
The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).

◆ morphologyEx() [8/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.morphologyEx ( Mat src,
Mat dst,
int op,
Mat kernel,
in(double x, double y) anchor,
int iterations,
int borderType )
static

Performs advanced morphological transformations.

The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as basic operations.

Any of the operations can be done in-place. In case of multi-channel images, each channel is processed independently.

Parameters
srcSource image. The number of channels can be arbitrary. The depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstDestination image of the same size and type as source image.
opType of a morphological operation, see #MorphTypes
kernelStructuring element. It can be created using getStructuringElement.
anchorAnchor position with the kernel. Negative values mean that the anchor is at the kernel center.
iterationsNumber of times erosion and dilation are applied.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueBorder value in case of a constant border. The default value has a special meaning.

dilate, erode, getStructuringElement

Note
The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).

◆ morphologyEx() [9/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.morphologyEx ( Mat src,
Mat dst,
int op,
Mat kernel,
in(double x, double y) anchor,
int iterations,
int borderType,
in(double v0, double v1, double v2, double v3) borderValue )
static

Performs advanced morphological transformations.

The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as basic operations.

Any of the operations can be done in-place. In case of multi-channel images, each channel is processed independently.

Parameters
srcSource image. The number of channels can be arbitrary. The depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstDestination image of the same size and type as source image.
opType of a morphological operation, see #MorphTypes
kernelStructuring element. It can be created using getStructuringElement.
anchorAnchor position with the kernel. Negative values mean that the anchor is at the kernel center.
iterationsNumber of times erosion and dilation are applied.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueBorder value in case of a constant border. The default value has a special meaning.

dilate, erode, getStructuringElement

Note
The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).

◆ morphologyEx() [10/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.morphologyEx ( Mat src,
Mat dst,
int op,
Mat kernel,
Point anchor )
static

Performs advanced morphological transformations.

The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as basic operations.

Any of the operations can be done in-place. In case of multi-channel images, each channel is processed independently.

Parameters
srcSource image. The number of channels can be arbitrary. The depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstDestination image of the same size and type as source image.
opType of a morphological operation, see #MorphTypes
kernelStructuring element. It can be created using getStructuringElement.
anchorAnchor position with the kernel. Negative values mean that the anchor is at the kernel center.
iterationsNumber of times erosion and dilation are applied.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueBorder value in case of a constant border. The default value has a special meaning.

dilate, erode, getStructuringElement

Note
The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).

◆ morphologyEx() [11/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.morphologyEx ( Mat src,
Mat dst,
int op,
Mat kernel,
Point anchor,
int iterations )
static

Performs advanced morphological transformations.

The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as basic operations.

Any of the operations can be done in-place. In case of multi-channel images, each channel is processed independently.

Parameters
srcSource image. The number of channels can be arbitrary. The depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstDestination image of the same size and type as source image.
opType of a morphological operation, see #MorphTypes
kernelStructuring element. It can be created using getStructuringElement.
anchorAnchor position with the kernel. Negative values mean that the anchor is at the kernel center.
iterationsNumber of times erosion and dilation are applied.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueBorder value in case of a constant border. The default value has a special meaning.

dilate, erode, getStructuringElement

Note
The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).

◆ morphologyEx() [12/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.morphologyEx ( Mat src,
Mat dst,
int op,
Mat kernel,
Point anchor,
int iterations,
int borderType )
static

Performs advanced morphological transformations.

The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as basic operations.

Any of the operations can be done in-place. In case of multi-channel images, each channel is processed independently.

Parameters
srcSource image. The number of channels can be arbitrary. The depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstDestination image of the same size and type as source image.
opType of a morphological operation, see #MorphTypes
kernelStructuring element. It can be created using getStructuringElement.
anchorAnchor position with the kernel. Negative values mean that the anchor is at the kernel center.
iterationsNumber of times erosion and dilation are applied.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueBorder value in case of a constant border. The default value has a special meaning.

dilate, erode, getStructuringElement

Note
The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).

◆ morphologyEx() [13/13]

static void OpenCVForUnity.ImgprocModule.Imgproc.morphologyEx ( Mat src,
Mat dst,
int op,
Mat kernel,
Point anchor,
int iterations,
int borderType,
Scalar borderValue )
static

Performs advanced morphological transformations.

The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as basic operations.

Any of the operations can be done in-place. In case of multi-channel images, each channel is processed independently.

Parameters
srcSource image. The number of channels can be arbitrary. The depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
dstDestination image of the same size and type as source image.
opType of a morphological operation, see #MorphTypes
kernelStructuring element. It can be created using getStructuringElement.
anchorAnchor position with the kernel. Negative values mean that the anchor is at the kernel center.
iterationsNumber of times erosion and dilation are applied.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueBorder value in case of a constant border. The default value has a special meaning.

dilate, erode, getStructuringElement

Note
The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).

◆ phaseCorrelate() [1/3]

static Point OpenCVForUnity.ImgprocModule.Imgproc.phaseCorrelate ( Mat src1,
Mat src2 )
static

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

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

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

The function performs the following equations:

  • First it applies a Hanning window (see <http://en.wikipedia.org/wiki/Hann_function&gt;) to each image to remove possible edge effects. This window is cached until the array size changes to speed up processing time.
  • Next it computes the forward DFTs of each source array:

    \[\mathbf{G}_a = \mathcal{F}\{src_1\}, \; \mathbf{G}_b = \mathcal{F}\{src_2\}\]

    where \(\mathcal{F}\) is the forward DFT.
  • It then computes the cross-power spectrum of each frequency domain array:

    \[R = \frac{ \mathbf{G}_a \mathbf{G}_b^*}{|\mathbf{G}_a \mathbf{G}_b^*|}\]

  • Next the cross-correlation is converted back into the time domain via the inverse DFT:

    \[r = \mathcal{F}^{-1}\{R\}\]

  • Finally, it computes the peak location and computes a 5x5 weighted centroid around the peak to achieve sub-pixel accuracy.

    \[(\Delta x, \Delta y) = \texttt{weightedCentroid} \{\arg \max_{(x, y)}\{r\}\}\]

  • If non-zero, the response parameter is computed as the sum of the elements of r within the 5x5 centroid around the peak location. It is normalized to a maximum of 1 (meaning there is a single peak) and will be smaller when there are multiple peaks.
Parameters
src1Source floating point array (CV_32FC1 or CV_64FC1)
src2Source floating point array (CV_32FC1 or CV_64FC1)
windowFloating point array with windowing coefficients to reduce edge effects (optional).
responseSignal power within the 5x5 centroid around the peak, between 0 and 1 (optional).
Returns
detected phase shift (sub-pixel) between the two arrays.
See also
dft, getOptimalDFTSize, idft, mulSpectrums createHanningWindow

◆ phaseCorrelate() [2/3]

static Point OpenCVForUnity.ImgprocModule.Imgproc.phaseCorrelate ( Mat src1,
Mat src2,
Mat window )
static

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

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

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

The function performs the following equations:

  • First it applies a Hanning window (see <http://en.wikipedia.org/wiki/Hann_function&gt;) to each image to remove possible edge effects. This window is cached until the array size changes to speed up processing time.
  • Next it computes the forward DFTs of each source array:

    \[\mathbf{G}_a = \mathcal{F}\{src_1\}, \; \mathbf{G}_b = \mathcal{F}\{src_2\}\]

    where \(\mathcal{F}\) is the forward DFT.
  • It then computes the cross-power spectrum of each frequency domain array:

    \[R = \frac{ \mathbf{G}_a \mathbf{G}_b^*}{|\mathbf{G}_a \mathbf{G}_b^*|}\]

  • Next the cross-correlation is converted back into the time domain via the inverse DFT:

    \[r = \mathcal{F}^{-1}\{R\}\]

  • Finally, it computes the peak location and computes a 5x5 weighted centroid around the peak to achieve sub-pixel accuracy.

    \[(\Delta x, \Delta y) = \texttt{weightedCentroid} \{\arg \max_{(x, y)}\{r\}\}\]

  • If non-zero, the response parameter is computed as the sum of the elements of r within the 5x5 centroid around the peak location. It is normalized to a maximum of 1 (meaning there is a single peak) and will be smaller when there are multiple peaks.
Parameters
src1Source floating point array (CV_32FC1 or CV_64FC1)
src2Source floating point array (CV_32FC1 or CV_64FC1)
windowFloating point array with windowing coefficients to reduce edge effects (optional).
responseSignal power within the 5x5 centroid around the peak, between 0 and 1 (optional).
Returns
detected phase shift (sub-pixel) between the two arrays.
See also
dft, getOptimalDFTSize, idft, mulSpectrums createHanningWindow

◆ phaseCorrelate() [3/3]

static Point OpenCVForUnity.ImgprocModule.Imgproc.phaseCorrelate ( Mat src1,
Mat src2,
Mat window,
double[] response )
static

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

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

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

The function performs the following equations:

  • First it applies a Hanning window (see <http://en.wikipedia.org/wiki/Hann_function&gt;) to each image to remove possible edge effects. This window is cached until the array size changes to speed up processing time.
  • Next it computes the forward DFTs of each source array:

    \[\mathbf{G}_a = \mathcal{F}\{src_1\}, \; \mathbf{G}_b = \mathcal{F}\{src_2\}\]

    where \(\mathcal{F}\) is the forward DFT.
  • It then computes the cross-power spectrum of each frequency domain array:

    \[R = \frac{ \mathbf{G}_a \mathbf{G}_b^*}{|\mathbf{G}_a \mathbf{G}_b^*|}\]

  • Next the cross-correlation is converted back into the time domain via the inverse DFT:

    \[r = \mathcal{F}^{-1}\{R\}\]

  • Finally, it computes the peak location and computes a 5x5 weighted centroid around the peak to achieve sub-pixel accuracy.

    \[(\Delta x, \Delta y) = \texttt{weightedCentroid} \{\arg \max_{(x, y)}\{r\}\}\]

  • If non-zero, the response parameter is computed as the sum of the elements of r within the 5x5 centroid around the peak location. It is normalized to a maximum of 1 (meaning there is a single peak) and will be smaller when there are multiple peaks.
Parameters
src1Source floating point array (CV_32FC1 or CV_64FC1)
src2Source floating point array (CV_32FC1 or CV_64FC1)
windowFloating point array with windowing coefficients to reduce edge effects (optional).
responseSignal power within the 5x5 centroid around the peak, between 0 and 1 (optional).
Returns
detected phase shift (sub-pixel) between the two arrays.
See also
dft, getOptimalDFTSize, idft, mulSpectrums createHanningWindow

◆ phaseCorrelateAsValueTuple() [1/3]

static double double y OpenCVForUnity.ImgprocModule.Imgproc.phaseCorrelateAsValueTuple ( Mat src1,
Mat src2 )
static

◆ phaseCorrelateAsValueTuple() [2/3]

static double double y OpenCVForUnity.ImgprocModule.Imgproc.phaseCorrelateAsValueTuple ( Mat src1,
Mat src2,
Mat window )
static

◆ phaseCorrelateAsValueTuple() [3/3]

static double double y OpenCVForUnity.ImgprocModule.Imgproc.phaseCorrelateAsValueTuple ( Mat src1,
Mat src2,
Mat window,
double[] response )
static

◆ phaseCorrelateAsVec2d() [1/3]

static Vec2d OpenCVForUnity.ImgprocModule.Imgproc.phaseCorrelateAsVec2d ( Mat src1,
Mat src2 )
static

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

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

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

The function performs the following equations:

  • First it applies a Hanning window (see <http://en.wikipedia.org/wiki/Hann_function&gt;) to each image to remove possible edge effects. This window is cached until the array size changes to speed up processing time.
  • Next it computes the forward DFTs of each source array:

    \[\mathbf{G}_a = \mathcal{F}\{src_1\}, \; \mathbf{G}_b = \mathcal{F}\{src_2\}\]

    where \(\mathcal{F}\) is the forward DFT.
  • It then computes the cross-power spectrum of each frequency domain array:

    \[R = \frac{ \mathbf{G}_a \mathbf{G}_b^*}{|\mathbf{G}_a \mathbf{G}_b^*|}\]

  • Next the cross-correlation is converted back into the time domain via the inverse DFT:

    \[r = \mathcal{F}^{-1}\{R\}\]

  • Finally, it computes the peak location and computes a 5x5 weighted centroid around the peak to achieve sub-pixel accuracy.

    \[(\Delta x, \Delta y) = \texttt{weightedCentroid} \{\arg \max_{(x, y)}\{r\}\}\]

  • If non-zero, the response parameter is computed as the sum of the elements of r within the 5x5 centroid around the peak location. It is normalized to a maximum of 1 (meaning there is a single peak) and will be smaller when there are multiple peaks.
Parameters
src1Source floating point array (CV_32FC1 or CV_64FC1)
src2Source floating point array (CV_32FC1 or CV_64FC1)
windowFloating point array with windowing coefficients to reduce edge effects (optional).
responseSignal power within the 5x5 centroid around the peak, between 0 and 1 (optional).
Returns
detected phase shift (sub-pixel) between the two arrays.
See also
dft, getOptimalDFTSize, idft, mulSpectrums createHanningWindow

◆ phaseCorrelateAsVec2d() [2/3]

static Vec2d OpenCVForUnity.ImgprocModule.Imgproc.phaseCorrelateAsVec2d ( Mat src1,
Mat src2,
Mat window )
static

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

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

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

The function performs the following equations:

  • First it applies a Hanning window (see <http://en.wikipedia.org/wiki/Hann_function&gt;) to each image to remove possible edge effects. This window is cached until the array size changes to speed up processing time.
  • Next it computes the forward DFTs of each source array:

    \[\mathbf{G}_a = \mathcal{F}\{src_1\}, \; \mathbf{G}_b = \mathcal{F}\{src_2\}\]

    where \(\mathcal{F}\) is the forward DFT.
  • It then computes the cross-power spectrum of each frequency domain array:

    \[R = \frac{ \mathbf{G}_a \mathbf{G}_b^*}{|\mathbf{G}_a \mathbf{G}_b^*|}\]

  • Next the cross-correlation is converted back into the time domain via the inverse DFT:

    \[r = \mathcal{F}^{-1}\{R\}\]

  • Finally, it computes the peak location and computes a 5x5 weighted centroid around the peak to achieve sub-pixel accuracy.

    \[(\Delta x, \Delta y) = \texttt{weightedCentroid} \{\arg \max_{(x, y)}\{r\}\}\]

  • If non-zero, the response parameter is computed as the sum of the elements of r within the 5x5 centroid around the peak location. It is normalized to a maximum of 1 (meaning there is a single peak) and will be smaller when there are multiple peaks.
Parameters
src1Source floating point array (CV_32FC1 or CV_64FC1)
src2Source floating point array (CV_32FC1 or CV_64FC1)
windowFloating point array with windowing coefficients to reduce edge effects (optional).
responseSignal power within the 5x5 centroid around the peak, between 0 and 1 (optional).
Returns
detected phase shift (sub-pixel) between the two arrays.
See also
dft, getOptimalDFTSize, idft, mulSpectrums createHanningWindow

◆ phaseCorrelateAsVec2d() [3/3]

static Vec2d OpenCVForUnity.ImgprocModule.Imgproc.phaseCorrelateAsVec2d ( Mat src1,
Mat src2,
Mat window,
double[] response )
static

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

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

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

The function performs the following equations:

  • First it applies a Hanning window (see <http://en.wikipedia.org/wiki/Hann_function&gt;) to each image to remove possible edge effects. This window is cached until the array size changes to speed up processing time.
  • Next it computes the forward DFTs of each source array:

    \[\mathbf{G}_a = \mathcal{F}\{src_1\}, \; \mathbf{G}_b = \mathcal{F}\{src_2\}\]

    where \(\mathcal{F}\) is the forward DFT.
  • It then computes the cross-power spectrum of each frequency domain array:

    \[R = \frac{ \mathbf{G}_a \mathbf{G}_b^*}{|\mathbf{G}_a \mathbf{G}_b^*|}\]

  • Next the cross-correlation is converted back into the time domain via the inverse DFT:

    \[r = \mathcal{F}^{-1}\{R\}\]

  • Finally, it computes the peak location and computes a 5x5 weighted centroid around the peak to achieve sub-pixel accuracy.

    \[(\Delta x, \Delta y) = \texttt{weightedCentroid} \{\arg \max_{(x, y)}\{r\}\}\]

  • If non-zero, the response parameter is computed as the sum of the elements of r within the 5x5 centroid around the peak location. It is normalized to a maximum of 1 (meaning there is a single peak) and will be smaller when there are multiple peaks.
Parameters
src1Source floating point array (CV_32FC1 or CV_64FC1)
src2Source floating point array (CV_32FC1 or CV_64FC1)
windowFloating point array with windowing coefficients to reduce edge effects (optional).
responseSignal power within the 5x5 centroid around the peak, between 0 and 1 (optional).
Returns
detected phase shift (sub-pixel) between the two arrays.
See also
dft, getOptimalDFTSize, idft, mulSpectrums createHanningWindow

◆ pointPolygonTest() [1/3]

static double OpenCVForUnity.ImgprocModule.Imgproc.pointPolygonTest ( MatOfPoint2f contour,
in Vec2d pt,
bool measureDist )
static

Performs a point-in-contour test.

The function determines whether the point is inside a contour, outside, or lies on an edge (or coincides with a vertex). It returns positive (inside), negative (outside), or zero (on an edge) value, correspondingly. When measureDist=false , the return value is +1, -1, and 0, respectively. Otherwise, the return value is a signed distance between the point and the nearest contour edge.

See below a sample output of the function where each image pixel is tested against the contour:

Parameters
contourInput contour.
ptPoint tested against the contour.
measureDistIf true, the function estimates the signed distance from the point to the nearest contour edge. Otherwise, the function only checks if the point is inside a contour or not.

◆ pointPolygonTest() [2/3]

static double OpenCVForUnity.ImgprocModule.Imgproc.pointPolygonTest ( MatOfPoint2f contour,
in(double x, double y) pt,
bool measureDist )
static

Performs a point-in-contour test.

The function determines whether the point is inside a contour, outside, or lies on an edge (or coincides with a vertex). It returns positive (inside), negative (outside), or zero (on an edge) value, correspondingly. When measureDist=false , the return value is +1, -1, and 0, respectively. Otherwise, the return value is a signed distance between the point and the nearest contour edge.

See below a sample output of the function where each image pixel is tested against the contour:

Parameters
contourInput contour.
ptPoint tested against the contour.
measureDistIf true, the function estimates the signed distance from the point to the nearest contour edge. Otherwise, the function only checks if the point is inside a contour or not.

◆ pointPolygonTest() [3/3]

static double OpenCVForUnity.ImgprocModule.Imgproc.pointPolygonTest ( MatOfPoint2f contour,
Point pt,
bool measureDist )
static

Performs a point-in-contour test.

The function determines whether the point is inside a contour, outside, or lies on an edge (or coincides with a vertex). It returns positive (inside), negative (outside), or zero (on an edge) value, correspondingly. When measureDist=false , the return value is +1, -1, and 0, respectively. Otherwise, the return value is a signed distance between the point and the nearest contour edge.

See below a sample output of the function where each image pixel is tested against the contour:

Parameters
contourInput contour.
ptPoint tested against the contour.
measureDistIf true, the function estimates the signed distance from the point to the nearest contour edge. Otherwise, the function only checks if the point is inside a contour or not.

◆ polylines() [1/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.polylines ( Mat img,
List< MatOfPoint > pts,
bool isClosed,
in Vec4d color )
static

Draws several polygonal curves.

Parameters
imgImage.
ptsArray of polygonal curves.
isClosedFlag indicating whether the drawn polylines are closed or not. If they are closed, the function draws a line from the last vertex of each curve to its first vertex.
colorPolyline color.
thicknessThickness of the polyline edges.
lineTypeType of the line segments. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

The function cv::polylines draws one or more polygonal curves.

◆ polylines() [2/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.polylines ( Mat img,
List< MatOfPoint > pts,
bool isClosed,
in Vec4d color,
int thickness )
static

Draws several polygonal curves.

Parameters
imgImage.
ptsArray of polygonal curves.
isClosedFlag indicating whether the drawn polylines are closed or not. If they are closed, the function draws a line from the last vertex of each curve to its first vertex.
colorPolyline color.
thicknessThickness of the polyline edges.
lineTypeType of the line segments. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

The function cv::polylines draws one or more polygonal curves.

◆ polylines() [3/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.polylines ( Mat img,
List< MatOfPoint > pts,
bool isClosed,
in Vec4d color,
int thickness,
int lineType )
static

Draws several polygonal curves.

Parameters
imgImage.
ptsArray of polygonal curves.
isClosedFlag indicating whether the drawn polylines are closed or not. If they are closed, the function draws a line from the last vertex of each curve to its first vertex.
colorPolyline color.
thicknessThickness of the polyline edges.
lineTypeType of the line segments. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

The function cv::polylines draws one or more polygonal curves.

◆ polylines() [4/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.polylines ( Mat img,
List< MatOfPoint > pts,
bool isClosed,
in Vec4d color,
int thickness,
int lineType,
int shift )
static

Draws several polygonal curves.

Parameters
imgImage.
ptsArray of polygonal curves.
isClosedFlag indicating whether the drawn polylines are closed or not. If they are closed, the function draws a line from the last vertex of each curve to its first vertex.
colorPolyline color.
thicknessThickness of the polyline edges.
lineTypeType of the line segments. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

The function cv::polylines draws one or more polygonal curves.

◆ polylines() [5/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.polylines ( Mat img,
List< MatOfPoint > pts,
bool isClosed,
in(double v0, double v1, double v2, double v3) color )
static

Draws several polygonal curves.

Parameters
imgImage.
ptsArray of polygonal curves.
isClosedFlag indicating whether the drawn polylines are closed or not. If they are closed, the function draws a line from the last vertex of each curve to its first vertex.
colorPolyline color.
thicknessThickness of the polyline edges.
lineTypeType of the line segments. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

The function cv::polylines draws one or more polygonal curves.

◆ polylines() [6/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.polylines ( Mat img,
List< MatOfPoint > pts,
bool isClosed,
in(double v0, double v1, double v2, double v3) color,
int thickness )
static

Draws several polygonal curves.

Parameters
imgImage.
ptsArray of polygonal curves.
isClosedFlag indicating whether the drawn polylines are closed or not. If they are closed, the function draws a line from the last vertex of each curve to its first vertex.
colorPolyline color.
thicknessThickness of the polyline edges.
lineTypeType of the line segments. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

The function cv::polylines draws one or more polygonal curves.

◆ polylines() [7/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.polylines ( Mat img,
List< MatOfPoint > pts,
bool isClosed,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType )
static

Draws several polygonal curves.

Parameters
imgImage.
ptsArray of polygonal curves.
isClosedFlag indicating whether the drawn polylines are closed or not. If they are closed, the function draws a line from the last vertex of each curve to its first vertex.
colorPolyline color.
thicknessThickness of the polyline edges.
lineTypeType of the line segments. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

The function cv::polylines draws one or more polygonal curves.

◆ polylines() [8/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.polylines ( Mat img,
List< MatOfPoint > pts,
bool isClosed,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType,
int shift )
static

Draws several polygonal curves.

Parameters
imgImage.
ptsArray of polygonal curves.
isClosedFlag indicating whether the drawn polylines are closed or not. If they are closed, the function draws a line from the last vertex of each curve to its first vertex.
colorPolyline color.
thicknessThickness of the polyline edges.
lineTypeType of the line segments. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

The function cv::polylines draws one or more polygonal curves.

◆ polylines() [9/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.polylines ( Mat img,
List< MatOfPoint > pts,
bool isClosed,
Scalar color )
static

Draws several polygonal curves.

Parameters
imgImage.
ptsArray of polygonal curves.
isClosedFlag indicating whether the drawn polylines are closed or not. If they are closed, the function draws a line from the last vertex of each curve to its first vertex.
colorPolyline color.
thicknessThickness of the polyline edges.
lineTypeType of the line segments. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

The function cv::polylines draws one or more polygonal curves.

◆ polylines() [10/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.polylines ( Mat img,
List< MatOfPoint > pts,
bool isClosed,
Scalar color,
int thickness )
static

Draws several polygonal curves.

Parameters
imgImage.
ptsArray of polygonal curves.
isClosedFlag indicating whether the drawn polylines are closed or not. If they are closed, the function draws a line from the last vertex of each curve to its first vertex.
colorPolyline color.
thicknessThickness of the polyline edges.
lineTypeType of the line segments. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

The function cv::polylines draws one or more polygonal curves.

◆ polylines() [11/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.polylines ( Mat img,
List< MatOfPoint > pts,
bool isClosed,
Scalar color,
int thickness,
int lineType )
static

Draws several polygonal curves.

Parameters
imgImage.
ptsArray of polygonal curves.
isClosedFlag indicating whether the drawn polylines are closed or not. If they are closed, the function draws a line from the last vertex of each curve to its first vertex.
colorPolyline color.
thicknessThickness of the polyline edges.
lineTypeType of the line segments. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

The function cv::polylines draws one or more polygonal curves.

◆ polylines() [12/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.polylines ( Mat img,
List< MatOfPoint > pts,
bool isClosed,
Scalar color,
int thickness,
int lineType,
int shift )
static

Draws several polygonal curves.

Parameters
imgImage.
ptsArray of polygonal curves.
isClosedFlag indicating whether the drawn polylines are closed or not. If they are closed, the function draws a line from the last vertex of each curve to its first vertex.
colorPolyline color.
thicknessThickness of the polyline edges.
lineTypeType of the line segments. See #LineTypes
shiftNumber of fractional bits in the vertex coordinates.

The function cv::polylines draws one or more polygonal curves.

◆ preCornerDetect() [1/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.preCornerDetect ( Mat src,
Mat dst,
int ksize )
static

Calculates a feature map for corner detection.

The function calculates the complex spatial derivative-based function of the source image

\[\texttt{dst} = (D_x \texttt{src} )^2 \cdot D_{yy} \texttt{src} + (D_y \texttt{src} )^2 \cdot D_{xx} \texttt{src} - 2 D_x \texttt{src} \cdot D_y \texttt{src} \cdot D_{xy} \texttt{src}\]

where \(D_x\), \(D_y\) are the first image derivatives, \(D_{xx}\), \(D_{yy}\) are the second image derivatives, and \(D_{xy}\) is the mixed derivative.

The corners can be found as local maximums of the functions, as shown below:

Mat corners, dilated_corners;
preCornerDetect(image, corners, 3);
// dilation with 3x3 rectangular structuring element
dilate(corners, dilated_corners, Mat(), 1);
Mat corner_mask = corners == dilated_corners;
static void dilate(Mat src, Mat dst, Mat kernel, Point anchor, int iterations, int borderType, Scalar borderValue)
Dilates an image by using a specific structuring element.
Definition Imgproc.cs:6007
static void preCornerDetect(Mat src, Mat dst, int ksize, int borderType)
Calculates a feature map for corner detection.
Definition Imgproc.cs:4014
Parameters
srcSource single-channel 8-bit of floating-point image.
dstOutput image that has the type CV_32F and the same size as src .
ksizeAperture size of the Sobel .
borderTypePixel extrapolation method. See #BorderTypes. #BORDER_WRAP is not supported.

◆ preCornerDetect() [2/2]

static void OpenCVForUnity.ImgprocModule.Imgproc.preCornerDetect ( Mat src,
Mat dst,
int ksize,
int borderType )
static

Calculates a feature map for corner detection.

The function calculates the complex spatial derivative-based function of the source image

\[\texttt{dst} = (D_x \texttt{src} )^2 \cdot D_{yy} \texttt{src} + (D_y \texttt{src} )^2 \cdot D_{xx} \texttt{src} - 2 D_x \texttt{src} \cdot D_y \texttt{src} \cdot D_{xy} \texttt{src}\]

where \(D_x\), \(D_y\) are the first image derivatives, \(D_{xx}\), \(D_{yy}\) are the second image derivatives, and \(D_{xy}\) is the mixed derivative.

The corners can be found as local maximums of the functions, as shown below:

Mat corners, dilated_corners;
preCornerDetect(image, corners, 3);
// dilation with 3x3 rectangular structuring element
dilate(corners, dilated_corners, Mat(), 1);
Mat corner_mask = corners == dilated_corners;
Parameters
srcSource single-channel 8-bit of floating-point image.
dstOutput image that has the type CV_32F and the same size as src .
ksizeAperture size of the Sobel .
borderTypePixel extrapolation method. See #BorderTypes. #BORDER_WRAP is not supported.

◆ putText() [1/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.putText ( Mat img,
string text,
in Vec2d org,
int fontFace,
double fontScale,
in Vec4d color )
static

Draws a text string.

The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered using the specified font are replaced by question marks. See getTextSize for a text rendering code example.

Parameters
imgImage.
textText string to be drawn.
orgBottom-left corner of the text string in the image.
fontFaceFont type, see #HersheyFonts.
fontScaleFont scale factor that is multiplied by the font-specific base size.
colorText color.
thicknessThickness of the lines used to draw a text.
lineTypeLine type. See #LineTypes
bottomLeftOriginWhen true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner.

◆ putText() [2/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.putText ( Mat img,
string text,
in Vec2d org,
int fontFace,
double fontScale,
in Vec4d color,
int thickness )
static

Draws a text string.

The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered using the specified font are replaced by question marks. See getTextSize for a text rendering code example.

Parameters
imgImage.
textText string to be drawn.
orgBottom-left corner of the text string in the image.
fontFaceFont type, see #HersheyFonts.
fontScaleFont scale factor that is multiplied by the font-specific base size.
colorText color.
thicknessThickness of the lines used to draw a text.
lineTypeLine type. See #LineTypes
bottomLeftOriginWhen true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner.

◆ putText() [3/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.putText ( Mat img,
string text,
in Vec2d org,
int fontFace,
double fontScale,
in Vec4d color,
int thickness,
int lineType )
static

Draws a text string.

The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered using the specified font are replaced by question marks. See getTextSize for a text rendering code example.

Parameters
imgImage.
textText string to be drawn.
orgBottom-left corner of the text string in the image.
fontFaceFont type, see #HersheyFonts.
fontScaleFont scale factor that is multiplied by the font-specific base size.
colorText color.
thicknessThickness of the lines used to draw a text.
lineTypeLine type. See #LineTypes
bottomLeftOriginWhen true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner.

◆ putText() [4/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.putText ( Mat img,
string text,
in Vec2d org,
int fontFace,
double fontScale,
in Vec4d color,
int thickness,
int lineType,
bool bottomLeftOrigin )
static

Draws a text string.

The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered using the specified font are replaced by question marks. See getTextSize for a text rendering code example.

Parameters
imgImage.
textText string to be drawn.
orgBottom-left corner of the text string in the image.
fontFaceFont type, see #HersheyFonts.
fontScaleFont scale factor that is multiplied by the font-specific base size.
colorText color.
thicknessThickness of the lines used to draw a text.
lineTypeLine type. See #LineTypes
bottomLeftOriginWhen true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner.

◆ putText() [5/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.putText ( Mat img,
string text,
in(double x, double y) org,
int fontFace,
double fontScale,
in(double v0, double v1, double v2, double v3) color )
static

Draws a text string.

The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered using the specified font are replaced by question marks. See getTextSize for a text rendering code example.

Parameters
imgImage.
textText string to be drawn.
orgBottom-left corner of the text string in the image.
fontFaceFont type, see #HersheyFonts.
fontScaleFont scale factor that is multiplied by the font-specific base size.
colorText color.
thicknessThickness of the lines used to draw a text.
lineTypeLine type. See #LineTypes
bottomLeftOriginWhen true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner.

◆ putText() [6/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.putText ( Mat img,
string text,
in(double x, double y) org,
int fontFace,
double fontScale,
in(double v0, double v1, double v2, double v3) color,
int thickness )
static

Draws a text string.

The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered using the specified font are replaced by question marks. See getTextSize for a text rendering code example.

Parameters
imgImage.
textText string to be drawn.
orgBottom-left corner of the text string in the image.
fontFaceFont type, see #HersheyFonts.
fontScaleFont scale factor that is multiplied by the font-specific base size.
colorText color.
thicknessThickness of the lines used to draw a text.
lineTypeLine type. See #LineTypes
bottomLeftOriginWhen true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner.

◆ putText() [7/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.putText ( Mat img,
string text,
in(double x, double y) org,
int fontFace,
double fontScale,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType )
static

Draws a text string.

The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered using the specified font are replaced by question marks. See getTextSize for a text rendering code example.

Parameters
imgImage.
textText string to be drawn.
orgBottom-left corner of the text string in the image.
fontFaceFont type, see #HersheyFonts.
fontScaleFont scale factor that is multiplied by the font-specific base size.
colorText color.
thicknessThickness of the lines used to draw a text.
lineTypeLine type. See #LineTypes
bottomLeftOriginWhen true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner.

◆ putText() [8/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.putText ( Mat img,
string text,
in(double x, double y) org,
int fontFace,
double fontScale,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType,
bool bottomLeftOrigin )
static

Draws a text string.

The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered using the specified font are replaced by question marks. See getTextSize for a text rendering code example.

Parameters
imgImage.
textText string to be drawn.
orgBottom-left corner of the text string in the image.
fontFaceFont type, see #HersheyFonts.
fontScaleFont scale factor that is multiplied by the font-specific base size.
colorText color.
thicknessThickness of the lines used to draw a text.
lineTypeLine type. See #LineTypes
bottomLeftOriginWhen true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner.

◆ putText() [9/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.putText ( Mat img,
string text,
Point org,
int fontFace,
double fontScale,
Scalar color )
static

Draws a text string.

The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered using the specified font are replaced by question marks. See getTextSize for a text rendering code example.

Parameters
imgImage.
textText string to be drawn.
orgBottom-left corner of the text string in the image.
fontFaceFont type, see #HersheyFonts.
fontScaleFont scale factor that is multiplied by the font-specific base size.
colorText color.
thicknessThickness of the lines used to draw a text.
lineTypeLine type. See #LineTypes
bottomLeftOriginWhen true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner.

◆ putText() [10/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.putText ( Mat img,
string text,
Point org,
int fontFace,
double fontScale,
Scalar color,
int thickness )
static

Draws a text string.

The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered using the specified font are replaced by question marks. See getTextSize for a text rendering code example.

Parameters
imgImage.
textText string to be drawn.
orgBottom-left corner of the text string in the image.
fontFaceFont type, see #HersheyFonts.
fontScaleFont scale factor that is multiplied by the font-specific base size.
colorText color.
thicknessThickness of the lines used to draw a text.
lineTypeLine type. See #LineTypes
bottomLeftOriginWhen true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner.

◆ putText() [11/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.putText ( Mat img,
string text,
Point org,
int fontFace,
double fontScale,
Scalar color,
int thickness,
int lineType )
static

Draws a text string.

The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered using the specified font are replaced by question marks. See getTextSize for a text rendering code example.

Parameters
imgImage.
textText string to be drawn.
orgBottom-left corner of the text string in the image.
fontFaceFont type, see #HersheyFonts.
fontScaleFont scale factor that is multiplied by the font-specific base size.
colorText color.
thicknessThickness of the lines used to draw a text.
lineTypeLine type. See #LineTypes
bottomLeftOriginWhen true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner.

◆ putText() [12/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.putText ( Mat img,
string text,
Point org,
int fontFace,
double fontScale,
Scalar color,
int thickness,
int lineType,
bool bottomLeftOrigin )
static

Draws a text string.

The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered using the specified font are replaced by question marks. See getTextSize for a text rendering code example.

Parameters
imgImage.
textText string to be drawn.
orgBottom-left corner of the text string in the image.
fontFaceFont type, see #HersheyFonts.
fontScaleFont scale factor that is multiplied by the font-specific base size.
colorText color.
thicknessThickness of the lines used to draw a text.
lineTypeLine type. See #LineTypes
bottomLeftOriginWhen true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner.

◆ pyrDown() [1/7]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrDown ( Mat src,
Mat dst )
static

Blurs an image and downsamples it.

By default, size of the output image is computed as Size((src.cols+1)/2, (src.rows+1)/2), but in any case, the following conditions should be satisfied:

\[\begin{array}{l} | \texttt{dstsize.width} *2-src.cols| \leq 2 \\ | \texttt{dstsize.height} *2-src.rows| \leq 2 \end{array}\]

The function performs the downsampling step of the Gaussian pyramid construction. First, it convolves the source image with the kernel:

\[\frac{1}{256} \begin{bmatrix} 1 & 4 & 6 & 4 & 1 \\ 4 & 16 & 24 & 16 & 4 \\ 6 & 24 & 36 & 24 & 6 \\ 4 & 16 & 24 & 16 & 4 \\ 1 & 4 & 6 & 4 & 1 \end{bmatrix}\]

Then, it downsamples the image by rejecting even rows and columns.

Parameters
srcinput image.
dstoutput image; it has the specified size and the same type as src.
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (#BORDER_CONSTANT isn't supported)

◆ pyrDown() [2/7]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrDown ( Mat src,
Mat dst,
in Vec2d dstsize )
static

Blurs an image and downsamples it.

By default, size of the output image is computed as Size((src.cols+1)/2, (src.rows+1)/2), but in any case, the following conditions should be satisfied:

\[\begin{array}{l} | \texttt{dstsize.width} *2-src.cols| \leq 2 \\ | \texttt{dstsize.height} *2-src.rows| \leq 2 \end{array}\]

The function performs the downsampling step of the Gaussian pyramid construction. First, it convolves the source image with the kernel:

\[\frac{1}{256} \begin{bmatrix} 1 & 4 & 6 & 4 & 1 \\ 4 & 16 & 24 & 16 & 4 \\ 6 & 24 & 36 & 24 & 6 \\ 4 & 16 & 24 & 16 & 4 \\ 1 & 4 & 6 & 4 & 1 \end{bmatrix}\]

Then, it downsamples the image by rejecting even rows and columns.

Parameters
srcinput image.
dstoutput image; it has the specified size and the same type as src.
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (#BORDER_CONSTANT isn't supported)

◆ pyrDown() [3/7]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrDown ( Mat src,
Mat dst,
in Vec2d dstsize,
int borderType )
static

Blurs an image and downsamples it.

By default, size of the output image is computed as Size((src.cols+1)/2, (src.rows+1)/2), but in any case, the following conditions should be satisfied:

\[\begin{array}{l} | \texttt{dstsize.width} *2-src.cols| \leq 2 \\ | \texttt{dstsize.height} *2-src.rows| \leq 2 \end{array}\]

The function performs the downsampling step of the Gaussian pyramid construction. First, it convolves the source image with the kernel:

\[\frac{1}{256} \begin{bmatrix} 1 & 4 & 6 & 4 & 1 \\ 4 & 16 & 24 & 16 & 4 \\ 6 & 24 & 36 & 24 & 6 \\ 4 & 16 & 24 & 16 & 4 \\ 1 & 4 & 6 & 4 & 1 \end{bmatrix}\]

Then, it downsamples the image by rejecting even rows and columns.

Parameters
srcinput image.
dstoutput image; it has the specified size and the same type as src.
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (#BORDER_CONSTANT isn't supported)

◆ pyrDown() [4/7]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrDown ( Mat src,
Mat dst,
in(double width, double height) dstsize )
static

Blurs an image and downsamples it.

By default, size of the output image is computed as Size((src.cols+1)/2, (src.rows+1)/2), but in any case, the following conditions should be satisfied:

\[\begin{array}{l} | \texttt{dstsize.width} *2-src.cols| \leq 2 \\ | \texttt{dstsize.height} *2-src.rows| \leq 2 \end{array}\]

The function performs the downsampling step of the Gaussian pyramid construction. First, it convolves the source image with the kernel:

\[\frac{1}{256} \begin{bmatrix} 1 & 4 & 6 & 4 & 1 \\ 4 & 16 & 24 & 16 & 4 \\ 6 & 24 & 36 & 24 & 6 \\ 4 & 16 & 24 & 16 & 4 \\ 1 & 4 & 6 & 4 & 1 \end{bmatrix}\]

Then, it downsamples the image by rejecting even rows and columns.

Parameters
srcinput image.
dstoutput image; it has the specified size and the same type as src.
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (#BORDER_CONSTANT isn't supported)

◆ pyrDown() [5/7]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrDown ( Mat src,
Mat dst,
in(double width, double height) dstsize,
int borderType )
static

Blurs an image and downsamples it.

By default, size of the output image is computed as Size((src.cols+1)/2, (src.rows+1)/2), but in any case, the following conditions should be satisfied:

\[\begin{array}{l} | \texttt{dstsize.width} *2-src.cols| \leq 2 \\ | \texttt{dstsize.height} *2-src.rows| \leq 2 \end{array}\]

The function performs the downsampling step of the Gaussian pyramid construction. First, it convolves the source image with the kernel:

\[\frac{1}{256} \begin{bmatrix} 1 & 4 & 6 & 4 & 1 \\ 4 & 16 & 24 & 16 & 4 \\ 6 & 24 & 36 & 24 & 6 \\ 4 & 16 & 24 & 16 & 4 \\ 1 & 4 & 6 & 4 & 1 \end{bmatrix}\]

Then, it downsamples the image by rejecting even rows and columns.

Parameters
srcinput image.
dstoutput image; it has the specified size and the same type as src.
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (#BORDER_CONSTANT isn't supported)

◆ pyrDown() [6/7]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrDown ( Mat src,
Mat dst,
Size dstsize )
static

Blurs an image and downsamples it.

By default, size of the output image is computed as Size((src.cols+1)/2, (src.rows+1)/2), but in any case, the following conditions should be satisfied:

\[\begin{array}{l} | \texttt{dstsize.width} *2-src.cols| \leq 2 \\ | \texttt{dstsize.height} *2-src.rows| \leq 2 \end{array}\]

The function performs the downsampling step of the Gaussian pyramid construction. First, it convolves the source image with the kernel:

\[\frac{1}{256} \begin{bmatrix} 1 & 4 & 6 & 4 & 1 \\ 4 & 16 & 24 & 16 & 4 \\ 6 & 24 & 36 & 24 & 6 \\ 4 & 16 & 24 & 16 & 4 \\ 1 & 4 & 6 & 4 & 1 \end{bmatrix}\]

Then, it downsamples the image by rejecting even rows and columns.

Parameters
srcinput image.
dstoutput image; it has the specified size and the same type as src.
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (#BORDER_CONSTANT isn't supported)

◆ pyrDown() [7/7]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrDown ( Mat src,
Mat dst,
Size dstsize,
int borderType )
static

Blurs an image and downsamples it.

By default, size of the output image is computed as Size((src.cols+1)/2, (src.rows+1)/2), but in any case, the following conditions should be satisfied:

\[\begin{array}{l} | \texttt{dstsize.width} *2-src.cols| \leq 2 \\ | \texttt{dstsize.height} *2-src.rows| \leq 2 \end{array}\]

The function performs the downsampling step of the Gaussian pyramid construction. First, it convolves the source image with the kernel:

\[\frac{1}{256} \begin{bmatrix} 1 & 4 & 6 & 4 & 1 \\ 4 & 16 & 24 & 16 & 4 \\ 6 & 24 & 36 & 24 & 6 \\ 4 & 16 & 24 & 16 & 4 \\ 1 & 4 & 6 & 4 & 1 \end{bmatrix}\]

Then, it downsamples the image by rejecting even rows and columns.

Parameters
srcinput image.
dstoutput image; it has the specified size and the same type as src.
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (#BORDER_CONSTANT isn't supported)

◆ pyrMeanShiftFiltering() [1/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrMeanShiftFiltering ( Mat src,
Mat dst,
double sp,
double sr )
static

Performs initial step of meanshift segmentation of an image.

The function implements the filtering stage of meanshift segmentation, that is, the output of the function is the filtered "posterized" image with color gradients and fine-grain texture flattened. At every pixel (X,Y) of the input image (or down-sized input image, see below) the function executes meanshift iterations, that is, the pixel (X,Y) neighborhood in the joint space-color hyperspace is considered:

\[(x,y): X- \texttt{sp} \le x \le X+ \texttt{sp} , Y- \texttt{sp} \le y \le Y+ \texttt{sp} , ||(R,G,B)-(r,g,b)|| \le \texttt{sr}\]

where (R,G,B) and (r,g,b) are the vectors of color components at (X,Y) and (x,y), respectively (though, the algorithm does not depend on the color space used, so any 3-component color space can be used instead). Over the neighborhood the average spatial value (X',Y') and average color vector (R',G',B') are found and they act as the neighborhood center on the next iteration:

\[(X,Y)~(X',Y'), (R,G,B)~(R',G',B').\]

After the iterations over, the color components of the initial pixel (that is, the pixel from where the iterations started) are set to the final value (average color at the last iteration):

\[I(X,Y) <- (R*,G*,B*)\]

When maxLevel > 0, the gaussian pyramid of maxLevel+1 levels is built, and the above procedure is run on the smallest layer first. After that, the results are propagated to the larger layer and the iterations are run again only on those pixels where the layer colors differ by more than sr from the lower-resolution layer of the pyramid. That makes boundaries of color regions sharper. Note that the results will be actually different from the ones obtained by running the meanshift procedure on the whole original image (i.e. when maxLevel==0).

Parameters
srcThe source 8-bit, 3-channel image.
dstThe destination image of the same format and the same size as the source.
spThe spatial window radius.
srThe color window radius.
maxLevelMaximum level of the pyramid for the segmentation.
termcritTermination criteria: when to stop meanshift iterations.

◆ pyrMeanShiftFiltering() [2/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrMeanShiftFiltering ( Mat src,
Mat dst,
double sp,
double sr,
int maxLevel )
static

Performs initial step of meanshift segmentation of an image.

The function implements the filtering stage of meanshift segmentation, that is, the output of the function is the filtered "posterized" image with color gradients and fine-grain texture flattened. At every pixel (X,Y) of the input image (or down-sized input image, see below) the function executes meanshift iterations, that is, the pixel (X,Y) neighborhood in the joint space-color hyperspace is considered:

\[(x,y): X- \texttt{sp} \le x \le X+ \texttt{sp} , Y- \texttt{sp} \le y \le Y+ \texttt{sp} , ||(R,G,B)-(r,g,b)|| \le \texttt{sr}\]

where (R,G,B) and (r,g,b) are the vectors of color components at (X,Y) and (x,y), respectively (though, the algorithm does not depend on the color space used, so any 3-component color space can be used instead). Over the neighborhood the average spatial value (X',Y') and average color vector (R',G',B') are found and they act as the neighborhood center on the next iteration:

\[(X,Y)~(X',Y'), (R,G,B)~(R',G',B').\]

After the iterations over, the color components of the initial pixel (that is, the pixel from where the iterations started) are set to the final value (average color at the last iteration):

\[I(X,Y) <- (R*,G*,B*)\]

When maxLevel > 0, the gaussian pyramid of maxLevel+1 levels is built, and the above procedure is run on the smallest layer first. After that, the results are propagated to the larger layer and the iterations are run again only on those pixels where the layer colors differ by more than sr from the lower-resolution layer of the pyramid. That makes boundaries of color regions sharper. Note that the results will be actually different from the ones obtained by running the meanshift procedure on the whole original image (i.e. when maxLevel==0).

Parameters
srcThe source 8-bit, 3-channel image.
dstThe destination image of the same format and the same size as the source.
spThe spatial window radius.
srThe color window radius.
maxLevelMaximum level of the pyramid for the segmentation.
termcritTermination criteria: when to stop meanshift iterations.

◆ pyrMeanShiftFiltering() [3/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrMeanShiftFiltering ( Mat src,
Mat dst,
double sp,
double sr,
int maxLevel,
in Vec3d termcrit )
static

Performs initial step of meanshift segmentation of an image.

The function implements the filtering stage of meanshift segmentation, that is, the output of the function is the filtered "posterized" image with color gradients and fine-grain texture flattened. At every pixel (X,Y) of the input image (or down-sized input image, see below) the function executes meanshift iterations, that is, the pixel (X,Y) neighborhood in the joint space-color hyperspace is considered:

\[(x,y): X- \texttt{sp} \le x \le X+ \texttt{sp} , Y- \texttt{sp} \le y \le Y+ \texttt{sp} , ||(R,G,B)-(r,g,b)|| \le \texttt{sr}\]

where (R,G,B) and (r,g,b) are the vectors of color components at (X,Y) and (x,y), respectively (though, the algorithm does not depend on the color space used, so any 3-component color space can be used instead). Over the neighborhood the average spatial value (X',Y') and average color vector (R',G',B') are found and they act as the neighborhood center on the next iteration:

\[(X,Y)~(X',Y'), (R,G,B)~(R',G',B').\]

After the iterations over, the color components of the initial pixel (that is, the pixel from where the iterations started) are set to the final value (average color at the last iteration):

\[I(X,Y) <- (R*,G*,B*)\]

When maxLevel > 0, the gaussian pyramid of maxLevel+1 levels is built, and the above procedure is run on the smallest layer first. After that, the results are propagated to the larger layer and the iterations are run again only on those pixels where the layer colors differ by more than sr from the lower-resolution layer of the pyramid. That makes boundaries of color regions sharper. Note that the results will be actually different from the ones obtained by running the meanshift procedure on the whole original image (i.e. when maxLevel==0).

Parameters
srcThe source 8-bit, 3-channel image.
dstThe destination image of the same format and the same size as the source.
spThe spatial window radius.
srThe color window radius.
maxLevelMaximum level of the pyramid for the segmentation.
termcritTermination criteria: when to stop meanshift iterations.

◆ pyrMeanShiftFiltering() [4/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrMeanShiftFiltering ( Mat src,
Mat dst,
double sp,
double sr,
int maxLevel,
in(double type, double maxCount, double epsilon) termcrit )
static

Performs initial step of meanshift segmentation of an image.

The function implements the filtering stage of meanshift segmentation, that is, the output of the function is the filtered "posterized" image with color gradients and fine-grain texture flattened. At every pixel (X,Y) of the input image (or down-sized input image, see below) the function executes meanshift iterations, that is, the pixel (X,Y) neighborhood in the joint space-color hyperspace is considered:

\[(x,y): X- \texttt{sp} \le x \le X+ \texttt{sp} , Y- \texttt{sp} \le y \le Y+ \texttt{sp} , ||(R,G,B)-(r,g,b)|| \le \texttt{sr}\]

where (R,G,B) and (r,g,b) are the vectors of color components at (X,Y) and (x,y), respectively (though, the algorithm does not depend on the color space used, so any 3-component color space can be used instead). Over the neighborhood the average spatial value (X',Y') and average color vector (R',G',B') are found and they act as the neighborhood center on the next iteration:

\[(X,Y)~(X',Y'), (R,G,B)~(R',G',B').\]

After the iterations over, the color components of the initial pixel (that is, the pixel from where the iterations started) are set to the final value (average color at the last iteration):

\[I(X,Y) <- (R*,G*,B*)\]

When maxLevel > 0, the gaussian pyramid of maxLevel+1 levels is built, and the above procedure is run on the smallest layer first. After that, the results are propagated to the larger layer and the iterations are run again only on those pixels where the layer colors differ by more than sr from the lower-resolution layer of the pyramid. That makes boundaries of color regions sharper. Note that the results will be actually different from the ones obtained by running the meanshift procedure on the whole original image (i.e. when maxLevel==0).

Parameters
srcThe source 8-bit, 3-channel image.
dstThe destination image of the same format and the same size as the source.
spThe spatial window radius.
srThe color window radius.
maxLevelMaximum level of the pyramid for the segmentation.
termcritTermination criteria: when to stop meanshift iterations.

◆ pyrMeanShiftFiltering() [5/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrMeanShiftFiltering ( Mat src,
Mat dst,
double sp,
double sr,
int maxLevel,
TermCriteria termcrit )
static

Performs initial step of meanshift segmentation of an image.

The function implements the filtering stage of meanshift segmentation, that is, the output of the function is the filtered "posterized" image with color gradients and fine-grain texture flattened. At every pixel (X,Y) of the input image (or down-sized input image, see below) the function executes meanshift iterations, that is, the pixel (X,Y) neighborhood in the joint space-color hyperspace is considered:

\[(x,y): X- \texttt{sp} \le x \le X+ \texttt{sp} , Y- \texttt{sp} \le y \le Y+ \texttt{sp} , ||(R,G,B)-(r,g,b)|| \le \texttt{sr}\]

where (R,G,B) and (r,g,b) are the vectors of color components at (X,Y) and (x,y), respectively (though, the algorithm does not depend on the color space used, so any 3-component color space can be used instead). Over the neighborhood the average spatial value (X',Y') and average color vector (R',G',B') are found and they act as the neighborhood center on the next iteration:

\[(X,Y)~(X',Y'), (R,G,B)~(R',G',B').\]

After the iterations over, the color components of the initial pixel (that is, the pixel from where the iterations started) are set to the final value (average color at the last iteration):

\[I(X,Y) <- (R*,G*,B*)\]

When maxLevel > 0, the gaussian pyramid of maxLevel+1 levels is built, and the above procedure is run on the smallest layer first. After that, the results are propagated to the larger layer and the iterations are run again only on those pixels where the layer colors differ by more than sr from the lower-resolution layer of the pyramid. That makes boundaries of color regions sharper. Note that the results will be actually different from the ones obtained by running the meanshift procedure on the whole original image (i.e. when maxLevel==0).

Parameters
srcThe source 8-bit, 3-channel image.
dstThe destination image of the same format and the same size as the source.
spThe spatial window radius.
srThe color window radius.
maxLevelMaximum level of the pyramid for the segmentation.
termcritTermination criteria: when to stop meanshift iterations.

◆ pyrUp() [1/7]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrUp ( Mat src,
Mat dst )
static

Upsamples an image and then blurs it.

By default, size of the output image is computed as Size(src.cols\*2, (src.rows\*2), but in any case, the following conditions should be satisfied:

\[\begin{array}{l} | \texttt{dstsize.width} -src.cols*2| \leq ( \texttt{dstsize.width} \mod 2) \\ | \texttt{dstsize.height} -src.rows*2| \leq ( \texttt{dstsize.height} \mod 2) \end{array}\]

The function performs the upsampling step of the Gaussian pyramid construction, though it can actually be used to construct the Laplacian pyramid. First, it upsamples the source image by injecting even zero rows and columns and then convolves the result with the same kernel as in pyrDown multiplied by 4.

Parameters
srcinput image.
dstoutput image. It has the specified size and the same type as src .
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (only #BORDER_DEFAULT is supported)

◆ pyrUp() [2/7]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrUp ( Mat src,
Mat dst,
in Vec2d dstsize )
static

Upsamples an image and then blurs it.

By default, size of the output image is computed as Size(src.cols\*2, (src.rows\*2), but in any case, the following conditions should be satisfied:

\[\begin{array}{l} | \texttt{dstsize.width} -src.cols*2| \leq ( \texttt{dstsize.width} \mod 2) \\ | \texttt{dstsize.height} -src.rows*2| \leq ( \texttt{dstsize.height} \mod 2) \end{array}\]

The function performs the upsampling step of the Gaussian pyramid construction, though it can actually be used to construct the Laplacian pyramid. First, it upsamples the source image by injecting even zero rows and columns and then convolves the result with the same kernel as in pyrDown multiplied by 4.

Parameters
srcinput image.
dstoutput image. It has the specified size and the same type as src .
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (only #BORDER_DEFAULT is supported)

◆ pyrUp() [3/7]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrUp ( Mat src,
Mat dst,
in Vec2d dstsize,
int borderType )
static

Upsamples an image and then blurs it.

By default, size of the output image is computed as Size(src.cols\*2, (src.rows\*2), but in any case, the following conditions should be satisfied:

\[\begin{array}{l} | \texttt{dstsize.width} -src.cols*2| \leq ( \texttt{dstsize.width} \mod 2) \\ | \texttt{dstsize.height} -src.rows*2| \leq ( \texttt{dstsize.height} \mod 2) \end{array}\]

The function performs the upsampling step of the Gaussian pyramid construction, though it can actually be used to construct the Laplacian pyramid. First, it upsamples the source image by injecting even zero rows and columns and then convolves the result with the same kernel as in pyrDown multiplied by 4.

Parameters
srcinput image.
dstoutput image. It has the specified size and the same type as src .
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (only #BORDER_DEFAULT is supported)

◆ pyrUp() [4/7]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrUp ( Mat src,
Mat dst,
in(double width, double height) dstsize )
static

Upsamples an image and then blurs it.

By default, size of the output image is computed as Size(src.cols\*2, (src.rows\*2), but in any case, the following conditions should be satisfied:

\[\begin{array}{l} | \texttt{dstsize.width} -src.cols*2| \leq ( \texttt{dstsize.width} \mod 2) \\ | \texttt{dstsize.height} -src.rows*2| \leq ( \texttt{dstsize.height} \mod 2) \end{array}\]

The function performs the upsampling step of the Gaussian pyramid construction, though it can actually be used to construct the Laplacian pyramid. First, it upsamples the source image by injecting even zero rows and columns and then convolves the result with the same kernel as in pyrDown multiplied by 4.

Parameters
srcinput image.
dstoutput image. It has the specified size and the same type as src .
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (only #BORDER_DEFAULT is supported)

◆ pyrUp() [5/7]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrUp ( Mat src,
Mat dst,
in(double width, double height) dstsize,
int borderType )
static

Upsamples an image and then blurs it.

By default, size of the output image is computed as Size(src.cols\*2, (src.rows\*2), but in any case, the following conditions should be satisfied:

\[\begin{array}{l} | \texttt{dstsize.width} -src.cols*2| \leq ( \texttt{dstsize.width} \mod 2) \\ | \texttt{dstsize.height} -src.rows*2| \leq ( \texttt{dstsize.height} \mod 2) \end{array}\]

The function performs the upsampling step of the Gaussian pyramid construction, though it can actually be used to construct the Laplacian pyramid. First, it upsamples the source image by injecting even zero rows and columns and then convolves the result with the same kernel as in pyrDown multiplied by 4.

Parameters
srcinput image.
dstoutput image. It has the specified size and the same type as src .
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (only #BORDER_DEFAULT is supported)

◆ pyrUp() [6/7]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrUp ( Mat src,
Mat dst,
Size dstsize )
static

Upsamples an image and then blurs it.

By default, size of the output image is computed as Size(src.cols\*2, (src.rows\*2), but in any case, the following conditions should be satisfied:

\[\begin{array}{l} | \texttt{dstsize.width} -src.cols*2| \leq ( \texttt{dstsize.width} \mod 2) \\ | \texttt{dstsize.height} -src.rows*2| \leq ( \texttt{dstsize.height} \mod 2) \end{array}\]

The function performs the upsampling step of the Gaussian pyramid construction, though it can actually be used to construct the Laplacian pyramid. First, it upsamples the source image by injecting even zero rows and columns and then convolves the result with the same kernel as in pyrDown multiplied by 4.

Parameters
srcinput image.
dstoutput image. It has the specified size and the same type as src .
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (only #BORDER_DEFAULT is supported)

◆ pyrUp() [7/7]

static void OpenCVForUnity.ImgprocModule.Imgproc.pyrUp ( Mat src,
Mat dst,
Size dstsize,
int borderType )
static

Upsamples an image and then blurs it.

By default, size of the output image is computed as Size(src.cols\*2, (src.rows\*2), but in any case, the following conditions should be satisfied:

\[\begin{array}{l} | \texttt{dstsize.width} -src.cols*2| \leq ( \texttt{dstsize.width} \mod 2) \\ | \texttt{dstsize.height} -src.rows*2| \leq ( \texttt{dstsize.height} \mod 2) \end{array}\]

The function performs the upsampling step of the Gaussian pyramid construction, though it can actually be used to construct the Laplacian pyramid. First, it upsamples the source image by injecting even zero rows and columns and then convolves the result with the same kernel as in pyrDown multiplied by 4.

Parameters
srcinput image.
dstoutput image. It has the specified size and the same type as src .
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (only #BORDER_DEFAULT is supported)

◆ rectangle() [1/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in Vec2d pt1,
in Vec2d pt2,
in Vec4d color )
static

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

The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners are pt1 and pt2.

Parameters
imgImage.
pt1Vertex of the rectangle.
pt2Vertex of the rectangle opposite to pt1 .
colorRectangle color or brightness (grayscale image).
thicknessThickness of lines that make up the rectangle. Negative values, like FILLED, mean that the function has to draw a filled rectangle.
lineTypeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.

◆ rectangle() [2/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in Vec2d pt1,
in Vec2d pt2,
in Vec4d color,
int thickness )
static

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

The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners are pt1 and pt2.

Parameters
imgImage.
pt1Vertex of the rectangle.
pt2Vertex of the rectangle opposite to pt1 .
colorRectangle color or brightness (grayscale image).
thicknessThickness of lines that make up the rectangle. Negative values, like FILLED, mean that the function has to draw a filled rectangle.
lineTypeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.

◆ rectangle() [3/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in Vec2d pt1,
in Vec2d pt2,
in Vec4d color,
int thickness,
int lineType )
static

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

The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners are pt1 and pt2.

Parameters
imgImage.
pt1Vertex of the rectangle.
pt2Vertex of the rectangle opposite to pt1 .
colorRectangle color or brightness (grayscale image).
thicknessThickness of lines that make up the rectangle. Negative values, like FILLED, mean that the function has to draw a filled rectangle.
lineTypeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.

◆ rectangle() [4/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in Vec2d pt1,
in Vec2d pt2,
in Vec4d color,
int thickness,
int lineType,
int shift )
static

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

The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners are pt1 and pt2.

Parameters
imgImage.
pt1Vertex of the rectangle.
pt2Vertex of the rectangle opposite to pt1 .
colorRectangle color or brightness (grayscale image).
thicknessThickness of lines that make up the rectangle. Negative values, like FILLED, mean that the function has to draw a filled rectangle.
lineTypeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.

◆ rectangle() [5/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in Vec4i rec,
in Vec4d color )
static

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

use rec parameter as alternative specification of the drawn rectangle: r.tl() and / r.br()-Point(1,1) are opposite corners

◆ rectangle() [6/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in Vec4i rec,
in Vec4d color,
int thickness )
static

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

use rec parameter as alternative specification of the drawn rectangle: r.tl() and / r.br()-Point(1,1) are opposite corners

◆ rectangle() [7/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in Vec4i rec,
in Vec4d color,
int thickness,
int lineType )
static

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

use rec parameter as alternative specification of the drawn rectangle: r.tl() and / r.br()-Point(1,1) are opposite corners

◆ rectangle() [8/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in Vec4i rec,
in Vec4d color,
int thickness,
int lineType,
int shift )
static

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

use rec parameter as alternative specification of the drawn rectangle: r.tl() and / r.br()-Point(1,1) are opposite corners

◆ rectangle() [9/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in(double x, double y) pt1,
in(double x, double y) pt2,
in(double v0, double v1, double v2, double v3) color )
static

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

The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners are pt1 and pt2.

Parameters
imgImage.
pt1Vertex of the rectangle.
pt2Vertex of the rectangle opposite to pt1 .
colorRectangle color or brightness (grayscale image).
thicknessThickness of lines that make up the rectangle. Negative values, like FILLED, mean that the function has to draw a filled rectangle.
lineTypeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.

◆ rectangle() [10/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in(double x, double y) pt1,
in(double x, double y) pt2,
in(double v0, double v1, double v2, double v3) color,
int thickness )
static

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

The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners are pt1 and pt2.

Parameters
imgImage.
pt1Vertex of the rectangle.
pt2Vertex of the rectangle opposite to pt1 .
colorRectangle color or brightness (grayscale image).
thicknessThickness of lines that make up the rectangle. Negative values, like FILLED, mean that the function has to draw a filled rectangle.
lineTypeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.

◆ rectangle() [11/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in(double x, double y) pt1,
in(double x, double y) pt2,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType )
static

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

The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners are pt1 and pt2.

Parameters
imgImage.
pt1Vertex of the rectangle.
pt2Vertex of the rectangle opposite to pt1 .
colorRectangle color or brightness (grayscale image).
thicknessThickness of lines that make up the rectangle. Negative values, like FILLED, mean that the function has to draw a filled rectangle.
lineTypeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.

◆ rectangle() [12/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in(double x, double y) pt1,
in(double x, double y) pt2,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType,
int shift )
static

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

The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners are pt1 and pt2.

Parameters
imgImage.
pt1Vertex of the rectangle.
pt2Vertex of the rectangle opposite to pt1 .
colorRectangle color or brightness (grayscale image).
thicknessThickness of lines that make up the rectangle. Negative values, like FILLED, mean that the function has to draw a filled rectangle.
lineTypeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.

◆ rectangle() [13/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in(int x, int y, int width, int height) rec,
in(double v0, double v1, double v2, double v3) color )
static

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

use rec parameter as alternative specification of the drawn rectangle: r.tl() and / r.br()-Point(1,1) are opposite corners

◆ rectangle() [14/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in(int x, int y, int width, int height) rec,
in(double v0, double v1, double v2, double v3) color,
int thickness )
static

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

use rec parameter as alternative specification of the drawn rectangle: r.tl() and / r.br()-Point(1,1) are opposite corners

◆ rectangle() [15/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in(int x, int y, int width, int height) rec,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType )
static

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

use rec parameter as alternative specification of the drawn rectangle: r.tl() and / r.br()-Point(1,1) are opposite corners

◆ rectangle() [16/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
in(int x, int y, int width, int height) rec,
in(double v0, double v1, double v2, double v3) color,
int thickness,
int lineType,
int shift )
static

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

use rec parameter as alternative specification of the drawn rectangle: r.tl() and / r.br()-Point(1,1) are opposite corners

◆ rectangle() [17/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
Point pt1,
Point pt2,
Scalar color )
static

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

The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners are pt1 and pt2.

Parameters
imgImage.
pt1Vertex of the rectangle.
pt2Vertex of the rectangle opposite to pt1 .
colorRectangle color or brightness (grayscale image).
thicknessThickness of lines that make up the rectangle. Negative values, like FILLED, mean that the function has to draw a filled rectangle.
lineTypeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.

◆ rectangle() [18/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
Point pt1,
Point pt2,
Scalar color,
int thickness )
static

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

The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners are pt1 and pt2.

Parameters
imgImage.
pt1Vertex of the rectangle.
pt2Vertex of the rectangle opposite to pt1 .
colorRectangle color or brightness (grayscale image).
thicknessThickness of lines that make up the rectangle. Negative values, like FILLED, mean that the function has to draw a filled rectangle.
lineTypeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.

◆ rectangle() [19/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
Point pt1,
Point pt2,
Scalar color,
int thickness,
int lineType )
static

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

The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners are pt1 and pt2.

Parameters
imgImage.
pt1Vertex of the rectangle.
pt2Vertex of the rectangle opposite to pt1 .
colorRectangle color or brightness (grayscale image).
thicknessThickness of lines that make up the rectangle. Negative values, like FILLED, mean that the function has to draw a filled rectangle.
lineTypeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.

◆ rectangle() [20/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
Point pt1,
Point pt2,
Scalar color,
int thickness,
int lineType,
int shift )
static

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

The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners are pt1 and pt2.

Parameters
imgImage.
pt1Vertex of the rectangle.
pt2Vertex of the rectangle opposite to pt1 .
colorRectangle color or brightness (grayscale image).
thicknessThickness of lines that make up the rectangle. Negative values, like FILLED, mean that the function has to draw a filled rectangle.
lineTypeType of the line. See #LineTypes
shiftNumber of fractional bits in the point coordinates.

◆ rectangle() [21/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
Rect rec,
Scalar color )
static

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

use rec parameter as alternative specification of the drawn rectangle: r.tl() and / r.br()-Point(1,1) are opposite corners

◆ rectangle() [22/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
Rect rec,
Scalar color,
int thickness )
static

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

use rec parameter as alternative specification of the drawn rectangle: r.tl() and / r.br()-Point(1,1) are opposite corners

◆ rectangle() [23/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
Rect rec,
Scalar color,
int thickness,
int lineType )
static

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

use rec parameter as alternative specification of the drawn rectangle: r.tl() and / r.br()-Point(1,1) are opposite corners

◆ rectangle() [24/24]

static void OpenCVForUnity.ImgprocModule.Imgproc.rectangle ( Mat img,
Rect rec,
Scalar color,
int thickness,
int lineType,
int shift )
static

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

use rec parameter as alternative specification of the drawn rectangle: r.tl() and / r.br()-Point(1,1) are opposite corners

◆ remap() [1/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.remap ( Mat src,
Mat dst,
Mat map1,
Mat map2,
int interpolation )
static

Applies a generic geometrical transformation to an image.

The function remap transforms the source image using the specified map:

\[\texttt{dst} (x,y) = \texttt{src} (map_x(x,y),map_y(x,y))\]

\[\texttt{dst} (x,y) = \texttt{src} (x+map_x(x,y),y+map_y(x,y))\]

with WARP_RELATIVE_MAP

where values of pixels with non-integer coordinates are computed using one of available interpolation methods. \(map_x\) and \(map_y\) can be encoded as separate floating-point maps in \(map_1\) and \(map_2\) respectively, or interleaved floating-point maps of \((x,y)\) in \(map_1\), or fixed-point maps created by using convertMaps. The reason you might want to convert from floating to fixed-point representations of a map is that they can yield much faster (2x) remapping operations. In the converted case, \(map_1\) contains pairs (cvFloor(x), cvFloor(y)) and \(map_2\) contains indices in a table of interpolation coefficients.

This function cannot operate in-place.

Parameters
srcSource image.
dstDestination image. It has the same size as map1 and the same type as src .
map1The first map of either (x,y) points or just x values having the type CV_16SC2 , CV_32FC1, or CV_32FC2. See convertMaps for details on converting a floating point representation to fixed-point for speed.
map2The second map of y values having the type CV_16UC1, CV_32FC1, or none (empty map if map1 is (x,y) points), respectively.
interpolationInterpolation method (see #InterpolationFlags). The methods INTER_AREA INTER_LINEAR_EXACT and INTER_NEAREST_EXACT are not supported by this function. The extra flag WARP_RELATIVE_MAP that can be ORed to the interpolation method (e.g. INTER_LINEAR | WARP_RELATIVE_MAP)
borderModePixel extrapolation method (see #BorderTypes). When borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image that corresponds to the "outliers" in the source image are not modified by the function.
borderValueValue used in case of a constant border. By default, it is 0.

Due to current implementation limitations the size of an input and output images should be less than 32767x32767.

◆ remap() [2/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.remap ( Mat src,
Mat dst,
Mat map1,
Mat map2,
int interpolation,
int borderMode )
static

Applies a generic geometrical transformation to an image.

The function remap transforms the source image using the specified map:

\[\texttt{dst} (x,y) = \texttt{src} (map_x(x,y),map_y(x,y))\]

\[\texttt{dst} (x,y) = \texttt{src} (x+map_x(x,y),y+map_y(x,y))\]

with WARP_RELATIVE_MAP

where values of pixels with non-integer coordinates are computed using one of available interpolation methods. \(map_x\) and \(map_y\) can be encoded as separate floating-point maps in \(map_1\) and \(map_2\) respectively, or interleaved floating-point maps of \((x,y)\) in \(map_1\), or fixed-point maps created by using convertMaps. The reason you might want to convert from floating to fixed-point representations of a map is that they can yield much faster (2x) remapping operations. In the converted case, \(map_1\) contains pairs (cvFloor(x), cvFloor(y)) and \(map_2\) contains indices in a table of interpolation coefficients.

This function cannot operate in-place.

Parameters
srcSource image.
dstDestination image. It has the same size as map1 and the same type as src .
map1The first map of either (x,y) points or just x values having the type CV_16SC2 , CV_32FC1, or CV_32FC2. See convertMaps for details on converting a floating point representation to fixed-point for speed.
map2The second map of y values having the type CV_16UC1, CV_32FC1, or none (empty map if map1 is (x,y) points), respectively.
interpolationInterpolation method (see #InterpolationFlags). The methods INTER_AREA INTER_LINEAR_EXACT and INTER_NEAREST_EXACT are not supported by this function. The extra flag WARP_RELATIVE_MAP that can be ORed to the interpolation method (e.g. INTER_LINEAR | WARP_RELATIVE_MAP)
borderModePixel extrapolation method (see #BorderTypes). When borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image that corresponds to the "outliers" in the source image are not modified by the function.
borderValueValue used in case of a constant border. By default, it is 0.

Due to current implementation limitations the size of an input and output images should be less than 32767x32767.

◆ remap() [3/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.remap ( Mat src,
Mat dst,
Mat map1,
Mat map2,
int interpolation,
int borderMode,
in Vec4d borderValue )
static

Applies a generic geometrical transformation to an image.

The function remap transforms the source image using the specified map:

\[\texttt{dst} (x,y) = \texttt{src} (map_x(x,y),map_y(x,y))\]

\[\texttt{dst} (x,y) = \texttt{src} (x+map_x(x,y),y+map_y(x,y))\]

with WARP_RELATIVE_MAP

where values of pixels with non-integer coordinates are computed using one of available interpolation methods. \(map_x\) and \(map_y\) can be encoded as separate floating-point maps in \(map_1\) and \(map_2\) respectively, or interleaved floating-point maps of \((x,y)\) in \(map_1\), or fixed-point maps created by using convertMaps. The reason you might want to convert from floating to fixed-point representations of a map is that they can yield much faster (2x) remapping operations. In the converted case, \(map_1\) contains pairs (cvFloor(x), cvFloor(y)) and \(map_2\) contains indices in a table of interpolation coefficients.

This function cannot operate in-place.

Parameters
srcSource image.
dstDestination image. It has the same size as map1 and the same type as src .
map1The first map of either (x,y) points or just x values having the type CV_16SC2 , CV_32FC1, or CV_32FC2. See convertMaps for details on converting a floating point representation to fixed-point for speed.
map2The second map of y values having the type CV_16UC1, CV_32FC1, or none (empty map if map1 is (x,y) points), respectively.
interpolationInterpolation method (see #InterpolationFlags). The methods INTER_AREA INTER_LINEAR_EXACT and INTER_NEAREST_EXACT are not supported by this function. The extra flag WARP_RELATIVE_MAP that can be ORed to the interpolation method (e.g. INTER_LINEAR | WARP_RELATIVE_MAP)
borderModePixel extrapolation method (see #BorderTypes). When borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image that corresponds to the "outliers" in the source image are not modified by the function.
borderValueValue used in case of a constant border. By default, it is 0.

Due to current implementation limitations the size of an input and output images should be less than 32767x32767.

◆ remap() [4/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.remap ( Mat src,
Mat dst,
Mat map1,
Mat map2,
int interpolation,
int borderMode,
in(double v0, double v1, double v2, double v3) borderValue )
static

Applies a generic geometrical transformation to an image.

The function remap transforms the source image using the specified map:

\[\texttt{dst} (x,y) = \texttt{src} (map_x(x,y),map_y(x,y))\]

\[\texttt{dst} (x,y) = \texttt{src} (x+map_x(x,y),y+map_y(x,y))\]

with WARP_RELATIVE_MAP

where values of pixels with non-integer coordinates are computed using one of available interpolation methods. \(map_x\) and \(map_y\) can be encoded as separate floating-point maps in \(map_1\) and \(map_2\) respectively, or interleaved floating-point maps of \((x,y)\) in \(map_1\), or fixed-point maps created by using convertMaps. The reason you might want to convert from floating to fixed-point representations of a map is that they can yield much faster (2x) remapping operations. In the converted case, \(map_1\) contains pairs (cvFloor(x), cvFloor(y)) and \(map_2\) contains indices in a table of interpolation coefficients.

This function cannot operate in-place.

Parameters
srcSource image.
dstDestination image. It has the same size as map1 and the same type as src .
map1The first map of either (x,y) points or just x values having the type CV_16SC2 , CV_32FC1, or CV_32FC2. See convertMaps for details on converting a floating point representation to fixed-point for speed.
map2The second map of y values having the type CV_16UC1, CV_32FC1, or none (empty map if map1 is (x,y) points), respectively.
interpolationInterpolation method (see #InterpolationFlags). The methods INTER_AREA INTER_LINEAR_EXACT and INTER_NEAREST_EXACT are not supported by this function. The extra flag WARP_RELATIVE_MAP that can be ORed to the interpolation method (e.g. INTER_LINEAR | WARP_RELATIVE_MAP)
borderModePixel extrapolation method (see #BorderTypes). When borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image that corresponds to the "outliers" in the source image are not modified by the function.
borderValueValue used in case of a constant border. By default, it is 0.

Due to current implementation limitations the size of an input and output images should be less than 32767x32767.

◆ remap() [5/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.remap ( Mat src,
Mat dst,
Mat map1,
Mat map2,
int interpolation,
int borderMode,
Scalar borderValue )
static

Applies a generic geometrical transformation to an image.

The function remap transforms the source image using the specified map:

\[\texttt{dst} (x,y) = \texttt{src} (map_x(x,y),map_y(x,y))\]

\[\texttt{dst} (x,y) = \texttt{src} (x+map_x(x,y),y+map_y(x,y))\]

with WARP_RELATIVE_MAP

where values of pixels with non-integer coordinates are computed using one of available interpolation methods. \(map_x\) and \(map_y\) can be encoded as separate floating-point maps in \(map_1\) and \(map_2\) respectively, or interleaved floating-point maps of \((x,y)\) in \(map_1\), or fixed-point maps created by using convertMaps. The reason you might want to convert from floating to fixed-point representations of a map is that they can yield much faster (2x) remapping operations. In the converted case, \(map_1\) contains pairs (cvFloor(x), cvFloor(y)) and \(map_2\) contains indices in a table of interpolation coefficients.

This function cannot operate in-place.

Parameters
srcSource image.
dstDestination image. It has the same size as map1 and the same type as src .
map1The first map of either (x,y) points or just x values having the type CV_16SC2 , CV_32FC1, or CV_32FC2. See convertMaps for details on converting a floating point representation to fixed-point for speed.
map2The second map of y values having the type CV_16UC1, CV_32FC1, or none (empty map if map1 is (x,y) points), respectively.
interpolationInterpolation method (see #InterpolationFlags). The methods INTER_AREA INTER_LINEAR_EXACT and INTER_NEAREST_EXACT are not supported by this function. The extra flag WARP_RELATIVE_MAP that can be ORed to the interpolation method (e.g. INTER_LINEAR | WARP_RELATIVE_MAP)
borderModePixel extrapolation method (see #BorderTypes). When borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image that corresponds to the "outliers" in the source image are not modified by the function.
borderValueValue used in case of a constant border. By default, it is 0.

Due to current implementation limitations the size of an input and output images should be less than 32767x32767.

◆ resize() [1/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.resize ( Mat src,
Mat dst,
in Vec2d dsize )
static

Resizes an image.

The function resize resizes the image src down to or up to the specified size. Note that the initial dst type or size are not taken into account. Instead, the size and type are derived from the src,dsize,fx, and fy. If you want to resize src so that it fits the pre-created dst, you may call the function as follows:

// explicitly specify dsize=dst.size(); fx and fy will be computed from that.
resize(src, dst, dst.size(), 0, 0, interpolation);
static void resize(Mat src, Mat dst, Size dsize, double fx, double fy, int interpolation)
Resizes an image.
Definition Imgproc.cs:6528

If you want to decimate the image by factor of 2 in each direction, you can call the function this way:

// specify fx and fy and let the function compute the destination image size.
resize(src, dst, Size(), 0.5, 0.5, interpolation);

To shrink an image, it will generally look best with INTER_AREA interpolation, whereas to enlarge an image, it will generally look best with INTER_CUBIC (slow) or INTER_LINEAR (faster but still looks OK).

Parameters
srcinput image.
dstoutput image; it has the size dsize (when it is non-zero) or the size computed from src.size(), fx, and fy; the type of dst is the same as of src.
dsizeoutput image size; if it equals zero (None in Python), it is computed as:

\[\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\]

Either dsize or both fx and fy must be non-zero.
fxscale factor along the horizontal axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.width/src.cols}\]

fyscale factor along the vertical axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.height/src.rows}\]

interpolationinterpolation method, see #InterpolationFlags
See also
warpAffine, warpPerspective, remap

◆ resize() [2/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.resize ( Mat src,
Mat dst,
in Vec2d dsize,
double fx )
static

Resizes an image.

The function resize resizes the image src down to or up to the specified size. Note that the initial dst type or size are not taken into account. Instead, the size and type are derived from the src,dsize,fx, and fy. If you want to resize src so that it fits the pre-created dst, you may call the function as follows:

// explicitly specify dsize=dst.size(); fx and fy will be computed from that.
resize(src, dst, dst.size(), 0, 0, interpolation);

If you want to decimate the image by factor of 2 in each direction, you can call the function this way:

// specify fx and fy and let the function compute the destination image size.
resize(src, dst, Size(), 0.5, 0.5, interpolation);

To shrink an image, it will generally look best with INTER_AREA interpolation, whereas to enlarge an image, it will generally look best with INTER_CUBIC (slow) or INTER_LINEAR (faster but still looks OK).

Parameters
srcinput image.
dstoutput image; it has the size dsize (when it is non-zero) or the size computed from src.size(), fx, and fy; the type of dst is the same as of src.
dsizeoutput image size; if it equals zero (None in Python), it is computed as:

\[\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\]

Either dsize or both fx and fy must be non-zero.
fxscale factor along the horizontal axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.width/src.cols}\]

fyscale factor along the vertical axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.height/src.rows}\]

interpolationinterpolation method, see #InterpolationFlags
See also
warpAffine, warpPerspective, remap

◆ resize() [3/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.resize ( Mat src,
Mat dst,
in Vec2d dsize,
double fx,
double fy )
static

Resizes an image.

The function resize resizes the image src down to or up to the specified size. Note that the initial dst type or size are not taken into account. Instead, the size and type are derived from the src,dsize,fx, and fy. If you want to resize src so that it fits the pre-created dst, you may call the function as follows:

// explicitly specify dsize=dst.size(); fx and fy will be computed from that.
resize(src, dst, dst.size(), 0, 0, interpolation);

If you want to decimate the image by factor of 2 in each direction, you can call the function this way:

// specify fx and fy and let the function compute the destination image size.
resize(src, dst, Size(), 0.5, 0.5, interpolation);

To shrink an image, it will generally look best with INTER_AREA interpolation, whereas to enlarge an image, it will generally look best with INTER_CUBIC (slow) or INTER_LINEAR (faster but still looks OK).

Parameters
srcinput image.
dstoutput image; it has the size dsize (when it is non-zero) or the size computed from src.size(), fx, and fy; the type of dst is the same as of src.
dsizeoutput image size; if it equals zero (None in Python), it is computed as:

\[\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\]

Either dsize or both fx and fy must be non-zero.
fxscale factor along the horizontal axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.width/src.cols}\]

fyscale factor along the vertical axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.height/src.rows}\]

interpolationinterpolation method, see #InterpolationFlags
See also
warpAffine, warpPerspective, remap

◆ resize() [4/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.resize ( Mat src,
Mat dst,
in Vec2d dsize,
double fx,
double fy,
int interpolation )
static

Resizes an image.

The function resize resizes the image src down to or up to the specified size. Note that the initial dst type or size are not taken into account. Instead, the size and type are derived from the src,dsize,fx, and fy. If you want to resize src so that it fits the pre-created dst, you may call the function as follows:

// explicitly specify dsize=dst.size(); fx and fy will be computed from that.
resize(src, dst, dst.size(), 0, 0, interpolation);

If you want to decimate the image by factor of 2 in each direction, you can call the function this way:

// specify fx and fy and let the function compute the destination image size.
resize(src, dst, Size(), 0.5, 0.5, interpolation);

To shrink an image, it will generally look best with INTER_AREA interpolation, whereas to enlarge an image, it will generally look best with INTER_CUBIC (slow) or INTER_LINEAR (faster but still looks OK).

Parameters
srcinput image.
dstoutput image; it has the size dsize (when it is non-zero) or the size computed from src.size(), fx, and fy; the type of dst is the same as of src.
dsizeoutput image size; if it equals zero (None in Python), it is computed as:

\[\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\]

Either dsize or both fx and fy must be non-zero.
fxscale factor along the horizontal axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.width/src.cols}\]

fyscale factor along the vertical axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.height/src.rows}\]

interpolationinterpolation method, see #InterpolationFlags
See also
warpAffine, warpPerspective, remap

◆ resize() [5/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.resize ( Mat src,
Mat dst,
in(double width, double height) dsize )
static

Resizes an image.

The function resize resizes the image src down to or up to the specified size. Note that the initial dst type or size are not taken into account. Instead, the size and type are derived from the src,dsize,fx, and fy. If you want to resize src so that it fits the pre-created dst, you may call the function as follows:

// explicitly specify dsize=dst.size(); fx and fy will be computed from that.
resize(src, dst, dst.size(), 0, 0, interpolation);

If you want to decimate the image by factor of 2 in each direction, you can call the function this way:

// specify fx and fy and let the function compute the destination image size.
resize(src, dst, Size(), 0.5, 0.5, interpolation);

To shrink an image, it will generally look best with INTER_AREA interpolation, whereas to enlarge an image, it will generally look best with INTER_CUBIC (slow) or INTER_LINEAR (faster but still looks OK).

Parameters
srcinput image.
dstoutput image; it has the size dsize (when it is non-zero) or the size computed from src.size(), fx, and fy; the type of dst is the same as of src.
dsizeoutput image size; if it equals zero (None in Python), it is computed as:

\[\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\]

Either dsize or both fx and fy must be non-zero.
fxscale factor along the horizontal axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.width/src.cols}\]

fyscale factor along the vertical axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.height/src.rows}\]

interpolationinterpolation method, see #InterpolationFlags
See also
warpAffine, warpPerspective, remap

◆ resize() [6/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.resize ( Mat src,
Mat dst,
in(double width, double height) dsize,
double fx )
static

Resizes an image.

The function resize resizes the image src down to or up to the specified size. Note that the initial dst type or size are not taken into account. Instead, the size and type are derived from the src,dsize,fx, and fy. If you want to resize src so that it fits the pre-created dst, you may call the function as follows:

// explicitly specify dsize=dst.size(); fx and fy will be computed from that.
resize(src, dst, dst.size(), 0, 0, interpolation);

If you want to decimate the image by factor of 2 in each direction, you can call the function this way:

// specify fx and fy and let the function compute the destination image size.
resize(src, dst, Size(), 0.5, 0.5, interpolation);

To shrink an image, it will generally look best with INTER_AREA interpolation, whereas to enlarge an image, it will generally look best with INTER_CUBIC (slow) or INTER_LINEAR (faster but still looks OK).

Parameters
srcinput image.
dstoutput image; it has the size dsize (when it is non-zero) or the size computed from src.size(), fx, and fy; the type of dst is the same as of src.
dsizeoutput image size; if it equals zero (None in Python), it is computed as:

\[\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\]

Either dsize or both fx and fy must be non-zero.
fxscale factor along the horizontal axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.width/src.cols}\]

fyscale factor along the vertical axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.height/src.rows}\]

interpolationinterpolation method, see #InterpolationFlags
See also
warpAffine, warpPerspective, remap

◆ resize() [7/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.resize ( Mat src,
Mat dst,
in(double width, double height) dsize,
double fx,
double fy )
static

Resizes an image.

The function resize resizes the image src down to or up to the specified size. Note that the initial dst type or size are not taken into account. Instead, the size and type are derived from the src,dsize,fx, and fy. If you want to resize src so that it fits the pre-created dst, you may call the function as follows:

// explicitly specify dsize=dst.size(); fx and fy will be computed from that.
resize(src, dst, dst.size(), 0, 0, interpolation);

If you want to decimate the image by factor of 2 in each direction, you can call the function this way:

// specify fx and fy and let the function compute the destination image size.
resize(src, dst, Size(), 0.5, 0.5, interpolation);

To shrink an image, it will generally look best with INTER_AREA interpolation, whereas to enlarge an image, it will generally look best with INTER_CUBIC (slow) or INTER_LINEAR (faster but still looks OK).

Parameters
srcinput image.
dstoutput image; it has the size dsize (when it is non-zero) or the size computed from src.size(), fx, and fy; the type of dst is the same as of src.
dsizeoutput image size; if it equals zero (None in Python), it is computed as:

\[\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\]

Either dsize or both fx and fy must be non-zero.
fxscale factor along the horizontal axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.width/src.cols}\]

fyscale factor along the vertical axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.height/src.rows}\]

interpolationinterpolation method, see #InterpolationFlags
See also
warpAffine, warpPerspective, remap

◆ resize() [8/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.resize ( Mat src,
Mat dst,
in(double width, double height) dsize,
double fx,
double fy,
int interpolation )
static

Resizes an image.

The function resize resizes the image src down to or up to the specified size. Note that the initial dst type or size are not taken into account. Instead, the size and type are derived from the src,dsize,fx, and fy. If you want to resize src so that it fits the pre-created dst, you may call the function as follows:

// explicitly specify dsize=dst.size(); fx and fy will be computed from that.
resize(src, dst, dst.size(), 0, 0, interpolation);

If you want to decimate the image by factor of 2 in each direction, you can call the function this way:

// specify fx and fy and let the function compute the destination image size.
resize(src, dst, Size(), 0.5, 0.5, interpolation);

To shrink an image, it will generally look best with INTER_AREA interpolation, whereas to enlarge an image, it will generally look best with INTER_CUBIC (slow) or INTER_LINEAR (faster but still looks OK).

Parameters
srcinput image.
dstoutput image; it has the size dsize (when it is non-zero) or the size computed from src.size(), fx, and fy; the type of dst is the same as of src.
dsizeoutput image size; if it equals zero (None in Python), it is computed as:

\[\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\]

Either dsize or both fx and fy must be non-zero.
fxscale factor along the horizontal axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.width/src.cols}\]

fyscale factor along the vertical axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.height/src.rows}\]

interpolationinterpolation method, see #InterpolationFlags
See also
warpAffine, warpPerspective, remap

◆ resize() [9/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.resize ( Mat src,
Mat dst,
Size dsize )
static

Resizes an image.

The function resize resizes the image src down to or up to the specified size. Note that the initial dst type or size are not taken into account. Instead, the size and type are derived from the src,dsize,fx, and fy. If you want to resize src so that it fits the pre-created dst, you may call the function as follows:

// explicitly specify dsize=dst.size(); fx and fy will be computed from that.
resize(src, dst, dst.size(), 0, 0, interpolation);

If you want to decimate the image by factor of 2 in each direction, you can call the function this way:

// specify fx and fy and let the function compute the destination image size.
resize(src, dst, Size(), 0.5, 0.5, interpolation);

To shrink an image, it will generally look best with INTER_AREA interpolation, whereas to enlarge an image, it will generally look best with INTER_CUBIC (slow) or INTER_LINEAR (faster but still looks OK).

Parameters
srcinput image.
dstoutput image; it has the size dsize (when it is non-zero) or the size computed from src.size(), fx, and fy; the type of dst is the same as of src.
dsizeoutput image size; if it equals zero (None in Python), it is computed as:

\[\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\]

Either dsize or both fx and fy must be non-zero.
fxscale factor along the horizontal axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.width/src.cols}\]

fyscale factor along the vertical axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.height/src.rows}\]

interpolationinterpolation method, see #InterpolationFlags
See also
warpAffine, warpPerspective, remap

◆ resize() [10/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.resize ( Mat src,
Mat dst,
Size dsize,
double fx )
static

Resizes an image.

The function resize resizes the image src down to or up to the specified size. Note that the initial dst type or size are not taken into account. Instead, the size and type are derived from the src,dsize,fx, and fy. If you want to resize src so that it fits the pre-created dst, you may call the function as follows:

// explicitly specify dsize=dst.size(); fx and fy will be computed from that.
resize(src, dst, dst.size(), 0, 0, interpolation);

If you want to decimate the image by factor of 2 in each direction, you can call the function this way:

// specify fx and fy and let the function compute the destination image size.
resize(src, dst, Size(), 0.5, 0.5, interpolation);

To shrink an image, it will generally look best with INTER_AREA interpolation, whereas to enlarge an image, it will generally look best with INTER_CUBIC (slow) or INTER_LINEAR (faster but still looks OK).

Parameters
srcinput image.
dstoutput image; it has the size dsize (when it is non-zero) or the size computed from src.size(), fx, and fy; the type of dst is the same as of src.
dsizeoutput image size; if it equals zero (None in Python), it is computed as:

\[\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\]

Either dsize or both fx and fy must be non-zero.
fxscale factor along the horizontal axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.width/src.cols}\]

fyscale factor along the vertical axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.height/src.rows}\]

interpolationinterpolation method, see #InterpolationFlags
See also
warpAffine, warpPerspective, remap

◆ resize() [11/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.resize ( Mat src,
Mat dst,
Size dsize,
double fx,
double fy )
static

Resizes an image.

The function resize resizes the image src down to or up to the specified size. Note that the initial dst type or size are not taken into account. Instead, the size and type are derived from the src,dsize,fx, and fy. If you want to resize src so that it fits the pre-created dst, you may call the function as follows:

// explicitly specify dsize=dst.size(); fx and fy will be computed from that.
resize(src, dst, dst.size(), 0, 0, interpolation);

If you want to decimate the image by factor of 2 in each direction, you can call the function this way:

// specify fx and fy and let the function compute the destination image size.
resize(src, dst, Size(), 0.5, 0.5, interpolation);

To shrink an image, it will generally look best with INTER_AREA interpolation, whereas to enlarge an image, it will generally look best with INTER_CUBIC (slow) or INTER_LINEAR (faster but still looks OK).

Parameters
srcinput image.
dstoutput image; it has the size dsize (when it is non-zero) or the size computed from src.size(), fx, and fy; the type of dst is the same as of src.
dsizeoutput image size; if it equals zero (None in Python), it is computed as:

\[\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\]

Either dsize or both fx and fy must be non-zero.
fxscale factor along the horizontal axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.width/src.cols}\]

fyscale factor along the vertical axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.height/src.rows}\]

interpolationinterpolation method, see #InterpolationFlags
See also
warpAffine, warpPerspective, remap

◆ resize() [12/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.resize ( Mat src,
Mat dst,
Size dsize,
double fx,
double fy,
int interpolation )
static

Resizes an image.

The function resize resizes the image src down to or up to the specified size. Note that the initial dst type or size are not taken into account. Instead, the size and type are derived from the src,dsize,fx, and fy. If you want to resize src so that it fits the pre-created dst, you may call the function as follows:

// explicitly specify dsize=dst.size(); fx and fy will be computed from that.
resize(src, dst, dst.size(), 0, 0, interpolation);

If you want to decimate the image by factor of 2 in each direction, you can call the function this way:

// specify fx and fy and let the function compute the destination image size.
resize(src, dst, Size(), 0.5, 0.5, interpolation);

To shrink an image, it will generally look best with INTER_AREA interpolation, whereas to enlarge an image, it will generally look best with INTER_CUBIC (slow) or INTER_LINEAR (faster but still looks OK).

Parameters
srcinput image.
dstoutput image; it has the size dsize (when it is non-zero) or the size computed from src.size(), fx, and fy; the type of dst is the same as of src.
dsizeoutput image size; if it equals zero (None in Python), it is computed as:

\[\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\]

Either dsize or both fx and fy must be non-zero.
fxscale factor along the horizontal axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.width/src.cols}\]

fyscale factor along the vertical axis; when it equals 0, it is computed as

\[\texttt{(double)dsize.height/src.rows}\]

interpolationinterpolation method, see #InterpolationFlags
See also
warpAffine, warpPerspective, remap

◆ rotatedRectangleIntersection() [1/3]

static int OpenCVForUnity.ImgprocModule.Imgproc.rotatedRectangleIntersection ( in Vec5d rect1,
in Vec5d rect2,
Mat intersectingRegion )
static

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

If there is then the vertices of the intersecting 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.

Parameters
rect1First rectangle
rect2Second rectangle
intersectingRegionThe output array of the vertices of the intersecting region. It returns at most 8 vertices. Stored as std::vector<cv::Point2f> or cv::Mat as Mx1 of type CV_32FC2.
Returns
One of #RectanglesIntersectTypes

◆ rotatedRectangleIntersection() [2/3]

static int OpenCVForUnity.ImgprocModule.Imgproc.rotatedRectangleIntersection ( in(double x, double y, double width, double height, double angle) rect1,
in(double x, double y, double width, double height, double angle) rect2,
Mat intersectingRegion )
static

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

If there is then the vertices of the intersecting 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.

Parameters
rect1First rectangle
rect2Second rectangle
intersectingRegionThe output array of the vertices of the intersecting region. It returns at most 8 vertices. Stored as std::vector<cv::Point2f> or cv::Mat as Mx1 of type CV_32FC2.
Returns
One of #RectanglesIntersectTypes

◆ rotatedRectangleIntersection() [3/3]

static int OpenCVForUnity.ImgprocModule.Imgproc.rotatedRectangleIntersection ( RotatedRect rect1,
RotatedRect rect2,
Mat intersectingRegion )
static

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

If there is then the vertices of the intersecting 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.

Parameters
rect1First rectangle
rect2Second rectangle
intersectingRegionThe output array of the vertices of the intersecting region. It returns at most 8 vertices. Stored as std::vector<cv::Point2f> or cv::Mat as Mx1 of type CV_32FC2.
Returns
One of #RectanglesIntersectTypes

◆ Scharr() [1/4]

static void OpenCVForUnity.ImgprocModule.Imgproc.Scharr ( Mat src,
Mat dst,
int ddepth,
int dx,
int dy )
static

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

The function computes the first x- or y- spatial image derivative using the Scharr operator. The call

\[\texttt{Scharr(src, dst, ddepth, dx, dy, scale, delta, borderType)}\]

is equivalent to

\[\texttt{Sobel(src, dst, ddepth, dx, dy, FILTER_SCHARR, scale, delta, borderType)} .\]

Parameters
srcinput image.
dstoutput image of the same size and the same number of channels as src.
ddepthoutput image depth, see combinations
dxorder of the derivative x.
dyorder of the derivative y.
scaleoptional scale factor for the computed derivative values; by default, no scaling is applied (see getDerivKernels for details).
deltaoptional delta value that is added to the results prior to storing them in dst.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

cartToPolar

◆ Scharr() [2/4]

static void OpenCVForUnity.ImgprocModule.Imgproc.Scharr ( Mat src,
Mat dst,
int ddepth,
int dx,
int dy,
double scale )
static

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

The function computes the first x- or y- spatial image derivative using the Scharr operator. The call

\[\texttt{Scharr(src, dst, ddepth, dx, dy, scale, delta, borderType)}\]

is equivalent to

\[\texttt{Sobel(src, dst, ddepth, dx, dy, FILTER_SCHARR, scale, delta, borderType)} .\]

Parameters
srcinput image.
dstoutput image of the same size and the same number of channels as src.
ddepthoutput image depth, see combinations
dxorder of the derivative x.
dyorder of the derivative y.
scaleoptional scale factor for the computed derivative values; by default, no scaling is applied (see getDerivKernels for details).
deltaoptional delta value that is added to the results prior to storing them in dst.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

cartToPolar

◆ Scharr() [3/4]

static void OpenCVForUnity.ImgprocModule.Imgproc.Scharr ( Mat src,
Mat dst,
int ddepth,
int dx,
int dy,
double scale,
double delta )
static

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

The function computes the first x- or y- spatial image derivative using the Scharr operator. The call

\[\texttt{Scharr(src, dst, ddepth, dx, dy, scale, delta, borderType)}\]

is equivalent to

\[\texttt{Sobel(src, dst, ddepth, dx, dy, FILTER_SCHARR, scale, delta, borderType)} .\]

Parameters
srcinput image.
dstoutput image of the same size and the same number of channels as src.
ddepthoutput image depth, see combinations
dxorder of the derivative x.
dyorder of the derivative y.
scaleoptional scale factor for the computed derivative values; by default, no scaling is applied (see getDerivKernels for details).
deltaoptional delta value that is added to the results prior to storing them in dst.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

cartToPolar

◆ Scharr() [4/4]

static void OpenCVForUnity.ImgprocModule.Imgproc.Scharr ( Mat src,
Mat dst,
int ddepth,
int dx,
int dy,
double scale,
double delta,
int borderType )
static

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

The function computes the first x- or y- spatial image derivative using the Scharr operator. The call

\[\texttt{Scharr(src, dst, ddepth, dx, dy, scale, delta, borderType)}\]

is equivalent to

\[\texttt{Sobel(src, dst, ddepth, dx, dy, FILTER_SCHARR, scale, delta, borderType)} .\]

Parameters
srcinput image.
dstoutput image of the same size and the same number of channels as src.
ddepthoutput image depth, see combinations
dxorder of the derivative x.
dyorder of the derivative y.
scaleoptional scale factor for the computed derivative values; by default, no scaling is applied (see getDerivKernels for details).
deltaoptional delta value that is added to the results prior to storing them in dst.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

cartToPolar

◆ sepFilter2D() [1/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.sepFilter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernelX,
Mat kernelY )
static

Applies a separable linear filter to an image.

The function applies a separable linear filter to the image. That is, first, every row of src is filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D kernel kernelY. The final result shifted by delta is stored in dst .

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDestination image depth, see combinations
kernelXCoefficients for filtering each row.
kernelYCoefficients for filtering each column.
anchorAnchor position within the kernel. The default value \((-1,-1)\) means that the anchor is at the kernel center.
deltaValue added to the filtered results before storing them.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

filter2D, Sobel, GaussianBlur, boxFilter, blur

◆ sepFilter2D() [2/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.sepFilter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernelX,
Mat kernelY,
in Vec2d anchor )
static

Applies a separable linear filter to an image.

The function applies a separable linear filter to the image. That is, first, every row of src is filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D kernel kernelY. The final result shifted by delta is stored in dst .

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDestination image depth, see combinations
kernelXCoefficients for filtering each row.
kernelYCoefficients for filtering each column.
anchorAnchor position within the kernel. The default value \((-1,-1)\) means that the anchor is at the kernel center.
deltaValue added to the filtered results before storing them.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

filter2D, Sobel, GaussianBlur, boxFilter, blur

◆ sepFilter2D() [3/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.sepFilter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernelX,
Mat kernelY,
in Vec2d anchor,
double delta )
static

Applies a separable linear filter to an image.

The function applies a separable linear filter to the image. That is, first, every row of src is filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D kernel kernelY. The final result shifted by delta is stored in dst .

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDestination image depth, see combinations
kernelXCoefficients for filtering each row.
kernelYCoefficients for filtering each column.
anchorAnchor position within the kernel. The default value \((-1,-1)\) means that the anchor is at the kernel center.
deltaValue added to the filtered results before storing them.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

filter2D, Sobel, GaussianBlur, boxFilter, blur

◆ sepFilter2D() [4/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.sepFilter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernelX,
Mat kernelY,
in Vec2d anchor,
double delta,
int borderType )
static

Applies a separable linear filter to an image.

The function applies a separable linear filter to the image. That is, first, every row of src is filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D kernel kernelY. The final result shifted by delta is stored in dst .

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDestination image depth, see combinations
kernelXCoefficients for filtering each row.
kernelYCoefficients for filtering each column.
anchorAnchor position within the kernel. The default value \((-1,-1)\) means that the anchor is at the kernel center.
deltaValue added to the filtered results before storing them.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

filter2D, Sobel, GaussianBlur, boxFilter, blur

◆ sepFilter2D() [5/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.sepFilter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernelX,
Mat kernelY,
in(double x, double y) anchor )
static

Applies a separable linear filter to an image.

The function applies a separable linear filter to the image. That is, first, every row of src is filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D kernel kernelY. The final result shifted by delta is stored in dst .

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDestination image depth, see combinations
kernelXCoefficients for filtering each row.
kernelYCoefficients for filtering each column.
anchorAnchor position within the kernel. The default value \((-1,-1)\) means that the anchor is at the kernel center.
deltaValue added to the filtered results before storing them.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

filter2D, Sobel, GaussianBlur, boxFilter, blur

◆ sepFilter2D() [6/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.sepFilter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernelX,
Mat kernelY,
in(double x, double y) anchor,
double delta )
static

Applies a separable linear filter to an image.

The function applies a separable linear filter to the image. That is, first, every row of src is filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D kernel kernelY. The final result shifted by delta is stored in dst .

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDestination image depth, see combinations
kernelXCoefficients for filtering each row.
kernelYCoefficients for filtering each column.
anchorAnchor position within the kernel. The default value \((-1,-1)\) means that the anchor is at the kernel center.
deltaValue added to the filtered results before storing them.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

filter2D, Sobel, GaussianBlur, boxFilter, blur

◆ sepFilter2D() [7/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.sepFilter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernelX,
Mat kernelY,
in(double x, double y) anchor,
double delta,
int borderType )
static

Applies a separable linear filter to an image.

The function applies a separable linear filter to the image. That is, first, every row of src is filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D kernel kernelY. The final result shifted by delta is stored in dst .

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDestination image depth, see combinations
kernelXCoefficients for filtering each row.
kernelYCoefficients for filtering each column.
anchorAnchor position within the kernel. The default value \((-1,-1)\) means that the anchor is at the kernel center.
deltaValue added to the filtered results before storing them.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

filter2D, Sobel, GaussianBlur, boxFilter, blur

◆ sepFilter2D() [8/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.sepFilter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernelX,
Mat kernelY,
Point anchor )
static

Applies a separable linear filter to an image.

The function applies a separable linear filter to the image. That is, first, every row of src is filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D kernel kernelY. The final result shifted by delta is stored in dst .

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDestination image depth, see combinations
kernelXCoefficients for filtering each row.
kernelYCoefficients for filtering each column.
anchorAnchor position within the kernel. The default value \((-1,-1)\) means that the anchor is at the kernel center.
deltaValue added to the filtered results before storing them.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

filter2D, Sobel, GaussianBlur, boxFilter, blur

◆ sepFilter2D() [9/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.sepFilter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernelX,
Mat kernelY,
Point anchor,
double delta )
static

Applies a separable linear filter to an image.

The function applies a separable linear filter to the image. That is, first, every row of src is filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D kernel kernelY. The final result shifted by delta is stored in dst .

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDestination image depth, see combinations
kernelXCoefficients for filtering each row.
kernelYCoefficients for filtering each column.
anchorAnchor position within the kernel. The default value \((-1,-1)\) means that the anchor is at the kernel center.
deltaValue added to the filtered results before storing them.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

filter2D, Sobel, GaussianBlur, boxFilter, blur

◆ sepFilter2D() [10/10]

static void OpenCVForUnity.ImgprocModule.Imgproc.sepFilter2D ( Mat src,
Mat dst,
int ddepth,
Mat kernelX,
Mat kernelY,
Point anchor,
double delta,
int borderType )
static

Applies a separable linear filter to an image.

The function applies a separable linear filter to the image. That is, first, every row of src is filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D kernel kernelY. The final result shifted by delta is stored in dst .

Parameters
srcSource image.
dstDestination image of the same size and the same number of channels as src .
ddepthDestination image depth, see combinations
kernelXCoefficients for filtering each row.
kernelYCoefficients for filtering each column.
anchorAnchor position within the kernel. The default value \((-1,-1)\) means that the anchor is at the kernel center.
deltaValue added to the filtered results before storing them.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

filter2D, Sobel, GaussianBlur, boxFilter, blur

◆ Sobel() [1/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Sobel ( Mat src,
Mat dst,
int ddepth,
int dx,
int dy )
static

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

In all cases except one, the \(\texttt{ksize} \times \texttt{ksize}\) separable kernel is used to calculate the derivative. When \(\texttt{ksize = 1}\), the \(3 \times 1\) or \(1 \times 3\) kernel is used (that is, no Gaussian smoothing is done). ksize = 1 can only be used for the first or the second x- or y- derivatives.

There is also the special value ksize = #FILTER_SCHARR (-1) that corresponds to the \(3\times3\) Scharr filter that may give more accurate results than the \(3\times3\) Sobel. The Scharr aperture is

\[\vecthreethree{-3}{0}{3}{-10}{0}{10}{-3}{0}{3}\]

for the x-derivative, or transposed for the y-derivative.

The function calculates an image derivative by convolving the image with the appropriate kernel:

\[\texttt{dst} = \frac{\partial^{xorder+yorder} \texttt{src}}{\partial x^{xorder} \partial y^{yorder}}\]

The Sobel operators combine Gaussian smoothing and differentiation, so the result is more or less resistant to the noise. Most often, the function is called with ( xorder = 1, yorder = 0, ksize = 3) or ( xorder = 0, yorder = 1, ksize = 3) to calculate the first x- or y- image derivative. The first case corresponds to a kernel of:

\[\vecthreethree{-1}{0}{1}{-2}{0}{2}{-1}{0}{1}\]

The second case corresponds to a kernel of:

\[\vecthreethree{-1}{-2}{-1}{0}{0}{0}{1}{2}{1}\]

Parameters
srcinput image.
dstoutput image of the same size and the same number of channels as src .
ddepthoutput image depth, see combinations; in the case of 8-bit input images it will result in truncated derivatives.
dxorder of the derivative x.
dyorder of the derivative y.
ksizesize of the extended Sobel kernel; it must be 1, 3, 5, or 7.
scaleoptional scale factor for the computed derivative values; by default, no scaling is applied (see getDerivKernels for details).
deltaoptional delta value that is added to the results prior to storing them in dst.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

Scharr, Laplacian, sepFilter2D, filter2D, GaussianBlur, cartToPolar

◆ Sobel() [2/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Sobel ( Mat src,
Mat dst,
int ddepth,
int dx,
int dy,
int ksize )
static

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

In all cases except one, the \(\texttt{ksize} \times \texttt{ksize}\) separable kernel is used to calculate the derivative. When \(\texttt{ksize = 1}\), the \(3 \times 1\) or \(1 \times 3\) kernel is used (that is, no Gaussian smoothing is done). ksize = 1 can only be used for the first or the second x- or y- derivatives.

There is also the special value ksize = #FILTER_SCHARR (-1) that corresponds to the \(3\times3\) Scharr filter that may give more accurate results than the \(3\times3\) Sobel. The Scharr aperture is

\[\vecthreethree{-3}{0}{3}{-10}{0}{10}{-3}{0}{3}\]

for the x-derivative, or transposed for the y-derivative.

The function calculates an image derivative by convolving the image with the appropriate kernel:

\[\texttt{dst} = \frac{\partial^{xorder+yorder} \texttt{src}}{\partial x^{xorder} \partial y^{yorder}}\]

The Sobel operators combine Gaussian smoothing and differentiation, so the result is more or less resistant to the noise. Most often, the function is called with ( xorder = 1, yorder = 0, ksize = 3) or ( xorder = 0, yorder = 1, ksize = 3) to calculate the first x- or y- image derivative. The first case corresponds to a kernel of:

\[\vecthreethree{-1}{0}{1}{-2}{0}{2}{-1}{0}{1}\]

The second case corresponds to a kernel of:

\[\vecthreethree{-1}{-2}{-1}{0}{0}{0}{1}{2}{1}\]

Parameters
srcinput image.
dstoutput image of the same size and the same number of channels as src .
ddepthoutput image depth, see combinations; in the case of 8-bit input images it will result in truncated derivatives.
dxorder of the derivative x.
dyorder of the derivative y.
ksizesize of the extended Sobel kernel; it must be 1, 3, 5, or 7.
scaleoptional scale factor for the computed derivative values; by default, no scaling is applied (see getDerivKernels for details).
deltaoptional delta value that is added to the results prior to storing them in dst.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

Scharr, Laplacian, sepFilter2D, filter2D, GaussianBlur, cartToPolar

◆ Sobel() [3/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Sobel ( Mat src,
Mat dst,
int ddepth,
int dx,
int dy,
int ksize,
double scale )
static

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

In all cases except one, the \(\texttt{ksize} \times \texttt{ksize}\) separable kernel is used to calculate the derivative. When \(\texttt{ksize = 1}\), the \(3 \times 1\) or \(1 \times 3\) kernel is used (that is, no Gaussian smoothing is done). ksize = 1 can only be used for the first or the second x- or y- derivatives.

There is also the special value ksize = #FILTER_SCHARR (-1) that corresponds to the \(3\times3\) Scharr filter that may give more accurate results than the \(3\times3\) Sobel. The Scharr aperture is

\[\vecthreethree{-3}{0}{3}{-10}{0}{10}{-3}{0}{3}\]

for the x-derivative, or transposed for the y-derivative.

The function calculates an image derivative by convolving the image with the appropriate kernel:

\[\texttt{dst} = \frac{\partial^{xorder+yorder} \texttt{src}}{\partial x^{xorder} \partial y^{yorder}}\]

The Sobel operators combine Gaussian smoothing and differentiation, so the result is more or less resistant to the noise. Most often, the function is called with ( xorder = 1, yorder = 0, ksize = 3) or ( xorder = 0, yorder = 1, ksize = 3) to calculate the first x- or y- image derivative. The first case corresponds to a kernel of:

\[\vecthreethree{-1}{0}{1}{-2}{0}{2}{-1}{0}{1}\]

The second case corresponds to a kernel of:

\[\vecthreethree{-1}{-2}{-1}{0}{0}{0}{1}{2}{1}\]

Parameters
srcinput image.
dstoutput image of the same size and the same number of channels as src .
ddepthoutput image depth, see combinations; in the case of 8-bit input images it will result in truncated derivatives.
dxorder of the derivative x.
dyorder of the derivative y.
ksizesize of the extended Sobel kernel; it must be 1, 3, 5, or 7.
scaleoptional scale factor for the computed derivative values; by default, no scaling is applied (see getDerivKernels for details).
deltaoptional delta value that is added to the results prior to storing them in dst.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

Scharr, Laplacian, sepFilter2D, filter2D, GaussianBlur, cartToPolar

◆ Sobel() [4/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Sobel ( Mat src,
Mat dst,
int ddepth,
int dx,
int dy,
int ksize,
double scale,
double delta )
static

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

In all cases except one, the \(\texttt{ksize} \times \texttt{ksize}\) separable kernel is used to calculate the derivative. When \(\texttt{ksize = 1}\), the \(3 \times 1\) or \(1 \times 3\) kernel is used (that is, no Gaussian smoothing is done). ksize = 1 can only be used for the first or the second x- or y- derivatives.

There is also the special value ksize = #FILTER_SCHARR (-1) that corresponds to the \(3\times3\) Scharr filter that may give more accurate results than the \(3\times3\) Sobel. The Scharr aperture is

\[\vecthreethree{-3}{0}{3}{-10}{0}{10}{-3}{0}{3}\]

for the x-derivative, or transposed for the y-derivative.

The function calculates an image derivative by convolving the image with the appropriate kernel:

\[\texttt{dst} = \frac{\partial^{xorder+yorder} \texttt{src}}{\partial x^{xorder} \partial y^{yorder}}\]

The Sobel operators combine Gaussian smoothing and differentiation, so the result is more or less resistant to the noise. Most often, the function is called with ( xorder = 1, yorder = 0, ksize = 3) or ( xorder = 0, yorder = 1, ksize = 3) to calculate the first x- or y- image derivative. The first case corresponds to a kernel of:

\[\vecthreethree{-1}{0}{1}{-2}{0}{2}{-1}{0}{1}\]

The second case corresponds to a kernel of:

\[\vecthreethree{-1}{-2}{-1}{0}{0}{0}{1}{2}{1}\]

Parameters
srcinput image.
dstoutput image of the same size and the same number of channels as src .
ddepthoutput image depth, see combinations; in the case of 8-bit input images it will result in truncated derivatives.
dxorder of the derivative x.
dyorder of the derivative y.
ksizesize of the extended Sobel kernel; it must be 1, 3, 5, or 7.
scaleoptional scale factor for the computed derivative values; by default, no scaling is applied (see getDerivKernels for details).
deltaoptional delta value that is added to the results prior to storing them in dst.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

Scharr, Laplacian, sepFilter2D, filter2D, GaussianBlur, cartToPolar

◆ Sobel() [5/5]

static void OpenCVForUnity.ImgprocModule.Imgproc.Sobel ( Mat src,
Mat dst,
int ddepth,
int dx,
int dy,
int ksize,
double scale,
double delta,
int borderType )
static

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

In all cases except one, the \(\texttt{ksize} \times \texttt{ksize}\) separable kernel is used to calculate the derivative. When \(\texttt{ksize = 1}\), the \(3 \times 1\) or \(1 \times 3\) kernel is used (that is, no Gaussian smoothing is done). ksize = 1 can only be used for the first or the second x- or y- derivatives.

There is also the special value ksize = #FILTER_SCHARR (-1) that corresponds to the \(3\times3\) Scharr filter that may give more accurate results than the \(3\times3\) Sobel. The Scharr aperture is

\[\vecthreethree{-3}{0}{3}{-10}{0}{10}{-3}{0}{3}\]

for the x-derivative, or transposed for the y-derivative.

The function calculates an image derivative by convolving the image with the appropriate kernel:

\[\texttt{dst} = \frac{\partial^{xorder+yorder} \texttt{src}}{\partial x^{xorder} \partial y^{yorder}}\]

The Sobel operators combine Gaussian smoothing and differentiation, so the result is more or less resistant to the noise. Most often, the function is called with ( xorder = 1, yorder = 0, ksize = 3) or ( xorder = 0, yorder = 1, ksize = 3) to calculate the first x- or y- image derivative. The first case corresponds to a kernel of:

\[\vecthreethree{-1}{0}{1}{-2}{0}{2}{-1}{0}{1}\]

The second case corresponds to a kernel of:

\[\vecthreethree{-1}{-2}{-1}{0}{0}{0}{1}{2}{1}\]

Parameters
srcinput image.
dstoutput image of the same size and the same number of channels as src .
ddepthoutput image depth, see combinations; in the case of 8-bit input images it will result in truncated derivatives.
dxorder of the derivative x.
dyorder of the derivative y.
ksizesize of the extended Sobel kernel; it must be 1, 3, 5, or 7.
scaleoptional scale factor for the computed derivative values; by default, no scaling is applied (see getDerivKernels for details).
deltaoptional delta value that is added to the results prior to storing them in dst.
borderTypepixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

Scharr, Laplacian, sepFilter2D, filter2D, GaussianBlur, cartToPolar

◆ spatialGradient() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.spatialGradient ( Mat src,
Mat dx,
Mat dy )
static

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

Equivalent to calling:

Sobel( src, dx, CV_16SC1, 1, 0, 3 );
Sobel( src, dy, CV_16SC1, 0, 1, 3 );
static void Sobel(Mat src, Mat dst, int ddepth, int dx, int dy, int ksize, double scale, double delta, int borderType)
Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator.
Definition Imgproc.cs:2611
Parameters
srcinput image.
dxoutput image with first-order derivative in x.
dyoutput image with first-order derivative in y.
ksizesize of Sobel kernel. It must be 3.
borderTypepixel extrapolation method, see #BorderTypes. Only #BORDER_DEFAULT=#BORDER_REFLECT_101 and #BORDER_REPLICATE are supported.
See also
Sobel

◆ spatialGradient() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.spatialGradient ( Mat src,
Mat dx,
Mat dy,
int ksize )
static

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

Equivalent to calling:

Sobel( src, dx, CV_16SC1, 1, 0, 3 );
Sobel( src, dy, CV_16SC1, 0, 1, 3 );
Parameters
srcinput image.
dxoutput image with first-order derivative in x.
dyoutput image with first-order derivative in y.
ksizesize of Sobel kernel. It must be 3.
borderTypepixel extrapolation method, see #BorderTypes. Only #BORDER_DEFAULT=#BORDER_REFLECT_101 and #BORDER_REPLICATE are supported.
See also
Sobel

◆ spatialGradient() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.spatialGradient ( Mat src,
Mat dx,
Mat dy,
int ksize,
int borderType )
static

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

Equivalent to calling:

Sobel( src, dx, CV_16SC1, 1, 0, 3 );
Sobel( src, dy, CV_16SC1, 0, 1, 3 );
Parameters
srcinput image.
dxoutput image with first-order derivative in x.
dyoutput image with first-order derivative in y.
ksizesize of Sobel kernel. It must be 3.
borderTypepixel extrapolation method, see #BorderTypes. Only #BORDER_DEFAULT=#BORDER_REFLECT_101 and #BORDER_REPLICATE are supported.
See also
Sobel

◆ sqrBoxFilter() [1/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.sqrBoxFilter ( Mat src,
Mat dst,
int ddepth,
in Vec2d ksize )
static

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

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

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

Parameters
srcinput image
dstoutput image of the same size and type as src
ddepththe output image depth (-1 to use src.depth())
ksizekernel size
anchorkernel anchor point. The default value of Point(-1, -1) denotes that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is to be normalized by it's area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter

◆ sqrBoxFilter() [2/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.sqrBoxFilter ( Mat src,
Mat dst,
int ddepth,
in Vec2d ksize,
in Vec2d anchor )
static

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

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

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

Parameters
srcinput image
dstoutput image of the same size and type as src
ddepththe output image depth (-1 to use src.depth())
ksizekernel size
anchorkernel anchor point. The default value of Point(-1, -1) denotes that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is to be normalized by it's area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter

◆ sqrBoxFilter() [3/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.sqrBoxFilter ( Mat src,
Mat dst,
int ddepth,
in Vec2d ksize,
in Vec2d anchor,
bool normalize )
static

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

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

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

Parameters
srcinput image
dstoutput image of the same size and type as src
ddepththe output image depth (-1 to use src.depth())
ksizekernel size
anchorkernel anchor point. The default value of Point(-1, -1) denotes that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is to be normalized by it's area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter

◆ sqrBoxFilter() [4/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.sqrBoxFilter ( Mat src,
Mat dst,
int ddepth,
in Vec2d ksize,
in Vec2d anchor,
bool normalize,
int borderType )
static

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

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

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

Parameters
srcinput image
dstoutput image of the same size and type as src
ddepththe output image depth (-1 to use src.depth())
ksizekernel size
anchorkernel anchor point. The default value of Point(-1, -1) denotes that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is to be normalized by it's area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter

◆ sqrBoxFilter() [5/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.sqrBoxFilter ( Mat src,
Mat dst,
int ddepth,
in(double width, double height) ksize )
static

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

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

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

Parameters
srcinput image
dstoutput image of the same size and type as src
ddepththe output image depth (-1 to use src.depth())
ksizekernel size
anchorkernel anchor point. The default value of Point(-1, -1) denotes that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is to be normalized by it's area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter

◆ sqrBoxFilter() [6/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.sqrBoxFilter ( Mat src,
Mat dst,
int ddepth,
in(double width, double height) ksize,
in(double x, double y) anchor )
static

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

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

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

Parameters
srcinput image
dstoutput image of the same size and type as src
ddepththe output image depth (-1 to use src.depth())
ksizekernel size
anchorkernel anchor point. The default value of Point(-1, -1) denotes that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is to be normalized by it's area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter

◆ sqrBoxFilter() [7/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.sqrBoxFilter ( Mat src,
Mat dst,
int ddepth,
in(double width, double height) ksize,
in(double x, double y) anchor,
bool normalize )
static

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

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

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

Parameters
srcinput image
dstoutput image of the same size and type as src
ddepththe output image depth (-1 to use src.depth())
ksizekernel size
anchorkernel anchor point. The default value of Point(-1, -1) denotes that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is to be normalized by it's area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter

◆ sqrBoxFilter() [8/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.sqrBoxFilter ( Mat src,
Mat dst,
int ddepth,
in(double width, double height) ksize,
in(double x, double y) anchor,
bool normalize,
int borderType )
static

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

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

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

Parameters
srcinput image
dstoutput image of the same size and type as src
ddepththe output image depth (-1 to use src.depth())
ksizekernel size
anchorkernel anchor point. The default value of Point(-1, -1) denotes that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is to be normalized by it's area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter

◆ sqrBoxFilter() [9/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.sqrBoxFilter ( Mat src,
Mat dst,
int ddepth,
Size ksize )
static

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

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

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

Parameters
srcinput image
dstoutput image of the same size and type as src
ddepththe output image depth (-1 to use src.depth())
ksizekernel size
anchorkernel anchor point. The default value of Point(-1, -1) denotes that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is to be normalized by it's area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter

◆ sqrBoxFilter() [10/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.sqrBoxFilter ( Mat src,
Mat dst,
int ddepth,
Size ksize,
Point anchor )
static

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

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

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

Parameters
srcinput image
dstoutput image of the same size and type as src
ddepththe output image depth (-1 to use src.depth())
ksizekernel size
anchorkernel anchor point. The default value of Point(-1, -1) denotes that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is to be normalized by it's area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter

◆ sqrBoxFilter() [11/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.sqrBoxFilter ( Mat src,
Mat dst,
int ddepth,
Size ksize,
Point anchor,
bool normalize )
static

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

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

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

Parameters
srcinput image
dstoutput image of the same size and type as src
ddepththe output image depth (-1 to use src.depth())
ksizekernel size
anchorkernel anchor point. The default value of Point(-1, -1) denotes that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is to be normalized by it's area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter

◆ sqrBoxFilter() [12/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.sqrBoxFilter ( Mat src,
Mat dst,
int ddepth,
Size ksize,
Point anchor,
bool normalize,
int borderType )
static

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

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

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

Parameters
srcinput image
dstoutput image of the same size and type as src
ddepththe output image depth (-1 to use src.depth())
ksizekernel size
anchorkernel anchor point. The default value of Point(-1, -1) denotes that the anchor is at the kernel center.
normalizeflag, specifying whether the kernel is to be normalized by it's area or not.
borderTypeborder mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.

boxFilter

◆ stackBlur() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.stackBlur ( Mat src,
Mat dst,
in Vec2d ksize )
static

Blurs an image using the stackBlur.

The function applies and stackBlur to an image. stackBlur can generate similar results as Gaussian blur, and the time consumption does not increase with the increase of kernel size. It creates a kind of moving stack of colors whilst scanning through the image. Thereby it just has to add one new block of color to the right side of the stack and remove the leftmost color. The remaining colors on the topmost layer of the stack are either added on or reduced by one, depending on if they are on the right or on the left side of the stack. The only supported borderType is BORDER_REPLICATE. Original paper was proposed by Mario Klingemann, which can be found http://underdestruction.com/2004/02/25/stackblur-2004.

Parameters
srcinput image. The number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S or CV_32F.
dstoutput image of the same size and type as src.
ksizestack-blurring kernel size. The ksize.width and ksize.height can differ but they both must be positive and odd.

◆ stackBlur() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.stackBlur ( Mat src,
Mat dst,
in(double width, double height) ksize )
static

Blurs an image using the stackBlur.

The function applies and stackBlur to an image. stackBlur can generate similar results as Gaussian blur, and the time consumption does not increase with the increase of kernel size. It creates a kind of moving stack of colors whilst scanning through the image. Thereby it just has to add one new block of color to the right side of the stack and remove the leftmost color. The remaining colors on the topmost layer of the stack are either added on or reduced by one, depending on if they are on the right or on the left side of the stack. The only supported borderType is BORDER_REPLICATE. Original paper was proposed by Mario Klingemann, which can be found http://underdestruction.com/2004/02/25/stackblur-2004.

Parameters
srcinput image. The number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S or CV_32F.
dstoutput image of the same size and type as src.
ksizestack-blurring kernel size. The ksize.width and ksize.height can differ but they both must be positive and odd.

◆ stackBlur() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.stackBlur ( Mat src,
Mat dst,
Size ksize )
static

Blurs an image using the stackBlur.

The function applies and stackBlur to an image. stackBlur can generate similar results as Gaussian blur, and the time consumption does not increase with the increase of kernel size. It creates a kind of moving stack of colors whilst scanning through the image. Thereby it just has to add one new block of color to the right side of the stack and remove the leftmost color. The remaining colors on the topmost layer of the stack are either added on or reduced by one, depending on if they are on the right or on the left side of the stack. The only supported borderType is BORDER_REPLICATE. Original paper was proposed by Mario Klingemann, which can be found http://underdestruction.com/2004/02/25/stackblur-2004.

Parameters
srcinput image. The number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S or CV_32F.
dstoutput image of the same size and type as src.
ksizestack-blurring kernel size. The ksize.width and ksize.height can differ but they both must be positive and odd.

◆ threshold()

static double OpenCVForUnity.ImgprocModule.Imgproc.threshold ( Mat src,
Mat dst,
double thresh,
double maxval,
int type )
static

Applies a fixed-level threshold to each array element.

The function applies fixed-level thresholding to a multiple-channel array. The function is typically used to get a bi-level (binary) image out of a grayscale image ( #compare could be also used for this purpose) or for removing a noise, that is, filtering out pixels with too small or too large values. There are several types of thresholding supported by the function. They are determined by type parameter.

Also, the special values THRESH_OTSU or THRESH_TRIANGLE may be combined with one of the above values. In these cases, the function determines the optimal threshold value using the Otsu's or Triangle algorithm and uses it instead of the specified thresh.

Note
Currently, the Otsu's and Triangle methods are implemented only for 8-bit single-channel images.
Parameters
srcinput array (multiple-channel, 8-bit or 32-bit floating point).
dstoutput array of the same size and type and the same number of channels as src.
threshthreshold value.
maxvalmaximum value to use with the THRESH_BINARY and THRESH_BINARY_INV thresholding types.
typethresholding type (see #ThresholdTypes).
Returns
the computed threshold value if Otsu's or Triangle methods used.
See also
adaptiveThreshold, findContours, compare, min, max

◆ warpAffine() [1/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpAffine ( Mat src,
Mat dst,
Mat M,
in Vec2d dsize )
static

Applies an affine transformation to an image.

The function warpAffine transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} ( \texttt{M} _{11} x + \texttt{M} _{12} y + \texttt{M} _{13}, \texttt{M} _{21} x + \texttt{M} _{22} y + \texttt{M} _{23})\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(2\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (see #InterpolationFlags) and the optional flag WARP_INVERSE_MAP that means that M is the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (see #BorderTypes); when borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to the "outliers" in the source image are not modified by the function.
borderValuevalue used in case of a constant border; by default, it is 0.
See also
warpPerspective, resize, remap, getRectSubPix, transform

◆ warpAffine() [2/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpAffine ( Mat src,
Mat dst,
Mat M,
in Vec2d dsize,
int flags )
static

Applies an affine transformation to an image.

The function warpAffine transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} ( \texttt{M} _{11} x + \texttt{M} _{12} y + \texttt{M} _{13}, \texttt{M} _{21} x + \texttt{M} _{22} y + \texttt{M} _{23})\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(2\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (see #InterpolationFlags) and the optional flag WARP_INVERSE_MAP that means that M is the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (see #BorderTypes); when borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to the "outliers" in the source image are not modified by the function.
borderValuevalue used in case of a constant border; by default, it is 0.
See also
warpPerspective, resize, remap, getRectSubPix, transform

◆ warpAffine() [3/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpAffine ( Mat src,
Mat dst,
Mat M,
in Vec2d dsize,
int flags,
int borderMode )
static

Applies an affine transformation to an image.

The function warpAffine transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} ( \texttt{M} _{11} x + \texttt{M} _{12} y + \texttt{M} _{13}, \texttt{M} _{21} x + \texttt{M} _{22} y + \texttt{M} _{23})\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(2\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (see #InterpolationFlags) and the optional flag WARP_INVERSE_MAP that means that M is the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (see #BorderTypes); when borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to the "outliers" in the source image are not modified by the function.
borderValuevalue used in case of a constant border; by default, it is 0.
See also
warpPerspective, resize, remap, getRectSubPix, transform

◆ warpAffine() [4/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpAffine ( Mat src,
Mat dst,
Mat M,
in Vec2d dsize,
int flags,
int borderMode,
in Vec4d borderValue )
static

Applies an affine transformation to an image.

The function warpAffine transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} ( \texttt{M} _{11} x + \texttt{M} _{12} y + \texttt{M} _{13}, \texttt{M} _{21} x + \texttt{M} _{22} y + \texttt{M} _{23})\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(2\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (see #InterpolationFlags) and the optional flag WARP_INVERSE_MAP that means that M is the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (see #BorderTypes); when borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to the "outliers" in the source image are not modified by the function.
borderValuevalue used in case of a constant border; by default, it is 0.
See also
warpPerspective, resize, remap, getRectSubPix, transform

◆ warpAffine() [5/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpAffine ( Mat src,
Mat dst,
Mat M,
in(double width, double height) dsize )
static

Applies an affine transformation to an image.

The function warpAffine transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} ( \texttt{M} _{11} x + \texttt{M} _{12} y + \texttt{M} _{13}, \texttt{M} _{21} x + \texttt{M} _{22} y + \texttt{M} _{23})\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(2\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (see #InterpolationFlags) and the optional flag WARP_INVERSE_MAP that means that M is the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (see #BorderTypes); when borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to the "outliers" in the source image are not modified by the function.
borderValuevalue used in case of a constant border; by default, it is 0.
See also
warpPerspective, resize, remap, getRectSubPix, transform

◆ warpAffine() [6/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpAffine ( Mat src,
Mat dst,
Mat M,
in(double width, double height) dsize,
int flags )
static

Applies an affine transformation to an image.

The function warpAffine transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} ( \texttt{M} _{11} x + \texttt{M} _{12} y + \texttt{M} _{13}, \texttt{M} _{21} x + \texttt{M} _{22} y + \texttt{M} _{23})\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(2\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (see #InterpolationFlags) and the optional flag WARP_INVERSE_MAP that means that M is the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (see #BorderTypes); when borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to the "outliers" in the source image are not modified by the function.
borderValuevalue used in case of a constant border; by default, it is 0.
See also
warpPerspective, resize, remap, getRectSubPix, transform

◆ warpAffine() [7/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpAffine ( Mat src,
Mat dst,
Mat M,
in(double width, double height) dsize,
int flags,
int borderMode )
static

Applies an affine transformation to an image.

The function warpAffine transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} ( \texttt{M} _{11} x + \texttt{M} _{12} y + \texttt{M} _{13}, \texttt{M} _{21} x + \texttt{M} _{22} y + \texttt{M} _{23})\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(2\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (see #InterpolationFlags) and the optional flag WARP_INVERSE_MAP that means that M is the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (see #BorderTypes); when borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to the "outliers" in the source image are not modified by the function.
borderValuevalue used in case of a constant border; by default, it is 0.
See also
warpPerspective, resize, remap, getRectSubPix, transform

◆ warpAffine() [8/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpAffine ( Mat src,
Mat dst,
Mat M,
in(double width, double height) dsize,
int flags,
int borderMode,
in(double v0, double v1, double v2, double v3) borderValue )
static

Applies an affine transformation to an image.

The function warpAffine transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} ( \texttt{M} _{11} x + \texttt{M} _{12} y + \texttt{M} _{13}, \texttt{M} _{21} x + \texttt{M} _{22} y + \texttt{M} _{23})\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(2\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (see #InterpolationFlags) and the optional flag WARP_INVERSE_MAP that means that M is the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (see #BorderTypes); when borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to the "outliers" in the source image are not modified by the function.
borderValuevalue used in case of a constant border; by default, it is 0.
See also
warpPerspective, resize, remap, getRectSubPix, transform

◆ warpAffine() [9/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpAffine ( Mat src,
Mat dst,
Mat M,
Size dsize )
static

Applies an affine transformation to an image.

The function warpAffine transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} ( \texttt{M} _{11} x + \texttt{M} _{12} y + \texttt{M} _{13}, \texttt{M} _{21} x + \texttt{M} _{22} y + \texttt{M} _{23})\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(2\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (see #InterpolationFlags) and the optional flag WARP_INVERSE_MAP that means that M is the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (see #BorderTypes); when borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to the "outliers" in the source image are not modified by the function.
borderValuevalue used in case of a constant border; by default, it is 0.
See also
warpPerspective, resize, remap, getRectSubPix, transform

◆ warpAffine() [10/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpAffine ( Mat src,
Mat dst,
Mat M,
Size dsize,
int flags )
static

Applies an affine transformation to an image.

The function warpAffine transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} ( \texttt{M} _{11} x + \texttt{M} _{12} y + \texttt{M} _{13}, \texttt{M} _{21} x + \texttt{M} _{22} y + \texttt{M} _{23})\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(2\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (see #InterpolationFlags) and the optional flag WARP_INVERSE_MAP that means that M is the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (see #BorderTypes); when borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to the "outliers" in the source image are not modified by the function.
borderValuevalue used in case of a constant border; by default, it is 0.
See also
warpPerspective, resize, remap, getRectSubPix, transform

◆ warpAffine() [11/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpAffine ( Mat src,
Mat dst,
Mat M,
Size dsize,
int flags,
int borderMode )
static

Applies an affine transformation to an image.

The function warpAffine transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} ( \texttt{M} _{11} x + \texttt{M} _{12} y + \texttt{M} _{13}, \texttt{M} _{21} x + \texttt{M} _{22} y + \texttt{M} _{23})\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(2\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (see #InterpolationFlags) and the optional flag WARP_INVERSE_MAP that means that M is the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (see #BorderTypes); when borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to the "outliers" in the source image are not modified by the function.
borderValuevalue used in case of a constant border; by default, it is 0.
See also
warpPerspective, resize, remap, getRectSubPix, transform

◆ warpAffine() [12/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpAffine ( Mat src,
Mat dst,
Mat M,
Size dsize,
int flags,
int borderMode,
Scalar borderValue )
static

Applies an affine transformation to an image.

The function warpAffine transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} ( \texttt{M} _{11} x + \texttt{M} _{12} y + \texttt{M} _{13}, \texttt{M} _{21} x + \texttt{M} _{22} y + \texttt{M} _{23})\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(2\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (see #InterpolationFlags) and the optional flag WARP_INVERSE_MAP that means that M is the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (see #BorderTypes); when borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to the "outliers" in the source image are not modified by the function.
borderValuevalue used in case of a constant border; by default, it is 0.
See also
warpPerspective, resize, remap, getRectSubPix, transform

◆ warpPerspective() [1/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPerspective ( Mat src,
Mat dst,
Mat M,
in Vec2d dsize )
static

Applies a perspective transformation to an image.

The function warpPerspective transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} \left ( \frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x + M_{32} y + M_{33}} , \frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \right )\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(3\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (#BORDER_CONSTANT or #BORDER_REPLICATE).
borderValuevalue used in case of a constant border; by default, it equals 0.
See also
warpAffine, resize, remap, getRectSubPix, perspectiveTransform

◆ warpPerspective() [2/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPerspective ( Mat src,
Mat dst,
Mat M,
in Vec2d dsize,
int flags )
static

Applies a perspective transformation to an image.

The function warpPerspective transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} \left ( \frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x + M_{32} y + M_{33}} , \frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \right )\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(3\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (#BORDER_CONSTANT or #BORDER_REPLICATE).
borderValuevalue used in case of a constant border; by default, it equals 0.
See also
warpAffine, resize, remap, getRectSubPix, perspectiveTransform

◆ warpPerspective() [3/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPerspective ( Mat src,
Mat dst,
Mat M,
in Vec2d dsize,
int flags,
int borderMode )
static

Applies a perspective transformation to an image.

The function warpPerspective transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} \left ( \frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x + M_{32} y + M_{33}} , \frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \right )\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(3\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (#BORDER_CONSTANT or #BORDER_REPLICATE).
borderValuevalue used in case of a constant border; by default, it equals 0.
See also
warpAffine, resize, remap, getRectSubPix, perspectiveTransform

◆ warpPerspective() [4/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPerspective ( Mat src,
Mat dst,
Mat M,
in Vec2d dsize,
int flags,
int borderMode,
in Vec4d borderValue )
static

Applies a perspective transformation to an image.

The function warpPerspective transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} \left ( \frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x + M_{32} y + M_{33}} , \frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \right )\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(3\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (#BORDER_CONSTANT or #BORDER_REPLICATE).
borderValuevalue used in case of a constant border; by default, it equals 0.
See also
warpAffine, resize, remap, getRectSubPix, perspectiveTransform

◆ warpPerspective() [5/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPerspective ( Mat src,
Mat dst,
Mat M,
in(double width, double height) dsize )
static

Applies a perspective transformation to an image.

The function warpPerspective transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} \left ( \frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x + M_{32} y + M_{33}} , \frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \right )\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(3\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (#BORDER_CONSTANT or #BORDER_REPLICATE).
borderValuevalue used in case of a constant border; by default, it equals 0.
See also
warpAffine, resize, remap, getRectSubPix, perspectiveTransform

◆ warpPerspective() [6/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPerspective ( Mat src,
Mat dst,
Mat M,
in(double width, double height) dsize,
int flags )
static

Applies a perspective transformation to an image.

The function warpPerspective transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} \left ( \frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x + M_{32} y + M_{33}} , \frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \right )\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(3\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (#BORDER_CONSTANT or #BORDER_REPLICATE).
borderValuevalue used in case of a constant border; by default, it equals 0.
See also
warpAffine, resize, remap, getRectSubPix, perspectiveTransform

◆ warpPerspective() [7/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPerspective ( Mat src,
Mat dst,
Mat M,
in(double width, double height) dsize,
int flags,
int borderMode )
static

Applies a perspective transformation to an image.

The function warpPerspective transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} \left ( \frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x + M_{32} y + M_{33}} , \frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \right )\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(3\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (#BORDER_CONSTANT or #BORDER_REPLICATE).
borderValuevalue used in case of a constant border; by default, it equals 0.
See also
warpAffine, resize, remap, getRectSubPix, perspectiveTransform

◆ warpPerspective() [8/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPerspective ( Mat src,
Mat dst,
Mat M,
in(double width, double height) dsize,
int flags,
int borderMode,
in(double v0, double v1, double v2, double v3) borderValue )
static

Applies a perspective transformation to an image.

The function warpPerspective transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} \left ( \frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x + M_{32} y + M_{33}} , \frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \right )\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(3\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (#BORDER_CONSTANT or #BORDER_REPLICATE).
borderValuevalue used in case of a constant border; by default, it equals 0.
See also
warpAffine, resize, remap, getRectSubPix, perspectiveTransform

◆ warpPerspective() [9/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPerspective ( Mat src,
Mat dst,
Mat M,
Size dsize )
static

Applies a perspective transformation to an image.

The function warpPerspective transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} \left ( \frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x + M_{32} y + M_{33}} , \frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \right )\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(3\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (#BORDER_CONSTANT or #BORDER_REPLICATE).
borderValuevalue used in case of a constant border; by default, it equals 0.
See also
warpAffine, resize, remap, getRectSubPix, perspectiveTransform

◆ warpPerspective() [10/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPerspective ( Mat src,
Mat dst,
Mat M,
Size dsize,
int flags )
static

Applies a perspective transformation to an image.

The function warpPerspective transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} \left ( \frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x + M_{32} y + M_{33}} , \frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \right )\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(3\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (#BORDER_CONSTANT or #BORDER_REPLICATE).
borderValuevalue used in case of a constant border; by default, it equals 0.
See also
warpAffine, resize, remap, getRectSubPix, perspectiveTransform

◆ warpPerspective() [11/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPerspective ( Mat src,
Mat dst,
Mat M,
Size dsize,
int flags,
int borderMode )
static

Applies a perspective transformation to an image.

The function warpPerspective transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} \left ( \frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x + M_{32} y + M_{33}} , \frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \right )\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(3\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (#BORDER_CONSTANT or #BORDER_REPLICATE).
borderValuevalue used in case of a constant border; by default, it equals 0.
See also
warpAffine, resize, remap, getRectSubPix, perspectiveTransform

◆ warpPerspective() [12/12]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPerspective ( Mat src,
Mat dst,
Mat M,
Size dsize,
int flags,
int borderMode,
Scalar borderValue )
static

Applies a perspective transformation to an image.

The function warpPerspective transforms the source image using the specified matrix:

\[\texttt{dst} (x,y) = \texttt{src} \left ( \frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x + M_{32} y + M_{33}} , \frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \right )\]

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
srcinput image.
dstoutput image that has the size dsize and the same type as src .
M\(3\times 3\) transformation matrix.
dsizesize of the output image.
flagscombination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
borderModepixel extrapolation method (#BORDER_CONSTANT or #BORDER_REPLICATE).
borderValuevalue used in case of a constant border; by default, it equals 0.
See also
warpAffine, resize, remap, getRectSubPix, perspectiveTransform

◆ warpPolar() [1/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPolar ( Mat src,
Mat dst,
in Vec2d dsize,
in Vec2d center,
double maxRadius,
int flags )
static

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

Transform the source image using the following transformation:

\[ dst(\rho , \phi ) = src(x,y) \]

where

\[ \begin{array}{l} \vec{I} = (x - center.x, \;y - center.y) \\ \phi = Kangle \cdot \texttt{angle} (\vec{I}) \\ \rho = \left\{\begin{matrix} Klin \cdot \texttt{magnitude} (\vec{I}) & default \\ Klog \cdot log_e(\texttt{magnitude} (\vec{I})) & if \; semilog \\ \end{matrix}\right. \end{array} \]

and

\[ \begin{array}{l} Kangle = dsize.height / 2\Pi \\ Klin = dsize.width / maxRadius \\ Klog = dsize.width / log_e(maxRadius) \\ \end{array} \]

Linear vs semilog mapping

Polar mapping can be linear or semi-log. Add one of #WarpPolarMode to flags to specify the polar mapping mode.

Linear is the default mode.

The semilog mapping emulates the human "foveal" vision that permit very high acuity on the line of sight (central vision) in contrast to peripheral vision where acuity is minor.

Option on dsize:
  • if both values in dsize &lt;=0 (default), the destination image will have (almost) same area of source bounding circle:

    \[\begin{array}{l} dsize.area \leftarrow (maxRadius^2 \cdot \Pi) \\ dsize.width = \texttt{cvRound}(maxRadius) \\ dsize.height = \texttt{cvRound}(maxRadius \cdot \Pi) \\ \end{array}\]

  • if only dsize.height &lt;= 0, the destination image area will be proportional to the bounding circle area but scaled by Kx * Kx:

    \[\begin{array}{l} dsize.height = \texttt{cvRound}(dsize.width \cdot \Pi) \\ \end{array} \]

  • if both values in dsize &gt; 0, the destination image will have the given size therefore the area of the bounding circle will be scaled to dsize.
Reverse mapping

You can get reverse mapping adding WARP_INVERSE_MAP to flags

In addiction, to calculate the original coordinate from a polar mapped coordinate \((rho, phi)->(x, y)\):

Parameters
srcSource image.
dstDestination image. It will have same type as src.
dsizeThe destination image size (see description for valid options).
centerThe transformation center.
maxRadiusThe radius of the bounding circle to transform. It determines the inverse magnitude scale parameter too.
flagsA combination of interpolation methods, #InterpolationFlags + #WarpPolarMode.
  • The function can not operate in-place.
  • To calculate magnitude and angle in degrees #cartToPolar is used internally thus angles are measured from 0 to 360 with accuracy about 0.3 degrees.
  • This function uses remap. Due to current implementation limitations the size of an input and output images should be less than 32767x32767.
See also
cv::remap

◆ warpPolar() [2/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPolar ( Mat src,
Mat dst,
in(double width, double height) dsize,
in(double x, double y) center,
double maxRadius,
int flags )
static

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

Transform the source image using the following transformation:

\[ dst(\rho , \phi ) = src(x,y) \]

where

\[ \begin{array}{l} \vec{I} = (x - center.x, \;y - center.y) \\ \phi = Kangle \cdot \texttt{angle} (\vec{I}) \\ \rho = \left\{\begin{matrix} Klin \cdot \texttt{magnitude} (\vec{I}) & default \\ Klog \cdot log_e(\texttt{magnitude} (\vec{I})) & if \; semilog \\ \end{matrix}\right. \end{array} \]

and

\[ \begin{array}{l} Kangle = dsize.height / 2\Pi \\ Klin = dsize.width / maxRadius \\ Klog = dsize.width / log_e(maxRadius) \\ \end{array} \]

Linear vs semilog mapping

Polar mapping can be linear or semi-log. Add one of #WarpPolarMode to flags to specify the polar mapping mode.

Linear is the default mode.

The semilog mapping emulates the human "foveal" vision that permit very high acuity on the line of sight (central vision) in contrast to peripheral vision where acuity is minor.

Option on dsize:
  • if both values in dsize &lt;=0 (default), the destination image will have (almost) same area of source bounding circle:

    \[\begin{array}{l} dsize.area \leftarrow (maxRadius^2 \cdot \Pi) \\ dsize.width = \texttt{cvRound}(maxRadius) \\ dsize.height = \texttt{cvRound}(maxRadius \cdot \Pi) \\ \end{array}\]

  • if only dsize.height &lt;= 0, the destination image area will be proportional to the bounding circle area but scaled by Kx * Kx:

    \[\begin{array}{l} dsize.height = \texttt{cvRound}(dsize.width \cdot \Pi) \\ \end{array} \]

  • if both values in dsize &gt; 0, the destination image will have the given size therefore the area of the bounding circle will be scaled to dsize.
Reverse mapping

You can get reverse mapping adding WARP_INVERSE_MAP to flags

In addiction, to calculate the original coordinate from a polar mapped coordinate \((rho, phi)->(x, y)\):

Parameters
srcSource image.
dstDestination image. It will have same type as src.
dsizeThe destination image size (see description for valid options).
centerThe transformation center.
maxRadiusThe radius of the bounding circle to transform. It determines the inverse magnitude scale parameter too.
flagsA combination of interpolation methods, #InterpolationFlags + #WarpPolarMode.
  • The function can not operate in-place.
  • To calculate magnitude and angle in degrees #cartToPolar is used internally thus angles are measured from 0 to 360 with accuracy about 0.3 degrees.
  • This function uses remap. Due to current implementation limitations the size of an input and output images should be less than 32767x32767.
See also
cv::remap

◆ warpPolar() [3/3]

static void OpenCVForUnity.ImgprocModule.Imgproc.warpPolar ( Mat src,
Mat dst,
Size dsize,
Point center,
double maxRadius,
int flags )
static

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

Transform the source image using the following transformation:

\[ dst(\rho , \phi ) = src(x,y) \]

where

\[ \begin{array}{l} \vec{I} = (x - center.x, \;y - center.y) \\ \phi = Kangle \cdot \texttt{angle} (\vec{I}) \\ \rho = \left\{\begin{matrix} Klin \cdot \texttt{magnitude} (\vec{I}) & default \\ Klog \cdot log_e(\texttt{magnitude} (\vec{I})) & if \; semilog \\ \end{matrix}\right. \end{array} \]

and

\[ \begin{array}{l} Kangle = dsize.height / 2\Pi \\ Klin = dsize.width / maxRadius \\ Klog = dsize.width / log_e(maxRadius) \\ \end{array} \]

Linear vs semilog mapping

Polar mapping can be linear or semi-log. Add one of #WarpPolarMode to flags to specify the polar mapping mode.

Linear is the default mode.

The semilog mapping emulates the human "foveal" vision that permit very high acuity on the line of sight (central vision) in contrast to peripheral vision where acuity is minor.

Option on dsize:
  • if both values in dsize &lt;=0 (default), the destination image will have (almost) same area of source bounding circle:

    \[\begin{array}{l} dsize.area \leftarrow (maxRadius^2 \cdot \Pi) \\ dsize.width = \texttt{cvRound}(maxRadius) \\ dsize.height = \texttt{cvRound}(maxRadius \cdot \Pi) \\ \end{array}\]

  • if only dsize.height &lt;= 0, the destination image area will be proportional to the bounding circle area but scaled by Kx * Kx:

    \[\begin{array}{l} dsize.height = \texttt{cvRound}(dsize.width \cdot \Pi) \\ \end{array} \]

  • if both values in dsize &gt; 0, the destination image will have the given size therefore the area of the bounding circle will be scaled to dsize.
Reverse mapping

You can get reverse mapping adding WARP_INVERSE_MAP to flags

In addiction, to calculate the original coordinate from a polar mapped coordinate \((rho, phi)->(x, y)\):

Parameters
srcSource image.
dstDestination image. It will have same type as src.
dsizeThe destination image size (see description for valid options).
centerThe transformation center.
maxRadiusThe radius of the bounding circle to transform. It determines the inverse magnitude scale parameter too.
flagsA combination of interpolation methods, #InterpolationFlags + #WarpPolarMode.
  • The function can not operate in-place.
  • To calculate magnitude and angle in degrees #cartToPolar is used internally thus angles are measured from 0 to 360 with accuracy about 0.3 degrees.
  • This function uses remap. Due to current implementation limitations the size of an input and output images should be less than 32767x32767.
See also
cv::remap

◆ watershed()

static void OpenCVForUnity.ImgprocModule.Imgproc.watershed ( Mat image,
Mat markers )
static

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

The function implements one of the variants of watershed, non-parametric marker-based segmentation algorithm, described in [Meyer92] .

Before passing the image to the function, you have to roughly outline the desired regions in the image markers with positive (>0) indices. So, every region is represented as one or more connected components with the pixel values 1, 2, 3, and so on. Such markers can be retrieved from a binary mask using findContours and drawContours (see the watershed.cpp demo). The markers are "seeds" of the future image regions. All the other pixels in markers , whose relation to the outlined regions is not known and should be defined by the algorithm, should be set to 0's. In the function output, each pixel in markers is set to a value of the "seed" components or to -1 at boundaries between the regions.

Note
Any two neighbor connected components are not necessarily separated by a watershed boundary (-1's pixels); for example, they can touch each other in the initial marker image passed to the function.
Parameters
imageInput 8-bit 3-channel image.
markersInput/output 32-bit single-channel image (map) of markers. It should have the same size as image .
See also
findContours

Member Data Documentation

◆ ADAPTIVE_THRESH_GAUSSIAN_C

const int OpenCVForUnity.ImgprocModule.Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C = 1
static

◆ ADAPTIVE_THRESH_MEAN_C

const int OpenCVForUnity.ImgprocModule.Imgproc.ADAPTIVE_THRESH_MEAN_C = 0
static

◆ CC_STAT_AREA

const int OpenCVForUnity.ImgprocModule.Imgproc.CC_STAT_AREA = 4
static

◆ CC_STAT_HEIGHT

const int OpenCVForUnity.ImgprocModule.Imgproc.CC_STAT_HEIGHT = 3
static

◆ CC_STAT_LEFT

const int OpenCVForUnity.ImgprocModule.Imgproc.CC_STAT_LEFT = 0
static

◆ CC_STAT_MAX

const int OpenCVForUnity.ImgprocModule.Imgproc.CC_STAT_MAX = 5
static

◆ CC_STAT_TOP

const int OpenCVForUnity.ImgprocModule.Imgproc.CC_STAT_TOP = 1
static

◆ CC_STAT_WIDTH

const int OpenCVForUnity.ImgprocModule.Imgproc.CC_STAT_WIDTH = 2
static

◆ CCL_BBDT

const int OpenCVForUnity.ImgprocModule.Imgproc.CCL_BBDT = 4
static

◆ CCL_BOLELLI

const int OpenCVForUnity.ImgprocModule.Imgproc.CCL_BOLELLI = 2
static

◆ CCL_DEFAULT

const int OpenCVForUnity.ImgprocModule.Imgproc.CCL_DEFAULT = -1
static

◆ CCL_GRANA

const int OpenCVForUnity.ImgprocModule.Imgproc.CCL_GRANA = 1
static

◆ CCL_SAUF

const int OpenCVForUnity.ImgprocModule.Imgproc.CCL_SAUF = 3
static

◆ CCL_SPAGHETTI

const int OpenCVForUnity.ImgprocModule.Imgproc.CCL_SPAGHETTI = 5
static

◆ CCL_WU

const int OpenCVForUnity.ImgprocModule.Imgproc.CCL_WU = 0
static

◆ CHAIN_APPROX_NONE

const int OpenCVForUnity.ImgprocModule.Imgproc.CHAIN_APPROX_NONE = 1
static

◆ CHAIN_APPROX_SIMPLE

const int OpenCVForUnity.ImgprocModule.Imgproc.CHAIN_APPROX_SIMPLE = 2
static

◆ CHAIN_APPROX_TC89_KCOS

const int OpenCVForUnity.ImgprocModule.Imgproc.CHAIN_APPROX_TC89_KCOS = 4
static

◆ CHAIN_APPROX_TC89_L1

const int OpenCVForUnity.ImgprocModule.Imgproc.CHAIN_APPROX_TC89_L1 = 3
static

◆ COLOR_BayerBG2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBG2BGR = 46
static

◆ COLOR_BayerBG2BGR_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBG2BGR_EA = 135
static

◆ COLOR_BayerBG2BGR_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBG2BGR_VNG = 62
static

◆ COLOR_BayerBG2BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBG2BGRA = 139
static

◆ COLOR_BayerBG2GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBG2GRAY = 86
static

◆ COLOR_BayerBG2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBG2RGB = COLOR_BayerRG2BGR
static

◆ COLOR_BayerBG2RGB_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBG2RGB_EA = COLOR_BayerRG2BGR_EA
static

◆ COLOR_BayerBG2RGB_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBG2RGB_VNG = COLOR_BayerRG2BGR_VNG
static

◆ COLOR_BayerBG2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBG2RGBA = COLOR_BayerRG2BGRA
static

◆ COLOR_BayerBGGR2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBGGR2BGR = COLOR_BayerRG2BGR
static

◆ COLOR_BayerBGGR2BGR_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBGGR2BGR_EA = COLOR_BayerRG2BGR_EA
static

◆ COLOR_BayerBGGR2BGR_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBGGR2BGR_VNG = COLOR_BayerRG2BGR_VNG
static

◆ COLOR_BayerBGGR2BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBGGR2BGRA = COLOR_BayerRG2BGRA
static

◆ COLOR_BayerBGGR2GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBGGR2GRAY = COLOR_BayerRG2GRAY
static

◆ COLOR_BayerBGGR2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBGGR2RGB = COLOR_BayerRGGB2BGR
static

◆ COLOR_BayerBGGR2RGB_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBGGR2RGB_EA = COLOR_BayerRGGB2BGR_EA
static

◆ COLOR_BayerBGGR2RGB_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBGGR2RGB_VNG = COLOR_BayerRGGB2BGR_VNG
static

◆ COLOR_BayerBGGR2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerBGGR2RGBA = COLOR_BayerRGGB2BGRA
static

◆ COLOR_BayerGB2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGB2BGR = 47
static

◆ COLOR_BayerGB2BGR_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGB2BGR_EA = 136
static

◆ COLOR_BayerGB2BGR_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGB2BGR_VNG = 63
static

◆ COLOR_BayerGB2BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGB2BGRA = 140
static

◆ COLOR_BayerGB2GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGB2GRAY = 87
static

◆ COLOR_BayerGB2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGB2RGB = COLOR_BayerGR2BGR
static

◆ COLOR_BayerGB2RGB_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGB2RGB_EA = COLOR_BayerGR2BGR_EA
static

◆ COLOR_BayerGB2RGB_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGB2RGB_VNG = COLOR_BayerGR2BGR_VNG
static

◆ COLOR_BayerGB2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGB2RGBA = COLOR_BayerGR2BGRA
static

◆ COLOR_BayerGBRG2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGBRG2BGR = COLOR_BayerGR2BGR
static

◆ COLOR_BayerGBRG2BGR_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGBRG2BGR_EA = COLOR_BayerGR2BGR_EA
static

◆ COLOR_BayerGBRG2BGR_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGBRG2BGR_VNG = COLOR_BayerGR2BGR_VNG
static

◆ COLOR_BayerGBRG2BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGBRG2BGRA = COLOR_BayerGR2BGRA
static

◆ COLOR_BayerGBRG2GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGBRG2GRAY = COLOR_BayerGR2GRAY
static

◆ COLOR_BayerGBRG2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGBRG2RGB = COLOR_BayerGRBG2BGR
static

◆ COLOR_BayerGBRG2RGB_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGBRG2RGB_EA = COLOR_BayerGRBG2BGR_EA
static

◆ COLOR_BayerGBRG2RGB_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGBRG2RGB_VNG = COLOR_BayerGRBG2BGR_VNG
static

◆ COLOR_BayerGBRG2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGBRG2RGBA = COLOR_BayerGRBG2BGRA
static

◆ COLOR_BayerGR2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGR2BGR = 49
static

◆ COLOR_BayerGR2BGR_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGR2BGR_EA = 138
static

◆ COLOR_BayerGR2BGR_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGR2BGR_VNG = 65
static

◆ COLOR_BayerGR2BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGR2BGRA = 142
static

◆ COLOR_BayerGR2GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGR2GRAY = 89
static

◆ COLOR_BayerGR2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGR2RGB = COLOR_BayerGB2BGR
static

◆ COLOR_BayerGR2RGB_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGR2RGB_EA = COLOR_BayerGB2BGR_EA
static

◆ COLOR_BayerGR2RGB_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGR2RGB_VNG = COLOR_BayerGB2BGR_VNG
static

◆ COLOR_BayerGR2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGR2RGBA = COLOR_BayerGB2BGRA
static

◆ COLOR_BayerGRBG2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGRBG2BGR = COLOR_BayerGB2BGR
static

◆ COLOR_BayerGRBG2BGR_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGRBG2BGR_EA = COLOR_BayerGB2BGR_EA
static

◆ COLOR_BayerGRBG2BGR_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGRBG2BGR_VNG = COLOR_BayerGB2BGR_VNG
static

◆ COLOR_BayerGRBG2BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGRBG2BGRA = COLOR_BayerGB2BGRA
static

◆ COLOR_BayerGRBG2GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGRBG2GRAY = COLOR_BayerGB2GRAY
static

◆ COLOR_BayerGRBG2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGRBG2RGB = COLOR_BayerGBRG2BGR
static

◆ COLOR_BayerGRBG2RGB_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGRBG2RGB_EA = COLOR_BayerGBRG2BGR_EA
static

◆ COLOR_BayerGRBG2RGB_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGRBG2RGB_VNG = COLOR_BayerGBRG2BGR_VNG
static

◆ COLOR_BayerGRBG2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerGRBG2RGBA = COLOR_BayerGBRG2BGRA
static

◆ COLOR_BayerRG2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRG2BGR = 48
static

◆ COLOR_BayerRG2BGR_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRG2BGR_EA = 137
static

◆ COLOR_BayerRG2BGR_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRG2BGR_VNG = 64
static

◆ COLOR_BayerRG2BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRG2BGRA = 141
static

◆ COLOR_BayerRG2GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRG2GRAY = 88
static

◆ COLOR_BayerRG2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRG2RGB = COLOR_BayerBG2BGR
static

◆ COLOR_BayerRG2RGB_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRG2RGB_EA = COLOR_BayerBG2BGR_EA
static

◆ COLOR_BayerRG2RGB_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRG2RGB_VNG = COLOR_BayerBG2BGR_VNG
static

◆ COLOR_BayerRG2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRG2RGBA = COLOR_BayerBG2BGRA
static

◆ COLOR_BayerRGGB2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRGGB2BGR = COLOR_BayerBG2BGR
static

◆ COLOR_BayerRGGB2BGR_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRGGB2BGR_EA = COLOR_BayerBG2BGR_EA
static

◆ COLOR_BayerRGGB2BGR_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRGGB2BGR_VNG = COLOR_BayerBG2BGR_VNG
static

◆ COLOR_BayerRGGB2BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRGGB2BGRA = COLOR_BayerBG2BGRA
static

◆ COLOR_BayerRGGB2GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRGGB2GRAY = COLOR_BayerBG2GRAY
static

◆ COLOR_BayerRGGB2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRGGB2RGB = COLOR_BayerBGGR2BGR
static

◆ COLOR_BayerRGGB2RGB_EA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRGGB2RGB_EA = COLOR_BayerBGGR2BGR_EA
static

◆ COLOR_BayerRGGB2RGB_VNG

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRGGB2RGB_VNG = COLOR_BayerBGGR2BGR_VNG
static

◆ COLOR_BayerRGGB2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BayerRGGB2RGBA = COLOR_BayerBGGR2BGRA
static

◆ COLOR_BGR2BGR555

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2BGR555 = 22
static

◆ COLOR_BGR2BGR565

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2BGR565 = 12
static

◆ COLOR_BGR2BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2BGRA = 0
static

◆ COLOR_BGR2GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2GRAY = 6
static

◆ COLOR_BGR2HLS

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2HLS = 52
static

◆ COLOR_BGR2HLS_FULL

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2HLS_FULL = 68
static

◆ COLOR_BGR2HSV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2HSV = 40
static

◆ COLOR_BGR2HSV_FULL

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2HSV_FULL = 66
static

◆ COLOR_BGR2Lab

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2Lab = 44
static

◆ COLOR_BGR2Luv

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2Luv = 50
static

◆ COLOR_BGR2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2RGB = 4
static

◆ COLOR_BGR2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2RGBA = 2
static

◆ COLOR_BGR2XYZ

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2XYZ = 32
static

◆ COLOR_BGR2YCrCb

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2YCrCb = 36
static

◆ COLOR_BGR2YUV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2YUV = 82
static

◆ COLOR_BGR2YUV_I420

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2YUV_I420 = 128
static

◆ COLOR_BGR2YUV_IYUV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2YUV_IYUV = COLOR_BGR2YUV_I420
static

◆ COLOR_BGR2YUV_UYNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2YUV_UYNV = COLOR_BGR2YUV_UYVY
static

◆ COLOR_BGR2YUV_UYVY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2YUV_UYVY = 144
static

◆ COLOR_BGR2YUV_Y422

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2YUV_Y422 = COLOR_BGR2YUV_UYVY
static

◆ COLOR_BGR2YUV_YUNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2YUV_YUNV = COLOR_BGR2YUV_YUY2
static

◆ COLOR_BGR2YUV_YUY2

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2YUV_YUY2 = 148
static

◆ COLOR_BGR2YUV_YUYV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2YUV_YUYV = COLOR_BGR2YUV_YUY2
static

◆ COLOR_BGR2YUV_YV12

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2YUV_YV12 = 132
static

◆ COLOR_BGR2YUV_YVYU

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR2YUV_YVYU = 150
static

◆ COLOR_BGR5552BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR5552BGR = 24
static

◆ COLOR_BGR5552BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR5552BGRA = 28
static

◆ COLOR_BGR5552GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR5552GRAY = 31
static

◆ COLOR_BGR5552RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR5552RGB = 25
static

◆ COLOR_BGR5552RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR5552RGBA = 29
static

◆ COLOR_BGR5652BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR5652BGR = 14
static

◆ COLOR_BGR5652BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR5652BGRA = 18
static

◆ COLOR_BGR5652GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR5652GRAY = 21
static

◆ COLOR_BGR5652RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR5652RGB = 15
static

◆ COLOR_BGR5652RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGR5652RGBA = 19
static

◆ COLOR_BGRA2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2BGR = 1
static

◆ COLOR_BGRA2BGR555

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2BGR555 = 26
static

◆ COLOR_BGRA2BGR565

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2BGR565 = 16
static

◆ COLOR_BGRA2GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2GRAY = 10
static

◆ COLOR_BGRA2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2RGB = COLOR_RGBA2BGR
static

◆ COLOR_BGRA2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2RGBA = 5
static

◆ COLOR_BGRA2YUV_I420

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2YUV_I420 = 130
static

◆ COLOR_BGRA2YUV_IYUV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2YUV_IYUV = COLOR_BGRA2YUV_I420
static

◆ COLOR_BGRA2YUV_UYNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2YUV_UYNV = COLOR_BGRA2YUV_UYVY
static

◆ COLOR_BGRA2YUV_UYVY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2YUV_UYVY = 146
static

◆ COLOR_BGRA2YUV_Y422

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2YUV_Y422 = COLOR_BGRA2YUV_UYVY
static

◆ COLOR_BGRA2YUV_YUNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2YUV_YUNV = COLOR_BGRA2YUV_YUY2
static

◆ COLOR_BGRA2YUV_YUY2

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2YUV_YUY2 = 152
static

◆ COLOR_BGRA2YUV_YUYV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2YUV_YUYV = COLOR_BGRA2YUV_YUY2
static

◆ COLOR_BGRA2YUV_YV12

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2YUV_YV12 = 134
static

◆ COLOR_BGRA2YUV_YVYU

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_BGRA2YUV_YVYU = 154
static

◆ COLOR_COLORCVT_MAX

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_COLORCVT_MAX = 155
static

◆ COLOR_GRAY2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_GRAY2BGR = 8
static

◆ COLOR_GRAY2BGR555

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_GRAY2BGR555 = 30
static

◆ COLOR_GRAY2BGR565

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_GRAY2BGR565 = 20
static

◆ COLOR_GRAY2BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_GRAY2BGRA = 9
static

◆ COLOR_GRAY2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_GRAY2RGB = COLOR_GRAY2BGR
static

◆ COLOR_GRAY2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_GRAY2RGBA = COLOR_GRAY2BGRA
static

◆ COLOR_HLS2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_HLS2BGR = 60
static

◆ COLOR_HLS2BGR_FULL

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_HLS2BGR_FULL = 72
static

◆ COLOR_HLS2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_HLS2RGB = 61
static

◆ COLOR_HLS2RGB_FULL

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_HLS2RGB_FULL = 73
static

◆ COLOR_HSV2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_HSV2BGR = 54
static

◆ COLOR_HSV2BGR_FULL

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_HSV2BGR_FULL = 70
static

◆ COLOR_HSV2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_HSV2RGB = 55
static

◆ COLOR_HSV2RGB_FULL

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_HSV2RGB_FULL = 71
static

◆ COLOR_Lab2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_Lab2BGR = 56
static

◆ COLOR_Lab2LBGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_Lab2LBGR = 78
static

◆ COLOR_Lab2LRGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_Lab2LRGB = 79
static

◆ COLOR_Lab2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_Lab2RGB = 57
static

◆ COLOR_LBGR2Lab

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_LBGR2Lab = 74
static

◆ COLOR_LBGR2Luv

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_LBGR2Luv = 76
static

◆ COLOR_LRGB2Lab

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_LRGB2Lab = 75
static

◆ COLOR_LRGB2Luv

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_LRGB2Luv = 77
static

◆ COLOR_Luv2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_Luv2BGR = 58
static

◆ COLOR_Luv2LBGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_Luv2LBGR = 80
static

◆ COLOR_Luv2LRGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_Luv2LRGB = 81
static

◆ COLOR_Luv2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_Luv2RGB = 59
static

◆ COLOR_mRGBA2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_mRGBA2RGBA = 126
static

◆ COLOR_RGB2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2BGR = COLOR_BGR2RGB
static

◆ COLOR_RGB2BGR555

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2BGR555 = 23
static

◆ COLOR_RGB2BGR565

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2BGR565 = 13
static

◆ COLOR_RGB2BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2BGRA = COLOR_BGR2RGBA
static

◆ COLOR_RGB2GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2GRAY = 7
static

◆ COLOR_RGB2HLS

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2HLS = 53
static

◆ COLOR_RGB2HLS_FULL

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2HLS_FULL = 69
static

◆ COLOR_RGB2HSV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2HSV = 41
static

◆ COLOR_RGB2HSV_FULL

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2HSV_FULL = 67
static

◆ COLOR_RGB2Lab

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2Lab = 45
static

◆ COLOR_RGB2Luv

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2Luv = 51
static

◆ COLOR_RGB2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2RGBA = COLOR_BGR2BGRA
static

◆ COLOR_RGB2XYZ

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2XYZ = 33
static

◆ COLOR_RGB2YCrCb

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2YCrCb = 37
static

◆ COLOR_RGB2YUV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2YUV = 83
static

◆ COLOR_RGB2YUV_I420

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2YUV_I420 = 127
static

◆ COLOR_RGB2YUV_IYUV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2YUV_IYUV = COLOR_RGB2YUV_I420
static

◆ COLOR_RGB2YUV_UYNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2YUV_UYNV = COLOR_RGB2YUV_UYVY
static

◆ COLOR_RGB2YUV_UYVY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2YUV_UYVY = 143
static

◆ COLOR_RGB2YUV_Y422

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2YUV_Y422 = COLOR_RGB2YUV_UYVY
static

◆ COLOR_RGB2YUV_YUNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2YUV_YUNV = COLOR_RGB2YUV_YUY2
static

◆ COLOR_RGB2YUV_YUY2

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2YUV_YUY2 = 147
static

◆ COLOR_RGB2YUV_YUYV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2YUV_YUYV = COLOR_RGB2YUV_YUY2
static

◆ COLOR_RGB2YUV_YV12

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2YUV_YV12 = 131
static

◆ COLOR_RGB2YUV_YVYU

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGB2YUV_YVYU = 149
static

◆ COLOR_RGBA2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2BGR = 3
static

◆ COLOR_RGBA2BGR555

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2BGR555 = 27
static

◆ COLOR_RGBA2BGR565

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2BGR565 = 17
static

◆ COLOR_RGBA2BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2BGRA = COLOR_BGRA2RGBA
static

◆ COLOR_RGBA2GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2GRAY = 11
static

◆ COLOR_RGBA2mRGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2mRGBA = 125
static

◆ COLOR_RGBA2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2RGB = COLOR_BGRA2BGR
static

◆ COLOR_RGBA2YUV_I420

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2YUV_I420 = 129
static

◆ COLOR_RGBA2YUV_IYUV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2YUV_IYUV = COLOR_RGBA2YUV_I420
static

◆ COLOR_RGBA2YUV_UYNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2YUV_UYNV = COLOR_RGBA2YUV_UYVY
static

◆ COLOR_RGBA2YUV_UYVY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2YUV_UYVY = 145
static

◆ COLOR_RGBA2YUV_Y422

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2YUV_Y422 = COLOR_RGBA2YUV_UYVY
static

◆ COLOR_RGBA2YUV_YUNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2YUV_YUNV = COLOR_RGBA2YUV_YUY2
static

◆ COLOR_RGBA2YUV_YUY2

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2YUV_YUY2 = 151
static

◆ COLOR_RGBA2YUV_YUYV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2YUV_YUYV = COLOR_RGBA2YUV_YUY2
static

◆ COLOR_RGBA2YUV_YV12

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2YUV_YV12 = 133
static

◆ COLOR_RGBA2YUV_YVYU

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_RGBA2YUV_YVYU = 153
static

◆ COLOR_XYZ2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_XYZ2BGR = 34
static

◆ COLOR_XYZ2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_XYZ2RGB = 35
static

◆ COLOR_YCrCb2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YCrCb2BGR = 38
static

◆ COLOR_YCrCb2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YCrCb2RGB = 39
static

◆ COLOR_YUV2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGR = 84
static

◆ COLOR_YUV2BGR_I420

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGR_I420 = COLOR_YUV2BGR_IYUV
static

◆ COLOR_YUV2BGR_IYUV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGR_IYUV = 101
static

◆ COLOR_YUV2BGR_NV12

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGR_NV12 = 91
static

◆ COLOR_YUV2BGR_NV21

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGR_NV21 = 93
static

◆ COLOR_YUV2BGR_UYNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGR_UYNV = COLOR_YUV2BGR_UYVY
static

◆ COLOR_YUV2BGR_UYVY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGR_UYVY = 108
static

◆ COLOR_YUV2BGR_Y422

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGR_Y422 = COLOR_YUV2BGR_UYVY
static

◆ COLOR_YUV2BGR_YUNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGR_YUNV = COLOR_YUV2BGR_YUY2
static

◆ COLOR_YUV2BGR_YUY2

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGR_YUY2 = 116
static

◆ COLOR_YUV2BGR_YUYV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGR_YUYV = COLOR_YUV2BGR_YUY2
static

◆ COLOR_YUV2BGR_YV12

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGR_YV12 = 99
static

◆ COLOR_YUV2BGR_YVYU

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGR_YVYU = 118
static

◆ COLOR_YUV2BGRA_I420

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGRA_I420 = COLOR_YUV2BGRA_IYUV
static

◆ COLOR_YUV2BGRA_IYUV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGRA_IYUV = 105
static

◆ COLOR_YUV2BGRA_NV12

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGRA_NV12 = 95
static

◆ COLOR_YUV2BGRA_NV21

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGRA_NV21 = 97
static

◆ COLOR_YUV2BGRA_UYNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGRA_UYNV = COLOR_YUV2BGRA_UYVY
static

◆ COLOR_YUV2BGRA_UYVY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGRA_UYVY = 112
static

◆ COLOR_YUV2BGRA_Y422

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGRA_Y422 = COLOR_YUV2BGRA_UYVY
static

◆ COLOR_YUV2BGRA_YUNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGRA_YUNV = COLOR_YUV2BGRA_YUY2
static

◆ COLOR_YUV2BGRA_YUY2

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGRA_YUY2 = 120
static

◆ COLOR_YUV2BGRA_YUYV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGRA_YUYV = COLOR_YUV2BGRA_YUY2
static

◆ COLOR_YUV2BGRA_YV12

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGRA_YV12 = 103
static

◆ COLOR_YUV2BGRA_YVYU

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2BGRA_YVYU = 122
static

◆ COLOR_YUV2GRAY_420

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2GRAY_420 = 106
static

◆ COLOR_YUV2GRAY_I420

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2GRAY_I420 = COLOR_YUV2GRAY_420
static

◆ COLOR_YUV2GRAY_IYUV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2GRAY_IYUV = COLOR_YUV2GRAY_420
static

◆ COLOR_YUV2GRAY_NV12

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2GRAY_NV12 = COLOR_YUV2GRAY_420
static

◆ COLOR_YUV2GRAY_NV21

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2GRAY_NV21 = COLOR_YUV2GRAY_420
static

◆ COLOR_YUV2GRAY_UYNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2GRAY_UYNV = COLOR_YUV2GRAY_UYVY
static

◆ COLOR_YUV2GRAY_UYVY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2GRAY_UYVY = 123
static

◆ COLOR_YUV2GRAY_Y422

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2GRAY_Y422 = COLOR_YUV2GRAY_UYVY
static

◆ COLOR_YUV2GRAY_YUNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2GRAY_YUNV = COLOR_YUV2GRAY_YUY2
static

◆ COLOR_YUV2GRAY_YUY2

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2GRAY_YUY2 = 124
static

◆ COLOR_YUV2GRAY_YUYV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2GRAY_YUYV = COLOR_YUV2GRAY_YUY2
static

◆ COLOR_YUV2GRAY_YV12

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2GRAY_YV12 = COLOR_YUV2GRAY_420
static

◆ COLOR_YUV2GRAY_YVYU

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2GRAY_YVYU = COLOR_YUV2GRAY_YUY2
static

◆ COLOR_YUV2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGB = 85
static

◆ COLOR_YUV2RGB_I420

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGB_I420 = COLOR_YUV2RGB_IYUV
static

◆ COLOR_YUV2RGB_IYUV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGB_IYUV = 100
static

◆ COLOR_YUV2RGB_NV12

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGB_NV12 = 90
static

◆ COLOR_YUV2RGB_NV21

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGB_NV21 = 92
static

◆ COLOR_YUV2RGB_UYNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGB_UYNV = COLOR_YUV2RGB_UYVY
static

◆ COLOR_YUV2RGB_UYVY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGB_UYVY = 107
static

◆ COLOR_YUV2RGB_Y422

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGB_Y422 = COLOR_YUV2RGB_UYVY
static

◆ COLOR_YUV2RGB_YUNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGB_YUNV = COLOR_YUV2RGB_YUY2
static

◆ COLOR_YUV2RGB_YUY2

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGB_YUY2 = 115
static

◆ COLOR_YUV2RGB_YUYV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGB_YUYV = COLOR_YUV2RGB_YUY2
static

◆ COLOR_YUV2RGB_YV12

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGB_YV12 = 98
static

◆ COLOR_YUV2RGB_YVYU

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGB_YVYU = 117
static

◆ COLOR_YUV2RGBA_I420

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGBA_I420 = COLOR_YUV2RGBA_IYUV
static

◆ COLOR_YUV2RGBA_IYUV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGBA_IYUV = 104
static

◆ COLOR_YUV2RGBA_NV12

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGBA_NV12 = 94
static

◆ COLOR_YUV2RGBA_NV21

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGBA_NV21 = 96
static

◆ COLOR_YUV2RGBA_UYNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGBA_UYNV = COLOR_YUV2RGBA_UYVY
static

◆ COLOR_YUV2RGBA_UYVY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGBA_UYVY = 111
static

◆ COLOR_YUV2RGBA_Y422

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGBA_Y422 = COLOR_YUV2RGBA_UYVY
static

◆ COLOR_YUV2RGBA_YUNV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGBA_YUNV = COLOR_YUV2RGBA_YUY2
static

◆ COLOR_YUV2RGBA_YUY2

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGBA_YUY2 = 119
static

◆ COLOR_YUV2RGBA_YUYV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGBA_YUYV = COLOR_YUV2RGBA_YUY2
static

◆ COLOR_YUV2RGBA_YV12

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGBA_YV12 = 102
static

◆ COLOR_YUV2RGBA_YVYU

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV2RGBA_YVYU = 121
static

◆ COLOR_YUV420p2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV420p2BGR = COLOR_YUV2BGR_YV12
static

◆ COLOR_YUV420p2BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV420p2BGRA = COLOR_YUV2BGRA_YV12
static

◆ COLOR_YUV420p2GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV420p2GRAY = COLOR_YUV2GRAY_420
static

◆ COLOR_YUV420p2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV420p2RGB = COLOR_YUV2RGB_YV12
static

◆ COLOR_YUV420p2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV420p2RGBA = COLOR_YUV2RGBA_YV12
static

◆ COLOR_YUV420sp2BGR

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV420sp2BGR = COLOR_YUV2BGR_NV21
static

◆ COLOR_YUV420sp2BGRA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV420sp2BGRA = COLOR_YUV2BGRA_NV21
static

◆ COLOR_YUV420sp2GRAY

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV420sp2GRAY = COLOR_YUV2GRAY_420
static

◆ COLOR_YUV420sp2RGB

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV420sp2RGB = COLOR_YUV2RGB_NV21
static

◆ COLOR_YUV420sp2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLOR_YUV420sp2RGBA = COLOR_YUV2RGBA_NV21
static

◆ COLORMAP_AUTUMN

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_AUTUMN = 0
static

◆ COLORMAP_BONE

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_BONE = 1
static

◆ COLORMAP_CIVIDIS

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_CIVIDIS = 17
static

◆ COLORMAP_COOL

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_COOL = 8
static

◆ COLORMAP_DEEPGREEN

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_DEEPGREEN = 21
static

◆ COLORMAP_HOT

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_HOT = 11
static

◆ COLORMAP_HSV

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_HSV = 9
static

◆ COLORMAP_INFERNO

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_INFERNO = 14
static

◆ COLORMAP_JET

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_JET = 2
static

◆ COLORMAP_MAGMA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_MAGMA = 13
static

◆ COLORMAP_OCEAN

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_OCEAN = 5
static

◆ COLORMAP_PARULA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_PARULA = 12
static

◆ COLORMAP_PINK

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_PINK = 10
static

◆ COLORMAP_PLASMA

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_PLASMA = 15
static

◆ COLORMAP_RAINBOW

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_RAINBOW = 4
static

◆ COLORMAP_SPRING

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_SPRING = 7
static

◆ COLORMAP_SUMMER

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_SUMMER = 6
static

◆ COLORMAP_TURBO

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_TURBO = 20
static

◆ COLORMAP_TWILIGHT

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_TWILIGHT = 18
static

◆ COLORMAP_TWILIGHT_SHIFTED

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_TWILIGHT_SHIFTED = 19
static

◆ COLORMAP_VIRIDIS

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_VIRIDIS = 16
static

◆ COLORMAP_WINTER

const int OpenCVForUnity.ImgprocModule.Imgproc.COLORMAP_WINTER = 3
static

◆ CONTOURS_MATCH_I1

const int OpenCVForUnity.ImgprocModule.Imgproc.CONTOURS_MATCH_I1 = 1
static

◆ CONTOURS_MATCH_I2

const int OpenCVForUnity.ImgprocModule.Imgproc.CONTOURS_MATCH_I2 = 2
static

◆ CONTOURS_MATCH_I3

const int OpenCVForUnity.ImgprocModule.Imgproc.CONTOURS_MATCH_I3 = 3
static

◆ CV_BILATERAL

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_BILATERAL = 4
static

◆ CV_BLUR

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_BLUR = 1
static

◆ CV_BLUR_NO_SCALE

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_BLUR_NO_SCALE = 0
static

◆ CV_CANNY_L2_GRADIENT

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_CANNY_L2_GRADIENT = (1 << 31)
static

◆ CV_CHAIN_CODE

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_CHAIN_CODE = 0
static

◆ CV_CLOCKWISE

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_CLOCKWISE = 1
static

◆ CV_COMP_BHATTACHARYYA

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_COMP_BHATTACHARYYA = 3
static

◆ CV_COMP_CHISQR

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_COMP_CHISQR = 1
static

◆ CV_COMP_CHISQR_ALT

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_COMP_CHISQR_ALT = 4
static

◆ CV_COMP_CORREL

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_COMP_CORREL = 0
static

◆ CV_COMP_HELLINGER

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_COMP_HELLINGER = CV_COMP_BHATTACHARYYA
static

◆ CV_COMP_INTERSECT

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_COMP_INTERSECT = 2
static

◆ CV_COMP_KL_DIV

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_COMP_KL_DIV = 5
static

◆ CV_CONTOURS_MATCH_I1

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_CONTOURS_MATCH_I1 = 1
static

◆ CV_CONTOURS_MATCH_I2

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_CONTOURS_MATCH_I2 = 2
static

◆ CV_CONTOURS_MATCH_I3

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_CONTOURS_MATCH_I3 = 3
static

◆ CV_COUNTER_CLOCKWISE

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_COUNTER_CLOCKWISE = 2
static

◆ CV_DIST_C

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_DIST_C = 3
static

◆ CV_DIST_FAIR

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_DIST_FAIR = 5
static

◆ CV_DIST_HUBER

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_DIST_HUBER = 7
static

◆ CV_DIST_L1

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_DIST_L1 = 1
static

◆ CV_DIST_L12

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_DIST_L12 = 4
static

◆ CV_DIST_L2

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_DIST_L2 = 2
static

◆ CV_DIST_LABEL_CCOMP

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_DIST_LABEL_CCOMP = 0
static

◆ CV_DIST_LABEL_PIXEL

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_DIST_LABEL_PIXEL = 1
static

◆ CV_DIST_MASK_3

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_DIST_MASK_3 = 3
static

◆ CV_DIST_MASK_5

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_DIST_MASK_5 = 5
static

◆ CV_DIST_MASK_PRECISE

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_DIST_MASK_PRECISE = 0
static

◆ CV_DIST_USER

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_DIST_USER = -1
static

◆ CV_DIST_WELSCH

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_DIST_WELSCH = 6
static

◆ CV_GAUSSIAN

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_GAUSSIAN = 2
static

◆ CV_GAUSSIAN_5x5

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_GAUSSIAN_5x5 = 7
static

◆ CV_HOUGH_GRADIENT

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_HOUGH_GRADIENT = 3
static

◆ CV_HOUGH_MULTI_SCALE

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_HOUGH_MULTI_SCALE = 2
static

◆ CV_HOUGH_PROBABILISTIC

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_HOUGH_PROBABILISTIC = 1
static

◆ CV_HOUGH_STANDARD

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_HOUGH_STANDARD = 0
static

◆ CV_LINK_RUNS

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_LINK_RUNS = 5
static

◆ CV_MAX_SOBEL_KSIZE

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_MAX_SOBEL_KSIZE = 7
static

◆ CV_MEDIAN

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_MEDIAN = 3
static

◆ CV_mRGBA2RGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_mRGBA2RGBA = 126
static

◆ CV_POLY_APPROX_DP

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_POLY_APPROX_DP = 0
static

◆ CV_RGBA2mRGBA

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_RGBA2mRGBA = 125
static

◆ CV_SCHARR

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_SCHARR = -1
static

◆ CV_SHAPE_CROSS

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_SHAPE_CROSS = 1
static

◆ CV_SHAPE_CUSTOM

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_SHAPE_CUSTOM = 100
static

◆ CV_SHAPE_ELLIPSE

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_SHAPE_ELLIPSE = 2
static

◆ CV_SHAPE_RECT

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_SHAPE_RECT = 0
static

◆ CV_WARP_FILL_OUTLIERS

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_WARP_FILL_OUTLIERS = 8
static

◆ CV_WARP_INVERSE_MAP

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_WARP_INVERSE_MAP = 16
static

◆ CV_WARP_RELATIVE_MAP

const int OpenCVForUnity.ImgprocModule.Imgproc.CV_WARP_RELATIVE_MAP = 32
static

◆ DIST_C

const int OpenCVForUnity.ImgprocModule.Imgproc.DIST_C = 3
static

◆ DIST_FAIR

const int OpenCVForUnity.ImgprocModule.Imgproc.DIST_FAIR = 5
static

◆ DIST_HUBER

const int OpenCVForUnity.ImgprocModule.Imgproc.DIST_HUBER = 7
static

◆ DIST_L1

const int OpenCVForUnity.ImgprocModule.Imgproc.DIST_L1 = 1
static

◆ DIST_L12

const int OpenCVForUnity.ImgprocModule.Imgproc.DIST_L12 = 4
static

◆ DIST_L2

const int OpenCVForUnity.ImgprocModule.Imgproc.DIST_L2 = 2
static

◆ DIST_LABEL_CCOMP

const int OpenCVForUnity.ImgprocModule.Imgproc.DIST_LABEL_CCOMP = 0
static

◆ DIST_LABEL_PIXEL

const int OpenCVForUnity.ImgprocModule.Imgproc.DIST_LABEL_PIXEL = 1
static

◆ DIST_MASK_3

const int OpenCVForUnity.ImgprocModule.Imgproc.DIST_MASK_3 = 3
static

◆ DIST_MASK_5

const int OpenCVForUnity.ImgprocModule.Imgproc.DIST_MASK_5 = 5
static

◆ DIST_MASK_PRECISE

const int OpenCVForUnity.ImgprocModule.Imgproc.DIST_MASK_PRECISE = 0
static

◆ DIST_USER

const int OpenCVForUnity.ImgprocModule.Imgproc.DIST_USER = -1
static

◆ DIST_WELSCH

const int OpenCVForUnity.ImgprocModule.Imgproc.DIST_WELSCH = 6
static

◆ FILLED

const int OpenCVForUnity.ImgprocModule.Imgproc.FILLED = -1
static

◆ FILTER_SCHARR

const int OpenCVForUnity.ImgprocModule.Imgproc.FILTER_SCHARR = -1
static

◆ FLOODFILL_FIXED_RANGE

const int OpenCVForUnity.ImgprocModule.Imgproc.FLOODFILL_FIXED_RANGE = 1 << 16
static

◆ FLOODFILL_MASK_ONLY

const int OpenCVForUnity.ImgprocModule.Imgproc.FLOODFILL_MASK_ONLY = 1 << 17
static

◆ FONT_HERSHEY_COMPLEX

const int OpenCVForUnity.ImgprocModule.Imgproc.FONT_HERSHEY_COMPLEX = 3
static

◆ FONT_HERSHEY_COMPLEX_SMALL

const int OpenCVForUnity.ImgprocModule.Imgproc.FONT_HERSHEY_COMPLEX_SMALL = 5
static

◆ FONT_HERSHEY_DUPLEX

const int OpenCVForUnity.ImgprocModule.Imgproc.FONT_HERSHEY_DUPLEX = 2
static

◆ FONT_HERSHEY_PLAIN

const int OpenCVForUnity.ImgprocModule.Imgproc.FONT_HERSHEY_PLAIN = 1
static

◆ FONT_HERSHEY_SCRIPT_COMPLEX

const int OpenCVForUnity.ImgprocModule.Imgproc.FONT_HERSHEY_SCRIPT_COMPLEX = 7
static

◆ FONT_HERSHEY_SCRIPT_SIMPLEX

const int OpenCVForUnity.ImgprocModule.Imgproc.FONT_HERSHEY_SCRIPT_SIMPLEX = 6
static

◆ FONT_HERSHEY_SIMPLEX

const int OpenCVForUnity.ImgprocModule.Imgproc.FONT_HERSHEY_SIMPLEX = 0
static

◆ FONT_HERSHEY_TRIPLEX

const int OpenCVForUnity.ImgprocModule.Imgproc.FONT_HERSHEY_TRIPLEX = 4
static

◆ FONT_ITALIC

const int OpenCVForUnity.ImgprocModule.Imgproc.FONT_ITALIC = 16
static

◆ GC_BGD

const int OpenCVForUnity.ImgprocModule.Imgproc.GC_BGD = 0
static

◆ GC_EVAL

const int OpenCVForUnity.ImgprocModule.Imgproc.GC_EVAL = 2
static

◆ GC_EVAL_FREEZE_MODEL

const int OpenCVForUnity.ImgprocModule.Imgproc.GC_EVAL_FREEZE_MODEL = 3
static

◆ GC_FGD

const int OpenCVForUnity.ImgprocModule.Imgproc.GC_FGD = 1
static

◆ GC_INIT_WITH_MASK

const int OpenCVForUnity.ImgprocModule.Imgproc.GC_INIT_WITH_MASK = 1
static

◆ GC_INIT_WITH_RECT

const int OpenCVForUnity.ImgprocModule.Imgproc.GC_INIT_WITH_RECT = 0
static

◆ GC_PR_BGD

const int OpenCVForUnity.ImgprocModule.Imgproc.GC_PR_BGD = 2
static

◆ GC_PR_FGD

const int OpenCVForUnity.ImgprocModule.Imgproc.GC_PR_FGD = 3
static

◆ height

static double double double double OpenCVForUnity.ImgprocModule.Imgproc.height
static

◆ HISTCMP_BHATTACHARYYA

const int OpenCVForUnity.ImgprocModule.Imgproc.HISTCMP_BHATTACHARYYA = 3
static

◆ HISTCMP_CHISQR

const int OpenCVForUnity.ImgprocModule.Imgproc.HISTCMP_CHISQR = 1
static

◆ HISTCMP_CHISQR_ALT

const int OpenCVForUnity.ImgprocModule.Imgproc.HISTCMP_CHISQR_ALT = 4
static

◆ HISTCMP_CORREL

const int OpenCVForUnity.ImgprocModule.Imgproc.HISTCMP_CORREL = 0
static

◆ HISTCMP_HELLINGER

const int OpenCVForUnity.ImgprocModule.Imgproc.HISTCMP_HELLINGER = HISTCMP_BHATTACHARYYA
static

◆ HISTCMP_INTERSECT

const int OpenCVForUnity.ImgprocModule.Imgproc.HISTCMP_INTERSECT = 2
static

◆ HISTCMP_KL_DIV

const int OpenCVForUnity.ImgprocModule.Imgproc.HISTCMP_KL_DIV = 5
static

◆ HOUGH_GRADIENT

const int OpenCVForUnity.ImgprocModule.Imgproc.HOUGH_GRADIENT = 3
static

◆ HOUGH_GRADIENT_ALT

const int OpenCVForUnity.ImgprocModule.Imgproc.HOUGH_GRADIENT_ALT = 4
static

◆ HOUGH_MULTI_SCALE

const int OpenCVForUnity.ImgprocModule.Imgproc.HOUGH_MULTI_SCALE = 2
static

◆ HOUGH_PROBABILISTIC

const int OpenCVForUnity.ImgprocModule.Imgproc.HOUGH_PROBABILISTIC = 1
static

◆ HOUGH_STANDARD

const int OpenCVForUnity.ImgprocModule.Imgproc.HOUGH_STANDARD = 0
static

◆ INTER_AREA

const int OpenCVForUnity.ImgprocModule.Imgproc.INTER_AREA = 3
static

◆ INTER_BITS

const int OpenCVForUnity.ImgprocModule.Imgproc.INTER_BITS = 5
static

◆ INTER_BITS2

const int OpenCVForUnity.ImgprocModule.Imgproc.INTER_BITS2 = INTER_BITS * 2
static

◆ INTER_CUBIC

const int OpenCVForUnity.ImgprocModule.Imgproc.INTER_CUBIC = 2
static

◆ INTER_LANCZOS4

const int OpenCVForUnity.ImgprocModule.Imgproc.INTER_LANCZOS4 = 4
static

◆ INTER_LINEAR

const int OpenCVForUnity.ImgprocModule.Imgproc.INTER_LINEAR = 1
static

◆ INTER_LINEAR_EXACT

const int OpenCVForUnity.ImgprocModule.Imgproc.INTER_LINEAR_EXACT = 5
static

◆ INTER_MAX

const int OpenCVForUnity.ImgprocModule.Imgproc.INTER_MAX = 7
static

◆ INTER_NEAREST

const int OpenCVForUnity.ImgprocModule.Imgproc.INTER_NEAREST = 0
static

◆ INTER_NEAREST_EXACT

const int OpenCVForUnity.ImgprocModule.Imgproc.INTER_NEAREST_EXACT = 6
static

◆ INTER_TAB_SIZE

const int OpenCVForUnity.ImgprocModule.Imgproc.INTER_TAB_SIZE = 1 << INTER_BITS
static

◆ INTER_TAB_SIZE2

const int OpenCVForUnity.ImgprocModule.Imgproc.INTER_TAB_SIZE2 = INTER_TAB_SIZE * INTER_TAB_SIZE
static

◆ INTERSECT_FULL

const int OpenCVForUnity.ImgprocModule.Imgproc.INTERSECT_FULL = 2
static

◆ INTERSECT_NONE

const int OpenCVForUnity.ImgprocModule.Imgproc.INTERSECT_NONE = 0
static

◆ INTERSECT_PARTIAL

const int OpenCVForUnity.ImgprocModule.Imgproc.INTERSECT_PARTIAL = 1
static

◆ LINE_4

const int OpenCVForUnity.ImgprocModule.Imgproc.LINE_4 = 4
static

◆ LINE_8

const int OpenCVForUnity.ImgprocModule.Imgproc.LINE_8 = 8
static

◆ LINE_AA

const int OpenCVForUnity.ImgprocModule.Imgproc.LINE_AA = 16
static

◆ LSD_REFINE_ADV

const int OpenCVForUnity.ImgprocModule.Imgproc.LSD_REFINE_ADV = 2
static

◆ LSD_REFINE_NONE

const int OpenCVForUnity.ImgprocModule.Imgproc.LSD_REFINE_NONE = 0
static

◆ LSD_REFINE_STD

const int OpenCVForUnity.ImgprocModule.Imgproc.LSD_REFINE_STD = 1
static

◆ m00

static double OpenCVForUnity.ImgprocModule.Imgproc.m00
static

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

The function computes moments, up to the 3rd order, of a vector shape or a rasterized shape. The results are returned in the structure cv::Moments.

Parameters
arraySingle chanel raster image (CV_8U, CV_16U, CV_16S, CV_32F, CV_64F) or an array ( \(1 \times N\) or \(N \times 1\) ) of 2D points (Point or Point2f).
binaryImageIf it is true, all non-zero image pixels are treated as 1's. The parameter is used for images only.
Returns
moments.
Note
Only applicable to contour moments calculations from Python bindings: Note that the numpy type for the input array should be either np.int32 or np.float32.
See also
contourArea, arcLength

◆ m01

static double double double OpenCVForUnity.ImgprocModule.Imgproc.m01
static

◆ m02

static double double double double double double OpenCVForUnity.ImgprocModule.Imgproc.m02
static

◆ m10

static double double OpenCVForUnity.ImgprocModule.Imgproc.m10
static

◆ m11

static double double double double double OpenCVForUnity.ImgprocModule.Imgproc.m11
static

◆ m12

static double double double double double double double double double OpenCVForUnity.ImgprocModule.Imgproc.m12
static

◆ m20

static double double double double OpenCVForUnity.ImgprocModule.Imgproc.m20
static

◆ m21

static double double double double double double double double OpenCVForUnity.ImgprocModule.Imgproc.m21
static

◆ m30

static double double double double double double double OpenCVForUnity.ImgprocModule.Imgproc.m30
static

◆ MARKER_CROSS

const int OpenCVForUnity.ImgprocModule.Imgproc.MARKER_CROSS = 0
static

◆ MARKER_DIAMOND

const int OpenCVForUnity.ImgprocModule.Imgproc.MARKER_DIAMOND = 3
static

◆ MARKER_SQUARE

const int OpenCVForUnity.ImgprocModule.Imgproc.MARKER_SQUARE = 4
static

◆ MARKER_STAR

const int OpenCVForUnity.ImgprocModule.Imgproc.MARKER_STAR = 2
static

◆ MARKER_TILTED_CROSS

const int OpenCVForUnity.ImgprocModule.Imgproc.MARKER_TILTED_CROSS = 1
static

◆ MARKER_TRIANGLE_DOWN

const int OpenCVForUnity.ImgprocModule.Imgproc.MARKER_TRIANGLE_DOWN = 6
static

◆ MARKER_TRIANGLE_UP

const int OpenCVForUnity.ImgprocModule.Imgproc.MARKER_TRIANGLE_UP = 5
static

◆ MORPH_BLACKHAT

const int OpenCVForUnity.ImgprocModule.Imgproc.MORPH_BLACKHAT = 6
static

◆ MORPH_CLOSE

const int OpenCVForUnity.ImgprocModule.Imgproc.MORPH_CLOSE = 3
static

◆ MORPH_CROSS

const int OpenCVForUnity.ImgprocModule.Imgproc.MORPH_CROSS = 1
static

◆ MORPH_DILATE

const int OpenCVForUnity.ImgprocModule.Imgproc.MORPH_DILATE = 1
static

◆ MORPH_ELLIPSE

const int OpenCVForUnity.ImgprocModule.Imgproc.MORPH_ELLIPSE = 2
static

◆ MORPH_ERODE

const int OpenCVForUnity.ImgprocModule.Imgproc.MORPH_ERODE = 0
static

◆ MORPH_GRADIENT

const int OpenCVForUnity.ImgprocModule.Imgproc.MORPH_GRADIENT = 4
static

◆ MORPH_HITMISS

const int OpenCVForUnity.ImgprocModule.Imgproc.MORPH_HITMISS = 7
static

◆ MORPH_OPEN

const int OpenCVForUnity.ImgprocModule.Imgproc.MORPH_OPEN = 2
static

◆ MORPH_RECT

const int OpenCVForUnity.ImgprocModule.Imgproc.MORPH_RECT = 0
static

◆ MORPH_TOPHAT

const int OpenCVForUnity.ImgprocModule.Imgproc.MORPH_TOPHAT = 5
static

◆ RETR_CCOMP

const int OpenCVForUnity.ImgprocModule.Imgproc.RETR_CCOMP = 2
static

◆ RETR_EXTERNAL

const int OpenCVForUnity.ImgprocModule.Imgproc.RETR_EXTERNAL = 0
static

◆ RETR_FLOODFILL

const int OpenCVForUnity.ImgprocModule.Imgproc.RETR_FLOODFILL = 4
static

◆ RETR_LIST

const int OpenCVForUnity.ImgprocModule.Imgproc.RETR_LIST = 1
static

◆ RETR_TREE

const int OpenCVForUnity.ImgprocModule.Imgproc.RETR_TREE = 3
static

◆ THRESH_BINARY

const int OpenCVForUnity.ImgprocModule.Imgproc.THRESH_BINARY = 0
static

◆ THRESH_BINARY_INV

const int OpenCVForUnity.ImgprocModule.Imgproc.THRESH_BINARY_INV = 1
static

◆ THRESH_MASK

const int OpenCVForUnity.ImgprocModule.Imgproc.THRESH_MASK = 7
static

◆ THRESH_OTSU

const int OpenCVForUnity.ImgprocModule.Imgproc.THRESH_OTSU = 8
static

◆ THRESH_TOZERO

const int OpenCVForUnity.ImgprocModule.Imgproc.THRESH_TOZERO = 3
static

◆ THRESH_TOZERO_INV

const int OpenCVForUnity.ImgprocModule.Imgproc.THRESH_TOZERO_INV = 4
static

◆ THRESH_TRIANGLE

const int OpenCVForUnity.ImgprocModule.Imgproc.THRESH_TRIANGLE = 16
static

◆ THRESH_TRUNC

const int OpenCVForUnity.ImgprocModule.Imgproc.THRESH_TRUNC = 2
static

◆ TM_CCOEFF

const int OpenCVForUnity.ImgprocModule.Imgproc.TM_CCOEFF = 4
static

◆ TM_CCOEFF_NORMED

const int OpenCVForUnity.ImgprocModule.Imgproc.TM_CCOEFF_NORMED = 5
static

◆ TM_CCORR

const int OpenCVForUnity.ImgprocModule.Imgproc.TM_CCORR = 2
static

◆ TM_CCORR_NORMED

const int OpenCVForUnity.ImgprocModule.Imgproc.TM_CCORR_NORMED = 3
static

◆ TM_SQDIFF

const int OpenCVForUnity.ImgprocModule.Imgproc.TM_SQDIFF = 0
static

◆ TM_SQDIFF_NORMED

const int OpenCVForUnity.ImgprocModule.Imgproc.TM_SQDIFF_NORMED = 1
static

◆ WARP_FILL_OUTLIERS

const int OpenCVForUnity.ImgprocModule.Imgproc.WARP_FILL_OUTLIERS = 8
static

◆ WARP_INVERSE_MAP

const int OpenCVForUnity.ImgprocModule.Imgproc.WARP_INVERSE_MAP = 16
static

◆ WARP_POLAR_LINEAR

const int OpenCVForUnity.ImgprocModule.Imgproc.WARP_POLAR_LINEAR = 0
static

◆ WARP_POLAR_LOG

const int OpenCVForUnity.ImgprocModule.Imgproc.WARP_POLAR_LOG = 256
static

◆ WARP_RELATIVE_MAP

const int OpenCVForUnity.ImgprocModule.Imgproc.WARP_RELATIVE_MAP = 32
static

◆ width [1/3]

static double double double OpenCVForUnity.ImgprocModule.Imgproc.width
static

◆ width [2/3]

double double double OpenCVForUnity.ImgprocModule.Imgproc.width
static

◆ width [3/3]

double OpenCVForUnity.ImgprocModule.Imgproc.width
static

◆ x [1/2]

static double OpenCVForUnity.ImgprocModule.Imgproc.x
static

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

Fits an ellipse around a set of 2D points.

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

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

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

The function performs the following equations:

  • First it applies a Hanning window (see <http://en.wikipedia.org/wiki/Hann_function&gt;) to each image to remove possible edge effects. This window is cached until the array size changes to speed up processing time.
  • Next it computes the forward DFTs of each source array:

    \[\mathbf{G}_a = \mathcal{F}\{src_1\}, \; \mathbf{G}_b = \mathcal{F}\{src_2\}\]

    where \(\mathcal{F}\) is the forward DFT.
  • It then computes the cross-power spectrum of each frequency domain array:

    \[R = \frac{ \mathbf{G}_a \mathbf{G}_b^*}{|\mathbf{G}_a \mathbf{G}_b^*|}\]

  • Next the cross-correlation is converted back into the time domain via the inverse DFT:

    \[r = \mathcal{F}^{-1}\{R\}\]

  • Finally, it computes the peak location and computes a 5x5 weighted centroid around the peak to achieve sub-pixel accuracy.

    \[(\Delta x, \Delta y) = \texttt{weightedCentroid} \{\arg \max_{(x, y)}\{r\}\}\]

  • If non-zero, the response parameter is computed as the sum of the elements of r within the 5x5 centroid around the peak location. It is normalized to a maximum of 1 (meaning there is a single peak) and will be smaller when there are multiple peaks.
Parameters
src1Source floating point array (CV_32FC1 or CV_64FC1)
src2Source floating point array (CV_32FC1 or CV_64FC1)
windowFloating point array with windowing coefficients to reduce edge effects (optional).
responseSignal power within the 5x5 centroid around the peak, between 0 and 1 (optional).
Returns
detected phase shift (sub-pixel) between the two arrays.
See also
dft, getOptimalDFTSize, idft, mulSpectrums createHanningWindow

The function calculates and returns the minimum-area bounding rectangle (possibly rotated) for a specified point set. Developer should keep in mind that the returned RotatedRect can contain negative indices when data is close to the containing Mat element boundary.

Parameters
pointsInput vector of 2D points, stored in std::vector<> or Mat

The function calculates the ellipse that fits (in a least-squares sense) a set of 2D points best of all. It returns the rotated rectangle in which the ellipse is inscribed. The first algorithm described by [Fitzgibbon95] is used. Developer should keep in mind that it is possible that the returned ellipse/rotatedRect data contains negative indices, due to the data points being close to the border of the containing Mat element.

Parameters
pointsInput 2D point set, stored in std::vector<> or Mat

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

For an ellipse, this basis set is \( \chi= \left(x^2, x y, y^2, x, y, 1\right) \), which is a set of six free coefficients \( A^T=\left\{A_{\text{xx}},A_{\text{xy}},A_{\text{yy}},A_x,A_y,A_0\right\} \). However, to specify an ellipse, all that is needed is five numbers; the major and minor axes lengths \( (a,b) \), the position \( (x_0,y_0) \), and the orientation \( \theta \). This is because the basis set includes lines, quadratics, parabolic and hyperbolic functions as well as elliptical functions as possible fits. If the fit is found to be a parabolic or hyperbolic function then the standard fitEllipse method is used. The AMS method restricts the fit to parabolic, hyperbolic and elliptical curves by imposing the condition that \( A^T ( D_x^T D_x + D_y^T D_y) A = 1 \) where the matrices \( Dx \) and \( Dy \) are the partial derivatives of the design matrix \( D \) with respect to x and y. The matrices are formed row by row applying the following to each of the points in the set:

\begin{align*} D(i,:)&=\left\{x_i^2, x_i y_i, y_i^2, x_i, y_i, 1\right\} & D_x(i,:)&=\left\{2 x_i,y_i,0,1,0,0\right\} & D_y(i,:)&=\left\{0,x_i,2 y_i,0,1,0\right\} \end{align*}

The AMS method minimizes the cost function

\begin{equation*} \epsilon ^2=\frac{ A^T D^T D A }{ A^T (D_x^T D_x + D_y^T D_y) A^T } \end{equation*}

The minimum cost is found by solving the generalized eigenvalue problem.

\begin{equation*} D^T D A = \lambda \left( D_x^T D_x + D_y^T D_y\right) A \end{equation*}

Parameters
pointsInput 2D point set, stored in std::vector<> or Mat

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

For an ellipse, this basis set is \( \chi= \left(x^2, x y, y^2, x, y, 1\right) \), which is a set of six free coefficients \( A^T=\left\{A_{\text{xx}},A_{\text{xy}},A_{\text{yy}},A_x,A_y,A_0\right\} \). However, to specify an ellipse, all that is needed is five numbers; the major and minor axes lengths \( (a,b) \), the position \( (x_0,y_0) \), and the orientation \( \theta \). This is because the basis set includes lines, quadratics, parabolic and hyperbolic functions as well as elliptical functions as possible fits. The Direct method confines the fit to ellipses by ensuring that \( 4 A_{xx} A_{yy}- A_{xy}^2 > 0 \). The condition imposed is that \( 4 A_{xx} A_{yy}- A_{xy}^2=1 \) which satisfies the inequality and as the coefficients can be arbitrarily scaled is not overly restrictive.

\begin{equation*} \epsilon ^2= A^T D^T D A \quad \text{with} \quad A^T C A =1 \quad \text{and} \quad C=\left(\begin{matrix} 0 & 0 & 2 & 0 & 0 & 0 \\ 0 & -1 & 0 & 0 & 0 & 0 \\ 2 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{matrix} \right) \end{equation*}

The minimum cost is found by solving the generalized eigenvalue problem.

\begin{equation*} D^T D A = \lambda \left( C\right) A \end{equation*}

The system produces only one positive eigenvalue \( \lambda\) which is chosen as the solution with its eigenvector \(\mathbf{u}\). These are used to find the coefficients

\begin{equation*} A = \sqrt{\frac{1}{\mathbf{u}^T C \mathbf{u}}} \mathbf{u} \end{equation*}

The scaling factor guarantees that \(A^T C A =1\).

Parameters
pointsInput 2D point set, stored in std::vector<> or Mat

◆ x [2/2]

int OpenCVForUnity.ImgprocModule.Imgproc.x
static

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

The function calculates and returns the minimal up-right bounding rectangle for the specified point set or non-zero pixels of gray-scale image.

Parameters
arrayInput gray-scale image or 2D point set, stored in std::vector or Mat.

◆ y [1/2]

static double double OpenCVForUnity.ImgprocModule.Imgproc.y
static

◆ y [2/2]

double double OpenCVForUnity.ImgprocModule.Imgproc.y
static

The documentation for this class was generated from the following files: