opencv_dart
library
Functions
absDiff (Mat src1 , Mat src2 , Mat dst )
→ void
AbsDiff calculates the per-element absolute difference between two arrays
or between an array and a scalar.
accumulate (InputArray src , InputOutputArray dst , {InputArray ? mask })
→ void
NewCLAHE returns a new CLAHE algorithm
accumulateProduct (InputArray src1 , InputArray src2 , InputOutputArray dst , {InputArray ? mask })
→ void
Adds the per-element product of two input images to the accumulator image.
accumulateSquare (InputArray src , InputOutputArray dst , {InputArray ? mask })
→ void
Adds the square of a source image to the accumulator image.
accumulateWeighted (InputArray src , InputOutputArray dst , double alpha , {InputArray ? mask })
→ void
Updates a running average.
adaptiveThreshold (InputArray src , OutputArray dst , double maxValue , int adaptiveMethod , int thresholdType , int blockSize , double C )
→ void
AdaptiveThreshold applies a fixed-level threshold to each array element.
add (Mat src1 , Mat src2 , Mat dst )
→ void
Add calculates the per-element sum of two arrays or an array and a scalar.
addWeighted (InputArray src1 , double alpha , InputArray src2 , double beta , double gamma , OutputArray dst , {int dtype = -1 })
→ void
AddWeighted calculates the weighted sum of two arrays.
applyColorMap (InputArray src , OutputArray dst , int colormap )
→ void
ApplyColorMap applies a GNU Octave/MATLAB equivalent colormap on a given image.
colormap: ColormapTypes
For further details, please see:
https:///docs.opencv.org/master/d3/d50/group__imgproc__colormap.html#gadf478a5e5ff49d8aa24e726ea6f65d15
applyCustomColorMap (InputArray src , OutputArray dst , InputArray userColor )
→ void
ApplyCustomColorMap applies a custom defined colormap on a given image.
approxPolyDP (List <Point > curve , double epsilon , bool closed )
→ List <Point >
ApproxPolyDP approximates a polygonal curve(s) with the specified precision.
arcLength (List <Point > curve , bool closed )
→ double
ArcLength calculates a contour perimeter or a curve length.
arrowedLine (InputOutputArray img , Point pt1 , Point pt2 , Scalar color , {int thickness = 1 , int line_type = 8 , int shift = 0 , double tipLength = 0.1 })
→ void
ArrowedLine draws a arrow segment pointing from the first point
to the second one.
arucoDrawDetectedMarkers (Mat img , List <List <Point2f > > markerCorners , List <int > markerIds , Scalar borderColor )
→ void
arucoGenerateImageMarker (PredefinedDictionaryType dictionaryId , int id , int sidePixels , Mat img , int borderBits )
→ void
batchDistance (InputArray src1 , InputArray src2 , OutputArray dist , int dtype , OutputArray nidx , {int normType = NORM_L2 , int K = 0 , InputArray ? mask , int update = 0 , bool crosscheck = false })
→ void
BatchDistance is a naive nearest neighbor finder.
bilateralFilter (Mat src , Mat dst , int diameter , double sigmaColor , double sigmaSpace )
→ void
BilateralFilter applies a bilateral filter to an image.
bitwise_and (InputArray src1 , InputArray src2 , OutputArray dst , {InputArray ? mask })
→ void
BitwiseAnd computes bitwise conjunction of the two arrays (dst = src1 & src2).
Calculates the per-element bit-wise conjunction of two arrays
or an array and a scalar.
bitwise_not (InputArray src , OutputArray dst , {InputArray ? mask })
→ void
BitwiseNot inverts every bit of an array.
bitwise_or (InputArray src1 , InputArray src2 , OutputArray dst , {InputArray ? mask })
→ void
BitwiseOr calculates the per-element bit-wise disjunction of two arrays
or an array and a scalar.
bitwise_xor (InputArray src1 , InputArray src2 , OutputArray dst , {InputArray ? mask })
→ void
BitwiseXor calculates the per-element bit-wise "exclusive or" operation
on two arrays or an array and a scalar.
blobFromImage (InputArray image , {double scalefactor = 1.0 , Size ? size , Scalar ? mean , bool swapRB = false , bool crop = false , int ddepth = MatType.CV_32F })
→ Mat
Creates 4-dimensional blob from image.
Optionally resizes and crops image from center,
subtract mean values, scales values by scalefactor, swap Blue and Red channels.
blobFromImages (List <Mat > images , {Mat ? blob , double scalefactor = 1.0 , Size ? size , Scalar ? mean , bool swapRB = false , bool crop = false , int ddepth = MatType.CV_32F })
→ Mat
Creates 4-dimensional blob from series of images.
Optionally resizes and crops images from center,
subtract mean values, scales values by scalefactor,
swap Blue and Red channels.
https://docs.opencv.org/4.x/d6/d0f/group__dnn.html#ga0b7b7c3c530b747ef738178835e1e70f
blur (Mat src , Mat dst , Size ksize )
→ void
Blur blurs an image Mat using a normalized box filter.
borderInterpolate (int p , int len , int borderType )
→ int
BorderInterpolate computes the source location of an extrapolated pixel.
boundingRect (List <Point > points )
→ Rect
BoundingRect calculates the up-right bounding rectangle of a point set.
boxFilter (Mat src , Mat dst , int depth , Size ksize )
→ void
BoxFilter blurs an image using the box filter.
boxPoints (RotatedRect rect , Mat pts )
→ void
BoxPoints finds the four vertices of a rotated rect. Useful to draw the rotated rectangle.
calcBackProject (List <Mat > src , List <int > channels , Mat hist , Mat backProject , List <double > ranges , {bool uniform = true })
→ void
CalcBackProject calculates the back projection of a histogram.
calcCovarMatrix (InputArray samples , OutputArray covar , InputOutputArray mean , int flags , {int ctype = MatType.CV_64F })
→ void
CalcCovarMatrix calculates the covariance matrix of a set of vectors.
calcHist (List <Mat > src , List <int > channels , Mat mask , Mat hist , List <int > histSize , List <double > ranges , {bool accumulate = false })
→ void
CalcHist Calculates a histogram of a set of images
calcOpticalFlowFarneback (InputArray prev , InputArray next , InputOutputArray flow , double pyr_scale , int levels , int winsize , int iterations , int poly_n , double poly_sigma , int flags )
→ void
Apply computes a foreground mask using the current BackgroundSubtractorMOG2.
calcOpticalFlowPyrLK (InputArray prevImg , InputArray nextImg , InputArray prevPts , InputOutputArray nextPts , OutputArray status , OutputArray err , {Size winSize = (21, 21) , int maxLevel = 3 , TermCriteria? criteria , int flags = 0 , double minEigThreshold = 1e-4 })
→ void
CalcOpticalFlowPyrLK calculates an optical flow for a sparse feature set using
the iterative Lucas-Kanade method with pyramids.
calibrateCamera (Contours3f objectPoints , Contours2f imagePoints , Size imageSize , InputOutputArray cameraMatrix , InputOutputArray distCoeffs , {Mat ? rvecs , Mat ? tvecs , int flags = 0 , TermCriteria? criteria })
→ (double , Mat , Mat , Mat , Mat )
Canny (Mat image , OutputArray edges , double threshold1 , double threshold2 , {int apertureSize = 3 , bool L2gradient = false })
→ void
Canny finds edges in an image using the Canny algorithm.
The function finds edges in the input image 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
cartToPolar (InputArray x , InputArray y , OutputArray magnitude , OutputArray angle , {bool angleInDegrees = false })
→ void
CartToPolar calculates the magnitude and angle of 2D vectors.
checkRange (InputArray a , {bool quiet = true , double minVal = -CV_F64_MAX , double maxVal = CV_F64_MAX })
→ (bool , Point )
CheckRange checks every element of an input array for invalid values.
circle (InputOutputArray img , Point center , int radius , Scalar color , {int thickness = 1 , int lineType = LINE_8 , int shift = 0 })
→ void
CircleWithParams draws a circle.
clipLine ((int , int ) imgSize , (int , int ) pt1 , (int , int ) pt2 )
→ bool
ClipLine clips the line against the image rectangle.
For further details, please see:
https:///docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#gaf483cb46ad6b049bc35ec67052ef1c2c
colorChange (InputArray src , InputArray mask , {double red_mul = 1.0 , double green_mul = 1.0 , double blue_mul = 1.0 })
→ Mat
ColorChange mix two differently colored versions of an image seamlessly.
For further details, please see:
https://docs.opencv.org/master/df/da0/group__photo__clone.html#ga6684f35dc669ff6196a7c340dc73b98e
compare (InputArray src1 , InputArray src2 , OutputArray dst , int cmpop )
→ void
Compare performs the per-element comparison of two arrays
or an array and scalar value.
compareHist (Mat hist1 , Mat hist2 , {int method = 0 })
→ double
CompareHist Compares two histograms.
mode: HistCompMethods
For further details, please see:
https:///docs.opencv.org/master/d6/dc7/group__imgproc__hist.html#gaf4190090efa5c47cb367cf97a9a519bd
completeSymm (InputOutputArray m , {bool lowerToUpper = false })
→ void
CompleteSymm copies the lower or the upper half of a square matrix to its another half.
connectedComponents (Mat image , Mat labels , int connectivity , int ltype , int ccltype )
→ int
ConnectedComponents computes the connected components labeled image of boolean image.
connectedComponentsWithStats (Mat src , Mat labels , Mat stats , Mat centroids , int connectivity , int ltype , int ccltype )
→ int
ConnectedComponentsWithStats computes the connected components labeled image of boolean
image and also produces a statistics output for each label.
contourArea (List <Point > contour )
→ double
ContourArea calculates a contour area.
convertScaleAbs (InputArray src , OutputArray dst , {double alpha = 1 , double beta = 0 })
→ void
ConvertScaleAbs scales, calculates absolute values, and converts the result to 8-bit.
convexHull (List <Point > points , Mat hull , {bool clockwise = false , bool returnPoints = true })
→ void
ConvexHull finds the convex hull of a point set.
convexityDefects (List <Point > contour , Mat hull , Mat result )
→ void
ConvexityDefects finds the convexity defects of a contour.
copyMakeBorder (InputArray src , OutputArray dst , int top , int bottom , int left , int right , int borderType , {Scalar ? value })
→ void
CopyMakeBorder forms a border around an image (applies padding).
cornerSubPix (InputArray image , InputOutputArray corners , Size winSize , Size zeroZone , TermCriteria criteria )
→ void
CornerSubPix Refines the corner locations. The function iterates to find
the sub-pixel accurate location of corners or radial saddle points.
countNonZero (Mat src )
→ int
CountNonZero counts non-zero array elements.
createBackgroundSubtractorMOG2 ({int history = 500 , double varThreshold = 16 , bool detectShadows = true })
→ BackgroundSubtractorMOG2
NewBackgroundSubtractorMOG2 returns a new BackgroundSubtractor algorithm
of type MOG2. MOG2 is a Gaussian Mixture-based Background/Foreground
Segmentation Algorithm.
cvRun (CvStatus func () )
→ void
cvtColor (Mat src , Mat dst , int code )
→ void
CvtColor converts an image from one color space to another.
It converts the src Mat image to the dst Mat using the
code param containing the desired ColorConversionCode color space.
dct (InputArray src , OutputArray dst , {int flags = 0 })
→ void
DCT performs a forward or inverse discrete Cosine transform of 1D or 2D array.
defaultCvErrorCallback (int code , Pointer <Char > func_name , Pointer <Char > err_msg , Pointer <Char > file_name , int line , Pointer <Void > userdata )
→ void
destroyAllWindows ()
→ void
destroy all windows.
detailEnhance (InputArray src , {double sigma_s = 10 , double sigma_r = 0.15 })
→ Mat
DetailEnhance filter enhances the details of a particular image
For further details, please see:
https://docs.opencv.org/4.x/df/dac/group__photo__render.html#ga0de660cb6f371a464a74c7b651415975
determinant (InputArray mtx )
→ double
Determinant returns the determinant of a square floating-point matrix.
dft (InputArray src , OutputArray dst , {int flags = 0 , int nonzeroRows = 0 })
→ void
DFT performs a forward or inverse Discrete Fourier Transform (DFT)
of a 1D or 2D floating-point array.
dilate (Mat src , Mat dst , Mat kernel , {({int x , int y } ) anchor = (x: -1, y: -1) , int iterations = 1 , int borderType = BORDER_CONSTANT , Scalar ? borderValue })
→ void
Dilate dilates an image by using a specific structuring element.
distanceTransform (Mat src , Mat dst , Mat labels , int distanceType , int maskSize , int labelType )
→ void
DistanceTransform Calculates the distance to the closest zero pixel for each pixel of the source image.
divide (InputArray src1 , InputArray src2 , OutputArray dst , {double scale = 1 , int dtype = -1 })
→ void
Divide performs the per-element division
on two arrays or an array and a scalar.
drawChessboardCorners (InputOutputArray image , Size patternSize , InputArray corners , bool patternWasFound )
→ Mat
drawContours (InputOutputArray image , Contours contours , int contourIdx , Scalar color , {int thickness = 1 , int lineType = LINE_8 , InputArray ? hierarchy , int maxLevel = 0x3f3f3f3f , Point ? offset })
→ void
FindHomography finds an optimal homography matrix using 4 or more point pairs (as opposed to GetPerspectiveTransform, which uses exactly 4)
drawKeyPoints (Mat src , List <KeyPoint > keypoints , Mat dst , Scalar color , DrawMatchesFlag flag )
→ void
drawMatches (InputArray img1 , List <KeyPoint > keypoints1 , InputArray img2 , List <KeyPoint > keypoints2 , List <DMatch > matches1to2 , InputOutputArray outImg , {Scalar ? matchColor , Scalar ? singlePointColor , List <int > ? matchesMask , DrawMatchesFlag flags = DrawMatchesFlag.DEFAULT })
→ void
edgePreservingFilter (InputArray src , {int flags = 1 , double sigma_s = 60 , double sigma_r = 0.4 })
→ Mat
EdgePreservingFilter filtering is the fundamental operation in image and video processing.
Edge-preserving smoothing filters are used in many different applications.
For further details, please see:
https://docs.opencv.org/4.x/df/dac/group__photo__render.html#gafaee2977597029bc8e35da6e67bd31f7
eigen (InputArray src , OutputArray eigenvalues , {OutputArray ? eigenvectors })
→ bool
Eigen calculates eigenvalues and eigenvectors of a symmetric matrix.
eigenNonSymmetric (InputArray src , OutputArray eigenvalues , OutputArray eigenvectors )
→ void
EigenNonSymmetric calculates eigenvalues and eigenvectors of a non-symmetric matrix (real eigenvalues only).
ellipse (InputOutputArray img , Point center , Point axes , double angle , double startAngle , double endAngle , Scalar color , {int thickness = 1 , int lineType = LINE_8 , int shift = 0 })
→ void
Ellipse draws a simple or thick elliptic arc or fills an ellipse sector.
equalizeHist (Mat src , Mat dst )
→ void
EqualizeHist Equalizes the histogram of a grayscale image.
erode (Mat src , Mat dst , Mat kernel , {({int x , int y } ) anchor = (x: -1, y: -1) , int iterations = 1 , int borderType = BORDER_CONSTANT , Scalar ? borderValue })
→ void
Erode erodes an image by using a specific structuring element.
estimateAffine2D (List <Point2f > from , List <Point2f > to , {int method = RANSAC , double ransacReprojThreshold = 3 , int maxIters = 2000 , double confidence = 0.99 , int refineIters = 10 , OutputArray ? inliers })
→ (Mat , Mat )
estimateAffinePartial2D (List <Point2f > from , List <Point2f > to , {int method = RANSAC , double ransacReprojThreshold = 3 , int maxIters = 2000 , double confidence = 0.99 , int refineIters = 10 , OutputArray ? inliers })
→ (Mat , Mat )
exp (InputArray src , OutputArray dst )
→ void
Exp calculates the exponent of every array element.
ExtractChannel extracts a single channel from src (coi is 0-based index).
fastNlMeansDenoising (InputArray src , {double h = 3 , int templateWindowSize = 7 , int searchWindowSize = 21 })
→ Mat
FastNlMeansDenoising performs image denoising using Non-local Means Denoising algorithm
http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/
For further details, please see:
https://docs.opencv.org/4.x/d1/d79/group__photo__denoise.html#ga4c6b0031f56ea3f98f768881279ffe93
fastNlMeansDenoisingColored (InputArray src , {double h = 3 , double hColor = 3 , int templateWindowSize = 7 , int searchWindowSize = 21 })
→ Mat
FastNlMeansDenoisingColored is a modification of fastNlMeansDenoising function for colored images.
For further details, please see:
https://docs.opencv.org/4.x/d1/d79/group__photo__denoise.html#ga21abc1c8b0e15f78cd3eff672cb6c476
fastNlMeansDenoisingColoredMulti (List <Mat > srcImgs , int imgToDenoiseIndex , int temporalWindowSize , {double h = 3 , double hColor = 3 , int templateWindowSize = 7 , int searchWindowSize = 21 })
→ Mat
FastNlMeansDenoisingColoredMulti denoises the selected images.
For further details, please see:
https://docs.opencv.org/master/d1/d79/group__photo__denoise.html#gaa501e71f52fb2dc17ff8ca5e7d2d3619
fillPoly (InputOutputArray img , List <List <Point > > pts , Scalar color , {int lineType = LINE_8 , int shift = 0 , Point ? offset })
→ void
FillPolyWithParams fills the area bounded by one or more polygons.
filter2D (InputArray src , OutputArray dst , int ddepth , InputArray kernel , {Point ? anchor , double delta = 0 , int borderType = BORDER_DEFAULT })
→ void
Filter2D applies an arbitrary linear filter to an image.
findChessboardCorners (InputArray image , Size patternSize , {OutputArray ? corners , int flags = CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE })
→ (bool , Mat )
findContours (Mat src , int mode , int method )
→ (Contours , Mat )
FindContours finds contours in a binary image.
findNonZero (InputArray src , OutputArray idx )
→ void
FindNonZero returns the list of locations of non-zero pixels.
findTransformECC (InputArray templateImage , InputArray inputImage , InputOutputArray warpMatrix , int motionType , TermCriteria criteria , InputArray inputMask , int gaussFiltSize )
→ double
FindTransformECC finds the geometric transform (warp) between two images in terms of the ECC criterion.
fitEllipse (List <Point > pts )
→ RotatedRect
FitEllipse Fits an ellipse around a set of 2D points.
fitLine (List <Point > points , OutputArray line , int distType , double param , double reps , double aeps )
→ void
FitLine fits a line to a 2D or 3D point set.
distType: DistanceTypes
For further details, please see:
https:///docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#gaf849da1fdafa67ee84b1e9a23b93f91f
flip (InputArray src , OutputArray dst , int flipCode )
→ void
Flip flips a 2D array around horizontal(0), vertical(1), or both axes(-1).
gaussianBlur (Mat src , Mat dst , Size ksize , double sigmaX , {double sigmaY = 0 , int borderType = BORDER_DEFAULT })
→ void
GaussianBlur blurs an image Mat using a Gaussian filter.
The function convolves the src Mat image into the dst Mat using
the specified Gaussian kernel params.
gemm (InputArray src1 , InputArray src2 , double alpha , InputArray src3 , double beta , OutputArray dst , {int flags = 0 })
→ void
Gemm performs generalized matrix multiplication.
getAffineTransform (List <Point > src , List <Point > dst )
→ Mat
GetAffineTransform returns a 2x3 affine transformation matrix for the
corresponding 3 point pairs as image.Point.
getAffineTransform2f (List <Point2f > src , List <Point2f > dst )
→ Mat
getBlobChannel (Mat blob , int imgidx , int chnidx )
→ Mat
GetBlobChannel extracts a single (2d)channel from a 4 dimensional blob structure
(this might e.g. contain the results of a SSD or YOLO detection,
getBlobSize (Mat blob )
→ Scalar
GetBlobSize retrieves the 4 dimensional size information in (N,C,H,W) order
getBuildInformation ()
→ String
Returns full configuration time cmake output.
getGaussianKernel (int ksize , double sigma , {int ktype = 6 })
→ Mat
GetGaussianKernel returns Gaussian filter coefficients.
getNumThreads ()
→ int
Get the number of threads for OpenCV.
getOptimalDFTSize (int vecsize )
→ int
GetOptimalDFTSize returns the optimal Discrete Fourier Transform (DFT) size
for a given vector size.
getOptimalNewCameraMatrix (InputArray cameraMatrix , InputArray distCoeffs , Size imageSize , double alpha , {Size newImgSize = (0, 0) , bool centerPrincipalPoint = false })
→ (Mat , Rect )
GetOptimalNewCameraMatrixWithParams computes and returns the optimal new camera matrix based on the free scaling parameter.
getPerspectiveTransform (List <Point > src , List <Point > dst , {int solveMethod = DECOMP_LU })
→ Mat
GetPerspectiveTransform returns 3x3 perspective transformation for the
corresponding 4 point pairs as image.Point.
getPerspectiveTransform2f (List <Point2f > src , List <Point2f > dst , {int solveMethod = DECOMP_LU })
→ Mat
GetPerspectiveTransform2f returns 3x3 perspective transformation for the
corresponding 4 point pairs as gocv.Point2f.
getRectSubPix (InputArray image , Size patchSize , Point2f center , OutputArray patch , {int patchType = -1 })
→ void
GetRectSubPix retrieves a pixel rectangle from an image with sub-pixel accuracy.
getRotationMatrix2D (Point2f center , double angle , double scale )
→ Mat
GetRotationMatrix2D calculates an affine matrix of 2D rotation.
getStructuringElement (int shape , Size ksize , {Point ? anchor })
→ Mat
GetStructuringElement returns a structuring element of the specified size
and shape for morphological operations.
getTextSize (String text , int fontFace , double fontScale , int thickness )
→ (Size , int )
GetTextSizeWithBaseline calculates the width and height of a text string including the basline of the text.
It returns an image.Point with the size required to draw text using
a specific font face, scale, and thickness as well as its baseline.
getTickCount ()
→ int
GetTickCount returns the number of ticks.
getTickFrequency ()
→ double
GetTickFrequency returns the number of ticks per second.
goodFeaturesToTrack (InputArray image , OutputArray corners , int maxCorners , double qualityLevel , double minDistance , {InputArray ? mask , int blockSize = 3 , bool useHarrisDetector = false , double k = 0.04 })
→ void
GoodFeaturesToTrack determines strong corners on an image. The function
finds the most prominent corners in the image or in the specified image region.
grabCut (InputArray img , InputOutputArray mask , Rect rect , InputOutputArray bgdModel , InputOutputArray fgdModel , int iterCount , {int mode = GC_EVAL })
→ void
Grabcut runs the GrabCut algorithm.
The function implements the GrabCut image segmentation algorithm.
For further details, please see:
https:///docs.opencv.org/master/d3/d47/group__imgproc__segmentation.html#ga909c1dda50efcbeaa3ce126be862b37f
groupRectangles (List <Rect > rects , int groupThreshold , double eps )
→ List <Rect >
hconcat (InputArray src1 , InputArray src2 , OutputArray dst )
→ void
Hconcat applies horizontal concatenation to given matrices.
HoughCircles (InputArray image , OutputArray circles , int method , double dp , double minDist , {double param1 = 100 , double param2 = 100 , int minRadius = 0 , int maxRadius = 0 })
→ void
HoughCircles finds circles in a grayscale image using the Hough transform.
The only "method" currently supported is HoughGradient. If you want to pass
more parameters, please see HoughCirclesWithParams
.
HoughLines (InputArray image , OutputArray lines , double rho , double theta , int threshold , {double srn = 0 , double stn = 0 , double min_theta = 0 , double max_theta = CV_PI })
→ void
HoughLines implements the standard or standard multi-scale Hough transform
algorithm for line detection. For a good explanation of Hough transform, see:
http:///homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm
HoughLinesP (InputArray image , OutputArray lines , double rho , double theta , int threshold , {double minLineLength = 0 , double maxLineGap = 0 })
→ void
HoughLinesP implements the probabilistic Hough transform
algorithm for line detection. For a good explanation of Hough transform, see:
http:///homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm
HoughLinesPointSet (InputArray point , OutputArray lines , int lines_max , int threshold , double min_rho , double max_rho , double rho_step , double min_theta , double max_theta , double theta_step )
→ void
HoughLinesPointSet implements the Hough transform algorithm for line
detection on a set of points. For a good explanation of Hough transform, see:
http:///homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm
idct (InputArray src , OutputArray dst , {int flags = 0 })
→ void
IDCT calculates the inverse Discrete Cosine Transform of a 1D or 2D array.
idft (InputArray src , OutputArray dst , {int flags = 0 , int nonzeroRows = 0 })
→ void
IDFT calculates the inverse Discrete Fourier Transform of a 1D or 2D array.
illuminationChange (InputArray src , InputArray mask , {double alpha = 0.2 , double beta = 0.4 })
→ Mat
IlluminationChange modifies locally the apparent illumination of an image.
For further details, please see:
https://docs.opencv.org/master/df/da0/group__photo__clone.html#gac5025767cf2febd8029d474278e886c7
imagesFromBlob (Mat blob )
→ List <Mat >
ImagesFromBlob Parse a 4D blob and output the images it contains as
2D arrays through a simpler data structure (std::vectorcv::Mat ).
imdecode (Uint8List buf , int flags , {Mat ? dst = null })
→ Mat
imdecode reads an image from a buffer in memory.
The function imdecode reads an image from the specified buffer in memory.
If the buffer is too short or contains invalid data, the function
returns an empty matrix.
@param buf Input array or vector of bytes.
@param flags The same flags as in cv::imread, see cv::ImreadModes.
For further details, please see:
https://docs.opencv.org/master/d4/da8/group__imgcodecs.html#ga26a67788faa58ade337f8d28ba0eb19e
imencode (String ext , InputArray img , {List <int > ? params })
→ Uint8List
IMEncode encodes an image Mat into a memory buffer.
This function compresses the image and stores it in the returned memory buffer,
using the image format passed in in the form of a file extension string.
imread (String filename , {int flags = IMREAD_COLOR })
→ Mat
IMRead reads an image from a file into a Mat.
The flags param is one of the IMReadFlag flags.
If the image cannot be read (because of missing file, improper permissions,
unsupported or invalid format), the function returns an empty Mat.
imwrite (String filename , InputArray img , {List <int > ? params })
→ bool
IMWrite writes a Mat to an image file.
initUndistortRectifyMap (InputArray cameraMatrix , InputArray distCoeffs , InputArray R , InputArray newCameraMatrix , Size size , int m1type , {OutputArray ? map1 , OutputArray ? map2 })
→ (Mat , Mat )
InitUndistortRectifyMap computes the joint undistortion and rectification transformation and represents the result in the form of maps for remap
inpaint (InputArray src , InputArray inpaintMask , double inpaintRadius , int flags )
→ Mat
Inpaint reconstructs the selected image area from the pixel near the area boundary.
The function may be used to remove dust and scratches from a scanned photo, or to
remove undesirable objects from still images or video.
For further details, please see:
https://docs.opencv.org/4.x/d7/d8b/group__photo__inpaint.html#gaedd30dfa0214fec4c88138b51d678085
inRange (InputArray src , InputArray lowerb , InputArray upperb , OutputArray dst )
→ void
InRange checks if array elements lie between the elements of two Mat arrays.
inRangebyScalar (InputArray src , Scalar lowerb , Scalar upperb , OutputArray dst )
→ void
InRangeWithScalar checks if array elements lie between the elements of two Scalars
insertChannel (InputArray src , InputOutputArray dst , int coi )
→ void
InsertChannel inserts a single channel to dst (coi is 0-based index)
(it replaces channel i with another in dst).
integral (InputArray src , OutputArray sum , OutputArray sqsum , OutputArray tilted , {int sdepth = -1 , int sqdepth = -1 })
→ void
Integral calculates one or more integral images for the source image.
For further details, please see:
https:///docs.opencv.org/master/d7/d1b/group__imgproc__misc.html#ga97b87bec26908237e8ba0f6e96d23e28
invert (InputArray src , OutputArray dst , {int flags = DECOMP_LU })
→ double
Invert finds the inverse or pseudo-inverse of a matrix.
invertAffineTransform (InputArray M , {OutputArray ? iM })
→ Mat
Inverts an affine transformation.
The function computes an inverse affine transformation represented by 2×3 matrix M:
The result is also a 2×3 matrix of the same type as M.
kmeans (InputArray data , int K , InputOutputArray bestLabels , TermCriteria criteria , int attempts , int flags , OutputArray centers )
→ double
KMeans finds centers of clusters and groups input samples around the clusters.
kmeansByPoints (List <Point > data , int K , InputOutputArray bestLabels , TermCriteria criteria , int attempts , int flags , OutputArray centers )
→ double
KMeansPoints finds centers of clusters and groups input samples around the clusters.
Laplacian (Mat src , Mat dst , int ddepth , {int ksize = 1 , double scale = 1 , double delta = 0 , int borderType = BORDER_DEFAULT })
→ void
Laplacian calculates the Laplacian of an image.
line (InputOutputArray img , Point pt1 , Point pt2 , Scalar color , {int thickness = 1 , int lineType = LINE_8 , int shift = 0 })
→ void
Line draws a line segment connecting two points.
linearPolar (InputArray src , OutputArray dst , Point2f center , double maxRadius , int flags )
→ void
LinearPolar remaps an image to polar coordinates space.
loadNativeLibrary ()
→ DynamicLibrary
log (InputArray src , OutputArray dst )
→ void
Log calculates the natural logarithm of every array element.
logPolar (InputArray src , OutputArray dst , Point2f center , double M , int flags )
→ void
LogPolar remaps an image to semilog-polar coordinates space.
magnitude (InputArray x , InputArray y , OutputArray magnitude )
→ void
Magnitude calculates the magnitude of 2D vectors.
matchShapes (List <Point > contour1 , List <Point > contour2 , int method , double parameter )
→ double
Compares two shapes.
method: ShapeMatchModes
For further details, please see:
https:///docs.opencv.org/4.x/d3/dc0/group__imgproc__shape.html#gaadc90cb16e2362c9bd6e7363e6e4c317
matchTemplate (Mat image , Mat templ , Mat result , int method , {Mat ? mask })
→ void
MatchTemplate compares a template against overlapped image regions.
max (InputArray src1 , InputArray src2 , OutputArray dst )
→ void
Max calculates per-element maximum of two arrays or an array and a scalar.
meanStdDev (InputArray src , OutputArray mean , OutputArray stddev , {InputArray ? mask })
→ dynamic
MeanStdDev calculates a mean and standard deviation of array elements.
medianBlur (Mat src , OutputArray dst , int ksize )
→ void
MedianBlur blurs an image using the median filter.
merge (List <Mat > mv , OutputArray dst )
→ void
Merge creates one multi-channel array out of several single-channel ones.
min (InputArray src1 , InputArray src2 , OutputArray dst )
→ void
Min calculates per-element minimum of two arrays or an array and a scalar.
minAreaRect (List <Point > points )
→ RotatedRect
MinAreaRect finds a rotated rectangle of the minimum area enclosing the input 2D point set.
minEnclosingCircle (List <Point > pts )
→ (Point2f , double )
MinEnclosingCircle finds a circle of the minimum area enclosing the input 2D point set.
minMaxIdx (InputArray src , {InputArray ? mask })
→ (double , double , int , int )
MinMaxIdx finds the global minimum and maximum in an array.
minMaxLoc (InputArray src , {InputArray ? mask })
→ (double , double , Point , Point )
MinMaxLoc finds the global minimum and maximum in an array.
moments (Mat src , {bool binaryImage = false })
→ Moments
Moments calculates all of the moments up to the third order of a polygon
or rasterized shape.
morphologyDefaultBorderValue ()
→ Scalar
MorphologyDefaultBorder returns "magic" border value for erosion and dilation.
It is automatically transformed to Scalar::all(-DBL_MAX) for dilation.
morphologyEx (Mat src , Mat dst , int op , Mat kernel , {Point ? anchor , int iterations = 1 , int borderType = BORDER_CONSTANT })
→ void
MorphologyEx performs advanced morphological transformations.
mulSpectrums (InputArray a , InputArray b , OutputArray c , int flags , {bool conjB = false })
→ void
Copies specified channels from input arrays to the specified channels of output arrays.
multiply (InputArray src1 , InputArray src2 , OutputArray dst , {double scale = 1 , int dtype = -1 })
→ void
Multiply calculates the per-element scaled product of two arrays.
Both input arrays must be of the same size and the same type.
NMSBoxes (List <Rect > bboxes , List <double > scores , double score_threshold , double nms_threshold , {double eta = 1.0 , int top_k = 0 })
→ List <int >
NMSBoxes performs non maximum suppression given boxes and corresponding scores.
norm (InputArray src1 , {int normType = NORM_L2 , InputArray ? mask })
→ double
Norm calculates the absolute norm of an array.
norm1 (InputArray src1 , InputArray src2 , {int normType = NORM_L2 , InputArray ? mask })
→ double
Norm calculates the absolute difference/relative norm of two arrays.
normalize (InputArray src , InputOutputArray dst , {double alpha = 1 , double beta = 0 , int norm_type = NORM_L2 })
→ void
Normalize normalizes the norm or value range of an array.
openCvVersion ()
→ String
get version
PCACompute (InputArray data , InputOutputArray mean , OutputArray eigenvectors , OutputArray eigenvalues , {int maxComponents = 0 })
→ void
PCACompute performs PCA.
pencilSketch (InputArray src , {double sigma_s = 60 , double sigma_r = 0.07 , double shade_factor = 0.02 })
→ (Mat , Mat )
PencilSketch pencil-like non-photorealistic line drawing.
For further details, please see:
https://docs.opencv.org/4.x/df/dac/group__photo__render.html#gae5930dd822c713b36f8529b21ddebd0c
perspectiveTransform (InputArray src , OutputArray dst , InputArray m )
→ void
PerspectiveTransform performs the perspective matrix transformation of vectors.
phase (InputArray x , InputArray y , OutputArray angle , {bool angleInDegrees = false })
→ void
Phase calculates the rotation angle of 2D vectors.
pointPolygonTest (List <Point > pts , Point2f pt , bool measureDist )
→ double
PointPolygonTest performs a point-in-contour test.
polarToCart (InputArray magnitude , InputArray angle , OutputArray x , OutputArray y , {bool angleInDegrees = false })
→ void
PolatToCart calculates x and y coordinates of 2D vectors from their magnitude and angle.
polylines (InputOutputArray img , List <List <Point > > pts , bool isClosed , Scalar color , {int thickness = 1 , int lineType = LINE_8 , int shift = 0 })
→ void
Polylines draws several polygonal curves.
pow (InputArray src , double power , OutputArray dst )
→ void
Pow raises every array element to a power.
putText (InputOutputArray img , String text , Point org , int fontFace , double fontScale , Scalar color , {int thickness = 1 , int lineType = LINE_8 , bool bottomLeftOrigin = false })
→ void
PutTextWithParams draws a text string.
It renders the specified text string into the img Mat at the location
passed in the "org" param, using the desired font face, font scale,
color, and line thinkness.
pyrDown (Mat src , Mat dst , {(int , int ) dstsize = (0, 0) , int borderType = BORDER_CONSTANT })
→ void
PyrDown blurs an image and downsamples it.
pyrUp (Mat src , Mat dst , {(int , int ) dstsize = (0, 0) , int borderType = BORDER_CONSTANT })
→ void
PyrUp upsamples an image and then blurs it.
randn (InputOutputArray dst , Scalar mean , Scalar stddev )
→ void
RandN Fills the array with normally distributed random numbers.
randShuffle (InputOutputArray dst , {double iterFactor = 1 , Rng ? rng })
→ void
RandShuffle Shuffles the array elements randomly.
randu (InputOutputArray dst , Scalar low , Scalar high )
→ void
RandU Generates a single uniformly-distributed random
number or an array of random numbers.
rectangle (InputOutputArray img , Rect rect , Scalar color , {int thickness = 1 , int lineType = LINE_8 , int shift = 0 })
→ void
Rectangle draws a simple, thick, or filled up-right rectangle.
It renders a rectangle with the desired characteristics to the target Mat image.
reduce (InputArray src , OutputArray dst , int dim , int rtype , {int dtype = -1 })
→ void
Reduce reduces a matrix to a vector.
reduceArgMax (InputArray src , OutputArray dst , int axis , {bool lastIndex = false })
→ void
Finds indices of max elements along provided axis.
reduceArgMin (InputArray src , OutputArray dst , int axis , {bool lastIndex = false })
→ void
Finds indices of min elements along provided axis.
registerErrorCallback ({DartErrorCallbackFunction? callback })
→ void
remap (InputArray src , OutputArray dst , InputArray map1 , InputArray map2 , int interpolation , {int borderMode = BORDER_CONSTANT , Scalar ? borderValue })
→ void
Remap applies a generic geometrical transformation to an image.
repeat (InputArray src , int ny , int nx , OutputArray dst )
→ void
Repeat fills the output array with repeated copies of the input array.
resize (InputArray src , OutputArray dst , Size dsize , {double fx = 0 , double fy = 0 , int interpolation = INTER_LINEAR })
→ void
Resize resizes an image.
It resizes the image src down to or up to the specified size, storing the
result in dst. Note that src and dst may be the same image. If you wish to
scale by factor, an empty sz may be passed and non-zero fx and fy. Likewise,
if you wish to scale to an explicit size, a non-empty sz may be passed with
zero for both fx and fy.
rotate (InputArray src , OutputArray dst , int rotateCode )
→ void
Rotate rotates a 2D array in multiples of 90 degrees
scaleAdd (InputArray src1 , double alpha , InputArray src2 , OutputArray dst )
→ void
Calculates the sum of a scaled array and another array.
Scharr (Mat src , Mat dst , int ddepth , int dx , int dy , {double scale = 1 , double delta = 0 , int borderType = BORDER_DEFAULT })
→ void
Scharr calculates the first x- or y- image derivative using Scharr operator.
seamlessClone (InputArray src , InputArray dst , InputArray mask , Point p , int flags )
→ Mat
SeamlessClone blend two image by Poisson Blending.
For further details, please see:
https://docs.opencv.org/master/df/da0/group__photo__clone.html#ga2bf426e4c93a6b1f21705513dfeca49d
sepFilter2D (InputArray src , OutputArray dst , int ddepth , InputArray kernelX , InputArray kernelY , {Point ? anchor , double delta = 0 , int borderType = BORDER_DEFAULT })
→ void
SepFilter2D applies a separable linear filter to the image.
setIdentity (InputOutputArray mtx , {double s = 1 })
→ void
SetIdentity initializes a scaled identity matrix.
For further details, please see:
setNumThreads (int n )
→ void
Set the number of threads for OpenCV.
sobel (Mat src , Mat dst , int ddepth , int dx , int dy , {int ksize = 3 , double scale = 1 , double delta = 0 , int borderType = BORDER_DEFAULT })
→ void
Sobel calculates the first, second, third, or mixed image derivatives using an extended Sobel operator
solve (InputArray src1 , InputArray src2 , OutputArray dst , {int flags = DECOMP_LU })
→ bool
Solve solves one or more linear systems or least-squares problems.
solveCubic (InputArray coeffs , OutputArray roots )
→ int
SolveCubic finds the real roots of a cubic equation.
solvePoly (InputArray coeffs , OutputArray roots , {int maxIters = 300 })
→ double
SolvePoly finds the real or complex roots of a polynomial equation.
sort (InputArray src , OutputArray dst , int flags )
→ void
Sort sorts each row or each column of a matrix.
sortIdx (InputArray src , OutputArray dst , int flags )
→ void
SortIdx sorts each row or each column of a matrix.
Instead of reordering the elements themselves, it stores the indices of sorted elements in the output array
spatialGradient (Mat src , Mat dx , Mat dy , {int ksize = 3 , int borderType = BORDER_DEFAULT })
→ void
SpatialGradient calculates the first order image derivative in both x and y using a Sobel operator.
split (InputArray m )
→ List <Mat >
Split creates an array of single channel images from a multi-channel image
Created images should be closed manualy to avoid memory leaks.
sqrBoxFilter (Mat src , Mat dst , int depth , Size ksize )
→ void
SqBoxFilter calculates the normalized sum of squares of the pixel values overlapping the filter.
stylization (InputArray src , {double sigma_s = 60 , double sigma_r = 0.45 })
→ Mat
Stylization aims to produce digital imagery with a wide variety of effects
not focused on photorealism. Edge-aware filters are ideal for stylization,
as they can abstract regions of low contrast while preserving, or enhancing,
high-contrast features.
For further details, please see:
https://docs.opencv.org/4.x/df/dac/group__photo__render.html#gacb0f7324017df153d7b5d095aed53206
subtract (InputArray src1 , InputArray src2 , OutputArray dst )
→ void
Subtract calculates the per-element subtraction of two arrays or an array and a scalar.
termCriteriaNew (int type , int maxCount , double epsilon )
→ TermCriteria
TermCriteria is the criteria for iterative algorithms.
textureFlattening (InputArray src , InputArray mask , {double low_threshold = 30 , double high_threshold = 45 , int kernel_size = 3 })
→ Mat
TextureFlattening washes out the texture of the selected region, giving its contents a flat aspect.
For further details, please see:
https://docs.opencv.org/master/df/da0/group__photo__clone.html#gad55df6aa53797365fa7cc23959a54004
theRNG ()
→ Rng
TheRNG Returns the default random number generator.
threshold (InputArray src , OutputArray dst , double thresh , double maxval , int type )
→ double
Threshold applies a fixed-level threshold to each array element.
throwIfFailed (CvStatus status )
→ void
trace (InputArray mtx )
→ Scalar
Trace returns the trace of a matrix.
transform (InputArray src , OutputArray dst , InputArray m )
→ void
Transform performs the matrix transformation of every array element.
transpose (InputArray src , OutputArray dst )
→ void
Transpose transposes a matrix.
undistort (InputArray src , InputArray cameraMatrix , InputArray distCoeffs , {OutputArray ? dst , InputArray ? newCameraMatrix })
→ Mat
undistortPoints (InputArray src , InputArray cameraMatrix , InputArray distCoeffs , {OutputArray ? dst , InputArray ? R , InputArray ? P })
→ Mat
vconcat (InputArray src1 , InputArray src2 , OutputArray dst )
→ void
Vconcat applies vertical concatenation to given matrices.
waitKey (int delay )
→ int
WaitKey that is not attached to a specific Window.
Only use when no Window exists in your application, e.g. command line app.
warpAffine (InputArray src , OutputArray dst , InputArray M , Size dsize , {int flags = INTER_LINEAR , int borderMode = BORDER_CONSTANT , Scalar ? borderValue })
→ void
WarpAffine applies an affine transformation to an image.
warpPerspective (InputArray src , OutputArray dst , InputArray M , Size dsize , {int flags = INTER_LINEAR , int borderMode = BORDER_CONSTANT , Scalar ? borderValue })
→ void
WarpPerspective applies a perspective transformation to an image.
For more parameters please check WarpPerspectiveWithParams.
watershed (InputArray image , InputOutputArray markers )
→ void
Watershed performs a marker-based image segmentation using the watershed algorithm.