Documentation ¶
Overview ¶
Package gocv is a wrapper around the OpenCV 4.x computer vision library. It provides a Go language interface to the latest version of OpenCV.
OpenCV (Open Source Computer Vision Library: http://opencv.org) is an open-source BSD-licensed library that includes several hundreds of computer vision algorithms.
For further details, please see: http://docs.opencv.org/master/d1/dfb/intro.html
Index ¶
- Constants
- Variables
- func AbsDiff(src1, src2 Mat, dst *Mat)
- func Accumulate(src Mat, dst *Mat)
- func AccumulateProduct(src1 Mat, src2 Mat, dst *Mat)
- func AccumulateProductWithMask(src1 Mat, src2 Mat, dst *Mat, mask Mat)
- func AccumulateSquare(src Mat, dst *Mat)
- func AccumulateSquareWithMask(src Mat, dst *Mat, mask Mat)
- func AccumulateWithMask(src Mat, dst *Mat, mask Mat)
- func AccumulatedWeighted(src Mat, dst *Mat, alpha float64)
- func AccumulatedWeightedWithMask(src Mat, dst *Mat, alpha float64, mask Mat)
- func AdaptiveThreshold(src Mat, dst *Mat, maxValue float32, adaptiveTyp AdaptiveThresholdType, ...)
- func Add(src1, src2 Mat, dst *Mat)
- func AddWeighted(src1 Mat, alpha float64, src2 Mat, beta float64, gamma float64, dst *Mat)
- func ApplyColorMap(src Mat, dst *Mat, colormapType ColormapTypes)
- func ApplyCustomColorMap(src Mat, dst *Mat, customColormap Mat)
- func ArcLength(curve PointVector, isClosed bool) float64
- func ArrowedLine(img *Mat, pt1 image.Point, pt2 image.Point, c color.RGBA, thickness int)
- func ArucoDrawDetectedMarkers(img Mat, markerCorners [][]Point2f, markerIds []int, borderColor Scalar)
- func ArucoGenerateImageMarker(dictionaryId ArucoDictionaryCode, id int, sidePixels int, img Mat, ...)
- func BatchDistance(src1 Mat, src2 Mat, dist Mat, dtype MatType, nidx Mat, normType NormType, ...)
- func BilateralFilter(src Mat, dst *Mat, diameter int, sigmaColor float64, sigmaSpace float64)
- func BitwiseAnd(src1 Mat, src2 Mat, dst *Mat)
- func BitwiseAndWithMask(src1 Mat, src2 Mat, dst *Mat, mask Mat)
- func BitwiseNot(src1 Mat, dst *Mat)
- func BitwiseNotWithMask(src1 Mat, dst *Mat, mask Mat)
- func BitwiseOr(src1 Mat, src2 Mat, dst *Mat)
- func BitwiseOrWithMask(src1 Mat, src2 Mat, dst *Mat, mask Mat)
- func BitwiseXor(src1 Mat, src2 Mat, dst *Mat)
- func BitwiseXorWithMask(src1 Mat, src2 Mat, dst *Mat, mask Mat)
- func BlobFromImages(imgs []Mat, blob *Mat, scaleFactor float64, size image.Point, mean Scalar, ...)
- func BlobFromImagesWithParams(imgs []Mat, blob *Mat, params ImageToBlobParams)
- func Blur(src Mat, dst *Mat, ksize image.Point)
- func BorderInterpolate(p int, len int, borderType CovarFlags) int
- func BoundingRect(contour PointVector) image.Rectangle
- func BoxFilter(src Mat, dst *Mat, depth int, ksize image.Point)
- func BoxPoints(rect RotatedRect, pts *Mat)
- func BoxPoints2f(rect RotatedRect2f, pts *Mat)
- func CalcBackProject(src []Mat, channels []int, hist Mat, backProject *Mat, ranges []float64, ...)
- func CalcCovarMatrix(samples Mat, covar *Mat, mean *Mat, flags CovarFlags, ctype MatType)
- func CalcHist(src []Mat, channels []int, mask Mat, hist *Mat, size []int, ranges []float64, ...)
- func CalcOpticalFlowFarneback(prevImg Mat, nextImg Mat, flow *Mat, pyrScale float64, levels int, winsize int, ...)
- func CalcOpticalFlowPyrLK(prevImg Mat, nextImg Mat, prevPts Mat, nextPts Mat, status *Mat, err *Mat)
- func CalcOpticalFlowPyrLKWithParams(prevImg Mat, nextImg Mat, prevPts Mat, nextPts Mat, status *Mat, err *Mat, ...)
- func CalibrateCamera(objectPoints Points3fVector, imagePoints Points2fVector, imageSize image.Point, ...) float64
- func Canny(src Mat, edges *Mat, t1 float32, t2 float32)
- func CartToPolar(x Mat, y Mat, magnitude *Mat, angle *Mat, angleInDegrees bool)
- func CheckChessboard(image Mat, size image.Point) bool
- func CheckRange(src Mat) bool
- func Circle(img *Mat, center image.Point, radius int, c color.RGBA, thickness int)
- func CircleWithParams(img *Mat, center image.Point, radius int, c color.RGBA, thickness int, ...)
- func ClipLine(imgSize image.Point, pt1 image.Point, pt2 image.Point) bool
- func ColorChange(src, mask Mat, dst *Mat, red_mul, green_mul, blue_mul float32)
- func Compare(src1 Mat, src2 Mat, dst *Mat, ct CompareType)
- func CompareHist(hist1 Mat, hist2 Mat, method HistCompMethod) float32
- func CompleteSymm(m Mat, lowerToUpper bool)
- func ConnectedComponents(src Mat, labels *Mat) int
- func ConnectedComponentsWithParams(src Mat, labels *Mat, conn int, ltype MatType, ...) int
- func ConnectedComponentsWithStats(src Mat, labels *Mat, stats *Mat, centroids *Mat) int
- func ConnectedComponentsWithStatsWithParams(src Mat, labels *Mat, stats *Mat, centroids *Mat, conn int, ltype MatType, ...) int
- func ContourArea(contour PointVector) float64
- func ConvertPointsFromHomogeneous(src Mat, dst *Mat)
- func ConvertScaleAbs(src Mat, dst *Mat, alpha float64, beta float64)
- func ConvexHull(points PointVector, hull *Mat, clockwise bool, returnPoints bool)
- func ConvexityDefects(contour PointVector, hull Mat, result *Mat)
- func CopyMakeBorder(src Mat, dst *Mat, top int, bottom int, left int, right int, bt BorderType, ...)
- func CornerSubPix(img Mat, corners *Mat, winSize image.Point, zeroZone image.Point, ...)
- func CountNonZero(src Mat) int
- func CreateHanningWindow(img *Mat, size image.Point, typ MatType)
- func CvtColor(src Mat, dst *Mat, code ColorConversionCode)
- func DCT(src Mat, dst *Mat, flags DftFlags)
- func DFT(src Mat, dst *Mat, flags DftFlags)
- func Demosaicing(src Mat, dst *Mat, code ColorConversionCode)
- func DetailEnhance(src Mat, dst *Mat, sigma_s, sigma_r float32)
- func Determinant(src Mat) float64
- func Dilate(src Mat, dst *Mat, kernel Mat)
- func DilateWithParams(src Mat, dst *Mat, kernel Mat, anchor image.Point, ...)
- func DistanceTransform(src Mat, dst *Mat, labels *Mat, distType DistanceTypes, ...)
- func Divide(src1 Mat, src2 Mat, dst *Mat)
- func DrawChessboardCorners(image *Mat, patternSize image.Point, corners Mat, patternWasFound bool)
- func DrawContours(img *Mat, contours PointsVector, contourIdx int, c color.RGBA, thickness int)
- func DrawContoursWithParams(img *Mat, contours PointsVector, contourIdx int, c color.RGBA, thickness int, ...)
- func DrawKeyPoints(src Mat, keyPoints []KeyPoint, dst *Mat, color color.RGBA, ...)
- func DrawMatches(img1 Mat, kp1 []KeyPoint, img2 Mat, kp2 []KeyPoint, matches1to2 []DMatch, ...)
- func EMD(signature1, signature2 Mat, typ DistanceTypes) float32
- func EdgePreservingFilter(src Mat, dst *Mat, filter EdgeFilter, sigma_s, sigma_r float32)
- func Eigen(src Mat, eigenvalues *Mat, eigenvectors *Mat) bool
- func EigenNonSymmetric(src Mat, eigenvalues *Mat, eigenvectors *Mat)
- func Ellipse(img *Mat, center, axes image.Point, angle, startAngle, endAngle float64, ...)
- func EllipseWithParams(img *Mat, center, axes image.Point, angle, startAngle, endAngle float64, ...)
- func EqualizeHist(src Mat, dst *Mat)
- func Erode(src Mat, dst *Mat, kernel Mat)
- func ErodeWithParams(src Mat, dst *Mat, kernel Mat, anchor image.Point, iterations, borderType int)
- func ErodeWithParamsAndBorderValue(src Mat, dst *Mat, kernel Mat, anchor image.Point, iterations, borderType int, ...)
- func EstimateNewCameraMatrixForUndistortRectify(k, d Mat, imgSize image.Point, r Mat, p *Mat, balance float64, ...)
- func Exp(src Mat, dst *Mat)
- func ExtractChannel(src Mat, dst *Mat, coi int)
- func FP16BlobFromImage(img Mat, scaleFactor float32, size image.Point, mean float32, swapRB bool, ...) []byte
- func FastNlMeansDenoising(src Mat, dst *Mat)
- func FastNlMeansDenoisingColored(src Mat, dst *Mat)
- func FastNlMeansDenoisingColoredMulti(src []Mat, dst *Mat, imgToDenoiseIndex int, temporalWindowSize int)
- func FastNlMeansDenoisingColoredMultiWithParams(src []Mat, dst *Mat, imgToDenoiseIndex int, temporalWindowSize int, h float32, ...)
- func FastNlMeansDenoisingColoredWithParams(src Mat, dst *Mat, h float32, hColor float32, templateWindowSize int, ...)
- func FastNlMeansDenoisingWithParams(src Mat, dst *Mat, h float32, templateWindowSize int, searchWindowSize int)
- func FillPoly(img *Mat, pts PointsVector, c color.RGBA)
- func FillPolyWithParams(img *Mat, pts PointsVector, c color.RGBA, lineType LineType, shift int, ...)
- func Filter2D(src Mat, dst *Mat, ddepth MatType, kernel Mat, anchor image.Point, ...)
- func FindChessboardCorners(image Mat, patternSize image.Point, corners *Mat, flags CalibCBFlag) bool
- func FindChessboardCornersSB(image Mat, patternSize image.Point, corners *Mat, flags CalibCBFlag) bool
- func FindChessboardCornersSBWithMeta(image Mat, patternSize image.Point, corners *Mat, flags CalibCBFlag, meta *Mat) bool
- func FindNonZero(src Mat, idx *Mat)
- func FindTransformECC(templateImage Mat, inputImage Mat, warpMatrix *Mat, motionType int, ...) float64
- func FisheyeCalibrate(objectPoints Points3fVector, imagePoints Points2fVector, size image.Point, ...) float64
- func FisheyeDistortPoints(undistorted Mat, distorted *Mat, k, d Mat)
- func FisheyeUndistortImage(distorted Mat, undistorted *Mat, k, d Mat)
- func FisheyeUndistortImageWithParams(distorted Mat, undistorted *Mat, k, d, knew Mat, size image.Point)
- func FisheyeUndistortPoints(distorted Mat, undistorted *Mat, k, d, r, p Mat)
- func FitLine(pts PointVector, line *Mat, distType DistanceTypes, param, reps, aeps float64)
- func Flip(src Mat, dst *Mat, flipCode int)
- func GaussianBlur(src Mat, dst *Mat, ksize image.Point, sigmaX float64, sigmaY float64, ...)
- func Gemm(src1, src2 Mat, alpha float64, src3 Mat, beta float64, dst *Mat, flags int)
- func GetNumThreads() int
- func GetOptimalDFTSize(vecsize int) int
- func GetRectSubPix(src Mat, patchSize image.Point, center image.Point, dst *Mat)
- func GetTextSize(text string, fontFace HersheyFont, fontScale float64, thickness int) image.Point
- func GetTextSizeWithBaseline(text string, fontFace HersheyFont, fontScale float64, thickness int) (image.Point, int)
- func GetTickCount() float64
- func GetTickFrequency() float64
- func GoodFeaturesToTrack(img Mat, corners *Mat, maxCorners int, quality float64, minDist float64)
- func GrabCut(img Mat, mask *Mat, r image.Rectangle, bgdModel *Mat, fgdModel *Mat, ...)
- func GroupRectangles(rects []image.Rectangle, groupThreshold int, eps float64) []image.Rectangle
- func Hconcat(src1, src2 Mat, dst *Mat)
- func HoughCircles(src Mat, circles *Mat, method HoughMode, dp, minDist float64)
- func HoughCirclesWithParams(src Mat, circles *Mat, method HoughMode, dp, minDist, param1, param2 float64, ...)
- func HoughLines(src Mat, lines *Mat, rho float32, theta float32, threshold int)
- func HoughLinesP(src Mat, lines *Mat, rho float32, theta float32, threshold int)
- func HoughLinesPWithParams(src Mat, lines *Mat, rho float32, theta float32, threshold int, ...)
- func HoughLinesPointSet(points Mat, lines *Mat, linesMax int, threshold int, minRho float32, ...)
- func IDCT(src Mat, dst *Mat, flags int)
- func IDFT(src Mat, dst *Mat, flags, nonzeroRows int)
- func IMDecodeIntoMat(buf []byte, flags IMReadFlag, dest *Mat) error
- func IMWrite(name string, img Mat) bool
- func IMWriteWithParams(name string, img Mat, params []int) bool
- func IlluminationChange(src, mask Mat, dst *Mat, alpha, beta float32)
- func ImagesFromBlob(blob Mat, imgs []Mat)
- func InRange(src, lb, ub Mat, dst *Mat)
- func InRangeWithScalar(src Mat, lb, ub Scalar, dst *Mat)
- func InitUndistortRectifyMap(cameraMatrix Mat, distCoeffs Mat, r Mat, newCameraMatrix Mat, size image.Point, ...)
- func Inpaint(src Mat, mask Mat, dst *Mat, inpaintRadius float32, ...)
- func InsertChannel(src Mat, dst *Mat, coi int)
- func Integral(src Mat, sum *Mat, sqsum *Mat, tilted *Mat)
- func Invert(src Mat, dst *Mat, flags SolveDecompositionFlags) float64
- func InvertAffineTransform(src Mat, dst *Mat)
- func KMeans(data Mat, k int, bestLabels *Mat, criteria TermCriteria, attempts int, ...) float64
- func KMeansPoints(points PointVector, k int, bestLabels *Mat, criteria TermCriteria, ...) float64
- func LUT(src, wbLUT Mat, dst *Mat)
- func Laplacian(src Mat, dst *Mat, dDepth MatType, size int, scale float64, delta float64, ...)
- func Line(img *Mat, pt1 image.Point, pt2 image.Point, c color.RGBA, thickness int)
- func LinearPolar(src Mat, dst *Mat, center image.Point, maxRadius float64, ...)
- func Log(src Mat, dst *Mat)
- func LogPolar(src Mat, dst *Mat, center image.Point, m float64, flags InterpolationFlags)
- func Magnitude(x, y Mat, magnitude *Mat)
- func Mahalanobis(v1, v2, icovar Mat) float64
- func MatchShapes(contour1 PointVector, contour2 PointVector, method ShapeMatchModes, ...) float64
- func MatchTemplate(image Mat, templ Mat, result *Mat, method TemplateMatchMode, mask Mat)
- func Max(src1, src2 Mat, dst *Mat)
- func MeanStdDev(src Mat, dst *Mat, dstStdDev *Mat)
- func MedianBlur(src Mat, dst *Mat, ksize int)
- func Merge(mv []Mat, dst *Mat)
- func Min(src1, src2 Mat, dst *Mat)
- func MinEnclosingCircle(pts PointVector) (x, y, radius float32)
- func MinMaxIdx(input Mat) (minVal, maxVal float32, minIdx, maxIdx int)
- func MinMaxLoc(input Mat) (minVal, maxVal float32, minLoc, maxLoc image.Point)
- func MinMaxLocWithMask(input, mask Mat) (minVal, maxVal float32, minLoc, maxLoc image.Point)
- func MixChannels(src []Mat, dst []Mat, fromTo []int)
- func Moments(src Mat, binaryImage bool) map[string]float64
- func MorphologyEx(src Mat, dst *Mat, op MorphType, kernel Mat)
- func MorphologyExWithParams(src Mat, dst *Mat, op MorphType, kernel Mat, iterations int, ...)
- func MulSpectrums(a Mat, b Mat, dst *Mat, flags DftFlags)
- func MulTransposed(src Mat, dest *Mat, ata bool)
- func Multiply(src1 Mat, src2 Mat, dst *Mat)
- func MultiplyWithParams(src1 Mat, src2 Mat, dst *Mat, scale float64, dtype MatType)
- func NMSBoxes(bboxes []image.Rectangle, scores []float32, scoreThreshold float32, ...) (indices []int)
- func NMSBoxesWithParams(bboxes []image.Rectangle, scores []float32, scoreThreshold float32, ...) (indices []int)
- func Norm(src1 Mat, normType NormType) float64
- func NormWithMats(src1 Mat, src2 Mat, normType NormType) float64
- func Normalize(src Mat, dst *Mat, alpha float64, beta float64, typ NormType)
- func OpenCVVersion() string
- func PCABackProject(data Mat, mean Mat, eigenvectors Mat, result *Mat)
- func PCACompute(src Mat, mean *Mat, eigenvectors *Mat, eigenvalues *Mat, maxComponents int)
- func PCAProject(data Mat, mean Mat, eigenvectors Mat, result *Mat)
- func PSNR(src1 Mat, src2 Mat) float64
- func PencilSketch(src Mat, dst1, dst2 *Mat, sigma_s, sigma_r, shade_factor float32)
- func PerspectiveTransform(src Mat, dst *Mat, tm Mat)
- func Phase(x, y Mat, angle *Mat, angleInDegrees bool)
- func PointPolygonTest(pts PointVector, pt image.Point, measureDist bool) float64
- func PolarToCart(magnitude Mat, degree Mat, x *Mat, y *Mat, angleInDegrees bool)
- func Polylines(img *Mat, pts PointsVector, isClosed bool, c color.RGBA, thickness int)
- func Pow(src Mat, power float64, dst *Mat)
- func PutText(img *Mat, text string, org image.Point, fontFace HersheyFont, ...)
- func PutTextWithParams(img *Mat, text string, org image.Point, fontFace HersheyFont, ...)
- func PyrDown(src Mat, dst *Mat, ksize image.Point, borderType BorderType)
- func PyrUp(src Mat, dst *Mat, ksize image.Point, borderType BorderType)
- func RandN(mat *Mat, mean, stddev Scalar)
- func RandShuffle(mat *Mat)
- func RandShuffleWithParams(mat *Mat, iterFactor float64, rng RNG)
- func RandU(mat *Mat, low, high Scalar)
- func Rectangle(img *Mat, r image.Rectangle, c color.RGBA, thickness int)
- func RectangleWithParams(img *Mat, r image.Rectangle, c color.RGBA, thickness int, lineType LineType, ...)
- func Reduce(src Mat, dst *Mat, dim int, rType ReduceTypes, dType MatType)
- func ReduceArgMax(src Mat, dst *Mat, axis int, lastIndex bool)
- func ReduceArgMin(src Mat, dst *Mat, axis int, lastIndex bool)
- func Remap(src Mat, dst, map1, map2 *Mat, interpolation InterpolationFlags, ...)
- func Repeat(src Mat, nY int, nX int, dst *Mat)
- func Resize(src Mat, dst *Mat, sz image.Point, fx, fy float64, interp InterpolationFlags)
- func Rodrigues(src Mat, dst *Mat)
- func Rotate(src Mat, dst *Mat, code RotateFlag)
- func SVBackSubst(w Mat, u Mat, vt Mat, rhs Mat, dst *Mat)
- func SVDCompute(src Mat, w, u, vt *Mat)
- func SVDecomp(src Mat, w *Mat, u *Mat, vt *Mat)
- func ScaleAdd(src1 Mat, alpha float64, src2 Mat, dst *Mat)
- func Scharr(src Mat, dst *Mat, dDepth MatType, dx int, dy int, scale float64, ...)
- func SeamlessClone(src, dst, mask Mat, p image.Point, blend *Mat, flags SeamlessCloneFlags)
- func SelectROI(name string, img Mat) image.Rectangledeprecated
- func SelectROIs(name string, img Mat) []image.Rectangledeprecated
- func SepFilter2D(src Mat, dst *Mat, ddepth MatType, kernelX, kernelY Mat, anchor image.Point, ...)
- func SetIdentity(src Mat, scalar float64)
- func SetNumThreads(n int)
- func SetRNGSeed(seed int)
- func Sobel(src Mat, dst *Mat, ddepth MatType, dx, dy, ksize int, scale, delta float64, ...)
- func Solve(src1 Mat, src2 Mat, dst *Mat, flags SolveDecompositionFlags) bool
- func SolveCubic(coeffs Mat, roots *Mat) int
- func SolvePnP(objectPoints Point3fVector, imagePoints Point2fVector, ...) bool
- func SolvePoly(coeffs Mat, roots *Mat, maxIters int) float64
- func Sort(src Mat, dst *Mat, flags SortFlags)
- func SortIdx(src Mat, dst *Mat, flags SortFlags)
- func SpatialGradient(src Mat, dx, dy *Mat, ksize MatType, borderType BorderType)
- func SqBoxFilter(src Mat, dst *Mat, depth int, ksize image.Point)
- func Stylization(src Mat, dst *Mat, sigma_s, sigma_r float32)
- func Subtract(src1 Mat, src2 Mat, dst *Mat)
- func TextureFlattening(src, mask Mat, dst *Mat, lowThreshold, highThreshold float32, kernelSize int)
- func Threshold(src Mat, dst *Mat, thresh float32, maxvalue float32, typ ThresholdType) (threshold float32)
- func Transform(src Mat, dst *Mat, tm Mat)
- func Transpose(src Mat, dst *Mat)
- func TransposeND(src Mat, order []int, dst *Mat)
- func TriangulatePoints(projMatr1, projMatr2 Mat, projPoints1, projPoints2 Point2fVector, ...)
- func Undistort(src Mat, dst *Mat, cameraMatrix Mat, distCoeffs Mat, newCameraMatrix Mat)
- func UndistortPoints(src Mat, dst *Mat, ...)
- func Vconcat(src1, src2 Mat, dst *Mat)
- func Version() string
- func WaitKey(delay int) int
- func WarpAffine(src Mat, dst *Mat, m Mat, sz image.Point)
- func WarpAffineWithParams(src Mat, dst *Mat, m Mat, sz image.Point, flags InterpolationFlags, ...)
- func WarpPerspective(src Mat, dst *Mat, m Mat, sz image.Point)
- func WarpPerspectiveWithParams(src Mat, dst *Mat, m Mat, sz image.Point, flags InterpolationFlags, ...)
- func Watershed(image Mat, markers *Mat)
- type AKAZE
- type AdaptiveThresholdType
- type AgastFeatureDetector
- type AlignMTB
- type ArucoDetector
- type ArucoDetectorParameters
- func (ap *ArucoDetectorParameters) GetAdaptiveThreshConstant() float64
- func (ap *ArucoDetectorParameters) GetAdaptiveThreshWinSizeMax() int
- func (ap *ArucoDetectorParameters) GetAdaptiveThreshWinSizeMin() int
- func (ap *ArucoDetectorParameters) GetAdaptiveThreshWinSizeStep() int
- func (ap *ArucoDetectorParameters) GetAprilTagCriticalRad() float32
- func (ap *ArucoDetectorParameters) GetAprilTagDeglitch() int
- func (ap *ArucoDetectorParameters) GetAprilTagMaxLineFitMse() float32
- func (ap *ArucoDetectorParameters) GetAprilTagMaxNmaxima() int
- func (ap *ArucoDetectorParameters) GetAprilTagMinClusterPixels() int
- func (ap *ArucoDetectorParameters) GetAprilTagMinWhiteBlackDiff() int
- func (ap *ArucoDetectorParameters) GetAprilTagQuadDecimate() float32
- func (ap *ArucoDetectorParameters) GetAprilTagQuadSigma() float32
- func (ap *ArucoDetectorParameters) GetCornerRefinementMaxIterations() int
- func (ap *ArucoDetectorParameters) GetCornerRefinementMethod() int
- func (ap *ArucoDetectorParameters) GetCornerRefinementMinAccuracy() float64
- func (ap *ArucoDetectorParameters) GetCornerRefinementWinSize() int
- func (ap *ArucoDetectorParameters) GetDetectInvertedMarker() bool
- func (ap *ArucoDetectorParameters) GetErrorCorrectionRate() float64
- func (ap *ArucoDetectorParameters) GetMarkerBorderBits() int
- func (ap *ArucoDetectorParameters) GetMaxErroneousBitsInBorderRate() float64
- func (ap *ArucoDetectorParameters) GetMaxMarkerPerimeterRate() float64
- func (ap *ArucoDetectorParameters) GetMinCornerDistanceRate() float64
- func (ap *ArucoDetectorParameters) GetMinDistanceToBorder() int
- func (ap *ArucoDetectorParameters) GetMinMarkerDistanceRate() float64
- func (ap *ArucoDetectorParameters) GetMinMarkerPerimeterRate() float64
- func (ap *ArucoDetectorParameters) GetMinOtsuStdDev() float64
- func (ap *ArucoDetectorParameters) GetPerspectiveRemoveIgnoredMarginPerCell() float64
- func (ap *ArucoDetectorParameters) GetPerspectiveRemovePixelPerCell() int
- func (ap *ArucoDetectorParameters) GetPolygonalApproxAccuracyRate() float64
- func (ap *ArucoDetectorParameters) SetAdaptiveThreshConstant(adaptiveThreshConstant float64)
- func (ap *ArucoDetectorParameters) SetAdaptiveThreshWinSizeMax(adaptiveThreshWinSizeMax int)
- func (ap *ArucoDetectorParameters) SetAdaptiveThreshWinSizeMin(adaptiveThreshWinSizeMin int)
- func (ap *ArucoDetectorParameters) SetAdaptiveThreshWinSizeStep(adaptiveThreshWinSizeStep int)
- func (ap *ArucoDetectorParameters) SetAprilTagCriticalRad(aprilTagCriticalRad float32)
- func (ap *ArucoDetectorParameters) SetAprilTagDeglitch(aprilTagDeglitch int)
- func (ap *ArucoDetectorParameters) SetAprilTagMaxLineFitMse(aprilTagMaxLineFitMse float32)
- func (ap *ArucoDetectorParameters) SetAprilTagMaxNmaxima(aprilTagMaxNmaxima int)
- func (ap *ArucoDetectorParameters) SetAprilTagMinClusterPixels(aprilTagMinClusterPixels int)
- func (ap *ArucoDetectorParameters) SetAprilTagMinWhiteBlackDiff(aprilTagMinWhiteBlackDiff int)
- func (ap *ArucoDetectorParameters) SetAprilTagQuadDecimate(aprilTagQuadDecimate float32)
- func (ap *ArucoDetectorParameters) SetAprilTagQuadSigma(aprilTagQuadSigma float32)
- func (ap *ArucoDetectorParameters) SetCornerRefinementMaxIterations(cornerRefinementMaxIterations int)
- func (ap *ArucoDetectorParameters) SetCornerRefinementMethod(cornerRefinementMethod int)
- func (ap *ArucoDetectorParameters) SetCornerRefinementMinAccuracy(cornerRefinementMinAccuracy float64)
- func (ap *ArucoDetectorParameters) SetCornerRefinementWinSize(cornerRefinementWinSize int)
- func (ap *ArucoDetectorParameters) SetDetectInvertedMarker(detectInvertedMarker bool)
- func (ap *ArucoDetectorParameters) SetErrorCorrectionRate(errorCorrectionRate float64)
- func (ap *ArucoDetectorParameters) SetMarkerBorderBits(markerBorderBits int)
- func (ap *ArucoDetectorParameters) SetMaxErroneousBitsInBorderRate(maxErroneousBitsInBorderRate float64)
- func (ap *ArucoDetectorParameters) SetMaxMarkerPerimeterRate(maxMarkerPerimeterRate float64)
- func (ap *ArucoDetectorParameters) SetMinCornerDistanceRate(minCornerDistanceRate float64)
- func (ap *ArucoDetectorParameters) SetMinDistanceToBorder(minDistanceToBorder int)
- func (ap *ArucoDetectorParameters) SetMinMarkerDistanceRate(minMarkerDistanceRate float64)
- func (ap *ArucoDetectorParameters) SetMinMarkerPerimeterRate(minMarkerPerimeterRate float64)
- func (ap *ArucoDetectorParameters) SetMinOtsuStdDev(minOtsuStdDev float64)
- func (ap *ArucoDetectorParameters) SetPerspectiveRemoveIgnoredMarginPerCell(perspectiveRemoveIgnoredMarginPerCell float64)
- func (ap *ArucoDetectorParameters) SetPerspectiveRemovePixelPerCell(perspectiveRemovePixelPerCell int)
- func (ap *ArucoDetectorParameters) SetPolygonalApproxAccuracyRate(polygonalApproxAccuracyRate float64)
- type ArucoDictionary
- type ArucoDictionaryCode
- type BFMatcher
- type BRISK
- type BackgroundSubtractorKNN
- type BackgroundSubtractorMOG2
- type BorderType
- type CLAHE
- type CalibCBFlag
- type CalibFlag
- type CascadeClassifier
- func (c *CascadeClassifier) Close() error
- func (c *CascadeClassifier) DetectMultiScale(img Mat) []image.Rectangle
- func (c *CascadeClassifier) DetectMultiScaleWithParams(img Mat, scale float64, minNeighbors, flags int, minSize, maxSize image.Point) []image.Rectangle
- func (c *CascadeClassifier) Load(name string) bool
- type ColorConversionCode
- type ColormapTypes
- type CompareType
- type ConnectedComponentsAlgorithmType
- type ConnectedComponentsTypes
- type ContourApproximationMode
- type CovarFlags
- type DMatch
- type DataLayoutType
- type DftFlags
- type DistanceTransformLabelTypes
- type DistanceTransformMasks
- type DistanceTypes
- type DrawMatchesFlag
- type EdgeFilter
- type FaceDetectorYN
- func NewFaceDetectorYN(modelPath string, configPath string, size image.Point) FaceDetectorYN
- func NewFaceDetectorYNFromBytes(framework string, bufferModel []byte, bufferConfig []byte, size image.Point) FaceDetectorYN
- func NewFaceDetectorYNFromBytesWithParams(framework string, bufferModel []byte, bufferConfig []byte, size image.Point, ...) FaceDetectorYN
- func NewFaceDetectorYNWithParams(modelPath string, configPath string, size image.Point, scoreThreshold float32, ...) FaceDetectorYN
- func (fd *FaceDetectorYN) Close()
- func (fd *FaceDetectorYN) Detect(image Mat, faces *Mat) int
- func (fd *FaceDetectorYN) GetInputSize() image.Point
- func (fd *FaceDetectorYN) GetNMSThreshold() float32
- func (fd *FaceDetectorYN) GetScoreThreshold() float32
- func (fd *FaceDetectorYN) GetTopK() int
- func (fd *FaceDetectorYN) SetInputSize(sz image.Point)
- func (fd *FaceDetectorYN) SetNMSThreshold(nmsThreshold float32)
- func (fd *FaceDetectorYN) SetScoreThreshold(scoreThreshold float32)
- func (fd *FaceDetectorYN) SetTopK(topK int)
- type FaceRecognizerSF
- func (fr *FaceRecognizerSF) AlignCrop(srcImg Mat, faceBox Mat, alignedImg *Mat)
- func (fr *FaceRecognizerSF) Close()
- func (fr *FaceRecognizerSF) Feature(alignedImg Mat, faceFeature *Mat)
- func (fr *FaceRecognizerSF) Match(faceFeature1 Mat, faceFeature2 Mat) float32
- func (fr *FaceRecognizerSF) MatchWithParams(faceFeature1 Mat, faceFeature2 Mat, disType FaceRecognizerSFDisType) float32
- type FaceRecognizerSFDisType
- type FastFeatureDetector
- type FastFeatureDetectorType
- type Feature2D
- type Feature2DComputer
- type Feature2DDetectComputer
- type Feature2DDetector
- type FileExt
- type FileNode
- func (fn *FileNode) Close()
- func (fn *FileNode) Empty() bool
- func (fn *FileNode) IsInt() bool
- func (fn *FileNode) IsMap() bool
- func (fn *FileNode) IsNamed() bool
- func (fn *FileNode) IsNone() bool
- func (fn *FileNode) IsReal() bool
- func (fn *FileNode) IsSeq() bool
- func (fn *FileNode) IsString() bool
- func (fn *FileNode) Keys() []string
- type FileNodeType
- type FileStorage
- func (fs *FileStorage) Close()
- func (fs *FileStorage) ElName() string
- func (fs *FileStorage) EndWriteStruct()
- func (fs *FileStorage) GetFirstTopLevelNode() *FileNode
- func (fs *FileStorage) GetFormat() FileStorageMode
- func (fs *FileStorage) GetNode(name string) *FileNode
- func (fs *FileStorage) IsOpened() bool
- func (fs *FileStorage) Open(filename string, flags FileStorageMode, encoding string) bool
- func (fs *FileStorage) Release()
- func (fs *FileStorage) ReleaseAndGetString() string
- func (fs *FileStorage) Root(streamIdx int) *FileNode
- func (fs *FileStorage) StartWriteStruct(name string, flags FileNodeType, typeName string)
- func (fs *FileStorage) State() FileStorageState
- func (fs *FileStorage) WriteComment(comment string, append bool)
- func (fs *FileStorage) WriteDouble(name string, val float32)
- func (fs *FileStorage) WriteInt(name string, val int)
- func (fs *FileStorage) WriteMat(name string, mat Mat)
- func (fs *FileStorage) WriteRaw(fmt string, vec []byte)
- func (fs *FileStorage) WriteString(name string, val string)
- func (fs *FileStorage) WriteStringArray(name string, val []string)
- type FileStorageMode
- type FileStorageState
- type FlannBasedMatcher
- type GFTTDetector
- type GrabCutMode
- type HOGDescriptor
- type HersheyFont
- type HistCompMethod
- type HomographyMethod
- type HoughMode
- type IMReadFlag
- type ImageToBlobParams
- type InpaintMethods
- type InterpolationFlags
- type KAZE
- type KMeansFlags
- type KalmanFilter
- func (kf *KalmanFilter) Close()
- func (kf *KalmanFilter) Correct(measurement Mat) Mat
- func (kf *KalmanFilter) GetControlMatrix() Mat
- func (kf *KalmanFilter) GetErrorCovPost() Mat
- func (kf *KalmanFilter) GetErrorCovPre() Mat
- func (kf *KalmanFilter) GetGain() Mat
- func (kf *KalmanFilter) GetMeasurementMatrix() Mat
- func (kf *KalmanFilter) GetMeasurementNoiseCov() Mat
- func (kf *KalmanFilter) GetProcessNoiseCov() Mat
- func (kf *KalmanFilter) GetStatePost() Mat
- func (kf *KalmanFilter) GetStatePre() Mat
- func (kf *KalmanFilter) GetTemp1() Mat
- func (kf *KalmanFilter) GetTemp2() Mat
- func (kf *KalmanFilter) GetTemp3() Mat
- func (kf *KalmanFilter) GetTemp4() Mat
- func (kf *KalmanFilter) GetTemp5() Mat
- func (kf *KalmanFilter) GetTransitionMatrix() Mat
- func (kf *KalmanFilter) Init(dynamParams int, measureParams int)
- func (kf *KalmanFilter) Predict() Mat
- func (kf *KalmanFilter) PredictWithParams(control Mat) Mat
- func (kf *KalmanFilter) SetControlMatrix(controlMatrix Mat)
- func (kf *KalmanFilter) SetErrorCovPost(errorCovPost Mat)
- func (kf *KalmanFilter) SetErrorCovPre(errorCovPre Mat)
- func (kf *KalmanFilter) SetGain(gain Mat)
- func (kf *KalmanFilter) SetMeasurementMatrix(measurementMatrix Mat)
- func (kf *KalmanFilter) SetMeasurementNoiseCov(measurementNoiseCov Mat)
- func (kf *KalmanFilter) SetProcessNoiseCov(processNoiseCov Mat)
- func (kf *KalmanFilter) SetStatePost(statePost Mat)
- func (kf *KalmanFilter) SetStatePre(statePre Mat)
- func (kf *KalmanFilter) SetTransitionMatrix(transitionMatrix Mat)
- type KeyPoint
- type Layer
- type LineType
- type MSER
- type Mat
- func BlobFromImage(img Mat, scaleFactor float64, size image.Point, mean Scalar, swapRB bool, ...) Mat
- func BlobFromImageWithParams(img Mat, params ImageToBlobParams) Mat
- func EstimateAffine2D(from, to Point2fVector) Mat
- func EstimateAffine2DWithParams(from Point2fVector, to Point2fVector, inliers Mat, method int, ...) Mat
- func EstimateAffinePartial2D(from, to Point2fVector) Mat
- func EstimateAffinePartial2DWithParams(from Point2fVector, to Point2fVector, inliers Mat, method int, ...) Mat
- func Eye(rows int, cols int, mt MatType) Mat
- func FindHomography(srcPoints Mat, dstPoints *Mat, method HomographyMethod, ...) Mat
- func GetAffineTransform(src, dst PointVector) Mat
- func GetAffineTransform2f(src, dst Point2fVector) Mat
- func GetBlobChannel(blob Mat, imgidx int, chnidx int) Mat
- func GetGaussianKernel(ksize int, sigma float64) Mat
- func GetGaussianKernelWithParams(ksize int, sigma float64, ktype MatType) Mat
- func GetOptimalNewCameraMatrixWithParams(cameraMatrix Mat, distCoeffs Mat, imageSize image.Point, alpha float64, ...) (Mat, image.Rectangle)
- func GetPerspectiveTransform(src, dst PointVector) Mat
- func GetPerspectiveTransform2f(src, dst Point2fVector) Mat
- func GetRotationMatrix2D(center image.Point, angle, scale float64) Mat
- func GetStructuringElement(shape MorphShape, ksize image.Point) Mat
- func HOGDefaultPeopleDetector() Mat
- func IMDecode(buf []byte, flags IMReadFlag) (Mat, error)
- func IMRead(name string, flags IMReadFlag) Mat
- func IMReadMulti(name string, flags IMReadFlag) []Mat
- func IMReadMulti_WithParams(name string, start int, count int, flags IMReadFlag) []Mat
- func ImageGrayToMatGray(img *image.Gray) (Mat, error)
- func ImageToMatRGB(img image.Image) (Mat, error)
- func ImageToMatRGBA(img image.Image) (Mat, error)
- func NewMat() Mat
- func NewMatFromBytes(rows int, cols int, mt MatType, data []byte) (Mat, error)
- func NewMatFromCMat(c_mat unsafe.Pointer) Mat
- func NewMatFromScalar(s Scalar, mt MatType) Mat
- func NewMatWithSize(rows int, cols int, mt MatType) Mat
- func NewMatWithSizeFromScalar(s Scalar, rows int, cols int, mt MatType) Mat
- func NewMatWithSizes(sizes []int, mt MatType) Mat
- func NewMatWithSizesFromBytes(sizes []int, mt MatType, data []byte) (Mat, error)
- func NewMatWithSizesWithScalar(sizes []int, mt MatType, s Scalar) Mat
- func Ones(rows int, cols int, mt MatType) Mat
- func Split(src Mat) (mv []Mat)
- func Zeros(rows int, cols int, mt MatType) Mat
- func (m *Mat) AddFloat(val float32)
- func (m *Mat) AddUChar(val uint8)
- func (m *Mat) Channels() int
- func (m *Mat) Clone() Mat
- func (m *Mat) Close() error
- func (m *Mat) Closed() bool
- func (m *Mat) Col(col int) Mat
- func (m *Mat) ColRange(start, end int) Mat
- func (m *Mat) Cols() int
- func (m *Mat) ConvertFp16() Mat
- func (m *Mat) ConvertTo(dst *Mat, mt MatType)
- func (m *Mat) ConvertToWithParams(dst *Mat, mt MatType, alpha, beta float32)
- func (m *Mat) CopyTo(dst *Mat)
- func (m *Mat) CopyToWithMask(dst *Mat, mask Mat)
- func (m *Mat) DataPtrFloat32() ([]float32, error)
- func (m *Mat) DataPtrFloat64() ([]float64, error)
- func (m *Mat) DataPtrInt16() ([]int16, error)
- func (m *Mat) DataPtrInt8() ([]int8, error)
- func (m *Mat) DataPtrUint16() ([]uint16, error)
- func (m *Mat) DataPtrUint8() ([]uint8, error)
- func (m *Mat) DivideFloat(val float32)
- func (m *Mat) DivideUChar(val uint8)
- func (m *Mat) ElemSize() int
- func (m *Mat) Empty() bool
- func (m *Mat) FromPtr(rows int, cols int, mt MatType, prow int, pcol int) (Mat, error)
- func (m *Mat) GetDoubleAt(row int, col int) float64
- func (m *Mat) GetDoubleAt3(x, y, z int) float64
- func (m *Mat) GetFloatAt(row int, col int) float32
- func (m *Mat) GetFloatAt3(x, y, z int) float32
- func (m *Mat) GetIntAt(row int, col int) int32
- func (m *Mat) GetIntAt3(x, y, z int) int32
- func (m *Mat) GetSCharAt(row int, col int) int8
- func (m *Mat) GetSCharAt3(x, y, z int) int8
- func (m *Mat) GetShortAt(row int, col int) int16
- func (m *Mat) GetShortAt3(x, y, z int) int16
- func (m *Mat) GetUCharAt(row int, col int) uint8
- func (m *Mat) GetUCharAt3(x, y, z int) uint8
- func (m *Mat) GetVecbAt(row int, col int) Vecb
- func (m *Mat) GetVecdAt(row int, col int) Vecd
- func (m *Mat) GetVecfAt(row int, col int) Vecf
- func (m *Mat) GetVeciAt(row int, col int) Veci
- func (m *Mat) Inv()
- func (m *Mat) IsContinuous() bool
- func (m *Mat) Mean() Scalar
- func (m *Mat) MeanWithMask(mask Mat) Scalar
- func (m *Mat) MultiplyFloat(val float32)
- func (m *Mat) MultiplyMatrix(x Mat) Mat
- func (m *Mat) MultiplyUChar(val uint8)
- func (m *Mat) PatchNaNs()
- func (m *Mat) Ptr() C.Mat
- func (m *Mat) Region(rio image.Rectangle) Mat
- func (m *Mat) Reshape(cn int, rows int) Mat
- func (m *Mat) Row(row int) Mat
- func (m *Mat) RowRange(start, end int) Mat
- func (m *Mat) Rows() int
- func (m *Mat) SetDoubleAt(row int, col int, val float64)
- func (m *Mat) SetDoubleAt3(x, y, z int, val float64)
- func (m *Mat) SetFloatAt(row int, col int, val float32)
- func (m *Mat) SetFloatAt3(x, y, z int, val float32)
- func (m *Mat) SetIntAt(row int, col int, val int32)
- func (m *Mat) SetIntAt3(x, y, z int, val int32)
- func (m *Mat) SetSCharAt(row int, col int, val int8)
- func (m *Mat) SetSCharAt3(x, y, z int, val int8)
- func (m *Mat) SetShortAt(row int, col int, val int16)
- func (m *Mat) SetShortAt3(x, y, z int, val int16)
- func (m *Mat) SetTo(s Scalar)
- func (m *Mat) SetUCharAt(row int, col int, val uint8)
- func (m *Mat) SetUCharAt3(x, y, z int, val uint8)
- func (m *Mat) Size() (dims []int)
- func (m *Mat) Sqrt() Mat
- func (m *Mat) Step() int
- func (m *Mat) SubtractFloat(val float32)
- func (m *Mat) SubtractUChar(val uint8)
- func (m *Mat) Sum() Scalar
- func (m *Mat) T() Mat
- func (m *Mat) ToBytes() []byte
- func (m *Mat) ToImage() (image.Image, error)
- func (m *Mat) ToImageYUV() (*image.YCbCr, error)
- func (m *Mat) ToImageYUVWithParams(ratio image.YCbCrSubsampleRatio) (*image.YCbCr, error)
- func (m *Mat) Total() int
- func (m *Mat) Type() MatType
- type MatType
- type MergeMertens
- type MorphShape
- type MorphType
- type MouseHandlerFunc
- type NativeByteBuffer
- type Net
- func ReadNet(model string, config string) Net
- func ReadNetBytes(framework string, model []byte, config []byte) (Net, error)
- func ReadNetFromCaffe(prototxt string, caffeModel string) Net
- func ReadNetFromCaffeBytes(prototxt []byte, caffeModel []byte) (Net, error)
- func ReadNetFromONNX(model string) Net
- func ReadNetFromONNXBytes(model []byte) (Net, error)
- func ReadNetFromTensorflow(model string) Net
- func ReadNetFromTensorflowBytes(model []byte) (Net, error)
- func ReadNetFromTorch(model string) Net
- func (net *Net) Close() error
- func (net *Net) Empty() bool
- func (net *Net) Forward(outputName string) Mat
- func (net *Net) ForwardLayers(outBlobNames []string) (blobs []Mat)
- func (net *Net) GetLayer(layer int) Layer
- func (net *Net) GetLayerNames() (names []string)
- func (net *Net) GetPerfProfile() float64
- func (net *Net) GetUnconnectedOutLayers() (ids []int)
- func (net *Net) SetInput(blob Mat, name string)
- func (net *Net) SetPreferableBackend(backend NetBackendType) error
- func (net *Net) SetPreferableTarget(target NetTargetType) error
- type NetBackendType
- type NetTargetType
- type NormType
- type ORB
- type ORBScoreType
- type PaddingModeType
- type Point2f
- type Point2fVector
- type Point3f
- type Point3fVector
- type PointVector
- type Points2fVector
- func (pvs Points2fVector) Append(pv Point2fVector)
- func (pvs Points2fVector) At(idx int) Point2fVector
- func (pvs Points2fVector) Close()
- func (pvs Points2fVector) IsNil() bool
- func (pvs Points2fVector) P() C.Points2fVector
- func (pvs Points2fVector) Size() int
- func (pvs Points2fVector) ToPoints() [][]Point2f
- type Points3fVector
- type PointsVector
- func FindContours(src Mat, mode RetrievalMode, method ContourApproximationMode) PointsVector
- func FindContoursWithParams(src Mat, hierarchy *Mat, mode RetrievalMode, method ContourApproximationMode) PointsVector
- func NewPointsVector() PointsVector
- func NewPointsVectorFromPoints(pts [][]image.Point) PointsVector
- type QRCodeDetector
- func (a *QRCodeDetector) Close() error
- func (a *QRCodeDetector) Decode(input Mat, points Mat, straight_qrcode *Mat) string
- func (a *QRCodeDetector) Detect(input Mat, points *Mat) bool
- func (a *QRCodeDetector) DetectAndDecode(input Mat, points *Mat, straight_qrcode *Mat) string
- func (a *QRCodeDetector) DetectAndDecodeMulti(input Mat, decoded []string, points *Mat, qrCodes []Mat) bool
- func (a *QRCodeDetector) DetectMulti(input Mat, points *Mat) bool
- type RNG
- type RNGDistType
- type ReduceTypes
- type RetrievalMode
- type RotateFlag
- type RotatedRect
- type RotatedRect2f
- type SIFT
- type Scalar
- type SeamlessCloneFlags
- type ShapeMatchModes
- type SimpleBlobDetector
- type SimpleBlobDetectorParams
- func (p *SimpleBlobDetectorParams) GetBlobColor() int
- func (p *SimpleBlobDetectorParams) GetFilterByArea() bool
- func (p *SimpleBlobDetectorParams) GetFilterByCircularity() bool
- func (p *SimpleBlobDetectorParams) GetFilterByColor() bool
- func (p *SimpleBlobDetectorParams) GetFilterByConvexity() bool
- func (p *SimpleBlobDetectorParams) GetFilterByInertia() bool
- func (p *SimpleBlobDetectorParams) GetMaxArea() float64
- func (p *SimpleBlobDetectorParams) GetMaxCircularity() float64
- func (p *SimpleBlobDetectorParams) GetMaxConvexity() float64
- func (p *SimpleBlobDetectorParams) GetMaxInertiaRatio() float64
- func (p *SimpleBlobDetectorParams) GetMaxThreshold() float64
- func (p *SimpleBlobDetectorParams) GetMinArea() float64
- func (p *SimpleBlobDetectorParams) GetMinCircularity() float64
- func (p *SimpleBlobDetectorParams) GetMinConvexity() float64
- func (p *SimpleBlobDetectorParams) GetMinDistBetweenBlobs() float64
- func (p *SimpleBlobDetectorParams) GetMinInertiaRatio() float64
- func (p *SimpleBlobDetectorParams) GetMinRepeatability() int
- func (p *SimpleBlobDetectorParams) GetMinThreshold() float64
- func (p *SimpleBlobDetectorParams) GetThresholdStep() float64
- func (p *SimpleBlobDetectorParams) SetBlobColor(blobColor int)
- func (p *SimpleBlobDetectorParams) SetFilterByArea(filterByArea bool)
- func (p *SimpleBlobDetectorParams) SetFilterByCircularity(filterByCircularity bool)
- func (p *SimpleBlobDetectorParams) SetFilterByColor(filterByColor bool)
- func (p *SimpleBlobDetectorParams) SetFilterByConvexity(filterByConvexity bool)
- func (p *SimpleBlobDetectorParams) SetFilterByInertia(filterByInertia bool)
- func (p *SimpleBlobDetectorParams) SetMaxArea(maxArea float64)
- func (p *SimpleBlobDetectorParams) SetMaxCircularity(maxCircularity float64)
- func (p *SimpleBlobDetectorParams) SetMaxConvexity(maxConvexity float64)
- func (p *SimpleBlobDetectorParams) SetMaxInertiaRatio(maxInertiaRatio float64)
- func (p *SimpleBlobDetectorParams) SetMaxThreshold(maxThreshold float64)
- func (p *SimpleBlobDetectorParams) SetMinArea(minArea float64)
- func (p *SimpleBlobDetectorParams) SetMinCircularity(minCircularity float64)
- func (p *SimpleBlobDetectorParams) SetMinConvexity(minConvexity float64)
- func (p *SimpleBlobDetectorParams) SetMinDistBetweenBlobs(minDistBetweenBlobs float64)
- func (p *SimpleBlobDetectorParams) SetMinInertiaRatio(minInertiaRatio float64)
- func (p *SimpleBlobDetectorParams) SetMinRepeatability(minRepeatability int)
- func (p *SimpleBlobDetectorParams) SetMinThreshold(minThreshold float64)
- func (p *SimpleBlobDetectorParams) SetThresholdStep(thresholdStep float64)
- type SolveDecompositionFlags
- type SortFlags
- type TemplateMatchMode
- type TermCriteria
- type TermCriteriaType
- type ThresholdType
- type Trackbar
- type Tracker
- type TrackerGOTURN
- type TrackerMIL
- type Vecb
- type Vecd
- type Vecf
- type Veci
- type VideoCapture
- func OpenVideoCapture(v interface{}) (*VideoCapture, error)
- func OpenVideoCaptureWithAPI(v interface{}, apiPreference VideoCaptureAPI) (*VideoCapture, error)
- func OpenVideoCaptureWithAPIParams(v interface{}, apiPreference VideoCaptureAPI, params []VideoCaptureProperties) (*VideoCapture, error)
- func VideoCaptureDevice(device int) (vc *VideoCapture, err error)
- func VideoCaptureDeviceWithAPI(device int, apiPreference VideoCaptureAPI) (vc *VideoCapture, err error)
- func VideoCaptureDeviceWithAPIParams(device int, apiPreference VideoCaptureAPI, params []VideoCaptureProperties) (vc *VideoCapture, err error)
- func VideoCaptureFile(uri string) (vc *VideoCapture, err error)
- func VideoCaptureFileWithAPI(uri string, apiPreference VideoCaptureAPI) (vc *VideoCapture, err error)
- func VideoCaptureFileWithAPIParams(uri string, apiPreference VideoCaptureAPI, params []VideoCaptureProperties) (vc *VideoCapture, err error)
- func (v *VideoCapture) Close() error
- func (v *VideoCapture) CodecString() string
- func (v VideoCapture) Get(prop VideoCaptureProperties) float64
- func (v *VideoCapture) Grab(skip int)
- func (v *VideoCapture) IsOpened() bool
- func (v *VideoCapture) Read(m *Mat) bool
- func (v *VideoCapture) Retrieve(m *Mat) bool
- func (v *VideoCapture) Set(prop VideoCaptureProperties, param float64)
- func (v *VideoCapture) ToCodec(codec string) float64
- type VideoCaptureAPI
- type VideoCaptureProperties
- type VideoRegistryType
- func (VideoRegistryType) GetBackendName(api VideoCaptureAPI) string
- func (VideoRegistryType) GetBackends() []VideoCaptureAPI
- func (VideoRegistryType) GetCameraBackendPluginVersion(api VideoCaptureAPI) (string, int, int)
- func (VideoRegistryType) GetCameraBackends() []VideoCaptureAPI
- func (VideoRegistryType) GetStreamBackendPluginVersion(api VideoCaptureAPI) (string, int, int)
- func (VideoRegistryType) GetStreamBackends() []VideoCaptureAPI
- func (VideoRegistryType) GetWriterBackendPluginVersion(api VideoCaptureAPI) (string, int, int)
- func (VideoRegistryType) GetWriterBackends() []VideoCaptureAPI
- func (VideoRegistryType) HasBackend(api VideoCaptureAPI) bool
- func (VideoRegistryType) IsBackendBuiltIn(api VideoCaptureAPI) bool
- type VideoWriter
- type Window
- func (w *Window) Close() error
- func (w *Window) CreateTrackbar(name string, max int) *Trackbar
- func (w *Window) CreateTrackbarWithValue(name string, value *int, max int) *Trackbar
- func (w *Window) GetWindowProperty(flag WindowPropertyFlag) float64
- func (w *Window) IMShow(img Mat)
- func (w *Window) IsOpen() bool
- func (w *Window) MoveWindow(x, y int)
- func (w *Window) PollKey() int
- func (w *Window) ResizeWindow(width, height int)
- func (w *Window) SelectROI(img Mat) image.Rectangle
- func (w *Window) SelectROIs(img Mat) []image.Rectangle
- func (w *Window) SetMouseHandler(onMOuse MouseHandlerFunc, userdata interface{})
- func (w *Window) SetWindowProperty(flag WindowPropertyFlag, value WindowFlag)
- func (w *Window) SetWindowTitle(title string)
- func (w *Window) WaitKey(delay int) int
- func (w *Window) WaitKeyEx(delay int) int
- type WindowFlag
- type WindowPropertyFlag
Examples ¶
Constants ¶
const ( // MatChannels1 is a single channel Mat. MatChannels1 = 0 // MatChannels2 is 2 channel Mat. MatChannels2 = 8 // MatChannels3 is 3 channel Mat. MatChannels3 = 16 // MatChannels4 is 4 channel Mat. MatChannels4 = 24 )
const ( // MatTypeCV8U is a Mat of 8-bit unsigned int MatTypeCV8U MatType = 0 // MatTypeCV8S is a Mat of 8-bit signed int MatTypeCV8S MatType = 1 // MatTypeCV16U is a Mat of 16-bit unsigned int MatTypeCV16U MatType = 2 // MatTypeCV16S is a Mat of 16-bit signed int MatTypeCV16S MatType = 3 // MatTypeCV16SC2 is a Mat of 16-bit signed int with 2 channels MatTypeCV16SC2 = MatTypeCV16S + MatChannels2 // MatTypeCV32S is a Mat of 32-bit signed int MatTypeCV32S MatType = 4 // MatTypeCV32F is a Mat of 32-bit float MatTypeCV32F MatType = 5 // MatTypeCV64F is a Mat of 64-bit float MatTypeCV64F MatType = 6 // MatTypeCV16F is a Mat of 16-bit (half) float MatTypeCV16F MatType = 7 // MatTypeCV8UC1 is a Mat of 8-bit unsigned int with a single channel MatTypeCV8UC1 = MatTypeCV8U + MatChannels1 // MatTypeCV8UC2 is a Mat of 8-bit unsigned int with 2 channels MatTypeCV8UC2 = MatTypeCV8U + MatChannels2 // MatTypeCV8UC3 is a Mat of 8-bit unsigned int with 3 channels MatTypeCV8UC3 = MatTypeCV8U + MatChannels3 // MatTypeCV8UC4 is a Mat of 8-bit unsigned int with 4 channels MatTypeCV8UC4 = MatTypeCV8U + MatChannels4 // MatTypeCV8SC1 is a Mat of 8-bit signed int with a single channel MatTypeCV8SC1 = MatTypeCV8S + MatChannels1 // MatTypeCV8SC2 is a Mat of 8-bit signed int with 2 channels MatTypeCV8SC2 = MatTypeCV8S + MatChannels2 // MatTypeCV8SC3 is a Mat of 8-bit signed int with 3 channels MatTypeCV8SC3 = MatTypeCV8S + MatChannels3 // MatTypeCV8SC4 is a Mat of 8-bit signed int with 4 channels MatTypeCV8SC4 = MatTypeCV8S + MatChannels4 // MatTypeCV16UC1 is a Mat of 16-bit unsigned int with a single channel MatTypeCV16UC1 = MatTypeCV16U + MatChannels1 // MatTypeCV16UC2 is a Mat of 16-bit unsigned int with 2 channels MatTypeCV16UC2 = MatTypeCV16U + MatChannels2 // MatTypeCV16UC3 is a Mat of 16-bit unsigned int with 3 channels MatTypeCV16UC3 = MatTypeCV16U + MatChannels3 // MatTypeCV16UC4 is a Mat of 16-bit unsigned int with 4 channels MatTypeCV16UC4 = MatTypeCV16U + MatChannels4 // MatTypeCV16SC1 is a Mat of 16-bit signed int with a single channel MatTypeCV16SC1 = MatTypeCV16S + MatChannels1 // MatTypeCV16SC3 is a Mat of 16-bit signed int with 3 channels MatTypeCV16SC3 = MatTypeCV16S + MatChannels3 // MatTypeCV16SC4 is a Mat of 16-bit signed int with 4 channels MatTypeCV16SC4 = MatTypeCV16S + MatChannels4 // MatTypeCV32SC1 is a Mat of 32-bit signed int with a single channel MatTypeCV32SC1 = MatTypeCV32S + MatChannels1 // MatTypeCV32SC2 is a Mat of 32-bit signed int with 2 channels MatTypeCV32SC2 = MatTypeCV32S + MatChannels2 // MatTypeCV32SC3 is a Mat of 32-bit signed int with 3 channels MatTypeCV32SC3 = MatTypeCV32S + MatChannels3 // MatTypeCV32SC4 is a Mat of 32-bit signed int with 4 channels MatTypeCV32SC4 = MatTypeCV32S + MatChannels4 // MatTypeCV32FC1 is a Mat of 32-bit float int with a single channel MatTypeCV32FC1 = MatTypeCV32F + MatChannels1 // MatTypeCV32FC2 is a Mat of 32-bit float int with 2 channels MatTypeCV32FC2 = MatTypeCV32F + MatChannels2 // MatTypeCV32FC3 is a Mat of 32-bit float int with 3 channels MatTypeCV32FC3 = MatTypeCV32F + MatChannels3 // MatTypeCV32FC4 is a Mat of 32-bit float int with 4 channels MatTypeCV32FC4 = MatTypeCV32F + MatChannels4 // MatTypeCV64FC1 is a Mat of 64-bit float int with a single channel MatTypeCV64FC1 = MatTypeCV64F + MatChannels1 // MatTypeCV64FC2 is a Mat of 64-bit float int with 2 channels MatTypeCV64FC2 = MatTypeCV64F + MatChannels2 // MatTypeCV64FC3 is a Mat of 64-bit float int with 3 channels MatTypeCV64FC3 = MatTypeCV64F + MatChannels3 // MatTypeCV64FC4 is a Mat of 64-bit float int with 4 channels MatTypeCV64FC4 = MatTypeCV64F + MatChannels4 // MatTypeCV16FC1 is a Mat of 16-bit float with a single channel MatTypeCV16FC1 = MatTypeCV16F + MatChannels1 // MatTypeCV16FC2 is a Mat of 16-bit float with 2 channels MatTypeCV16FC2 = MatTypeCV16F + MatChannels2 // MatTypeCV16FC3 is a Mat of 16-bit float with 3 channels MatTypeCV16FC3 = MatTypeCV16F + MatChannels3 // MatTypeCV16FC4 is a Mat of 16-bit float with 4 channels MatTypeCV16FC4 = MatTypeCV16F + MatChannels4 )
const ( //IMWriteJpegQuality is the quality from 0 to 100 for JPEG (the higher is the better). Default value is 95. IMWriteJpegQuality = 1 // IMWriteJpegProgressive enables JPEG progressive feature, 0 or 1, default is False. IMWriteJpegProgressive = 2 // IMWriteJpegOptimize enables JPEG optimization, 0 or 1, default is False. IMWriteJpegOptimize = 3 // IMWriteJpegRstInterval is the JPEG restart interval, 0 - 65535, default is 0 - no restart. IMWriteJpegRstInterval = 4 // IMWriteJpegLumaQuality separates luma quality level, 0 - 100, default is 0 - don't use. IMWriteJpegLumaQuality = 5 // IMWriteJpegChromaQuality separates chroma quality level, 0 - 100, default is 0 - don't use. IMWriteJpegChromaQuality = 6 // IMWritePngCompression is the compression level from 0 to 9 for PNG. A // higher value means a smaller size and longer compression time. // If specified, strategy is changed to IMWRITE_PNG_STRATEGY_DEFAULT (Z_DEFAULT_STRATEGY). // Default value is 1 (best speed setting). IMWritePngCompression = 16 // IMWritePngStrategy is one of cv::IMWritePNGFlags, default is IMWRITE_PNG_STRATEGY_RLE. IMWritePngStrategy = 17 // IMWritePngBilevel is the binary level PNG, 0 or 1, default is 0. IMWritePngBilevel = 18 // IMWritePxmBinary for PPM, PGM, or PBM can be a binary format flag, 0 or 1. Default value is 1. IMWritePxmBinary = 32 // IMWriteWebpQuality is the quality from 1 to 100 for WEBP (the higher is // the better). By default (without any parameter) and for quality above // 100 the lossless compression is used. IMWriteWebpQuality = 64 // IMWritePamTupletype sets the TUPLETYPE field to the corresponding string // value that is defined for the format. IMWritePamTupletype = 128 // IMWritePngStrategyDefault is the value to use for normal data. IMWritePngStrategyDefault = 0 // IMWritePngStrategyFiltered is the value to use for data produced by a // filter (or predictor). Filtered data consists mostly of small values // with a somewhat random distribution. In this case, the compression // algorithm is tuned to compress them better. IMWritePngStrategyFiltered = 1 // IMWritePngStrategyHuffmanOnly forces Huffman encoding only (no string match). IMWritePngStrategyHuffmanOnly = 2 // IMWritePngStrategyRle is the value to use to limit match distances to // one (run-length encoding). IMWritePngStrategyRle = 3 // IMWritePngStrategyFixed is the value to prevent the use of dynamic // Huffman codes, allowing for a simpler decoder for special applications. IMWritePngStrategyFixed = 4 )
const ( OptflowUseInitialFlow = 4 OptflowLkGetMinEigenvals = 8 OptflowFarnebackGaussian = 256 )
*
cv::OPTFLOW_USE_INITIAL_FLOW = 4, cv::OPTFLOW_LK_GET_MIN_EIGENVALS = 8, cv::OPTFLOW_FARNEBACK_GAUSSIAN = 256 For further details, please see: https://docs.opencv.org/master/dc/d6b/group__video__track.html#gga2c6cc144c9eee043575d5b311ac8af08a9d4430ac75199af0cf6fcdefba30eafe
const ( MotionTranslation = 0 MotionEuclidean = 1 MotionAffine = 2 MotionHomography = 3 )
*
cv::MOTION_TRANSLATION = 0, cv::MOTION_EUCLIDEAN = 1, cv::MOTION_AFFINE = 2, cv::MOTION_HOMOGRAPHY = 3 For further details, please see: https://docs.opencv.org/4.x/dc/d6b/group__video__track.html#ggaaedb1f94e6b143cef163622c531afd88a01106d6d20122b782ff25eaeffe9a5be
const GoCVVersion = "0.39.0"
GoCVVersion of this package, for display purposes.
Variables ¶
var ErrEmptyByteSlice = errors.New("empty byte array")
Functions ¶
func AbsDiff ¶ added in v0.3.0
AbsDiff calculates the per-element absolute difference between two arrays or between an array and a scalar.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga6fef31bc8c4071cbc114a758a2b79c14
func Accumulate ¶ added in v0.26.0
func AccumulateProduct ¶ added in v0.26.0
Adds the per-element product of two input images to the accumulator image.
For further details, please see: https://docs.opencv.org/master/d7/df3/group__imgproc__motion.html#ga82518a940ecfda49460f66117ac82520
func AccumulateProductWithMask ¶ added in v0.26.0
Adds the per-element product of two input images to the accumulator image with mask.
For further details, please see: https://docs.opencv.org/master/d7/df3/group__imgproc__motion.html#ga82518a940ecfda49460f66117ac82520
func AccumulateSquare ¶ added in v0.26.0
Adds the square of a source image to the accumulator image.
For further details, please see: https://docs.opencv.org/master/d7/df3/group__imgproc__motion.html#gacb75e7ffb573227088cef9ceaf80be8c
func AccumulateSquareWithMask ¶ added in v0.26.0
Adds the square of a source image to the accumulator image with mask.
For further details, please see: https://docs.opencv.org/master/d7/df3/group__imgproc__motion.html#gacb75e7ffb573227088cef9ceaf80be8c
func AccumulateWithMask ¶ added in v0.26.0
Adds an image to the accumulator image with mask.
For further details, please see: https://docs.opencv.org/master/d7/df3/group__imgproc__motion.html#ga1a567a79901513811ff3b9976923b199
func AccumulatedWeighted ¶ added in v0.26.0
Updates a running average.
For further details, please see: https://docs.opencv.org/master/d7/df3/group__imgproc__motion.html#ga4f9552b541187f61f6818e8d2d826bc7
func AccumulatedWeightedWithMask ¶ added in v0.26.0
Updates a running average with mask.
For further details, please see: https://docs.opencv.org/master/d7/df3/group__imgproc__motion.html#ga4f9552b541187f61f6818e8d2d826bc7
func AdaptiveThreshold ¶ added in v0.16.0
func AdaptiveThreshold(src Mat, dst *Mat, maxValue float32, adaptiveTyp AdaptiveThresholdType, typ ThresholdType, blockSize int, c float32)
AdaptiveThreshold applies a fixed-level threshold to each array element.
For further details, please see: https://docs.opencv.org/master/d7/d1b/group__imgproc__misc.html#ga72b913f352e4a1b1b397736707afcde3
func Add ¶ added in v0.3.0
Add calculates the per-element sum of two arrays or an array and a scalar.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga10ac1bfb180e2cfda1701d06c24fdbd6
func AddWeighted ¶ added in v0.3.0
AddWeighted calculates the weighted sum of two arrays.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gafafb2513349db3bcff51f54ee5592a19
func ApplyColorMap ¶ added in v0.8.0
func ApplyColorMap(src Mat, dst *Mat, colormapType ColormapTypes)
ApplyColorMap applies a GNU Octave/MATLAB equivalent colormap on a given image.
For further details, please see: https://docs.opencv.org/master/d3/d50/group__imgproc__colormap.html#gadf478a5e5ff49d8aa24e726ea6f65d15
func ApplyCustomColorMap ¶ added in v0.8.0
ApplyCustomColorMap applies a custom defined colormap on a given image.
For further details, please see: https://docs.opencv.org/master/d3/d50/group__imgproc__colormap.html#gacb22288ddccc55f9bd9e6d492b409cae
func ArcLength ¶ added in v0.9.0
func ArcLength(curve PointVector, isClosed bool) float64
ArcLength calculates a contour perimeter or a curve length.
For further details, please see:
https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#ga8d26483c636be6b35c3ec6335798a47c
func ArrowedLine ¶ added in v0.3.0
ArrowedLine draws a arrow segment pointing from the first point to the second one.
For further details, please see: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga0a165a3ca093fd488ac709fdf10c05b2
func ArucoDrawDetectedMarkers ¶ added in v0.32.1
func ArucoGenerateImageMarker ¶ added in v0.32.1
func ArucoGenerateImageMarker(dictionaryId ArucoDictionaryCode, id int, sidePixels int, img Mat, borderBits int)
func BatchDistance ¶ added in v0.16.0
func BatchDistance(src1 Mat, src2 Mat, dist Mat, dtype MatType, nidx Mat, normType NormType, K int, mask Mat, update int, crosscheck bool)
BatchDistance is a naive nearest neighbor finder.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga4ba778a1c57f83233b1d851c83f5a622
func BilateralFilter ¶ added in v0.3.0
BilateralFilter applies a bilateral filter to an image.
Bilateral filtering is described here: 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.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga9d7064d478c95d60003cf839430737ed
func BitwiseAnd ¶ added in v0.3.0
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.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga60b4d04b251ba5eb1392c34425497e14
func BitwiseAndWithMask ¶ added in v0.19.0
BitwiseAndWithMask 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. It has an additional parameter for a mask.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga60b4d04b251ba5eb1392c34425497e14
func BitwiseNot ¶ added in v0.3.0
BitwiseNot inverts every bit of an array.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga0002cf8b418479f4cb49a75442baee2f
func BitwiseNotWithMask ¶ added in v0.19.0
BitwiseNotWithMask inverts every bit of an array. It has an additional parameter for a mask.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga0002cf8b418479f4cb49a75442baee2f
func BitwiseOr ¶ added in v0.3.0
BitwiseOr calculates the per-element bit-wise disjunction of two arrays or an array and a scalar.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gab85523db362a4e26ff0c703793a719b4
func BitwiseOrWithMask ¶ added in v0.19.0
BitwiseOrWithMask calculates the per-element bit-wise disjunction of two arrays or an array and a scalar. It has an additional parameter for a mask.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gab85523db362a4e26ff0c703793a719b4
func BitwiseXor ¶ added in v0.3.0
BitwiseXor calculates the per-element bit-wise "exclusive or" operation on two arrays or an array and a scalar.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga84b2d8188ce506593dcc3f8cd00e8e2c
func BitwiseXorWithMask ¶ added in v0.19.0
BitwiseXorWithMask calculates the per-element bit-wise "exclusive or" operation on two arrays or an array and a scalar. It has an additional parameter for a mask.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga84b2d8188ce506593dcc3f8cd00e8e2c
func BlobFromImages ¶ added in v0.21.0
func BlobFromImages(imgs []Mat, blob *Mat, scaleFactor float64, size image.Point, mean Scalar, swapRB bool, crop bool, ddepth MatType)
BlobFromImages 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.
For further details, please see: https://docs.opencv.org/master/d6/d0f/group__dnn.html#ga2b89ed84432e4395f5a1412c2926293c
func BlobFromImagesWithParams ¶ added in v0.38.0
func BlobFromImagesWithParams(imgs []Mat, blob *Mat, params ImageToBlobParams)
BlobFromImagesWithParams 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.
For further details, please see: https://docs.opencv.org/master/d6/d0f/group__dnn.html#ga2b89ed84432e4395f5a1412c2926293c
func Blur ¶
Blur blurs an image Mat using a normalized box filter.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga8c45db9afe636703801b0b2e440fce37
func BorderInterpolate ¶ added in v0.16.0
func BorderInterpolate(p int, len int, borderType CovarFlags) int
BorderInterpolate computes the source location of an extrapolated pixel.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga247f571aa6244827d3d798f13892da58
func BoundingRect ¶ added in v0.4.1
func BoundingRect(contour PointVector) image.Rectangle
BoundingRect calculates the up-right bounding rectangle of a point set.
For further details, please see: https://docs.opencv.org/3.3.0/d3/dc0/group__imgproc__shape.html#gacb413ddce8e48ff3ca61ed7cf626a366
func BoxFilter ¶ added in v0.16.0
BoxFilter blurs an image using the box filter.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gad533230ebf2d42509547d514f7d3fbc3
func BoxPoints ¶ added in v0.19.0
func BoxPoints(rect RotatedRect, pts *Mat)
BoxPoints finds the four vertices of a rotated rect. Useful to draw the rotated rectangle.
For further Details, please see: https://docs.opencv.org/3.3.0/d3/dc0/group__imgproc__shape.html#gaf78d467e024b4d7936cf9397185d2f5c
func BoxPoints2f ¶ added in v0.36.0
func BoxPoints2f(rect RotatedRect2f, pts *Mat)
BoxPoints finds the four vertices of a rotated rect. Useful to draw the rotated rectangle.
For further Details, please see: https://docs.opencv.org/3.3.0/d3/dc0/group__imgproc__shape.html#gaf78d467e024b4d7936cf9397185d2f5c
func CalcBackProject ¶ added in v0.21.0
func CalcBackProject(src []Mat, channels []int, hist Mat, backProject *Mat, ranges []float64, uniform bool)
CalcBackProject calculates the back projection of a histogram.
For futher details, please see: https://docs.opencv.org/3.4/d6/dc7/group__imgproc__hist.html#ga3a0af640716b456c3d14af8aee12e3ca
func CalcCovarMatrix ¶ added in v0.16.0
func CalcCovarMatrix(samples Mat, covar *Mat, mean *Mat, flags CovarFlags, ctype MatType)
CalcCovarMatrix calculates the covariance matrix of a set of vectors.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga017122d912af19d7d0d2cccc2d63819f
func CalcHist ¶ added in v0.16.0
func CalcHist(src []Mat, channels []int, mask Mat, hist *Mat, size []int, ranges []float64, acc bool)
CalcHist Calculates a histogram of a set of images
For futher details, please see: https://docs.opencv.org/master/d6/dc7/group__imgproc__hist.html#ga6ca1876785483836f72a77ced8ea759a
func CalcOpticalFlowFarneback ¶ added in v0.5.0
func CalcOpticalFlowFarneback(prevImg Mat, nextImg Mat, flow *Mat, pyrScale float64, levels int, winsize int, iterations int, polyN int, polySigma float64, flags int)
CalcOpticalFlowFarneback computes a dense optical flow using Gunnar Farneback's algorithm.
For further details, please see: https://docs.opencv.org/master/dc/d6b/group__video__track.html#ga5d10ebbd59fe09c5f650289ec0ece5af
func CalcOpticalFlowPyrLK ¶ added in v0.5.0
func CalcOpticalFlowPyrLK(prevImg Mat, nextImg Mat, prevPts Mat, nextPts Mat, status *Mat, err *Mat)
CalcOpticalFlowPyrLK calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with pyramids.
For further details, please see: https://docs.opencv.org/master/dc/d6b/group__video__track.html#ga473e4b886d0bcc6b65831eb88ed93323
func CalcOpticalFlowPyrLKWithParams ¶ added in v0.20.0
func CalcOpticalFlowPyrLKWithParams(prevImg Mat, nextImg Mat, prevPts Mat, nextPts Mat, status *Mat, err *Mat, winSize image.Point, maxLevel int, criteria TermCriteria, flags int, minEigThreshold float64)
CalcOpticalFlowPyrLKWithParams calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with pyramids.
For further details, please see: https://docs.opencv.org/master/dc/d6b/group__video__track.html#ga473e4b886d0bcc6b65831eb88ed93323
func CalibrateCamera ¶ added in v0.29.0
func CalibrateCamera(objectPoints Points3fVector, imagePoints Points2fVector, imageSize image.Point, cameraMatrix *Mat, distCoeffs *Mat, rvecs *Mat, tvecs *Mat, calibFlag CalibFlag) float64
CalibrateCamera finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
For further details, please see: https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga3207604e4b1a1758aa66acb6ed5aa65d
func Canny ¶
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
For further details, please see: http://docs.opencv.org/master/dd/d1a/group__imgproc__feature.html#ga04723e007ed888ddf11d9ba04e2232de
func CartToPolar ¶ added in v0.16.0
CartToPolar calculates the magnitude and angle of 2D vectors.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gac5f92f48ec32cacf5275969c33ee837d
func CheckChessboard ¶ added in v0.36.0
CheckChessboard renders the detected chessboard corners.
For further details, please see: https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga6a10b0bb120c4907e5eabbcd22319022
func CheckRange ¶ added in v0.16.0
CheckRange checks every element of an input array for invalid values.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga2bd19d89cae59361416736f87e3c7a64
func Circle ¶ added in v0.3.0
Circle draws a circle.
For further details, please see: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#gaf10604b069374903dbd0f0488cb43670
func CircleWithParams ¶ added in v0.28.0
func CircleWithParams(img *Mat, center image.Point, radius int, c color.RGBA, thickness int, lineType LineType, shift int)
CircleWithParams draws a circle.
For further details, please see: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#gaf10604b069374903dbd0f0488cb43670
func ClipLine ¶ added in v0.22.0
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
func ColorChange ¶ added in v0.26.0
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
func Compare ¶ added in v0.16.0
func Compare(src1 Mat, src2 Mat, dst *Mat, ct CompareType)
Compare performs the per-element comparison of two arrays or an array and scalar value.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga303cfb72acf8cbb36d884650c09a3a97
func CompareHist ¶ added in v0.21.0
func CompareHist(hist1 Mat, hist2 Mat, method HistCompMethod) float32
CompareHist Compares two histograms.
For further details, please see: https://docs.opencv.org/master/d6/dc7/group__imgproc__hist.html#gaf4190090efa5c47cb367cf97a9a519bd
func CompleteSymm ¶ added in v0.16.0
CompleteSymm copies the lower or the upper half of a square matrix to its another half.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaa9d88dcd0e54b6d1af38d41f2a3e3d25
func ConnectedComponents ¶ added in v0.19.0
ConnectedComponents computes the connected components labeled image of boolean image.
For further details, please see: https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#gaedef8c7340499ca391d459122e51bef5
func ConnectedComponentsWithParams ¶ added in v0.19.0
func ConnectedComponentsWithParams(src Mat, labels *Mat, conn int, ltype MatType, ccltype ConnectedComponentsAlgorithmType) int
ConnectedComponents computes the connected components labeled image of boolean image.
For further details, please see: https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#gaedef8c7340499ca391d459122e51bef5
func ConnectedComponentsWithStats ¶ added in v0.19.0
ConnectedComponentsWithStats computes the connected components labeled image of boolean image and also produces a statistics output for each label.
For further details, please see: https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#ga107a78bf7cd25dec05fb4dfc5c9e765f
func ConnectedComponentsWithStatsWithParams ¶ added in v0.19.0
func ConnectedComponentsWithStatsWithParams(src Mat, labels *Mat, stats *Mat, centroids *Mat, conn int, ltype MatType, ccltype ConnectedComponentsAlgorithmType) int
ConnectedComponentsWithStats computes the connected components labeled image of boolean image and also produces a statistics output for each label.
For further details, please see: https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#ga107a78bf7cd25dec05fb4dfc5c9e765f
func ContourArea ¶ added in v0.4.1
func ContourArea(contour PointVector) float64
ContourArea calculates a contour area.
For further details, please see: https://docs.opencv.org/3.3.0/d3/dc0/group__imgproc__shape.html#ga2c759ed9f497d4a618048a2f56dc97f1
func ConvertPointsFromHomogeneous ¶ added in v0.36.0
ConvertPointsFromHomogeneous converts points from homogeneous to Euclidean space.
For further details, please see: https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#gac42edda3a3a0f717979589fcd6ac0035
func ConvertScaleAbs ¶ added in v0.16.0
ConvertScaleAbs scales, calculates absolute values, and converts the result to 8-bit.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga3460e9c9f37b563ab9dd550c4d8c4e7d
func ConvexHull ¶ added in v0.16.0
func ConvexHull(points PointVector, hull *Mat, clockwise bool, returnPoints bool)
ConvexHull finds the convex hull of a point set.
For further details, please see: https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#ga014b28e56cb8854c0de4a211cb2be656
func ConvexityDefects ¶ added in v0.16.0
func ConvexityDefects(contour PointVector, hull Mat, result *Mat)
ConvexityDefects finds the convexity defects of a contour.
For further details, please see: https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#gada4437098113fd8683c932e0567f47ba
func CopyMakeBorder ¶ added in v0.16.0
func CopyMakeBorder(src Mat, dst *Mat, top int, bottom int, left int, right int, bt BorderType, value color.RGBA)
CopyMakeBorder forms a border around an image (applies padding).
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga2ac1049c2c3dd25c2b41bffe17658a36
func CornerSubPix ¶ added in v0.5.0
func CornerSubPix(img Mat, corners *Mat, winSize image.Point, zeroZone image.Point, criteria TermCriteria)
CornerSubPix Refines the corner locations. The function iterates to find the sub-pixel accurate location of corners or radial saddle points.
For further details, please see: https://docs.opencv.org/master/dd/d1a/group__imgproc__feature.html#ga354e0d7c86d0d9da75de9b9701a9a87e
func CountNonZero ¶ added in v0.16.0
CountNonZero counts non-zero array elements.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaa4b89393263bb4d604e0fe5986723914
func CreateHanningWindow ¶ added in v0.36.0
CreateHanningWindow computes a Hanning window coefficients in two dimensions.
For further details, please see: https://docs.opencv.org/4.x/d7/df3/group__imgproc__motion.html#ga80e5c3de52f6bab3a7c1e60e89308e1b
func CvtColor ¶
func CvtColor(src Mat, dst *Mat, code ColorConversionCode)
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.
For further details, please see: http://docs.opencv.org/master/d7/d1b/group__imgproc__misc.html#ga4e0972be5de079fed4e3a10e24ef5ef0
func DCT ¶ added in v0.16.0
DCT performs a forward or inverse discrete Cosine transform of 1D or 2D array.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga85aad4d668c01fbd64825f589e3696d4
func DFT ¶ added in v0.3.0
DFT performs a forward or inverse Discrete Fourier Transform (DFT) of a 1D or 2D floating-point array.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gadd6cf9baf2b8b704a11b5f04aaf4f39d
func Demosaicing ¶ added in v0.38.0
func Demosaicing(src Mat, dst *Mat, code ColorConversionCode)
Demosaicing converts an image from Bayer pattern to RGB or grayscale. It converts the src Mat image to the dst Mat using the code param containing the desired ColorConversionCode color space.
For further details, please see: https://docs.opencv.org/master/d7/d1b/group__imgproc__color__conversions.html#ga57261f12fccf872a2b2d66daf29d5bd0
func DetailEnhance ¶ added in v0.30.0
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#gae5930dd822c713b36f8529b21ddebd0c
func Determinant ¶ added in v0.16.0
Determinant returns the determinant of a square floating-point matrix.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaf802bd9ca3e07b8b6170645ef0611d0c
func Dilate ¶ added in v0.3.0
Dilate dilates an image by using a specific structuring element.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga4ff0f3318642c4f469d0e11f242f3b6c
func DilateWithParams ¶ added in v0.28.0
func DilateWithParams(src Mat, dst *Mat, kernel Mat, anchor image.Point, iterations, borderType BorderType, borderValue color.RGBA)
DilateWithParams dilates an image by using a specific structuring element.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga4ff0f3318642c4f469d0e11f242f3b6c
func DistanceTransform ¶ added in v0.21.0
func DistanceTransform(src Mat, dst *Mat, labels *Mat, distType DistanceTypes, maskSize DistanceTransformMasks, labelType DistanceTransformLabelTypes)
DistanceTransform Calculates the distance to the closest zero pixel for each pixel of the source image.
For further details, please see: https://docs.opencv.org/master/d7/d1b/group__imgproc__misc.html#ga8a0b7fdfcb7a13dde018988ba3a43042
func Divide ¶ added in v0.16.0
Divide performs the per-element division on two arrays or an array and a scalar.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga6db555d30115642fedae0cda05604874
func DrawChessboardCorners ¶ added in v0.23.0
DrawChessboardCorners renders the detected chessboard corners.
For further details, please see: https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga6a10b0bb120c4907e5eabbcd22319022
func DrawContours ¶ added in v0.16.0
DrawContours draws contours outlines or filled contours.
For further details, please see: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga746c0625f1781f1ffc9056259103edbc
func DrawContoursWithParams ¶ added in v0.30.0
func DrawContoursWithParams(img *Mat, contours PointsVector, contourIdx int, c color.RGBA, thickness int, lineType LineType, hierarchy Mat, maxLevel int, offset image.Point)
DrawContoursWithParams draws contours outlines or filled contours.
For further details, please see: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga746c0625f1781f1ffc9056259103edbc
func DrawKeyPoints ¶ added in v0.16.0
DrawKeyPoints draws keypoints
For further details please see: https://docs.opencv.org/master/d4/d5d/group__features2d__draw.html#gab958f8900dd10f14316521c149a60433
func DrawMatches ¶ added in v0.25.0
func DrawMatches(img1 Mat, kp1 []KeyPoint, img2 Mat, kp2 []KeyPoint, matches1to2 []DMatch, outImg *Mat, matchColor color.RGBA, singlePointColor color.RGBA, matchesMask []byte, flags DrawMatchesFlag)
DrawMatches draws matches on combined train and querry images.
For further details, please see: https://docs.opencv.org/master/d4/d5d/group__features2d__draw.html#gad8f463ccaf0dc6f61083abd8717c261a
func EMD ¶ added in v0.36.0
func EMD(signature1, signature2 Mat, typ DistanceTypes) float32
EMD Computes the "minimal work" distance between two weighted point configurations.
For further details, please see: https://docs.opencv.org/4.x/d6/dc7/group__imgproc__hist.html#ga902b8e60cc7075c8947345489221e0e0
func EdgePreservingFilter ¶ added in v0.30.0
func EdgePreservingFilter(src Mat, dst *Mat, filter EdgeFilter, sigma_s, sigma_r float32)
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
func Eigen ¶ added in v0.16.0
Eigen calculates eigenvalues and eigenvectors of a symmetric matrix.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga9fa0d58657f60eaa6c71f6fbb40456e3
func EigenNonSymmetric ¶ added in v0.16.0
EigenNonSymmetric calculates eigenvalues and eigenvectors of a non-symmetric matrix (real eigenvalues only).
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaf51987e03cac8d171fbd2b327cf966f6
func Ellipse ¶ added in v0.16.0
func Ellipse(img *Mat, center, axes image.Point, angle, startAngle, endAngle float64, c color.RGBA, thickness int)
Ellipse draws a simple or thick elliptic arc or fills an ellipse sector.
For further details, please see: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga28b2267d35786f5f890ca167236cbc69
func EllipseWithParams ¶ added in v0.28.0
func EllipseWithParams(img *Mat, center, axes image.Point, angle, startAngle, endAngle float64, c color.RGBA, thickness int, lineType LineType, shift int)
Ellipse draws a simple or thick elliptic arc or fills an ellipse sector.
For further details, please see: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga28b2267d35786f5f890ca167236cbc69
func EqualizeHist ¶ added in v0.16.0
EqualizeHist normalizes the brightness and increases the contrast of the image.
For further details, please see: https://docs.opencv.org/master/d6/dc7/group__imgproc__hist.html#ga7e54091f0c937d49bf84152a16f76d6e
func Erode ¶ added in v0.3.0
Erode erodes an image by using a specific structuring element.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gaeb1e0c1033e3f6b891a25d0511362aeb
func ErodeWithParams ¶ added in v0.23.0
ErodeWithParams erodes an image by using a specific structuring element.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gaeb1e0c1033e3f6b891a25d0511362aeb
func ErodeWithParamsAndBorderValue ¶ added in v0.36.0
func ErodeWithParamsAndBorderValue(src Mat, dst *Mat, kernel Mat, anchor image.Point, iterations, borderType int, borderValue Scalar)
ErodeWithParamsAndBorderValue erodes an image by using a specific structuring element. Same as ErodeWithParams but requires an additional borderValue parameter.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gaeb1e0c1033e3f6b891a25d0511362aeb
func EstimateNewCameraMatrixForUndistortRectify ¶ added in v0.24.0
func EstimateNewCameraMatrixForUndistortRectify(k, d Mat, imgSize image.Point, r Mat, p *Mat, balance float64, newSize image.Point, fovScale float64)
EstimateNewCameraMatrixForUndistortRectify estimates new camera matrix for undistortion or rectification.
For further details, please see: https://docs.opencv.org/master/db/d58/group__calib3d__fisheye.html#ga384940fdf04c03e362e94b6eb9b673c9
func Exp ¶ added in v0.16.0
Exp calculates the exponent of every array element.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga3e10108e2162c338f1b848af619f39e5
func ExtractChannel ¶ added in v0.16.0
ExtractChannel extracts a single channel from src (coi is 0-based index).
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gacc6158574aa1f0281878c955bcf35642
func FP16BlobFromImage ¶ added in v0.16.0
func FP16BlobFromImage(img Mat, scaleFactor float32, size image.Point, mean float32, swapRB bool, crop bool) []byte
FP16BlobFromImage is an extended helper function to convert an Image to a half-float blob, as used by the Movidius Neural Compute Stick.
func FastNlMeansDenoising ¶ added in v0.30.0
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
func FastNlMeansDenoisingColored ¶ added in v0.30.0
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
func FastNlMeansDenoisingColoredMulti ¶ added in v0.28.0
func FastNlMeansDenoisingColoredMulti(src []Mat, dst *Mat, imgToDenoiseIndex int, temporalWindowSize int)
FastNlMeansDenoisingColoredMulti denoises the selected images.
For further details, please see: https://docs.opencv.org/master/d1/d79/group__photo__denoise.html#gaa501e71f52fb2dc17ff8ca5e7d2d3619
func FastNlMeansDenoisingColoredMultiWithParams ¶ added in v0.28.0
func FastNlMeansDenoisingColoredMultiWithParams(src []Mat, dst *Mat, imgToDenoiseIndex int, temporalWindowSize int, h float32, hColor float32, templateWindowSize int, searchWindowSize int)
FastNlMeansDenoisingColoredMulti denoises the selected images.
For further details, please see: https://docs.opencv.org/master/d1/d79/group__photo__denoise.html#gaa501e71f52fb2dc17ff8ca5e7d2d3619
func FastNlMeansDenoisingColoredWithParams ¶ added in v0.30.0
func FastNlMeansDenoisingColoredWithParams(src Mat, dst *Mat, h float32, hColor float32, templateWindowSize int, searchWindowSize int)
FastNlMeansDenoisingColoredWithParams 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
func FastNlMeansDenoisingWithParams ¶ added in v0.30.0
func FastNlMeansDenoisingWithParams(src Mat, dst *Mat, h float32, templateWindowSize int, searchWindowSize int)
FastNlMeansDenoisingWithParams 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
func FillPoly ¶ added in v0.16.0
func FillPoly(img *Mat, pts PointsVector, c color.RGBA)
FillPoly fills the area bounded by one or more polygons.
For more information, see: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#gaf30888828337aa4c6b56782b5dfbd4b7
func FillPolyWithParams ¶ added in v0.28.0
func FillPolyWithParams(img *Mat, pts PointsVector, c color.RGBA, lineType LineType, shift int, offset image.Point)
FillPolyWithParams fills the area bounded by one or more polygons.
For more information, see: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#gaf30888828337aa4c6b56782b5dfbd4b7
func Filter2D ¶ added in v0.17.0
func Filter2D(src Mat, dst *Mat, ddepth MatType, kernel Mat, anchor image.Point, delta float64, borderType BorderType)
Filter2D applies an arbitrary linear filter to an image.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga27c049795ce870216ddfb366086b5a04
func FindChessboardCorners ¶ added in v0.23.0
func FindChessboardCorners(image Mat, patternSize image.Point, corners *Mat, flags CalibCBFlag) bool
FindChessboardCorners finds the positions of internal corners of the chessboard.
For further details, please see: https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga93efa9b0aa890de240ca32b11253dd4a
func FindChessboardCornersSB ¶ added in v0.29.0
func FindChessboardCornersSB(image Mat, patternSize image.Point, corners *Mat, flags CalibCBFlag) bool
FindChessboardCorners finds the positions of internal corners of the chessboard using a sector based approach.
For further details, please see: https://docs.opencv.org/master/d9/d0c/group__calib3d.html#gadc5bcb05cb21cf1e50963df26986d7c9
func FindChessboardCornersSBWithMeta ¶ added in v0.29.0
func FindChessboardCornersSBWithMeta(image Mat, patternSize image.Point, corners *Mat, flags CalibCBFlag, meta *Mat) bool
FindChessboardCornersSBWithMeta finds the positions of internal corners of the chessboard using a sector based approach.
For further details, please see: https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga93efa9b0aa890de240ca32b11253dd4a
func FindNonZero ¶ added in v0.16.0
FindNonZero returns the list of locations of non-zero pixels.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaed7df59a3539b4cc0fe5c9c8d7586190
func FindTransformECC ¶ added in v0.31.0
func FindTransformECC(templateImage Mat, inputImage Mat, warpMatrix *Mat, motionType int, criteria TermCriteria, inputMask Mat, gaussFiltSize int) float64
FindTransformECC finds the geometric transform (warp) between two images in terms of the ECC criterion.
For futther details, please see: https://docs.opencv.org/4.x/dc/d6b/group__video__track.html#ga1aa357007eaec11e9ed03500ecbcbe47
func FisheyeCalibrate ¶ added in v0.36.0
func FisheyeCalibrate(objectPoints Points3fVector, imagePoints Points2fVector, size image.Point, k, d, rvecs, tvecs *Mat, flags CalibFlag) float64
FisheyeCalibrate performs camera calibration.
For further details, please see: https://docs.opencv.org/4.x/db/d58/group__calib3d__fisheye.html#gad626a78de2b1dae7489e152a5a5a89e1
func FisheyeDistortPoints ¶ added in v0.36.0
FisheyeDistortPoints distorts 2D points using fisheye model.
For further details, please see: https://docs.opencv.org/master/db/d58/group__calib3d__fisheye.html#gab738cdf90ceee97b2b52b0d0e7511541
func FisheyeUndistortImage ¶ added in v0.16.0
FisheyeUndistortImage transforms an image to compensate for fisheye lens distortion
func FisheyeUndistortImageWithParams ¶ added in v0.16.0
func FisheyeUndistortImageWithParams(distorted Mat, undistorted *Mat, k, d, knew Mat, size image.Point)
FisheyeUndistortImageWithParams transforms an image to compensate for fisheye lens distortion with Knew matrix
func FisheyeUndistortPoints ¶ added in v0.24.0
FisheyeUndistortPoints transforms points to compensate for fisheye lens distortion
For further details, please see: https://docs.opencv.org/master/db/d58/group__calib3d__fisheye.html#gab738cdf90ceee97b2b52b0d0e7511541
func FitLine ¶ added in v0.17.0
func FitLine(pts PointVector, line *Mat, distType DistanceTypes, param, reps, aeps float64)
FitLine fits a line to a 2D or 3D point set.
For further details, please see: https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#gaf849da1fdafa67ee84b1e9a23b93f91f
func Flip ¶ added in v0.16.0
Flip flips a 2D array around horizontal(0), vertical(1), or both axes(-1).
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaca7be533e3dac7feb70fc60635adf441
func GaussianBlur ¶
func GaussianBlur(src Mat, dst *Mat, ksize image.Point, sigmaX float64, sigmaY float64, borderType BorderType)
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.
For further details, please see: http://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gaabe8c836e97159a9193fb0b11ac52cf1
func Gemm ¶ added in v0.16.0
Gemm performs generalized matrix multiplication.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gacb6e64071dffe36434e1e7ee79e7cb35
func GetNumThreads ¶ added in v0.32.1
func GetNumThreads() int
Get the number of threads for OpenCV.
func GetOptimalDFTSize ¶ added in v0.3.0
GetOptimalDFTSize returns the optimal Discrete Fourier Transform (DFT) size for a given vector size.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga6577a2e59968936ae02eb2edde5de299
func GetRectSubPix ¶ added in v0.22.0
GetRectSubPix retrieves a pixel rectangle from an image with sub-pixel accuracy.
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#ga77576d06075c1a4b6ba1a608850cd614
func GetTextSize ¶
GetTextSize calculates the width and height of a text string. It returns an image.Point with the size required to draw text using a specific font face, scale, and thickness.
For further details, please see: http://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga3d2abfcb995fd2db908c8288199dba82
func GetTextSizeWithBaseline ¶ added in v0.25.0
func GetTextSizeWithBaseline(text string, fontFace HersheyFont, fontScale float64, thickness int) (image.Point, 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.
For further details, please see: http://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga3d2abfcb995fd2db908c8288199dba82
func GetTickCount ¶ added in v0.16.0
func GetTickCount() float64
GetTickCount returns the number of ticks.
For further details, please see: https://docs.opencv.org/master/db/de0/group__core__utils.html#gae73f58000611a1af25dd36d496bf4487
func GetTickFrequency ¶ added in v0.16.0
func GetTickFrequency() float64
GetTickFrequency returns the number of ticks per second.
For further details, please see: https://docs.opencv.org/master/db/de0/group__core__utils.html#ga705441a9ef01f47acdc55d87fbe5090c
func GoodFeaturesToTrack ¶ added in v0.5.0
GoodFeaturesToTrack determines strong corners on an image. The function finds the most prominent corners in the image or in the specified image region.
For further details, please see: https://docs.opencv.org/master/dd/d1a/group__imgproc__feature.html#ga1d6bb77486c8f92d79c8793ad995d541
func GrabCut ¶ added in v0.21.0
func GrabCut(img Mat, mask *Mat, r image.Rectangle, bgdModel *Mat, fgdModel *Mat, iterCount int, mode GrabCutMode)
Grabcut runs the GrabCut algorithm. The function implements the GrabCut image segmentation algorithm. For further details, please see: https://docs.opencv.org/master/d7/d1b/group__imgproc__misc.html#ga909c1dda50efcbeaa3ce126be862b37f
func GroupRectangles ¶ added in v0.7.0
GroupRectangles groups the object candidate rectangles.
For further details, please see: https://docs.opencv.org/master/d5/d54/group__objdetect.html#ga3dba897ade8aa8227edda66508e16ab9
func Hconcat ¶ added in v0.16.0
Hconcat applies horizontal concatenation to given matrices.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaab5ceee39e0580f879df645a872c6bf7
func HoughCircles ¶ added in v0.3.0
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`.
For further details, please see: https://docs.opencv.org/master/dd/d1a/group__imgproc__feature.html#ga47849c3be0d0406ad3ca45db65a25d2d
func HoughCirclesWithParams ¶ added in v0.16.0
func HoughCirclesWithParams(src Mat, circles *Mat, method HoughMode, dp, minDist, param1, param2 float64, minRadius, maxRadius int)
HoughCirclesWithParams finds circles in a grayscale image using the Hough transform. The only "method" currently supported is HoughGradient.
For further details, please see: https://docs.opencv.org/master/dd/d1a/group__imgproc__feature.html#ga47849c3be0d0406ad3ca45db65a25d2d
func HoughLines ¶
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
For further details, please see: http://docs.opencv.org/master/dd/d1a/group__imgproc__feature.html#ga46b4e588934f6c8dfd509cc6e0e4545a
func HoughLinesP ¶
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
For further details, please see: http://docs.opencv.org/master/dd/d1a/group__imgproc__feature.html#ga8618180a5948286384e3b7ca02f6feeb
func HoughLinesPWithParams ¶ added in v0.16.0
func HoughLinesPointSet ¶ added in v0.19.0
func HoughLinesPointSet(points Mat, lines *Mat, linesMax int, threshold int, minRho float32, maxRho float32, rhoStep float32, minTheta float32, maxTheta float32, thetaStep float32)
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
For further details, please see: https://docs.opencv.org/master/dd/d1a/group__imgproc__feature.html#ga2858ef61b4e47d1919facac2152a160e
func IDCT ¶ added in v0.16.0
IDCT calculates the inverse Discrete Cosine Transform of a 1D or 2D array.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga77b168d84e564c50228b69730a227ef2
func IDFT ¶ added in v0.16.0
IDFT calculates the inverse Discrete Fourier Transform of a 1D or 2D array.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaa708aa2d2e57a508f968eb0f69aa5ff1
func IMDecodeIntoMat ¶ added in v0.32.1
func IMDecodeIntoMat(buf []byte, flags IMReadFlag, dest *Mat) error
IMDecodeIntoMat reads an image from a buffer in memory into a matrix. The function IMDecodeIntoMat reads an image from the specified buffer in memory. If the buffer is too short or contains invalid data, the function returns an error
For further details, please see: https://docs.opencv.org/4.x/d4/da8/group__imgcodecs.html#ga5a0acefe5cbe0a81e904e452ec7ca733
func IMWrite ¶
IMWrite writes a Mat to an image file.
For further details, please see: http://docs.opencv.org/master/d4/da8/group__imgcodecs.html#gabbc7ef1aa2edfaa87772f1202d67e0ce
func IMWriteWithParams ¶ added in v0.4.1
IMWriteWithParams writes a Mat to an image file. With that func you can pass compression parameters.
For further details, please see: http://docs.opencv.org/master/d4/da8/group__imgcodecs.html#gabbc7ef1aa2edfaa87772f1202d67e0ce
func IlluminationChange ¶ added in v0.26.0
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
func ImagesFromBlob ¶ added in v0.21.0
ImagesFromBlob Parse a 4D blob and output the images it contains as 2D arrays through a simpler data structure (std::vector<cv::Mat>).
For further details, please see: https://docs.opencv.org/master/d6/d0f/group__dnn.html#ga4051b5fa2ed5f54b76c059a8625df9f5
func InRange ¶ added in v0.3.0
InRange checks if array elements lie between the elements of two Mat arrays.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga48af0ab51e36436c5d04340e036ce981
func InRangeWithScalar ¶ added in v0.16.0
InRangeWithScalar checks if array elements lie between the elements of two Scalars
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga48af0ab51e36436c5d04340e036ce981
func InitUndistortRectifyMap ¶ added in v0.19.0
func InitUndistortRectifyMap(cameraMatrix Mat, distCoeffs Mat, r Mat, newCameraMatrix Mat, size image.Point, m1type int, map1 Mat, map2 Mat)
InitUndistortRectifyMap computes the joint undistortion and rectification transformation and represents the result in the form of maps for remap
For further details, please see: https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga7dfb72c9cf9780a347fbe3d1c47e5d5a
func Inpaint ¶ added in v0.32.1
func Inpaint(src Mat, mask Mat, dst *Mat, inpaintRadius float32, algorithmType InpaintMethods)
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
func InsertChannel ¶ added in v0.16.0
InsertChannel inserts a single channel to dst (coi is 0-based index) (it replaces channel i with another in dst).
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga1d4bd886d35b00ec0b764cb4ce6eb515
func Integral ¶ added in v0.21.0
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
func Invert ¶ added in v0.16.0
func Invert(src Mat, dst *Mat, flags SolveDecompositionFlags) float64
Invert finds the inverse or pseudo-inverse of a matrix.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gad278044679d4ecf20f7622cc151aaaa2
func InvertAffineTransform ¶ added in v0.22.0
func KMeans ¶ added in v0.21.0
func KMeans(data Mat, k int, bestLabels *Mat, criteria TermCriteria, attempts int, flags KMeansFlags, centers *Mat) float64
KMeans finds centers of clusters and groups input samples around the clusters.
For further details, please see: https://docs.opencv.org/master/d5/d38/group__core__cluster.html#ga9a34dc06c6ec9460e90860f15bcd2f88
func KMeansPoints ¶ added in v0.21.0
func KMeansPoints(points PointVector, k int, bestLabels *Mat, criteria TermCriteria, attempts int, flags KMeansFlags, centers *Mat) float64
KMeansPoints finds centers of clusters and groups input samples around the clusters.
For further details, please see: https://docs.opencv.org/master/d5/d38/group__core__cluster.html#ga9a34dc06c6ec9460e90860f15bcd2f88
func LUT ¶ added in v0.6.0
LUT performs a look-up table transform of an array.
The function LUT fills the output array with values from the look-up table. Indices of the entries are taken from the input array.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gab55b8d062b7f5587720ede032d34156f
func Laplacian ¶ added in v0.4.1
func Laplacian(src Mat, dst *Mat, dDepth MatType, size int, scale float64, delta float64, borderType BorderType)
Laplacian calculates the Laplacian of an image.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gad78703e4c8fe703d479c1860d76429e6
func Line ¶ added in v0.3.0
Line draws a line segment connecting two points.
For further details, please see: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga7078a9fae8c7e7d13d24dac2520ae4a2
func LinearPolar ¶ added in v0.22.0
func LinearPolar(src Mat, dst *Mat, center image.Point, maxRadius float64, flags InterpolationFlags)
LinearPolar remaps an image to polar coordinates space.
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#gaa38a6884ac8b6e0b9bed47939b5362f3
func Log ¶ added in v0.16.0
Log calculates the natural logarithm of every array element.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga937ecdce4679a77168730830a955bea7
func LogPolar ¶ added in v0.17.0
LogPolar remaps an image to semilog-polar coordinates space.
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#gaec3a0b126a85b5ca2c667b16e0ae022d
func Magnitude ¶ added in v0.16.0
Magnitude calculates the magnitude of 2D vectors.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga6d3b097586bca4409873d64a90fe64c3
func Mahalanobis ¶ added in v0.36.0
Mahalanobis calculates the Mahalanobis distance between two vectors.
For further details, please see: https://docs.opencv.org/4.x/d2/de8/group__core__array.html#ga4493aee129179459cbfc6064f051aa7d
func MatchShapes ¶ added in v0.32.1
func MatchShapes(contour1 PointVector, contour2 PointVector, method ShapeMatchModes, parameter float64) float64
Compares two shapes.
For further details, please see: https://docs.opencv.org/4.x/d3/dc0/group__imgproc__shape.html#gaadc90cb16e2362c9bd6e7363e6e4c317
func MatchTemplate ¶ added in v0.9.0
func MatchTemplate(image Mat, templ Mat, result *Mat, method TemplateMatchMode, mask Mat)
MatchTemplate compares a template against overlapped image regions.
For further details, please see: https://docs.opencv.org/master/df/dfb/group__imgproc__object.html#ga586ebfb0a7fb604b35a23d85391329be
func Max ¶ added in v0.16.0
Max calculates per-element maximum of two arrays or an array and a scalar.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gacc40fa15eac0fb83f8ca70b7cc0b588d
func MeanStdDev ¶ added in v0.16.0
MeanStdDev calculates a mean and standard deviation of array elements.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga846c858f4004d59493d7c6a4354b301d
func MedianBlur ¶ added in v0.3.0
MedianBlur blurs an image using the median filter.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga564869aa33e58769b4469101aac458f9
func Merge ¶ added in v0.3.0
Merge creates one multi-channel array out of several single-channel ones.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga7d7b4d6c6ee504b30a20b1680029c7b4
func Min ¶ added in v0.16.0
Min calculates per-element minimum of two arrays or an array and a scalar.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga9af368f182ee76d0463d0d8d5330b764
func MinEnclosingCircle ¶ added in v0.19.0
func MinEnclosingCircle(pts PointVector) (x, y, radius float32)
MinEnclosingCircle finds a circle of the minimum area enclosing the input 2D point set.
For further details, please see: https://docs.opencv.org/3.4/d3/dc0/group__imgproc__shape.html#ga8ce13c24081bbc7151e9326f412190f1
func MinMaxIdx ¶ added in v0.16.0
MinMaxIdx finds the global minimum and maximum in an array.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga7622c466c628a75d9ed008b42250a73f
func MinMaxLoc ¶ added in v0.8.0
MinMaxLoc finds the global minimum and maximum in an array.
For further details, please see: https://docs.opencv.org/trunk/d2/de8/group__core__array.html#gab473bf2eb6d14ff97e89b355dac20707
func MinMaxLocWithMask ¶ added in v0.36.0
MinMaxLocWithMask finds the global minimum and maximum in an array with a mask used to select a sub-array.
For further details, please see: https://docs.opencv.org/4.x/d2/de8/group__core__array.html#gab473bf2eb6d14ff97e89b355dac20707
func MixChannels ¶ added in v0.25.0
Copies specified channels from input arrays to the specified channels of output arrays.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga51d768c270a1cdd3497255017c4504be
func Moments ¶ added in v0.4.1
Moments calculates all of the moments up to the third order of a polygon or rasterized shape.
For further details, please see: https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#ga556a180f43cab22649c23ada36a8a139
func MorphologyEx ¶ added in v0.3.0
MorphologyEx performs advanced morphological transformations.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga67493776e3ad1a3df63883829375201f
func MorphologyExWithParams ¶ added in v0.21.0
func MorphologyExWithParams(src Mat, dst *Mat, op MorphType, kernel Mat, iterations int, borderType BorderType)
MorphologyExWithParams performs advanced morphological transformations.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga67493776e3ad1a3df63883829375201f
func MulSpectrums ¶ added in v0.17.0
Mulspectrums performs the per-element multiplication of two Fourier spectrums.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga3ab38646463c59bf0ce962a9d51db64f
func MulTransposed ¶ added in v0.36.0
MulTransposed calculates the product of a matrix and its transposition.
For further details, please see: https://docs.opencv.org/4.x/d2/de8/group__core__array.html#gadc4e49f8f7a155044e3be1b9e3b270ab
func Multiply ¶ added in v0.16.0
Multiply calculates the per-element scaled product of two arrays. Both input arrays must be of the same size and the same type.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga979d898a58d7f61c53003e162e7ad89f
func MultiplyWithParams ¶ added in v0.24.0
MultiplyWithParams calculates the per-element scaled product of two arrays. Both input arrays must be of the same size and the same type.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga979d898a58d7f61c53003e162e7ad89f
func NMSBoxes ¶ added in v0.25.0
func NMSBoxes(bboxes []image.Rectangle, scores []float32, scoreThreshold float32, nmsThreshold float32) (indices []int)
NMSBoxes performs non maximum suppression given boxes and corresponding scores.
For futher details, please see: https://docs.opencv.org/4.4.0/d6/d0f/group__dnn.html#ga9d118d70a1659af729d01b10233213ee
func NMSBoxesWithParams ¶ added in v0.25.0
func NMSBoxesWithParams(bboxes []image.Rectangle, scores []float32, scoreThreshold float32, nmsThreshold float32, eta float32, topK int) (indices []int)
NMSBoxesWithParams performs non maximum suppression given boxes and corresponding scores.
For futher details, please see: https://docs.opencv.org/4.4.0/d6/d0f/group__dnn.html#ga9d118d70a1659af729d01b10233213ee
func Norm ¶ added in v0.8.0
Norm calculates the absolute norm of an array.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga7c331fb8dd951707e184ef4e3f21dd33
func NormWithMats ¶ added in v0.26.0
Norm calculates the absolute difference/relative norm of two arrays.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga7c331fb8dd951707e184ef4e3f21dd33
func Normalize ¶ added in v0.3.0
Normalize normalizes the norm or value range of an array.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga87eef7ee3970f86906d69a92cbf064bd
func OpenCVVersion ¶
func OpenCVVersion() string
OpenCVVersion returns the current OpenCV lib version
func PCABackProject ¶ added in v0.36.0
PCABackProject reconstructs vectors from their PC projections.
For further details, please see: https://docs.opencv.org/4.x/d2/de8/group__core__array.html#gab26049f30ee8e94f7d69d82c124faafc
func PCACompute ¶ added in v0.34.0
PCACompute performs PCA.
The computed eigenvalues are sorted from the largest to the smallest and the corresponding eigenvectors are stored as eigenvectors rows.
Note: Calling with maxComponents == 0 (opencv default) will cause all components to be retained.
For further details, please see: https://docs.opencv.org/4.x/d2/de8/group__core__array.html#ga27a565b31d820b05dcbcd47112176b6e
func PCAProject ¶ added in v0.36.0
PCAProject projects vector(s) to the principal component subspace.
For further details, please see: https://docs.opencv.org/4.x/d2/de8/group__core__array.html#ga6b9fbc7b3a99ebfd441bbec0a6bc4f88
func PSNR ¶ added in v0.36.0
PSNR computes the Peak Signal-to-Noise Ratio (PSNR) image quality metric.
For further details, please see: https://docs.opencv.org/4.x/d2/de8/group__core__array.html#ga3119e3ea73010a6f810bb05aa36ac8d6
func PencilSketch ¶ added in v0.30.0
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
func PerspectiveTransform ¶ added in v0.16.0
PerspectiveTransform performs the perspective matrix transformation of vectors.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gad327659ac03e5fd6894b90025e6900a7
func Phase ¶ added in v0.17.0
Phase calculates the rotation angle of 2D vectors.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga9db9ca9b4d81c3bde5677b8f64dc0137
func PointPolygonTest ¶ added in v0.28.0
func PointPolygonTest(pts PointVector, pt image.Point, measureDist bool) float64
PointPolygonTest performs a point-in-contour test.
For further details, please see: https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#ga1a539e8db2135af2566103705d7a5722
func PolarToCart ¶ added in v0.17.0
PolatToCart calculates x and y coordinates of 2D vectors from their magnitude and angle.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga581ff9d44201de2dd1b40a50db93d665
func Polylines ¶ added in v0.23.0
Polylines draws several polygonal curves.
For more information, see: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga1ea127ffbbb7e0bfc4fd6fd2eb64263c
func Pow ¶ added in v0.16.0
Pow raises every array element to a power.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaf0d056b5bd1dc92500d6f6cf6bac41ef
func PutText ¶
func PutText(img *Mat, text string, org image.Point, fontFace HersheyFont, fontScale float64, c color.RGBA, thickness int)
PutText 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.
For further details, please see: http://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga5126f47f883d730f633d74f07456c576
func PutTextWithParams ¶ added in v0.22.0
func PutTextWithParams(img *Mat, text string, org image.Point, fontFace HersheyFont, fontScale float64, c color.RGBA, thickness int, lineType LineType, bottomLeftOrigin bool)
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.
For further details, please see: http://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga5126f47f883d730f633d74f07456c576
func PyrDown ¶ added in v0.16.0
func PyrDown(src Mat, dst *Mat, ksize image.Point, borderType BorderType)
PyrDown blurs an image and downsamples it.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gaf9bba239dfca11654cb7f50f889fc2ff
func PyrUp ¶ added in v0.16.0
func PyrUp(src Mat, dst *Mat, ksize image.Point, borderType BorderType)
PyrUp upsamples an image and then blurs it.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gada75b59bdaaca411ed6fee10085eb784
func RandN ¶ added in v0.27.0
RandN Fills the array with normally distributed random numbers.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaeff1f61e972d133a04ce3a5f81cf6808
func RandShuffle ¶ added in v0.27.0
func RandShuffle(mat *Mat)
RandShuffle Shuffles the array elements randomly.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga6a789c8a5cb56c6dd62506179808f763
func RandShuffleWithParams ¶ added in v0.27.0
RandShuffleWithParams Shuffles the array elements randomly.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga6a789c8a5cb56c6dd62506179808f763
func RandU ¶ added in v0.27.0
RandU Generates a single uniformly-distributed random number or an array of random numbers.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga1ba1026dca0807b27057ba6a49d258c0
func Rectangle ¶
Rectangle draws a simple, thick, or filled up-right rectangle. It renders a rectangle with the desired characteristics to the target Mat image.
For further details, please see: http://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga346ac30b5c74e9b5137576c9ee9e0e8c
func RectangleWithParams ¶ added in v0.28.0
func RectangleWithParams(img *Mat, r image.Rectangle, c color.RGBA, thickness int, lineType LineType, shift int)
RectangleWithParams draws a simple, thick, or filled up-right rectangle. It renders a rectangle with the desired characteristics to the target Mat image.
For further details, please see: http://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga346ac30b5c74e9b5137576c9ee9e0e8c
func Reduce ¶ added in v0.17.0
func Reduce(src Mat, dst *Mat, dim int, rType ReduceTypes, dType MatType)
Reduce reduces a matrix to a vector.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga4b78072a303f29d9031d56e5638da78e
func ReduceArgMax ¶ added in v0.33.0
Finds indices of max elements along provided axis.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaa87ea34d99bcc5bf9695048355163da0
func ReduceArgMin ¶ added in v0.33.0
Finds indices of min elements along provided axis.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaeecd548276bfb91b938989e66b722088
func Remap ¶ added in v0.17.0
func Remap(src Mat, dst, map1, map2 *Mat, interpolation InterpolationFlags, borderMode BorderType, borderValue color.RGBA)
Remap applies a generic geometrical transformation to an image.
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#gab75ef31ce5cdfb5c44b6da5f3b908ea4
func Repeat ¶ added in v0.17.0
Repeat fills the output array with repeated copies of the input array.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga496c3860f3ac44c40b48811333cfda2d
func Resize ¶ added in v0.3.0
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.
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#ga47a974309e9102f5f08231edc7e7529d
func Rodrigues ¶ added in v0.36.0
Rodrigues converts a rotation matrix to a rotation vector or vice versa.
For further details, please see: https://docs.opencv.org/4.0.0/d9/d0c/group__calib3d.html#ga61585db663d9da06b68e70cfbf6a1eac
func Rotate ¶ added in v0.16.0
func Rotate(src Mat, dst *Mat, code RotateFlag)
Rotate rotates a 2D array in multiples of 90 degrees
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga4ad01c0978b0ce64baa246811deeac24
func SVBackSubst ¶ added in v0.36.0
SVBackSubst performs a singular value back substitution.
For further details, please see: https://docs.opencv.org/4.x/d2/de8/group__core__array.html#gab4e620e6fc6c8a27bb2be3d50a840c0b
func SVDCompute ¶ added in v0.22.0
SVDCompute decomposes matrix and stores the results to user-provided matrices
https://docs.opencv.org/4.1.2/df/df7/classcv_1_1SVD.html#a76f0b2044df458160292045a3d3714c6
func SVDecomp ¶ added in v0.36.0
SVDecomp decomposes matrix and stores the results to user-provided matrices.
For further details, please see: https://docs.opencv.org/4.x/d2/de8/group__core__array.html#gab477b5b7b39b370bb03e75b19d2d5109
func ScaleAdd ¶ added in v0.18.0
Calculates the sum of a scaled array and another array.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga9e0845db4135f55dcf20227402f00d98
func Scharr ¶ added in v0.4.1
func Scharr(src Mat, dst *Mat, dDepth MatType, dx int, dy int, scale float64, delta float64, borderType BorderType)
Scharr calculates the first x- or y- image derivative using Scharr operator.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gaa13106761eedf14798f37aa2d60404c9
func SeamlessClone ¶ added in v0.26.0
func SeamlessClone(src, dst, mask Mat, p image.Point, blend *Mat, flags SeamlessCloneFlags)
SeamlessClone blend two image by Poisson Blending.
For further details, please see: https://docs.opencv.org/master/df/da0/group__photo__clone.html#ga2bf426e4c93a6b1f21705513dfeca49d
func SelectROIs
deprecated
added in
v0.7.0
func SepFilter2D ¶ added in v0.17.0
func SepFilter2D(src Mat, dst *Mat, ddepth MatType, kernelX, kernelY Mat, anchor image.Point, delta float64, borderType BorderType)
SepFilter2D applies a separable linear filter to the image.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga910e29ff7d7b105057d1625a4bf6318d
func SetIdentity ¶ added in v0.22.0
SetIdentity initializes a scaled identity matrix. For further details, please see:
https://docs.opencv.org/master/d2/de8/group__core__array.html#ga388d7575224a4a277ceb98ccaa327c99
func SetNumThreads ¶ added in v0.32.1
func SetNumThreads(n int)
Set the number of threads for OpenCV.
func SetRNGSeed ¶ added in v0.27.0
func SetRNGSeed(seed int)
TheRNG Sets state of default random number generator.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga757e657c037410d9e19e819569e7de0f
func Sobel ¶ added in v0.17.0
func Sobel(src Mat, dst *Mat, ddepth MatType, dx, dy, ksize int, scale, delta float64, borderType BorderType)
Sobel calculates the first, second, third, or mixed image derivatives using an extended Sobel operator
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gacea54f142e81b6758cb6f375ce782c8d
func Solve ¶ added in v0.17.0
func Solve(src1 Mat, src2 Mat, dst *Mat, flags SolveDecompositionFlags) bool
Solve solves one or more linear systems or least-squares problems.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga12b43690dbd31fed96f213eefead2373
func SolveCubic ¶ added in v0.17.0
SolveCubic finds the real roots of a cubic equation.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga1c3b0b925b085b6e96931ee309e6a1da
func SolvePnP ¶ added in v0.36.0
func SolvePnP(objectPoints Point3fVector, imagePoints Point2fVector, cameraMatrix, distCoeffs Mat, rvec, tvec *Mat, useExtrinsicGuess bool, flags int) bool
SolvePnP finds an object pose from 3D-2D point correspondences.
For further details, please see: https://docs.opencv.org/4.0.0/d9/d0c/group__calib3d.html#ga549c2075fac14829ff4a58bc931c033d
func SolvePoly ¶ added in v0.17.0
SolvePoly finds the real or complex roots of a polynomial equation.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gac2f5e953016fabcdf793d762f4ec5dce
func Sort ¶ added in v0.17.0
Sort sorts each row or each column of a matrix.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga45dd56da289494ce874be2324856898f
func SortIdx ¶ added in v0.17.0
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
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gadf35157cbf97f3cb85a545380e383506
func SpatialGradient ¶ added in v0.17.0
func SpatialGradient(src Mat, dx, dy *Mat, ksize MatType, borderType BorderType)
SpatialGradient calculates the first order image derivative in both x and y using a Sobel operator.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga405d03b20c782b65a4daf54d233239a2
func SqBoxFilter ¶ added in v0.16.0
SqBoxFilter calculates the normalized sum of squares of the pixel values overlapping the filter.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga045028184a9ef65d7d2579e5c4bff6c0
func Stylization ¶ added in v0.30.0
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
func Subtract ¶ added in v0.16.0
Subtract calculates the per-element subtraction of two arrays or an array and a scalar.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaa0f00d98b4b5edeaeb7b8333b2de353b
func TextureFlattening ¶ added in v0.26.0
func TextureFlattening(src, mask Mat, dst *Mat, lowThreshold, highThreshold float32, kernelSize int)
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
func Threshold ¶ added in v0.4.1
func Threshold(src Mat, dst *Mat, thresh float32, maxvalue float32, typ ThresholdType) (threshold float32)
Threshold applies a fixed-level threshold to each array element.
For further details, please see: https://docs.opencv.org/3.3.0/d7/d1b/group__imgproc__misc.html#gae8a4a146d1ca78c626a53577199e9c57
func Transform ¶ added in v0.16.0
Transform performs the matrix transformation of every array element.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga393164aa54bb9169ce0a8cc44e08ff22
func Transpose ¶ added in v0.16.0
Transpose transposes a matrix.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga46630ed6c0ea6254a35f447289bd7404
func TransposeND ¶ added in v0.38.0
TransposeND transpose for n-dimensional matrices.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gab1b1274b4a563be34cdfa55b8919a4ec
func TriangulatePoints ¶ added in v0.36.0
func TriangulatePoints(projMatr1, projMatr2 Mat, projPoints1, projPoints2 Point2fVector, points4D *Mat)
TriangulatePoints reconstructs 3-dimensional points (in homogeneous coordinates) by using their observations with a stereo camera.
For further details, please see: https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#gad3fc9a0c82b08df034234979960b778c
func Undistort ¶ added in v0.22.0
Undistort transforms an image to compensate for lens distortion.
For further details, please see: https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#ga69f2545a8b62a6b0fc2ee060dc30559d
func UndistortPoints ¶ added in v0.24.0
func UndistortPoints(src Mat, dst *Mat, cameraMatrix, distCoeffs, rectificationTransform, newCameraMatrix Mat)
UndistortPoints transforms points to compensate for lens distortion
For further details, please see: https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga55c716492470bfe86b0ee9bf3a1f0f7e
func Vconcat ¶ added in v0.16.0
Vconcat applies vertical concatenation to given matrices.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaab5ceee39e0580f879df645a872c6bf7
func WaitKey ¶
WaitKey that is not attached to a specific Window. Only use when no Window exists in your application, e.g. command line app.
func WarpAffine ¶ added in v0.8.0
WarpAffine applies an affine transformation to an image. For more parameters please check WarpAffineWithParams
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#ga0203d9ee5fcd28d40dbc4a1ea4451983
func WarpAffineWithParams ¶ added in v0.8.0
func WarpAffineWithParams(src Mat, dst *Mat, m Mat, sz image.Point, flags InterpolationFlags, borderType BorderType, borderValue color.RGBA)
WarpAffineWithParams applies an affine transformation to an image.
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#ga0203d9ee5fcd28d40dbc4a1ea4451983
func WarpPerspective ¶ added in v0.16.0
WarpPerspective applies a perspective transformation to an image. For more parameters please check WarpPerspectiveWithParams.
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#gaf73673a7e8e18ec6963e3774e6a94b87
func WarpPerspectiveWithParams ¶ added in v0.31.0
func WarpPerspectiveWithParams(src Mat, dst *Mat, m Mat, sz image.Point, flags InterpolationFlags, borderType BorderType, borderValue color.RGBA)
WarpPerspectiveWithParams applies a perspective transformation to an image.
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#gaf73673a7e8e18ec6963e3774e6a94b87
func Watershed ¶ added in v0.21.0
Watershed performs a marker-based image segmentation using the watershed algorithm.
For further details, please see: https://docs.opencv.org/master/d7/d1b/group__imgproc__misc.html#ga3267243e4d3f95165d55a618c65ac6e1
Types ¶
type AKAZE ¶ added in v0.6.0
type AKAZE struct {
// contains filtered or unexported fields
}
AKAZE is a wrapper around the cv::AKAZE algorithm.
func NewAKAZE ¶ added in v0.6.0
func NewAKAZE() AKAZE
NewAKAZE returns a new AKAZE algorithm
For further details, please see: https://docs.opencv.org/master/d8/d30/classcv_1_1AKAZE.html
func (*AKAZE) Compute ¶ added in v0.36.0
Compute keypoints in an image using AKAZE.
For further details, please see: https://docs.opencv.org/4.x/d0/d13/classcv_1_1Feature2D.html#ab3cce8d56f4fc5e1d530b5931e1e8dc0
func (*AKAZE) Detect ¶ added in v0.6.0
Detect keypoints in an image using AKAZE.
For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#aa4e9a7082ec61ebc108806704fbd7887
func (*AKAZE) DetectAndCompute ¶ added in v0.6.0
DetectAndCompute keypoints and compute in an image using AKAZE.
For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#a8be0d1c20b08eb867184b8d74c15a677
type AdaptiveThresholdType ¶ added in v0.16.0
type AdaptiveThresholdType int
AdaptiveThresholdType type of adaptive threshold operation.
const ( // AdaptiveThresholdMean threshold type AdaptiveThresholdMean AdaptiveThresholdType = 0 // AdaptiveThresholdGaussian threshold type AdaptiveThresholdGaussian AdaptiveThresholdType = 1 )
func (AdaptiveThresholdType) String ¶ added in v0.22.0
func (c AdaptiveThresholdType) String() string
type AgastFeatureDetector ¶ added in v0.6.0
type AgastFeatureDetector struct {
// contains filtered or unexported fields
}
AgastFeatureDetector is a wrapper around the cv::AgastFeatureDetector.
func NewAgastFeatureDetector ¶ added in v0.6.0
func NewAgastFeatureDetector() AgastFeatureDetector
NewAgastFeatureDetector returns a new AgastFeatureDetector algorithm
For further details, please see: https://docs.opencv.org/master/d7/d19/classcv_1_1AgastFeatureDetector.html
func (*AgastFeatureDetector) Close ¶ added in v0.6.0
func (a *AgastFeatureDetector) Close() error
Close AgastFeatureDetector.
func (*AgastFeatureDetector) Detect ¶ added in v0.6.0
func (a *AgastFeatureDetector) Detect(src Mat) []KeyPoint
Detect keypoints in an image using AgastFeatureDetector.
For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#aa4e9a7082ec61ebc108806704fbd7887
type AlignMTB ¶ added in v0.28.0
type AlignMTB struct {
// contains filtered or unexported fields
}
AlignMTB is a wrapper around the cv::AlignMTB.
func NewAlignMTB ¶ added in v0.28.0
func NewAlignMTB() AlignMTB
For further details, please see: https://docs.opencv.org/master/d6/df5/group__photo__hdr.html https://docs.opencv.org/master/d7/db6/classcv_1_1AlignMTB.html https://docs.opencv.org/master/d6/df5/group__photo__hdr.html#ga2f1fafc885a5d79dbfb3542e08db0244
type ArucoDetector ¶ added in v0.32.1
type ArucoDetector struct {
// contains filtered or unexported fields
}
func NewArucoDetector ¶ added in v0.32.1
func NewArucoDetector() ArucoDetector
NewArucoDetector returns a new ArucoDetector.
func NewArucoDetectorWithParams ¶ added in v0.32.1
func NewArucoDetectorWithParams(dictionary ArucoDictionary, params ArucoDetectorParameters) ArucoDetector
NewArucoDetectorWithParams returns a new ArucoDetector.
func (*ArucoDetector) Close ¶ added in v0.32.1
func (a *ArucoDetector) Close() error
Close deletes the ArucoDetector's pointer.
func (*ArucoDetector) DetectMarkers ¶ added in v0.32.1
func (a *ArucoDetector) DetectMarkers(input Mat) ( markerCorners [][]Point2f, markerIds []int, rejectedCandidates [][]Point2f, )
DetectMarkers does basic marker detection.
For further details, please see: https://docs.opencv.org/master/d9/d6a/group__aruco.html#gab9159aa69250d8d3642593e508cb6baa
type ArucoDetectorParameters ¶ added in v0.32.1
type ArucoDetectorParameters struct {
// contains filtered or unexported fields
}
func NewArucoDetectorParameters ¶ added in v0.32.1
func NewArucoDetectorParameters() ArucoDetectorParameters
NewArucoDetectorParameters returns the default parameters for the SimpleBobDetector
func (*ArucoDetectorParameters) GetAdaptiveThreshConstant ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetAdaptiveThreshConstant() float64
func (*ArucoDetectorParameters) GetAdaptiveThreshWinSizeMax ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetAdaptiveThreshWinSizeMax() int
func (*ArucoDetectorParameters) GetAdaptiveThreshWinSizeMin ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetAdaptiveThreshWinSizeMin() int
func (*ArucoDetectorParameters) GetAdaptiveThreshWinSizeStep ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetAdaptiveThreshWinSizeStep() int
func (*ArucoDetectorParameters) GetAprilTagCriticalRad ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetAprilTagCriticalRad() float32
func (*ArucoDetectorParameters) GetAprilTagDeglitch ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetAprilTagDeglitch() int
func (*ArucoDetectorParameters) GetAprilTagMaxLineFitMse ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetAprilTagMaxLineFitMse() float32
func (*ArucoDetectorParameters) GetAprilTagMaxNmaxima ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetAprilTagMaxNmaxima() int
func (*ArucoDetectorParameters) GetAprilTagMinClusterPixels ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetAprilTagMinClusterPixels() int
func (*ArucoDetectorParameters) GetAprilTagMinWhiteBlackDiff ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetAprilTagMinWhiteBlackDiff() int
func (*ArucoDetectorParameters) GetAprilTagQuadDecimate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetAprilTagQuadDecimate() float32
func (*ArucoDetectorParameters) GetAprilTagQuadSigma ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetAprilTagQuadSigma() float32
func (*ArucoDetectorParameters) GetCornerRefinementMaxIterations ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetCornerRefinementMaxIterations() int
func (*ArucoDetectorParameters) GetCornerRefinementMethod ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetCornerRefinementMethod() int
func (*ArucoDetectorParameters) GetCornerRefinementMinAccuracy ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetCornerRefinementMinAccuracy() float64
func (*ArucoDetectorParameters) GetCornerRefinementWinSize ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetCornerRefinementWinSize() int
func (*ArucoDetectorParameters) GetDetectInvertedMarker ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetDetectInvertedMarker() bool
func (*ArucoDetectorParameters) GetErrorCorrectionRate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetErrorCorrectionRate() float64
func (*ArucoDetectorParameters) GetMarkerBorderBits ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetMarkerBorderBits() int
func (*ArucoDetectorParameters) GetMaxErroneousBitsInBorderRate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetMaxErroneousBitsInBorderRate() float64
func (*ArucoDetectorParameters) GetMaxMarkerPerimeterRate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetMaxMarkerPerimeterRate() float64
func (*ArucoDetectorParameters) GetMinCornerDistanceRate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetMinCornerDistanceRate() float64
func (*ArucoDetectorParameters) GetMinDistanceToBorder ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetMinDistanceToBorder() int
func (*ArucoDetectorParameters) GetMinMarkerDistanceRate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetMinMarkerDistanceRate() float64
func (*ArucoDetectorParameters) GetMinMarkerPerimeterRate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetMinMarkerPerimeterRate() float64
func (*ArucoDetectorParameters) GetMinOtsuStdDev ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetMinOtsuStdDev() float64
func (*ArucoDetectorParameters) GetPerspectiveRemoveIgnoredMarginPerCell ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetPerspectiveRemoveIgnoredMarginPerCell() float64
func (*ArucoDetectorParameters) GetPerspectiveRemovePixelPerCell ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetPerspectiveRemovePixelPerCell() int
func (*ArucoDetectorParameters) GetPolygonalApproxAccuracyRate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) GetPolygonalApproxAccuracyRate() float64
func (*ArucoDetectorParameters) SetAdaptiveThreshConstant ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetAdaptiveThreshConstant(adaptiveThreshConstant float64)
func (*ArucoDetectorParameters) SetAdaptiveThreshWinSizeMax ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetAdaptiveThreshWinSizeMax(adaptiveThreshWinSizeMax int)
func (*ArucoDetectorParameters) SetAdaptiveThreshWinSizeMin ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetAdaptiveThreshWinSizeMin(adaptiveThreshWinSizeMin int)
func (*ArucoDetectorParameters) SetAdaptiveThreshWinSizeStep ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetAdaptiveThreshWinSizeStep(adaptiveThreshWinSizeStep int)
func (*ArucoDetectorParameters) SetAprilTagCriticalRad ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetAprilTagCriticalRad(aprilTagCriticalRad float32)
func (*ArucoDetectorParameters) SetAprilTagDeglitch ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetAprilTagDeglitch(aprilTagDeglitch int)
func (*ArucoDetectorParameters) SetAprilTagMaxLineFitMse ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetAprilTagMaxLineFitMse(aprilTagMaxLineFitMse float32)
func (*ArucoDetectorParameters) SetAprilTagMaxNmaxima ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetAprilTagMaxNmaxima(aprilTagMaxNmaxima int)
func (*ArucoDetectorParameters) SetAprilTagMinClusterPixels ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetAprilTagMinClusterPixels(aprilTagMinClusterPixels int)
func (*ArucoDetectorParameters) SetAprilTagMinWhiteBlackDiff ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetAprilTagMinWhiteBlackDiff(aprilTagMinWhiteBlackDiff int)
func (*ArucoDetectorParameters) SetAprilTagQuadDecimate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetAprilTagQuadDecimate(aprilTagQuadDecimate float32)
func (*ArucoDetectorParameters) SetAprilTagQuadSigma ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetAprilTagQuadSigma(aprilTagQuadSigma float32)
func (*ArucoDetectorParameters) SetCornerRefinementMaxIterations ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetCornerRefinementMaxIterations(cornerRefinementMaxIterations int)
func (*ArucoDetectorParameters) SetCornerRefinementMethod ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetCornerRefinementMethod(cornerRefinementMethod int)
func (*ArucoDetectorParameters) SetCornerRefinementMinAccuracy ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetCornerRefinementMinAccuracy(cornerRefinementMinAccuracy float64)
func (*ArucoDetectorParameters) SetCornerRefinementWinSize ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetCornerRefinementWinSize(cornerRefinementWinSize int)
func (*ArucoDetectorParameters) SetDetectInvertedMarker ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetDetectInvertedMarker(detectInvertedMarker bool)
func (*ArucoDetectorParameters) SetErrorCorrectionRate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetErrorCorrectionRate(errorCorrectionRate float64)
func (*ArucoDetectorParameters) SetMarkerBorderBits ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetMarkerBorderBits(markerBorderBits int)
func (*ArucoDetectorParameters) SetMaxErroneousBitsInBorderRate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetMaxErroneousBitsInBorderRate(maxErroneousBitsInBorderRate float64)
func (*ArucoDetectorParameters) SetMaxMarkerPerimeterRate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetMaxMarkerPerimeterRate(maxMarkerPerimeterRate float64)
func (*ArucoDetectorParameters) SetMinCornerDistanceRate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetMinCornerDistanceRate(minCornerDistanceRate float64)
func (*ArucoDetectorParameters) SetMinDistanceToBorder ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetMinDistanceToBorder(minDistanceToBorder int)
func (*ArucoDetectorParameters) SetMinMarkerDistanceRate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetMinMarkerDistanceRate(minMarkerDistanceRate float64)
func (*ArucoDetectorParameters) SetMinMarkerPerimeterRate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetMinMarkerPerimeterRate(minMarkerPerimeterRate float64)
func (*ArucoDetectorParameters) SetMinOtsuStdDev ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetMinOtsuStdDev(minOtsuStdDev float64)
func (*ArucoDetectorParameters) SetPerspectiveRemoveIgnoredMarginPerCell ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetPerspectiveRemoveIgnoredMarginPerCell(perspectiveRemoveIgnoredMarginPerCell float64)
func (*ArucoDetectorParameters) SetPerspectiveRemovePixelPerCell ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetPerspectiveRemovePixelPerCell(perspectiveRemovePixelPerCell int)
func (*ArucoDetectorParameters) SetPolygonalApproxAccuracyRate ¶ added in v0.32.1
func (ap *ArucoDetectorParameters) SetPolygonalApproxAccuracyRate(polygonalApproxAccuracyRate float64)
type ArucoDictionary ¶ added in v0.32.1
type ArucoDictionary struct {
// contains filtered or unexported fields
}
func GetPredefinedDictionary ¶ added in v0.32.1
func GetPredefinedDictionary(dictionaryId ArucoDictionaryCode) ArucoDictionary
type ArucoDictionaryCode ¶ added in v0.32.1
type ArucoDictionaryCode int
const ( ArucoDict4x4_50 ArucoDictionaryCode = iota ArucoDict4x4_100 ArucoDictionaryCode = iota ArucoDict4x4_250 ArucoDictionaryCode = iota ArucoDict4x4_1000 ArucoDictionaryCode = iota ArucoDict5x5_50 ArucoDictionaryCode = iota ArucoDict5x5_100 ArucoDictionaryCode = iota ArucoDict5x5_250 ArucoDictionaryCode = iota ArucoDict5x5_1000 ArucoDictionaryCode = iota ArucoDict6x6_50 ArucoDictionaryCode = iota ArucoDict6x6_100 ArucoDictionaryCode = iota ArucoDict6x6_250 ArucoDictionaryCode = iota ArucoDict6x6_1000 ArucoDictionaryCode = iota ArucoDict7x7_50 ArucoDictionaryCode = iota ArucoDict7x7_100 ArucoDictionaryCode = iota ArucoDict7x7_250 ArucoDictionaryCode = iota ArucoDict7x7_1000 ArucoDictionaryCode = iota ArucoDictArucoOriginal ArucoDictionaryCode = iota ArucoDictAprilTag_16h5 ArucoDictionaryCode = iota ///< 4x4 bits, minimum hamming distance between any two codes = 5, 30 codes ArucoDictAprilTag_25h9 ArucoDictionaryCode = iota ///< 5x5 bits, minimum hamming distance between any two codes = 9, 35 codes ArucoDictAprilTag_36h10 ArucoDictionaryCode = iota ///< 6x6 bits, minimum hamming distance between any two codes = 10, 2320 codes ArucoDictAprilTag_36h11 ArucoDictionaryCode = iota ///< 6x6 bits, minimum hamming distance between any two codes = 11, 587 codes )
type BFMatcher ¶ added in v0.16.0
type BFMatcher struct {
// contains filtered or unexported fields
}
BFMatcher is a wrapper around the the cv::BFMatcher algorithm
func NewBFMatcher ¶ added in v0.16.0
func NewBFMatcher() BFMatcher
NewBFMatcher returns a new BFMatcher
For further details, please see: https://docs.opencv.org/master/d3/da1/classcv_1_1BFMatcher.html#abe0bb11749b30d97f60d6ade665617bd
func NewBFMatcherWithParams ¶ added in v0.16.0
NewBFMatcherWithParams creates a new BFMatchers but allows setting parameters to values other than just the defaults.
For further details, please see: https://docs.opencv.org/master/d3/da1/classcv_1_1BFMatcher.html#abe0bb11749b30d97f60d6ade665617bd
func (*BFMatcher) KnnMatch ¶ added in v0.16.0
KnnMatch Finds the k best matches for each descriptor from a query set.
For further details, please see: https://docs.opencv.org/master/db/d39/classcv_1_1DescriptorMatcher.html#aa880f9353cdf185ccf3013e08210483a
type BRISK ¶ added in v0.6.0
type BRISK struct {
// contains filtered or unexported fields
}
BRISK is a wrapper around the cv::BRISK algorithm.
func NewBRISK ¶ added in v0.6.0
func NewBRISK() BRISK
NewBRISK returns a new BRISK algorithm
For further details, please see: https://docs.opencv.org/master/d8/d30/classcv_1_1AKAZE.html
func (*BRISK) Compute ¶ added in v0.36.0
Compute keypoints in an image using BRISK.
For further details, please see: https://docs.opencv.org/4.x/d0/d13/classcv_1_1Feature2D.html#ab3cce8d56f4fc5e1d530b5931e1e8dc0
func (*BRISK) Detect ¶ added in v0.6.0
Detect keypoints in an image using BRISK.
For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#aa4e9a7082ec61ebc108806704fbd7887
func (*BRISK) DetectAndCompute ¶ added in v0.6.0
DetectAndCompute keypoints and compute in an image using BRISK.
For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#a8be0d1c20b08eb867184b8d74c15a677
type BackgroundSubtractorKNN ¶ added in v0.6.0
type BackgroundSubtractorKNN struct {
// contains filtered or unexported fields
}
BackgroundSubtractorKNN is a wrapper around the cv::BackgroundSubtractorKNN.
func NewBackgroundSubtractorKNN ¶ added in v0.3.0
func NewBackgroundSubtractorKNN() BackgroundSubtractorKNN
NewBackgroundSubtractorKNN returns a new BackgroundSubtractor algorithm of type KNN. K-Nearest Neighbors (KNN) uses a Background/Foreground Segmentation Algorithm
For further details, please see: https://docs.opencv.org/master/de/de1/group__video__motion.html#gac9be925771f805b6fdb614ec2292006d https://docs.opencv.org/master/db/d88/classcv_1_1BackgroundSubtractorKNN.html
func NewBackgroundSubtractorKNNWithParams ¶ added in v0.20.0
func NewBackgroundSubtractorKNNWithParams(history int, dist2Threshold float64, detectShadows bool) BackgroundSubtractorKNN
NewBackgroundSubtractorKNNWithParams returns a new BackgroundSubtractor algorithm of type KNN with customized parameters. K-Nearest Neighbors (KNN) uses a Background/Foreground Segmentation Algorithm
For further details, please see: https://docs.opencv.org/master/de/de1/group__video__motion.html#gac9be925771f805b6fdb614ec2292006d https://docs.opencv.org/master/db/d88/classcv_1_1BackgroundSubtractorKNN.html
func (*BackgroundSubtractorKNN) Apply ¶ added in v0.6.0
func (k *BackgroundSubtractorKNN) Apply(src Mat, dst *Mat)
Apply computes a foreground mask using the current BackgroundSubtractorKNN.
For further details, please see: https://docs.opencv.org/master/d7/df6/classcv_1_1BackgroundSubtractor.html#aa735e76f7069b3fa9c3f32395f9ccd21
func (*BackgroundSubtractorKNN) Close ¶ added in v0.6.0
func (k *BackgroundSubtractorKNN) Close() error
Close BackgroundSubtractorKNN.
type BackgroundSubtractorMOG2 ¶ added in v0.6.0
type BackgroundSubtractorMOG2 struct {
// contains filtered or unexported fields
}
BackgroundSubtractorMOG2 is a wrapper around the cv::BackgroundSubtractorMOG2.
func NewBackgroundSubtractorMOG2 ¶ added in v0.3.0
func NewBackgroundSubtractorMOG2() BackgroundSubtractorMOG2
NewBackgroundSubtractorMOG2 returns a new BackgroundSubtractor algorithm of type MOG2. MOG2 is a Gaussian Mixture-based Background/Foreground Segmentation Algorithm.
For further details, please see: https://docs.opencv.org/master/de/de1/group__video__motion.html#ga2beb2dee7a073809ccec60f145b6b29c https://docs.opencv.org/master/d7/d7b/classcv_1_1BackgroundSubtractorMOG2.html
func NewBackgroundSubtractorMOG2WithParams ¶ added in v0.20.0
func NewBackgroundSubtractorMOG2WithParams(history int, varThreshold float64, detectShadows bool) BackgroundSubtractorMOG2
NewBackgroundSubtractorMOG2WithParams returns a new BackgroundSubtractor algorithm of type MOG2 with customized parameters. MOG2 is a Gaussian Mixture-based Background/Foreground Segmentation Algorithm.
For further details, please see: https://docs.opencv.org/master/de/de1/group__video__motion.html#ga2beb2dee7a073809ccec60f145b6b29c https://docs.opencv.org/master/d7/d7b/classcv_1_1BackgroundSubtractorMOG2.html
func (*BackgroundSubtractorMOG2) Apply ¶ added in v0.6.0
func (b *BackgroundSubtractorMOG2) Apply(src Mat, dst *Mat)
Apply computes a foreground mask using the current BackgroundSubtractorMOG2.
For further details, please see: https://docs.opencv.org/master/d7/df6/classcv_1_1BackgroundSubtractor.html#aa735e76f7069b3fa9c3f32395f9ccd21
func (*BackgroundSubtractorMOG2) Close ¶ added in v0.6.0
func (b *BackgroundSubtractorMOG2) Close() error
Close BackgroundSubtractorMOG2.
type BorderType ¶ added in v0.4.1
type BorderType int
BorderType type of border.
const ( // BorderConstant border type BorderConstant BorderType = 0 // BorderReplicate border type BorderReplicate BorderType = 1 // BorderReflect border type BorderReflect BorderType = 2 // BorderWrap border type BorderWrap BorderType = 3 // BorderReflect101 border type BorderReflect101 BorderType = 4 // BorderTransparent border type BorderTransparent BorderType = 5 // BorderDefault border type BorderDefault = BorderReflect101 // BorderIsolated border type BorderIsolated BorderType = 16 )
func (BorderType) String ¶ added in v0.22.0
func (c BorderType) String() string
type CLAHE ¶ added in v0.19.0
type CLAHE struct {
// contains filtered or unexported fields
}
CLAHE is a wrapper around the cv::CLAHE algorithm.
func NewCLAHE ¶ added in v0.19.0
func NewCLAHE() CLAHE
NewCLAHE returns a new CLAHE algorithm
For further details, please see: https://docs.opencv.org/master/d6/db6/classcv_1_1CLAHE.html
func NewCLAHEWithParams ¶ added in v0.19.0
NewCLAHEWithParams returns a new CLAHE algorithm
For further details, please see: https://docs.opencv.org/master/d6/db6/classcv_1_1CLAHE.html
func (*CLAHE) Apply ¶ added in v0.19.0
Apply CLAHE.
For further details, please see: https://docs.opencv.org/master/d6/db6/classcv_1_1CLAHE.html#a4e92e0e427de21be8d1fae8dcd862c5e
type CalibCBFlag ¶ added in v0.23.0
type CalibCBFlag int
CalibCBFlag value for chessboard calibration For more details, please see: https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga93efa9b0aa890de240ca32b11253dd4a
const ( // Various operation flags that can be zero or a combination of the following values: // Use adaptive thresholding to convert the image to black and white, rather than a fixed threshold level (computed from the average image brightness). CalibCBAdaptiveThresh CalibCBFlag = 1 << iota // Normalize the image gamma with equalizeHist before applying fixed or adaptive thresholding. CalibCBNormalizeImage // Use additional criteria (like contour area, perimeter, square-like shape) to filter out false quads extracted at the contour retrieval stage. CalibCBFilterQuads // Run a fast check on the image that looks for chessboard corners, and shortcut the call if none is found. This can drastically speed up the call in the degenerate condition when no chessboard is observed. CalibCBFastCheck // Run an exhaustive search to improve detection rate. CalibCBExhaustive // Up sample input image to improve sub-pixel accuracy due to aliasing effects. CalibCBAccuracy // The detected pattern is allowed to be larger than patternSize (see description). CalibCBLarger // The detected pattern must have a marker (see description). This should be used if an accurate camera calibration is required. CalibCBMarker )
func (CalibCBFlag) String ¶ added in v0.23.0
func (c CalibCBFlag) String() string
type CalibFlag ¶ added in v0.16.0
type CalibFlag int32
CalibFlag value for calibration
const ( // CalibUseIntrinsicGuess indicates that cameraMatrix contains valid initial values // of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially // set to the image center ( imageSize is used), and focal distances are computed // in a least-squares fashion. CalibUseIntrinsicGuess CalibFlag = 1 << iota // CalibRecomputeExtrinsic indicates that extrinsic will be recomputed after each // iteration of intrinsic optimization. CalibRecomputeExtrinsic // CalibCheckCond indicates that the functions will check validity of condition number CalibCheckCond // CalibFixSkew indicates that skew coefficient (alpha) is set to zero and stay zero CalibFixSkew // CalibFixK1 indicates that selected distortion coefficients are set to zeros and stay zero CalibFixK1 // CalibFixK2 indicates that selected distortion coefficients are set to zeros and stay zero CalibFixK2 // CalibFixK3 indicates that selected distortion coefficients are set to zeros and stay zero CalibFixK3 // CalibFixK4 indicates that selected distortion coefficients are set to zeros and stay zero CalibFixK4 // CalibFixIntrinsic indicates that fix K1, K2? and D1, D2? so that only R, T matrices are estimated CalibFixIntrinsic // CalibFixPrincipalPoint indicates that the principal point is not changed during the global optimization. // It stays at the center or at a different location specified when CalibUseIntrinsicGuess is set too. CalibFixPrincipalPoint )
type CascadeClassifier ¶
type CascadeClassifier struct {
// contains filtered or unexported fields
}
CascadeClassifier is a cascade classifier class for object detection.
For further details, please see: http://docs.opencv.org/master/d1/de5/classcv_1_1CascadeClassifier.html
func NewCascadeClassifier ¶
func NewCascadeClassifier() CascadeClassifier
NewCascadeClassifier returns a new CascadeClassifier.
func (*CascadeClassifier) Close ¶
func (c *CascadeClassifier) Close() error
Close deletes the CascadeClassifier's pointer.
func (*CascadeClassifier) DetectMultiScale ¶
func (c *CascadeClassifier) DetectMultiScale(img Mat) []image.Rectangle
DetectMultiScale detects objects of different sizes in the input Mat image. The detected objects are returned as a slice of image.Rectangle structs.
For further details, please see: http://docs.opencv.org/master/d1/de5/classcv_1_1CascadeClassifier.html#aaf8181cb63968136476ec4204ffca498
func (*CascadeClassifier) DetectMultiScaleWithParams ¶ added in v0.5.0
func (c *CascadeClassifier) DetectMultiScaleWithParams(img Mat, scale float64, minNeighbors, flags int, minSize, maxSize image.Point) []image.Rectangle
DetectMultiScaleWithParams calls DetectMultiScale but allows setting parameters to values other than just the defaults.
For further details, please see: http://docs.opencv.org/master/d1/de5/classcv_1_1CascadeClassifier.html#aaf8181cb63968136476ec4204ffca498
func (*CascadeClassifier) Load ¶
func (c *CascadeClassifier) Load(name string) bool
Load cascade classifier from a file.
For further details, please see: http://docs.opencv.org/master/d1/de5/classcv_1_1CascadeClassifier.html#a1a5884c8cc749422f9eb77c2471958bc
type ColorConversionCode ¶
type ColorConversionCode int
ColorConversionCode is a color conversion code used on Mat.
For further details, please see: http://docs.opencv.org/master/d7/d1b/group__imgproc__misc.html#ga4e0972be5de079fed4e3a10e24ef5ef0
const ( // ColorBGRToBGRA adds alpha channel to BGR image. ColorBGRToBGRA ColorConversionCode = 0 // ColorRGBToRGBA adds alpha channel to RGB image. ColorRGBToRGBA ColorConversionCode = ColorBGRToBGRA // ColorBGRAToBGR removes alpha channel from BGR image. ColorBGRAToBGR ColorConversionCode = 1 // ColorRGBAToRGB removes alpha channel from RGB image. ColorRGBAToRGB ColorConversionCode = ColorBGRAToBGR // ColorBGRToRGBA converts from BGR to RGB with alpha channel. ColorBGRToRGBA ColorConversionCode = 2 // ColorRGBToBGRA converts from RGB to BGR with alpha channel. ColorRGBToBGRA ColorConversionCode = ColorBGRToRGBA // ColorRGBAToBGR converts from RGB with alpha to BGR color space. ColorRGBAToBGR ColorConversionCode = 3 // ColorBGRAToRGB converts from BRG with alpha to RGB color space. ColorBGRAToRGB ColorConversionCode = ColorRGBAToBGR // ColorBGRToRGB converts from BGR to RGB without alpha channel. ColorBGRToRGB ColorConversionCode = 4 // ColorRGBToBGR converts from RGB to BGR without alpha channel. ColorRGBToBGR ColorConversionCode = ColorBGRToRGB // ColorBGRAToRGBA converts from BGR with alpha channel // to RGB with alpha channel. ColorBGRAToRGBA ColorConversionCode = 5 // ColorRGBAToBGRA converts from RGB with alpha channel // to BGR with alpha channel. ColorRGBAToBGRA ColorConversionCode = ColorBGRAToRGBA // ColorBGRToGray converts from BGR to grayscale. ColorBGRToGray ColorConversionCode = 6 // ColorRGBToGray converts from RGB to grayscale. ColorRGBToGray ColorConversionCode = 7 // ColorGrayToBGR converts from grayscale to BGR. ColorGrayToBGR ColorConversionCode = 8 // ColorGrayToRGB converts from grayscale to RGB. ColorGrayToRGB ColorConversionCode = ColorGrayToBGR // ColorGrayToBGRA converts from grayscale to BGR with alpha channel. ColorGrayToBGRA ColorConversionCode = 9 // ColorGrayToRGBA converts from grayscale to RGB with alpha channel. ColorGrayToRGBA ColorConversionCode = ColorGrayToBGRA // ColorBGRAToGray converts from BGR with alpha channel to grayscale. ColorBGRAToGray ColorConversionCode = 10 // ColorRGBAToGray converts from RGB with alpha channel to grayscale. ColorRGBAToGray ColorConversionCode = 11 // ColorBGRToBGR565 converts from BGR to BGR565 (16-bit images). ColorBGRToBGR565 ColorConversionCode = 12 // ColorRGBToBGR565 converts from RGB to BGR565 (16-bit images). ColorRGBToBGR565 ColorConversionCode = 13 // ColorBGR565ToBGR converts from BGR565 (16-bit images) to BGR. ColorBGR565ToBGR ColorConversionCode = 14 // ColorBGR565ToRGB converts from BGR565 (16-bit images) to RGB. ColorBGR565ToRGB ColorConversionCode = 15 // ColorBGRAToBGR565 converts from BGRA (with alpha channel) // to BGR565 (16-bit images). ColorBGRAToBGR565 ColorConversionCode = 16 // ColorRGBAToBGR565 converts from RGBA (with alpha channel) // to BGR565 (16-bit images). ColorRGBAToBGR565 ColorConversionCode = 17 // ColorBGR565ToBGRA converts from BGR565 (16-bit images) // to BGRA (with alpha channel). ColorBGR565ToBGRA ColorConversionCode = 18 // ColorBGR565ToRGBA converts from BGR565 (16-bit images) // to RGBA (with alpha channel). ColorBGR565ToRGBA ColorConversionCode = 19 // ColorGrayToBGR565 converts from grayscale // to BGR565 (16-bit images). ColorGrayToBGR565 ColorConversionCode = 20 // ColorBGR565ToGray converts from BGR565 (16-bit images) // to grayscale. ColorBGR565ToGray ColorConversionCode = 21 // ColorBGRToBGR555 converts from BGR to BGR555 (16-bit images). ColorBGRToBGR555 ColorConversionCode = 22 // ColorRGBToBGR555 converts from RGB to BGR555 (16-bit images). ColorRGBToBGR555 ColorConversionCode = 23 // ColorBGR555ToBGR converts from BGR555 (16-bit images) to BGR. ColorBGR555ToBGR ColorConversionCode = 24 // ColorBGR555ToRGB converts from BGR555 (16-bit images) to RGB. ColorBGR555ToRGB ColorConversionCode = 25 // ColorBGRAToBGR555 converts from BGRA (with alpha channel) // to BGR555 (16-bit images). ColorBGRAToBGR555 ColorConversionCode = 26 // ColorRGBAToBGR555 converts from RGBA (with alpha channel) // to BGR555 (16-bit images). ColorRGBAToBGR555 ColorConversionCode = 27 // ColorBGR555ToBGRA converts from BGR555 (16-bit images) // to BGRA (with alpha channel). ColorBGR555ToBGRA ColorConversionCode = 28 // ColorBGR555ToRGBA converts from BGR555 (16-bit images) // to RGBA (with alpha channel). ColorBGR555ToRGBA ColorConversionCode = 29 // ColorGrayToBGR555 converts from grayscale to BGR555 (16-bit images). ColorGrayToBGR555 ColorConversionCode = 30 // ColorBGR555ToGRAY converts from BGR555 (16-bit images) to grayscale. ColorBGR555ToGRAY ColorConversionCode = 31 // ColorBGRToXYZ converts from BGR to CIE XYZ. ColorBGRToXYZ ColorConversionCode = 32 // ColorRGBToXYZ converts from RGB to CIE XYZ. ColorRGBToXYZ ColorConversionCode = 33 // ColorXYZToBGR converts from CIE XYZ to BGR. ColorXYZToBGR ColorConversionCode = 34 // ColorXYZToRGB converts from CIE XYZ to RGB. ColorXYZToRGB ColorConversionCode = 35 // ColorBGRToYCrCb converts from BGR to luma-chroma (aka YCC). ColorBGRToYCrCb ColorConversionCode = 36 // ColorRGBToYCrCb converts from RGB to luma-chroma (aka YCC). ColorRGBToYCrCb ColorConversionCode = 37 // ColorYCrCbToBGR converts from luma-chroma (aka YCC) to BGR. ColorYCrCbToBGR ColorConversionCode = 38 // ColorYCrCbToRGB converts from luma-chroma (aka YCC) to RGB. ColorYCrCbToRGB ColorConversionCode = 39 // ColorBGRToHSV converts from BGR to HSV (hue saturation value). ColorBGRToHSV ColorConversionCode = 40 // ColorRGBToHSV converts from RGB to HSV (hue saturation value). ColorRGBToHSV ColorConversionCode = 41 // ColorBGRToLab converts from BGR to CIE Lab. ColorBGRToLab ColorConversionCode = 44 // ColorRGBToLab converts from RGB to CIE Lab. ColorRGBToLab ColorConversionCode = 45 // ColorBGRToLuv converts from BGR to CIE Luv. ColorBGRToLuv ColorConversionCode = 50 // ColorRGBToLuv converts from RGB to CIE Luv. ColorRGBToLuv ColorConversionCode = 51 // ColorBGRToHLS converts from BGR to HLS (hue lightness saturation). ColorBGRToHLS ColorConversionCode = 52 // ColorRGBToHLS converts from RGB to HLS (hue lightness saturation). ColorRGBToHLS ColorConversionCode = 53 // ColorHSVToBGR converts from HSV (hue saturation value) to BGR. ColorHSVToBGR ColorConversionCode = 54 // ColorHSVToRGB converts from HSV (hue saturation value) to RGB. ColorHSVToRGB ColorConversionCode = 55 // ColorLabToBGR converts from CIE Lab to BGR. ColorLabToBGR ColorConversionCode = 56 // ColorLabToRGB converts from CIE Lab to RGB. ColorLabToRGB ColorConversionCode = 57 // ColorLuvToBGR converts from CIE Luv to BGR. ColorLuvToBGR ColorConversionCode = 58 // ColorLuvToRGB converts from CIE Luv to RGB. ColorLuvToRGB ColorConversionCode = 59 // ColorHLSToBGR converts from HLS (hue lightness saturation) to BGR. ColorHLSToBGR ColorConversionCode = 60 // ColorHLSToRGB converts from HLS (hue lightness saturation) to RGB. ColorHLSToRGB ColorConversionCode = 61 // ColorBGRToHSVFull converts from BGR to HSV (hue saturation value) full. ColorBGRToHSVFull ColorConversionCode = 66 // ColorRGBToHSVFull converts from RGB to HSV (hue saturation value) full. ColorRGBToHSVFull ColorConversionCode = 67 // ColorBGRToHLSFull converts from BGR to HLS (hue lightness saturation) full. ColorBGRToHLSFull ColorConversionCode = 68 // ColorRGBToHLSFull converts from RGB to HLS (hue lightness saturation) full. ColorRGBToHLSFull ColorConversionCode = 69 // ColorHSVToBGRFull converts from HSV (hue saturation value) to BGR full. ColorHSVToBGRFull ColorConversionCode = 70 // ColorHSVToRGBFull converts from HSV (hue saturation value) to RGB full. ColorHSVToRGBFull ColorConversionCode = 71 // ColorHLSToBGRFull converts from HLS (hue lightness saturation) to BGR full. ColorHLSToBGRFull ColorConversionCode = 72 // ColorHLSToRGBFull converts from HLS (hue lightness saturation) to RGB full. ColorHLSToRGBFull ColorConversionCode = 73 // ColorLBGRToLab converts from LBGR to CIE Lab. ColorLBGRToLab ColorConversionCode = 74 // ColorLRGBToLab converts from LRGB to CIE Lab. ColorLRGBToLab ColorConversionCode = 75 // ColorLBGRToLuv converts from LBGR to CIE Luv. ColorLBGRToLuv ColorConversionCode = 76 // ColorLRGBToLuv converts from LRGB to CIE Luv. ColorLRGBToLuv ColorConversionCode = 77 // ColorLabToLBGR converts from CIE Lab to LBGR. ColorLabToLBGR ColorConversionCode = 78 // ColorLabToLRGB converts from CIE Lab to LRGB. ColorLabToLRGB ColorConversionCode = 79 // ColorLuvToLBGR converts from CIE Luv to LBGR. ColorLuvToLBGR ColorConversionCode = 80 // ColorLuvToLRGB converts from CIE Luv to LRGB. ColorLuvToLRGB ColorConversionCode = 81 // ColorBGRToYUV converts from BGR to YUV. ColorBGRToYUV ColorConversionCode = 82 // ColorRGBToYUV converts from RGB to YUV. ColorRGBToYUV ColorConversionCode = 83 // ColorYUVToBGR converts from YUV to BGR. ColorYUVToBGR ColorConversionCode = 84 // ColorYUVToRGB converts from YUV to RGB. ColorYUVToRGB ColorConversionCode = 85 // ColorYUVToRGBNV12 converts from YUV 4:2:0 to RGB NV12. ColorYUVToRGBNV12 ColorConversionCode = 90 // ColorYUVToBGRNV12 converts from YUV 4:2:0 to BGR NV12. ColorYUVToBGRNV12 ColorConversionCode = 91 // ColorYUVToRGBNV21 converts from YUV 4:2:0 to RGB NV21. ColorYUVToRGBNV21 ColorConversionCode = 92 // ColorYUVToBGRNV21 converts from YUV 4:2:0 to BGR NV21. ColorYUVToBGRNV21 ColorConversionCode = 93 // ColorYUVToRGBANV12 converts from YUV 4:2:0 to RGBA NV12. ColorYUVToRGBANV12 ColorConversionCode = 94 // ColorYUVToBGRANV12 converts from YUV 4:2:0 to BGRA NV12. ColorYUVToBGRANV12 ColorConversionCode = 95 // ColorYUVToRGBANV21 converts from YUV 4:2:0 to RGBA NV21. ColorYUVToRGBANV21 ColorConversionCode = 96 // ColorYUVToBGRANV21 converts from YUV 4:2:0 to BGRA NV21. ColorYUVToBGRANV21 ColorConversionCode = 97 ColorYUVToRGBYV12 ColorConversionCode = 98 ColorYUVToBGRYV12 ColorConversionCode = 99 ColorYUVToRGBIYUV ColorConversionCode = 100 ColorYUVToBGRIYUV ColorConversionCode = 101 ColorYUVToRGBAYV12 ColorConversionCode = 102 ColorYUVToBGRAYV12 ColorConversionCode = 103 ColorYUVToRGBAIYUV ColorConversionCode = 104 ColorYUVToBGRAIYUV ColorConversionCode = 105 ColorYUVToGRAY420 ColorConversionCode = 106 // YUV 4:2:2 family to RGB ColorYUVToRGBUYVY ColorConversionCode = 107 ColorYUVToBGRUYVY ColorConversionCode = 108 ColorYUVToRGBAUYVY ColorConversionCode = 111 ColorYUVToBGRAUYVY ColorConversionCode = 112 ColorYUVToRGBYUY2 ColorConversionCode = 115 ColorYUVToBGRYUY2 ColorConversionCode = 116 ColorYUVToRGBYVYU ColorConversionCode = 117 ColorYUVToBGRYVYU ColorConversionCode = 118 ColorYUVToRGBAYUY2 ColorConversionCode = 119 ColorYUVToBGRAYUY2 ColorConversionCode = 120 ColorYUVToRGBAYVYU ColorConversionCode = 121 ColorYUVToBGRAYVYU ColorConversionCode = 122 ColorYUVToGRAYUYVY ColorConversionCode = 123 ColorYUVToGRAYYUY2 ColorConversionCode = 124 // alpha premultiplication ColorRGBATomRGBA ColorConversionCode = 125 ColormRGBAToRGBA ColorConversionCode = 126 // RGB to YUV 4:2:0 family ColorRGBToYUVI420 ColorConversionCode = 127 ColorBGRToYUVI420 ColorConversionCode = 128 ColorRGBAToYUVI420 ColorConversionCode = 129 ColorBGRAToYUVI420 ColorConversionCode = 130 ColorRGBToYUVYV12 ColorConversionCode = 131 ColorBGRToYUVYV12 ColorConversionCode = 132 ColorRGBAToYUVYV12 ColorConversionCode = 133 ColorBGRAToYUVYV12 ColorConversionCode = 134 // Demosaicing ColorBayerBGToBGR ColorConversionCode = 46 ColorBayerGBToBGR ColorConversionCode = 47 ColorBayerRGToBGR ColorConversionCode = 48 ColorBayerGRToBGR ColorConversionCode = 49 ColorBayerBGToRGB ColorConversionCode = ColorBayerRGToBGR ColorBayerGBToRGB ColorConversionCode = ColorBayerGRToBGR ColorBayerRGToRGB ColorConversionCode = ColorBayerBGToBGR ColorBayerGRToRGB ColorConversionCode = ColorBayerGBToBGR ColorBayerBGToGRAY ColorConversionCode = 86 ColorBayerGBToGRAY ColorConversionCode = 87 ColorBayerRGToGRAY ColorConversionCode = 88 ColorBayerGRToGRAY ColorConversionCode = 89 // Demosaicing using Variable Number of Gradients ColorBayerBGToBGRVNG ColorConversionCode = 62 ColorBayerGBToBGRVNG ColorConversionCode = 63 ColorBayerRGToBGRVNG ColorConversionCode = 64 ColorBayerGRToBGRVNG ColorConversionCode = 65 ColorBayerBGToRGBVNG ColorConversionCode = ColorBayerRGToBGRVNG ColorBayerGBToRGBVNG ColorConversionCode = ColorBayerGRToBGRVNG ColorBayerRGToRGBVNG ColorConversionCode = ColorBayerBGToBGRVNG ColorBayerGRToRGBVNG ColorConversionCode = ColorBayerGBToBGRVNG // Edge-Aware Demosaicing ColorBayerBGToBGREA ColorConversionCode = 135 ColorBayerGBToBGREA ColorConversionCode = 136 ColorBayerRGToBGREA ColorConversionCode = 137 ColorBayerGRToBGREA ColorConversionCode = 138 ColorBayerBGToRGBEA ColorConversionCode = ColorBayerRGToBGREA ColorBayerGBToRGBEA ColorConversionCode = ColorBayerGRToBGREA ColorBayerRGToRGBEA ColorConversionCode = ColorBayerBGToBGREA ColorBayerGRToRGBEA ColorConversionCode = ColorBayerGBToBGREA // Demosaicing with alpha channel ColorBayerBGToBGRA ColorConversionCode = 139 ColorBayerGBToBGRA ColorConversionCode = 140 ColorBayerRGToBGRA ColorConversionCode = 141 ColorBayerGRToBGRA ColorConversionCode = 142 ColorBayerBGToRGBA ColorConversionCode = ColorBayerRGToBGRA ColorBayerGBToRGBA ColorConversionCode = ColorBayerGRToBGRA ColorBayerRGToRGBA ColorConversionCode = ColorBayerBGToBGRA ColorBayerGRToRGBA ColorConversionCode = ColorBayerGBToBGRA ColorCOLORCVTMAX ColorConversionCode = 143 )
func (ColorConversionCode) String ¶ added in v0.22.0
func (c ColorConversionCode) String() string
type ColormapTypes ¶ added in v0.8.0
type ColormapTypes int
ColormapTypes are the 12 GNU Octave/MATLAB equivalent colormaps.
For further details, please see: https://docs.opencv.org/master/d3/d50/group__imgproc__colormap.html
const ( ColormapAutumn ColormapTypes = 0 ColormapBone ColormapTypes = 1 ColormapJet ColormapTypes = 2 ColormapWinter ColormapTypes = 3 ColormapRainbow ColormapTypes = 4 ColormapOcean ColormapTypes = 5 ColormapSummer ColormapTypes = 6 ColormapSpring ColormapTypes = 7 ColormapCool ColormapTypes = 8 ColormapHsv ColormapTypes = 9 ColormapPink ColormapTypes = 10 ColormapHot ColormapTypes = 11 ColormapParula ColormapTypes = 12 )
List of the available color maps
For further details, please see: https://docs.opencv.org/master/d3/d50/group__imgproc__colormap.html#ga9a805d8262bcbe273f16be9ea2055a65
func (ColormapTypes) String ¶ added in v0.22.0
func (c ColormapTypes) String() string
type CompareType ¶ added in v0.16.0
type CompareType int
CompareType is used for Compare operations to indicate which kind of comparison to use.
const ( // CompareEQ src1 is equal to src2. CompareEQ CompareType = 0 // CompareGT src1 is greater than src2. CompareGT CompareType = 1 // CompareGE src1 is greater than or equal to src2. CompareGE CompareType = 2 // CompareLT src1 is less than src2. CompareLT CompareType = 3 // CompareLE src1 is less than or equal to src2. CompareLE CompareType = 4 // CompareNE src1 is unequal to src2. CompareNE CompareType = 5 )
func (CompareType) String ¶ added in v0.22.0
func (c CompareType) String() string
type ConnectedComponentsAlgorithmType ¶ added in v0.19.0
type ConnectedComponentsAlgorithmType int
ConnectedComponentsAlgorithmType specifies the type for ConnectedComponents
const ( // SAUF algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. CCL_WU ConnectedComponentsAlgorithmType = 0 // BBDT algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. CCL_DEFAULT ConnectedComponentsAlgorithmType = 1 // BBDT algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity CCL_GRANA ConnectedComponentsAlgorithmType = 2 )
func (ConnectedComponentsAlgorithmType) String ¶ added in v0.22.0
func (c ConnectedComponentsAlgorithmType) String() string
type ConnectedComponentsTypes ¶ added in v0.19.0
type ConnectedComponentsTypes int
ConnectedComponentsTypes are the connected components algorithm output formats
const ( //The leftmost (x) coordinate which is the inclusive start of the bounding box in the horizontal direction. CC_STAT_LEFT ConnectedComponentsTypes = 0 //The topmost (y) coordinate which is the inclusive start of the bounding box in the vertical direction. CC_STAT_TOP ConnectedComponentsTypes = 1 // The horizontal size of the bounding box. CC_STAT_WIDTH ConnectedComponentsTypes = 2 // The vertical size of the bounding box. CC_STAT_HEIGHT ConnectedComponentsTypes = 3 // The total area (in pixels) of the connected component. CC_STAT_AREA ConnectedComponentsTypes = 4 CC_STAT_MAX ConnectedComponentsTypes = 5 )
func (ConnectedComponentsTypes) String ¶ added in v0.22.0
func (c ConnectedComponentsTypes) String() string
type ContourApproximationMode ¶ added in v0.4.1
type ContourApproximationMode int
ContourApproximationMode is the mode of the contour approximation algorithm.
const ( // ChainApproxNone stores absolutely all the contour points. That is, // any 2 subsequent points (x1,y1) and (x2,y2) of the contour will be // either horizontal, vertical or diagonal neighbors, that is, // max(abs(x1-x2),abs(y2-y1))==1. ChainApproxNone ContourApproximationMode = 1 // ChainApproxSimple compresses horizontal, vertical, and diagonal segments // and leaves only their end points. // For example, an up-right rectangular contour is encoded with 4 points. ChainApproxSimple ContourApproximationMode = 2 // ChainApproxTC89L1 applies one of the flavors of the Teh-Chin chain // approximation algorithms. ChainApproxTC89L1 ContourApproximationMode = 3 // ChainApproxTC89KCOS applies one of the flavors of the Teh-Chin chain // approximation algorithms. ChainApproxTC89KCOS ContourApproximationMode = 4 )
func (ContourApproximationMode) String ¶ added in v0.22.0
func (c ContourApproximationMode) String() string
type CovarFlags ¶ added in v0.16.0
type CovarFlags int
CovarFlags are the covariation flags used by functions such as BorderInterpolate.
For further details, please see: https://docs.opencv.org/master/d0/de1/group__core.html#ga719ebd4a73f30f4fab258ab7616d0f0f
const ( // CovarScrambled indicates to scramble the results. CovarScrambled CovarFlags = 0 // CovarNormal indicates to use normal covariation. CovarNormal CovarFlags = 1 // CovarUseAvg indicates to use average covariation. CovarUseAvg CovarFlags = 2 // CovarScale indicates to use scaled covariation. CovarScale CovarFlags = 4 // CovarRows indicates to use covariation on rows. CovarRows CovarFlags = 8 // CovarCols indicates to use covariation on columns. CovarCols CovarFlags = 16 )
func (CovarFlags) String ¶ added in v0.22.0
func (c CovarFlags) String() string
type DMatch ¶ added in v0.16.0
DMatch is data structure for matching keypoint descriptors.
For further details, please see: https://docs.opencv.org/master/d4/de0/classcv_1_1DMatch.html#a546ddb9a87898f06e510e015a6de596e
type DataLayoutType ¶ added in v0.38.0
type DataLayoutType int
const ( DataLayoutUnknown DataLayoutType = iota DataLayoutND DataLayoutNCHW DataLayoutNCDHW DataLayoutNHWC DataLayoutNDHWC DataLayoutPLANAR )
type DftFlags ¶ added in v0.16.0
type DftFlags int
DftFlags represents a DFT or DCT flag.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gaf4dde112b483b38175621befedda1f1c
const ( // DftForward performs forward 1D or 2D dft or dct. DftForward DftFlags = 0 // DftInverse performs an inverse 1D or 2D transform. DftInverse DftFlags = 1 // DftScale scales the result: divide it by the number of array elements. Normally, it is combined with DFT_INVERSE. DftScale DftFlags = 2 // DftRows performs a forward or inverse transform of every individual row of the input matrix. DftRows DftFlags = 4 // DftComplexOutput performs a forward transformation of 1D or 2D real array; the result, though being a complex array, has complex-conjugate symmetry DftComplexOutput DftFlags = 16 // DftRealOutput performs an inverse transformation of a 1D or 2D complex array; the result is normally a complex array of the same size, // however, if the input array has conjugate-complex symmetry (for example, it is a result of forward transformation with DFT_COMPLEX_OUTPUT flag), // the output is a real array. DftRealOutput DftFlags = 32 // DftComplexInput specifies that input is complex input. If this flag is set, the input must have 2 channels. DftComplexInput DftFlags = 64 // DctInverse performs an inverse 1D or 2D dct transform. DctInverse = DftInverse // DctRows performs a forward or inverse dct transform of every individual row of the input matrix. DctRows = DftRows )
type DistanceTransformLabelTypes ¶ added in v0.21.0
type DistanceTransformLabelTypes int
DistanceTransformLabelTypes are the types of the DistanceTransform algorithm flag
const ( // DistanceLabelCComp assigns the same label to each connected component of zeros in the source image // (as well as all the non-zero pixels closest to the connected component). DistanceLabelCComp DistanceTransformLabelTypes = 0 // DistanceLabelPixel assigns its own label to each zero pixel (and all the non-zero pixels closest to it). DistanceLabelPixel )
func (DistanceTransformLabelTypes) String ¶ added in v0.22.0
func (c DistanceTransformLabelTypes) String() string
type DistanceTransformMasks ¶ added in v0.21.0
type DistanceTransformMasks int
DistanceTransformMasks are the marsk sizes for distance transform
const ( // DistanceMask3 is a mask of size 3 DistanceMask3 DistanceTransformMasks = 0 // DistanceMask5 is a mask of size 3 DistanceMask5 // DistanceMaskPrecise is not currently supported DistanceMaskPrecise )
func (DistanceTransformMasks) String ¶ added in v0.22.0
func (c DistanceTransformMasks) String() string
type DistanceTypes ¶ added in v0.17.0
type DistanceTypes int
DistanceTypes types for Distance Transform and M-estimatorss
For further details, please see: https://docs.opencv.org/master/d7/d1b/group__imgproc__misc.html#gaa2bfbebbc5c320526897996aafa1d8eb
const ( DistUser DistanceTypes = 0 DistL1 DistanceTypes = 1 DistL2 DistanceTypes = 2 DistC DistanceTypes = 3 DistL12 DistanceTypes = 4 DistFair DistanceTypes = 5 DistWelsch DistanceTypes = 6 DistHuber DistanceTypes = 7 )
func (DistanceTypes) String ¶ added in v0.22.0
func (c DistanceTypes) String() string
type DrawMatchesFlag ¶ added in v0.16.0
type DrawMatchesFlag int
DrawMatchesFlag are the flags setting drawing feature
For further details please see: https://docs.opencv.org/master/de/d30/structcv_1_1DrawMatchesFlags.html
const ( // DrawDefault creates new image and for each keypoint only the center point will be drawn DrawDefault DrawMatchesFlag = 0 // DrawOverOutImg draws matches on existing content of image DrawOverOutImg DrawMatchesFlag = 1 // NotDrawSinglePoints will not draw single points NotDrawSinglePoints DrawMatchesFlag = 2 // DrawRichKeyPoints draws the circle around each keypoint with keypoint size and orientation DrawRichKeyPoints DrawMatchesFlag = 3 )
func (DrawMatchesFlag) String ¶ added in v0.22.0
func (c DrawMatchesFlag) String() string
type EdgeFilter ¶ added in v0.30.0
type EdgeFilter int
const ( // RecursFilter Recursive Filtering. RecursFilter EdgeFilter = 1 // NormconvFilter Normalized Convolution Filtering. NormconvFilter = 2 )
type FaceDetectorYN ¶ added in v0.39.0
type FaceDetectorYN struct {
// contains filtered or unexported fields
}
func NewFaceDetectorYN ¶ added in v0.39.0
func NewFaceDetectorYN(modelPath string, configPath string, size image.Point) FaceDetectorYN
NewFaceDetectorYN Creates an instance of face detector with given parameters.
modelPath: the path to the requested model
configPath: the path to the config file for compability, which is not requested for ONNX models
size: the size of the input image
For further details, please see: https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#a5f7fb43c60c95ca5ebab78483de02516
func NewFaceDetectorYNFromBytes ¶ added in v0.39.0
func NewFaceDetectorYNFromBytes(framework string, bufferModel []byte, bufferConfig []byte, size image.Point) FaceDetectorYN
NewFaceDetectorYNFromBytes Creates an instance of face detector with given parameters.
For further details, please see: https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#aa0796a4bfe2d4709bef81abbae9a927a
func NewFaceDetectorYNFromBytesWithParams ¶ added in v0.39.0
func NewFaceDetectorYNFromBytesWithParams(framework string, bufferModel []byte, bufferConfig []byte, size image.Point, scoreThreshold float32, nmsThreshold float32, topK int, backendId int, targetId int) FaceDetectorYN
NewFaceDetectorYNFromBuffers Creates an instance of face detector with given parameters.
For further details, please see: https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#aa0796a4bfe2d4709bef81abbae9a927a
func NewFaceDetectorYNWithParams ¶ added in v0.39.0
func NewFaceDetectorYNWithParams(modelPath string, configPath string, size image.Point, scoreThreshold float32, nmsThreshold float32, topK int, backendId int, targetId int) FaceDetectorYN
NewFaceDetectorYNWithParams Creates an instance of face detector with given parameters.
For further details, please see: https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#a5f7fb43c60c95ca5ebab78483de02516
func (*FaceDetectorYN) Close ¶ added in v0.39.0
func (fd *FaceDetectorYN) Close()
func (*FaceDetectorYN) Detect ¶ added in v0.39.0
func (fd *FaceDetectorYN) Detect(image Mat, faces *Mat) int
Detect Detects faces in the input image.
image: an image to detect
faces: detection results stored in a 2D cv::Mat of shape [num_faces, 15]
0-1: x, y of bbox top left corner
2-3: width, height of bbox
4-5: x, y of right eye (blue point in the example image)
6-7: x, y of left eye (red point in the example image)
8-9: x, y of nose tip (green point in the example image)
10-11: x, y of right corner of mouth (pink point in the example image)
12-13: x, y of left corner of mouth (yellow point in the example image)
14: face score
For further details, please see: https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#ac05bd075ca3e6edc0e328927aae6f45b
func (*FaceDetectorYN) GetInputSize ¶ added in v0.39.0
func (fd *FaceDetectorYN) GetInputSize() image.Point
func (*FaceDetectorYN) GetNMSThreshold ¶ added in v0.39.0
func (fd *FaceDetectorYN) GetNMSThreshold() float32
func (*FaceDetectorYN) GetScoreThreshold ¶ added in v0.39.0
func (fd *FaceDetectorYN) GetScoreThreshold() float32
func (*FaceDetectorYN) GetTopK ¶ added in v0.39.0
func (fd *FaceDetectorYN) GetTopK() int
func (*FaceDetectorYN) SetInputSize ¶ added in v0.39.0
func (fd *FaceDetectorYN) SetInputSize(sz image.Point)
SetInputSize Set the size for the network input, which overwrites the input size of creating model. Call this method when the size of input image does not match the input size when creating model.
For further details, please see: https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#a072418e5ce7beeb69c41edda75c41d2e
func (*FaceDetectorYN) SetNMSThreshold ¶ added in v0.39.0
func (fd *FaceDetectorYN) SetNMSThreshold(nmsThreshold float32)
SetNMSThreshold Set the Non-maximum-suppression threshold to suppress bounding boxes that have IoU greater than the given value.
For further details, please see: https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#ab6011efee7e12dca3857d82de5269ac5
func (*FaceDetectorYN) SetScoreThreshold ¶ added in v0.39.0
func (fd *FaceDetectorYN) SetScoreThreshold(scoreThreshold float32)
SetScoreThreshold Set the score threshold to filter out bounding boxes of score less than the given value.
For further details, please see: https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#a37f3c23b82158fac7fdad967d315f85a
func (*FaceDetectorYN) SetTopK ¶ added in v0.39.0
func (fd *FaceDetectorYN) SetTopK(topK int)
SetTopK Set the number of bounding boxes preserved before NMS.
For further details, please see: https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#aa88d20e1e2df75ea36b851534089856a
type FaceRecognizerSF ¶ added in v0.39.0
type FaceRecognizerSF struct {
// contains filtered or unexported fields
}
func NewFaceRecognizerSF ¶ added in v0.39.0
func NewFaceRecognizerSF(modelPath string, configPath string) FaceRecognizerSF
NewFaceRecognizerSF Creates an instance with given parameters.
model: the path of the onnx model used for face recognition
config: the path to the config file for compability, which is not requested for ONNX models
For further details, please see: https://docs.opencv.org/4.x/da/d09/classcv_1_1FaceRecognizerSF.html#a04df90b0cd7d26d350acd92621a35743
func NewFaceRecognizerSFWithParams ¶ added in v0.39.0
func NewFaceRecognizerSFWithParams(modelPath string, configPath string, backendId int, targetId int) FaceRecognizerSF
NewFaceRecognizerSFWithParams Creates an instance with given parameters.
model: the path of the onnx model used for face recognition
config: the path to the config file for compability, which is not requested for ONNX models
backend_id: the id of backend
target_id: the id of target device
For further details, please see: https://docs.opencv.org/4.x/da/d09/classcv_1_1FaceRecognizerSF.html#a04df90b0cd7d26d350acd92621a35743
func (*FaceRecognizerSF) AlignCrop ¶ added in v0.39.0
func (fr *FaceRecognizerSF) AlignCrop(srcImg Mat, faceBox Mat, alignedImg *Mat)
AlignCrop Aligns detected face with the source input image and crops it.
srcImg: input image
faceBox: the detected face result from the input image
alignedImg: output aligned image
For further details, please see: https://docs.opencv.org/4.x/da/d09/classcv_1_1FaceRecognizerSF.html#a84492908abecbc9362b4ddc8d46b8345
func (*FaceRecognizerSF) Close ¶ added in v0.39.0
func (fr *FaceRecognizerSF) Close()
Close Releases FaceRecognizerSF resources.
func (*FaceRecognizerSF) Feature ¶ added in v0.39.0
func (fr *FaceRecognizerSF) Feature(alignedImg Mat, faceFeature *Mat)
Feature Extracts face feature from aligned image.
alignedImg: input aligned image
faceFeature: output face feature
For further details, please see: https://docs.opencv.org/4.x/da/d09/classcv_1_1FaceRecognizerSF.html#ab1b4a3c12213e89091a490c573dc5aba
func (*FaceRecognizerSF) Match ¶ added in v0.39.0
func (fr *FaceRecognizerSF) Match(faceFeature1 Mat, faceFeature2 Mat) float32
Match Calculates the distance between two face features.
faceFeature1: the first input feature
faceFeature2: the second input feature of the same size and the same type as face_feature1
For further details, please see: https://docs.opencv.org/4.x/da/d09/classcv_1_1FaceRecognizerSF.html#a2f0362ca1e64320a1f3ba7e1386d0219
func (*FaceRecognizerSF) MatchWithParams ¶ added in v0.39.0
func (fr *FaceRecognizerSF) MatchWithParams(faceFeature1 Mat, faceFeature2 Mat, disType FaceRecognizerSFDisType) float32
MatchWithParams Calculates the distance between two face features.
faceFeature1: the first input feature
faceFeature2: the second input feature of the same size and the same type as face_feature1
disType: defines how to calculate the distance between two face features
For further details, please see: https://docs.opencv.org/4.x/da/d09/classcv_1_1FaceRecognizerSF.html#a2f0362ca1e64320a1f3ba7e1386d0219
type FaceRecognizerSFDisType ¶ added in v0.39.0
type FaceRecognizerSFDisType int
const ( FaceRecognizerSFDisTypeCosine FaceRecognizerSFDisType = 0 FaceRecognizerSFDisTypeNormL2 FaceRecognizerSFDisType = 1 )
type FastFeatureDetector ¶ added in v0.6.0
type FastFeatureDetector struct {
// contains filtered or unexported fields
}
FastFeatureDetector is a wrapper around the cv::FastFeatureDetector.
func NewFastFeatureDetector ¶ added in v0.6.0
func NewFastFeatureDetector() FastFeatureDetector
NewFastFeatureDetector returns a new FastFeatureDetector algorithm
For further details, please see: https://docs.opencv.org/master/df/d74/classcv_1_1FastFeatureDetector.html
func NewFastFeatureDetectorWithParams ¶ added in v0.20.0
func NewFastFeatureDetectorWithParams(threshold int, nonmaxSuppression bool, typ FastFeatureDetectorType) FastFeatureDetector
NewFastFeatureDetectorWithParams returns a new FastFeatureDetector algorithm with parameters
For further details, please see: https://docs.opencv.org/master/df/d74/classcv_1_1FastFeatureDetector.html#ab986f2ff8f8778aab1707e2642bc7f8e
func (*FastFeatureDetector) Close ¶ added in v0.6.0
func (f *FastFeatureDetector) Close() error
Close FastFeatureDetector.
func (*FastFeatureDetector) Detect ¶ added in v0.6.0
func (f *FastFeatureDetector) Detect(src Mat) []KeyPoint
Detect keypoints in an image using FastFeatureDetector.
For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#aa4e9a7082ec61ebc108806704fbd7887
type FastFeatureDetectorType ¶ added in v0.20.0
type FastFeatureDetectorType int
FastFeatureDetectorType defines the detector type
For further details, please see: https://docs.opencv.org/master/df/d74/classcv_1_1FastFeatureDetector.html#a4654f6fb0aa4b8e9123b223bfa0e2a08
const ( //FastFeatureDetectorType58 is an alias of FastFeatureDetector::TYPE_5_8 FastFeatureDetectorType58 FastFeatureDetectorType = 0 //FastFeatureDetectorType712 is an alias of FastFeatureDetector::TYPE_7_12 FastFeatureDetectorType712 FastFeatureDetectorType = 1 //FastFeatureDetectorType916 is an alias of FastFeatureDetector::TYPE_9_16 FastFeatureDetectorType916 FastFeatureDetectorType = 2 )
func (FastFeatureDetectorType) String ¶ added in v0.22.0
func (c FastFeatureDetectorType) String() string
type Feature2D ¶ added in v0.36.0
type Feature2D interface { io.Closer Feature2DDetector Feature2DComputer Feature2DDetectComputer }
type Feature2DComputer ¶ added in v0.36.0
type Feature2DDetectComputer ¶ added in v0.36.0
type Feature2DDetector ¶ added in v0.36.0
type FileNode ¶ added in v0.38.0
type FileNode struct {
// contains filtered or unexported fields
}
FileNode is a wrapper for the OpenCV FileNode class
Ref: https://docs.opencv.org/4.x/de/dd9/classcv_1_1FileNode.html
type FileNodeType ¶ added in v0.38.0
type FileNodeType int
const ( FileNodeTypeNone FileNodeType = 0 FileNodeTypeInt FileNodeType = 1 FileNodeTypeReal FileNodeType = 2 FileNodeTypeFloat FileNodeType = FileNodeTypeReal FileNodeTypeStr FileNodeType = 3 FileNodeTypeString FileNodeType = FileNodeTypeStr FileNodeTypeSeq FileNodeType = 4 FileNodeTypeMap FileNodeType = 5 FileNodeTypeTypeMask FileNodeType = 7 FileNodeTypeFlow FileNodeType = 8 FileNodeTypeUniform FileNodeType = 8 FileNodeTypeEmpty FileNodeType = 16 FileNodeTypeNamed FileNodeType = 32 )
type FileStorage ¶ added in v0.38.0
type FileStorage struct {
// contains filtered or unexported fields
}
FileStorage is a wrapper for the OpenCV FileStorage class
Ref: https://docs.opencv.org/4.x/da/d56/classcv_1_1FileStorage.html
func NewFileStorage ¶ added in v0.38.0
func NewFileStorage() *FileStorage
func NewFileStorageWithParams ¶ added in v0.38.0
func NewFileStorageWithParams(filename string, flags FileStorageMode, encoding string) *FileStorage
func (*FileStorage) Close ¶ added in v0.38.0
func (fs *FileStorage) Close()
func (*FileStorage) ElName ¶ added in v0.38.0
func (fs *FileStorage) ElName() string
func (*FileStorage) EndWriteStruct ¶ added in v0.38.0
func (fs *FileStorage) EndWriteStruct()
func (*FileStorage) GetFirstTopLevelNode ¶ added in v0.38.0
func (fs *FileStorage) GetFirstTopLevelNode() *FileNode
func (*FileStorage) GetFormat ¶ added in v0.38.0
func (fs *FileStorage) GetFormat() FileStorageMode
func (*FileStorage) GetNode ¶ added in v0.38.0
func (fs *FileStorage) GetNode(name string) *FileNode
func (*FileStorage) IsOpened ¶ added in v0.38.0
func (fs *FileStorage) IsOpened() bool
func (*FileStorage) Open ¶ added in v0.38.0
func (fs *FileStorage) Open(filename string, flags FileStorageMode, encoding string) bool
func (*FileStorage) Release ¶ added in v0.38.0
func (fs *FileStorage) Release()
func (*FileStorage) ReleaseAndGetString ¶ added in v0.38.0
func (fs *FileStorage) ReleaseAndGetString() string
func (*FileStorage) Root ¶ added in v0.38.0
func (fs *FileStorage) Root(streamIdx int) *FileNode
func (*FileStorage) StartWriteStruct ¶ added in v0.38.0
func (fs *FileStorage) StartWriteStruct(name string, flags FileNodeType, typeName string)
func (*FileStorage) State ¶ added in v0.38.0
func (fs *FileStorage) State() FileStorageState
func (*FileStorage) WriteComment ¶ added in v0.38.0
func (fs *FileStorage) WriteComment(comment string, append bool)
func (*FileStorage) WriteDouble ¶ added in v0.38.0
func (fs *FileStorage) WriteDouble(name string, val float32)
func (*FileStorage) WriteInt ¶ added in v0.38.0
func (fs *FileStorage) WriteInt(name string, val int)
func (*FileStorage) WriteMat ¶ added in v0.38.0
func (fs *FileStorage) WriteMat(name string, mat Mat)
func (*FileStorage) WriteRaw ¶ added in v0.38.0
func (fs *FileStorage) WriteRaw(fmt string, vec []byte)
func (*FileStorage) WriteString ¶ added in v0.38.0
func (fs *FileStorage) WriteString(name string, val string)
func (*FileStorage) WriteStringArray ¶ added in v0.38.0
func (fs *FileStorage) WriteStringArray(name string, val []string)
type FileStorageMode ¶ added in v0.38.0
type FileStorageMode int
const ( FileStorageModeRead FileStorageMode = 0 FileStorageModeWrite FileStorageMode = 1 FileStorageModeAppend FileStorageMode = 2 FileStorageModeMemory FileStorageMode = 4 FileStorageModeFormatMask FileStorageMode = (7 << 3) FileStorageModeFormatAuto FileStorageMode = 0 FileStorageModeFormatXml FileStorageMode = (1 << 3) FileStorageModeFormatYaml FileStorageMode = (2 << 3) FileStorageModeFormatJson FileStorageMode = (3 << 3) FileStorageModeBase64 FileStorageMode = 64 FileStorageModeWriteBase64 FileStorageMode = FileStorageModeBase64 | FileStorageModeWrite )
type FileStorageState ¶ added in v0.38.0
type FileStorageState int
const ( FileStorageStateUndefined FileStorageState = 0 FileStorageStateValueExpected FileStorageState = 1 FileStorageStateNameExpected FileStorageState = 2 FileStorageStateInsideMap FileStorageState = 4 )
type FlannBasedMatcher ¶ added in v0.25.0
type FlannBasedMatcher struct {
// contains filtered or unexported fields
}
FlannBasedMatcher is a wrapper around the the cv::FlannBasedMatcher algorithm
func NewFlannBasedMatcher ¶ added in v0.25.0
func NewFlannBasedMatcher() FlannBasedMatcher
NewFlannBasedMatcher returns a new FlannBasedMatcher
For further details, please see: https://docs.opencv.org/master/dc/de2/classcv_1_1FlannBasedMatcher.html#ab9114a6471e364ad221f89068ca21382
func (*FlannBasedMatcher) Close ¶ added in v0.25.0
func (f *FlannBasedMatcher) Close() error
Close FlannBasedMatcher
func (*FlannBasedMatcher) KnnMatch ¶ added in v0.25.0
func (f *FlannBasedMatcher) KnnMatch(query, train Mat, k int) [][]DMatch
KnnMatch Finds the k best matches for each descriptor from a query set.
For further details, please see: https://docs.opencv.org/master/db/d39/classcv_1_1DescriptorMatcher.html#aa880f9353cdf185ccf3013e08210483a
type GFTTDetector ¶ added in v0.8.0
type GFTTDetector struct {
// contains filtered or unexported fields
}
GFTTDetector is a wrapper around the cv::GFTTDetector algorithm.
func NewGFTTDetector ¶ added in v0.8.0
func NewGFTTDetector() GFTTDetector
NewGFTTDetector returns a new GFTTDetector algorithm
For further details, please see: https://docs.opencv.org/master/df/d21/classcv_1_1GFTTDetector.html
func (*GFTTDetector) Close ¶ added in v0.8.0
func (a *GFTTDetector) Close() error
Close GFTTDetector.
func (*GFTTDetector) Detect ¶ added in v0.8.0
func (a *GFTTDetector) Detect(src Mat) []KeyPoint
Detect keypoints in an image using GFTTDetector.
For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#aa4e9a7082ec61ebc108806704fbd7887
type GrabCutMode ¶ added in v0.21.0
type GrabCutMode int
GrabCutMode is the flag for GrabCut algorithm.
const ( // GCInitWithRect makes the function initialize the state and the mask using the provided rectangle. // After that it runs the itercount iterations of the algorithm. GCInitWithRect GrabCutMode = 0 // GCInitWithMask makes the function initialize the state using the provided mask. // GCInitWithMask and GCInitWithRect can be combined. // Then all the pixels outside of the ROI are automatically initialized with GC_BGD. GCInitWithMask GrabCutMode = 1 // GCEval means that the algorithm should just resume. GCEval GrabCutMode = 2 // GCEvalFreezeModel means that the algorithm should just run a single iteration of the GrabCut algorithm // with the fixed model GCEvalFreezeModel GrabCutMode = 3 )
func (GrabCutMode) String ¶ added in v0.22.0
func (c GrabCutMode) String() string
type HOGDescriptor ¶ added in v0.3.0
type HOGDescriptor struct {
// contains filtered or unexported fields
}
HOGDescriptor is a Histogram Of Gradiants (HOG) for object detection.
For further details, please see: https://docs.opencv.org/master/d5/d33/structcv_1_1HOGDescriptor.html#a723b95b709cfd3f95cf9e616de988fc8
func NewHOGDescriptor ¶ added in v0.3.0
func NewHOGDescriptor() HOGDescriptor
NewHOGDescriptor returns a new HOGDescriptor.
func (*HOGDescriptor) Close ¶ added in v0.3.0
func (h *HOGDescriptor) Close() error
Close deletes the HOGDescriptor's pointer.
func (*HOGDescriptor) DetectMultiScale ¶ added in v0.3.0
func (h *HOGDescriptor) DetectMultiScale(img Mat) []image.Rectangle
DetectMultiScale detects objects in the input Mat image. The detected objects are returned as a slice of image.Rectangle structs.
For further details, please see: https://docs.opencv.org/master/d5/d33/structcv_1_1HOGDescriptor.html#a660e5cd036fd5ddf0f5767b352acd948
func (*HOGDescriptor) DetectMultiScaleWithParams ¶ added in v0.5.0
func (h *HOGDescriptor) DetectMultiScaleWithParams(img Mat, hitThresh float64, winStride, padding image.Point, scale, finalThreshold float64, useMeanshiftGrouping bool) []image.Rectangle
DetectMultiScaleWithParams calls DetectMultiScale but allows setting parameters to values other than just the defaults.
For further details, please see: https://docs.opencv.org/master/d5/d33/structcv_1_1HOGDescriptor.html#a660e5cd036fd5ddf0f5767b352acd948
func (*HOGDescriptor) SetSVMDetector ¶ added in v0.3.0
func (h *HOGDescriptor) SetSVMDetector(det Mat) error
SetSVMDetector sets the data for the HOGDescriptor.
For further details, please see: https://docs.opencv.org/master/d5/d33/structcv_1_1HOGDescriptor.html#a09e354ad701f56f9c550dc0385dc36f1
type HersheyFont ¶
type HersheyFont int
HersheyFont are the font libraries included in OpenCV. Only a subset of the available Hershey fonts are supported by OpenCV.
For more information, see: http://sources.isc.org/utils/misc/hershey-font.txt
const ( // FontHersheySimplex is normal size sans-serif font. FontHersheySimplex HersheyFont = 0 // FontHersheyPlain issmall size sans-serif font. FontHersheyPlain HersheyFont = 1 // FontHersheyDuplex normal size sans-serif font // (more complex than FontHersheySIMPLEX). FontHersheyDuplex HersheyFont = 2 // FontHersheyComplex i a normal size serif font. FontHersheyComplex HersheyFont = 3 // FontHersheyTriplex is a normal size serif font // (more complex than FontHersheyCOMPLEX). FontHersheyTriplex HersheyFont = 4 // FontHersheyComplexSmall is a smaller version of FontHersheyCOMPLEX. FontHersheyComplexSmall HersheyFont = 5 // FontHersheyScriptSimplex is a hand-writing style font. FontHersheyScriptSimplex HersheyFont = 6 // FontHersheyScriptComplex is a more complex variant of FontHersheyScriptSimplex. FontHersheyScriptComplex HersheyFont = 7 // FontItalic is the flag for italic font. FontItalic HersheyFont = 16 )
func (HersheyFont) String ¶ added in v0.22.0
func (c HersheyFont) String() string
type HistCompMethod ¶ added in v0.21.0
type HistCompMethod int
HistCompMethod is the method for Histogram comparison For more information, see https://docs.opencv.org/master/d6/dc7/group__imgproc__hist.html#ga994f53817d621e2e4228fc646342d386
const ( // HistCmpCorrel calculates the Correlation HistCmpCorrel HistCompMethod = 0 // HistCmpChiSqr calculates the Chi-Square HistCmpChiSqr HistCompMethod = 1 // HistCmpIntersect calculates the Intersection HistCmpIntersect HistCompMethod = 2 // HistCmpBhattacharya applies the HistCmpBhattacharya by calculating the Bhattacharya distance. HistCmpBhattacharya HistCompMethod = 3 // HistCmpHellinger applies the HistCmpBhattacharya comparison. It is a synonym to HistCmpBhattacharya. HistCmpHellinger = HistCmpBhattacharya // HistCmpChiSqrAlt applies the Alternative Chi-Square (regularly used for texture comparsion). HistCmpChiSqrAlt HistCompMethod = 4 // HistCmpKlDiv applies the Kullback-Liebler divergence comparison. HistCmpKlDiv HistCompMethod = 5 )
func (HistCompMethod) String ¶ added in v0.22.0
func (c HistCompMethod) String() string
type HomographyMethod ¶ added in v0.24.0
type HomographyMethod int
const ( HomographyMethodAllPoints HomographyMethod = 0 HomographyMethodLMEDS HomographyMethod = 4 HomographyMethodRANSAC HomographyMethod = 8 HomographyMethodRHO HomographyMethod = 16 )
type HoughMode ¶ added in v0.16.0
type HoughMode int
HoughMode is the type for Hough transform variants.
const ( // HoughStandard is the classical or standard Hough transform. HoughStandard HoughMode = 0 // HoughProbabilistic is the probabilistic Hough transform (more efficient // in case if the picture contains a few long linear segments). HoughProbabilistic HoughMode = 1 // HoughMultiScale is the multi-scale variant of the classical Hough // transform. HoughMultiScale HoughMode = 2 // HoughGradient is basically 21HT, described in: HK Yuen, John Princen, // John Illingworth, and Josef Kittler. Comparative study of hough // transform methods for circle finding. Image and Vision Computing, // 8(1):71–77, 1990. HoughGradient HoughMode = 3 )
type IMReadFlag ¶
type IMReadFlag int
IMReadFlag is one of the valid flags to use for the IMRead function.
const ( // IMReadUnchanged return the loaded image as is (with alpha channel, // otherwise it gets cropped). IMReadUnchanged IMReadFlag = -1 // IMReadGrayScale always convert image to the single channel // grayscale image. IMReadGrayScale IMReadFlag = 0 // IMReadColor always converts image to the 3 channel BGR color image. IMReadColor IMReadFlag = 1 // IMReadAnyDepth returns 16-bit/32-bit image when the input has the corresponding // depth, otherwise convert it to 8-bit. IMReadAnyDepth IMReadFlag = 2 // IMReadAnyColor the image is read in any possible color format. IMReadAnyColor IMReadFlag = 4 // IMReadLoadGDAL uses the gdal driver for loading the image. IMReadLoadGDAL IMReadFlag = 8 // IMReadReducedGrayscale2 always converts image to the single channel grayscale image // and the image size reduced 1/2. IMReadReducedGrayscale2 IMReadFlag = 16 // IMReadReducedColor2 always converts image to the 3 channel BGR color image and the // image size reduced 1/2. IMReadReducedColor2 IMReadFlag = 17 // IMReadReducedGrayscale4 always converts image to the single channel grayscale image and // the image size reduced 1/4. IMReadReducedGrayscale4 IMReadFlag = 32 // IMReadReducedColor4 always converts image to the 3 channel BGR color image and // the image size reduced 1/4. IMReadReducedColor4 IMReadFlag = 33 // IMReadReducedGrayscale8 always convert image to the single channel grayscale image and // the image size reduced 1/8. IMReadReducedGrayscale8 IMReadFlag = 64 // IMReadReducedColor8 always convert image to the 3 channel BGR color image and the // image size reduced 1/8. IMReadReducedColor8 IMReadFlag = 65 // IMReadIgnoreOrientation do not rotate the image according to EXIF's orientation flag. IMReadIgnoreOrientation IMReadFlag = 128 )
type ImageToBlobParams ¶ added in v0.38.0
type ImageToBlobParams struct { ScaleFactor float64 Size image.Point Mean Scalar SwapRB bool Ddepth MatType DataLayout DataLayoutType PaddingMode PaddingModeType BorderValue Scalar }
func NewImageToBlobParams ¶ added in v0.38.0
func NewImageToBlobParams(scale float64, size image.Point, mean Scalar, swapRB bool, ddepth MatType, dataLayout DataLayoutType, paddingMode PaddingModeType, border Scalar) ImageToBlobParams
func (*ImageToBlobParams) BlobRectToImageRect ¶ added in v0.38.0
func (p *ImageToBlobParams) BlobRectToImageRect(rect image.Rectangle, size image.Point) image.Rectangle
BlobRectToImageRect gets rectangle coordinates in original image system from rectangle in blob coordinates.
For further details, please see: https://docs.opencv.org/4.10.0/d9/d3c/structcv_1_1dnn_1_1Image2BlobParams.html#a40b2b5a731da82f042279650ffb3c3ee
func (*ImageToBlobParams) BlobRectsToImageRects ¶ added in v0.38.0
func (p *ImageToBlobParams) BlobRectsToImageRects(rects []image.Rectangle, size image.Point) []image.Rectangle
BlobRectsToImageRects converts rectangle coordinates in original image system from rectangles in blob coordinates.
For further details, please see: https://docs.opencv.org/4.10.0/d9/d3c/structcv_1_1dnn_1_1Image2BlobParams.html#a822728804c0d35fc3b743644ee192f60
type InpaintMethods ¶ added in v0.32.1
type InpaintMethods int
InpaintMethods is the methods for inpainting process.
const ( // NS inpaints using Navier-Stokes based method, created by Bertalmio, Marcelo, // Andrea L. Bertozzi, and Guillermo Sapiro in 2001 NS InpaintMethods = 0 // Telea inpaints using Fast Marching Method proposed by Alexandru Telea in 2004. Telea InpaintMethods = 1 )
type InterpolationFlags ¶ added in v0.3.0
type InterpolationFlags int
InterpolationFlags are bit flags that control the interpolation algorithm that is used.
const ( // InterpolationNearestNeighbor is nearest neighbor. (fast but low quality) InterpolationNearestNeighbor InterpolationFlags = 0 // InterpolationLinear is bilinear interpolation. InterpolationLinear InterpolationFlags = 1 // InterpolationCubic is bicube interpolation. InterpolationCubic InterpolationFlags = 2 // InterpolationArea uses pixel area relation. It is preferred for image // decimation as it gives moire-free results. InterpolationArea InterpolationFlags = 3 // InterpolationLanczos4 is Lanczos interpolation over 8x8 neighborhood. InterpolationLanczos4 InterpolationFlags = 4 // InterpolationDefault is an alias for InterpolationLinear. InterpolationDefault = InterpolationLinear // InterpolationMax indicates use maximum interpolation. InterpolationMax InterpolationFlags = 7 // WarpFillOutliers fills all of the destination image pixels. If some of them correspond to outliers in the source image, they are set to zero. WarpFillOutliers = 8 // WarpInverseMap, inverse transformation. WarpInverseMap = 16 )
func (InterpolationFlags) String ¶ added in v0.22.0
func (c InterpolationFlags) String() string
type KAZE ¶ added in v0.8.0
type KAZE struct {
// contains filtered or unexported fields
}
KAZE is a wrapper around the cv::KAZE algorithm.
func NewKAZE ¶ added in v0.8.0
func NewKAZE() KAZE
NewKAZE returns a new KAZE algorithm
For further details, please see: https://docs.opencv.org/master/d3/d61/classcv_1_1KAZE.html
func (*KAZE) Compute ¶ added in v0.36.0
Compute keypoints in an image using KAZE.
For further details, please see: https://docs.opencv.org/4.x/d0/d13/classcv_1_1Feature2D.html#ab3cce8d56f4fc5e1d530b5931e1e8dc0
func (*KAZE) Detect ¶ added in v0.8.0
Detect keypoints in an image using KAZE.
For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#aa4e9a7082ec61ebc108806704fbd7887
func (*KAZE) DetectAndCompute ¶ added in v0.8.0
DetectAndCompute keypoints and compute in an image using KAZE.
For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#a8be0d1c20b08eb867184b8d74c15a677
type KMeansFlags ¶ added in v0.21.0
type KMeansFlags int
KMeansFlags for kmeans center selection
For further details, please see: https://docs.opencv.org/master/d0/de1/group__core.html#ga276000efe55ee2756e0c471c7b270949
const ( // KMeansRandomCenters selects random initial centers in each attempt. KMeansRandomCenters KMeansFlags = 0 // KMeansPPCenters uses kmeans++ center initialization by Arthur and Vassilvitskii [Arthur2007]. KMeansPPCenters KMeansFlags = 1 // KMeansUseInitialLabels uses the user-supplied lables during the first (and possibly the only) attempt // instead of computing them from the initial centers. For the second and further attempts, use the random or semi-random // centers. Use one of KMEANS_*_CENTERS flag to specify the exact method. KMeansUseInitialLabels KMeansFlags = 2 )
func (KMeansFlags) String ¶ added in v0.22.0
func (c KMeansFlags) String() string
type KalmanFilter ¶ added in v0.32.1
type KalmanFilter struct {
// contains filtered or unexported fields
}
KalmanFilter implements a standard Kalman filter http://en.wikipedia.org/wiki/Kalman_filter. However, you can modify transitionMatrix, controlMatrix, and measurementMatrix to get an extended Kalman filter functionality.
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html
func NewKalmanFilter ¶ added in v0.32.1
func NewKalmanFilter(dynamParams int, measureParams int) KalmanFilter
NewKalmanFilter returns a new KalmanFilter.
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#ac0799f0611baee9e7e558f016e4a7b40
func NewKalmanFilterWithParams ¶ added in v0.32.1
func NewKalmanFilterWithParams(dynamParams int, measureParams int, controlParams int, matType MatType) KalmanFilter
NewKalmanFilterWithParams returns a new KalmanFilter.
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#abac82ecfa530611a163255bc7d91c088
func (*KalmanFilter) Close ¶ added in v0.32.1
func (kf *KalmanFilter) Close()
Close closes the kalman filter.
func (*KalmanFilter) Correct ¶ added in v0.32.1
func (kf *KalmanFilter) Correct(measurement Mat) Mat
Correct the predicted state from the measurement.
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#a60eb7feb569222ad0657ef1875884b5e
func (*KalmanFilter) GetControlMatrix ¶ added in v0.32.1
func (kf *KalmanFilter) GetControlMatrix() Mat
GetControlMatrix returns the Kalman filter's controlMatrix Mat.
control matrix (B) (not used if there is no control)
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#a6486e7287114810636fb33953280ed52
func (*KalmanFilter) GetErrorCovPost ¶ added in v0.32.1
func (kf *KalmanFilter) GetErrorCovPost() Mat
GetErrorCovPost returns the Kalman filter's errorCovPost Mat.
posteriori error estimate covariance matrix (P(k)): P(k)=(I-K(k)*H)*P'(k)
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#a446d8e9a0105b0aa35cd66119c529803
func (*KalmanFilter) GetErrorCovPre ¶ added in v0.32.1
func (kf *KalmanFilter) GetErrorCovPre() Mat
GetErrorCovPre returns the Kalman filter's errorCovPre Mat.
priori error estimate covariance matrix (P'(k)): P'(k)=A*P(k-1)*At + Q)*/
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#ae1bd3a86f10753d723e7174d570d9ac1
func (*KalmanFilter) GetGain ¶ added in v0.32.1
func (kf *KalmanFilter) GetGain() Mat
GetGain returns the Kalman filter's gain Mat.
Kalman gain matrix (K(k)): K(k)=P'(k)*Ht*inv(H*P'(k)*Ht+R)
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#a077d73eb075b00779dc009a9057c27c3
func (*KalmanFilter) GetMeasurementMatrix ¶ added in v0.32.1
func (kf *KalmanFilter) GetMeasurementMatrix() Mat
GetMeasurementMatrix returns the Kalman filter's measurementMatrix Mat.
measurement matrix (H)
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#a0f60b78726d8eccf74a1f2479c2d1f97
func (*KalmanFilter) GetMeasurementNoiseCov ¶ added in v0.32.1
func (kf *KalmanFilter) GetMeasurementNoiseCov() Mat
GetMeasurementNoiseCov returns the Kalman filter's measurementNoiseCov Mat.
measurement noise covariance matrix (R)
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#a828d051035ba807966ad65edf288a08e
func (*KalmanFilter) GetProcessNoiseCov ¶ added in v0.32.1
func (kf *KalmanFilter) GetProcessNoiseCov() Mat
GetProcessNoiseCov returns the Kalman filter's processNoiseCov Mat.
process noise covariance matrix (Q)
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#af19be9c0630d0f658bdbaea409a35cda
func (*KalmanFilter) GetStatePost ¶ added in v0.32.1
func (kf *KalmanFilter) GetStatePost() Mat
GetStatePost returns the Kalman filter's statePost Mat.
corrected state (x(k)): x(k)=x'(k)+K(k)*(z(k)-H*x'(k))
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#add8fb5ac9c04b4600b679698dcb0447d
func (*KalmanFilter) GetStatePre ¶ added in v0.32.1
func (kf *KalmanFilter) GetStatePre() Mat
GetStatePre returns the Kalman filter's statePre Mat.
predicted state (x'(k)): x(k)=A*x(k-1)+B*u(k)
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#a60eb7feb569222ad0657ef1875884b5e
func (*KalmanFilter) GetTemp1 ¶ added in v0.32.1
func (kf *KalmanFilter) GetTemp1() Mat
GetTemp1 returns the Kalman filter's temp1 Mat.
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#aa3d064a9194c2815dbe19c056b6dc763
func (*KalmanFilter) GetTemp2 ¶ added in v0.32.1
func (kf *KalmanFilter) GetTemp2() Mat
GetTemp2 returns the Kalman filter's temp2 Mat.
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#a14866bd506668eb0ed57b3974b3a1ee7
func (*KalmanFilter) GetTemp3 ¶ added in v0.32.1
func (kf *KalmanFilter) GetTemp3() Mat
GetTemp3 returns the Kalman filter's temp3 Mat.
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#afdbe36066a7d7f560aa02abe6be114d8
func (*KalmanFilter) GetTemp4 ¶ added in v0.32.1
func (kf *KalmanFilter) GetTemp4() Mat
GetTemp4 returns the Kalman filter's temp4 Mat.
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#a84342f2d9dec1e6389025ad229401809
func (*KalmanFilter) GetTemp5 ¶ added in v0.32.1
func (kf *KalmanFilter) GetTemp5() Mat
GetTemp5 returns the Kalman filter's temp5 Mat.
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#a846c2a6222c6e5d8b1385dfbccc83ae0
func (*KalmanFilter) GetTransitionMatrix ¶ added in v0.32.1
func (kf *KalmanFilter) GetTransitionMatrix() Mat
GetTransitionMatrix returns the Kalman filter's transitionMatrix Mat.
state transition matrix (A)
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#a0657173e411acbf40d2d3c6b46e03b19
func (*KalmanFilter) Init ¶ added in v0.32.1
func (kf *KalmanFilter) Init(dynamParams int, measureParams int)
Init re-initializes the Kalman filter. The previous content is destroyed.
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#a4f136c39c016d3530c7c5801dd1ddb3b
func (*KalmanFilter) Predict ¶ added in v0.32.1
func (kf *KalmanFilter) Predict() Mat
Predict computes a predicted state.
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#aa710d2255566bec8d6ce608d103d4fa7
func (*KalmanFilter) PredictWithParams ¶ added in v0.32.1
func (kf *KalmanFilter) PredictWithParams(control Mat) Mat
PredictWithParams computes a predicted state.
For further details, please see: https://docs.opencv.org/4.6.0/dd/d6a/classcv_1_1KalmanFilter.html#aa710d2255566bec8d6ce608d103d4fa7
func (*KalmanFilter) SetControlMatrix ¶ added in v0.32.1
func (kf *KalmanFilter) SetControlMatrix(controlMatrix Mat)
SetControlMatrix sets the Kalman filter's controlMatrix Mat.
func (*KalmanFilter) SetErrorCovPost ¶ added in v0.32.1
func (kf *KalmanFilter) SetErrorCovPost(errorCovPost Mat)
SetErrorCovPost sets the Kalman filter's errorCovPost Mat.
func (*KalmanFilter) SetErrorCovPre ¶ added in v0.32.1
func (kf *KalmanFilter) SetErrorCovPre(errorCovPre Mat)
SetErrorCovPre sets the Kalman filter's errorCovPre Mat.
func (*KalmanFilter) SetGain ¶ added in v0.32.1
func (kf *KalmanFilter) SetGain(gain Mat)
SetGain sets the Kalman filter's gain Mat.
func (*KalmanFilter) SetMeasurementMatrix ¶ added in v0.32.1
func (kf *KalmanFilter) SetMeasurementMatrix(measurementMatrix Mat)
SetMeasurementMatrix sets the Kalman filter's measurementMatrix Mat.
func (*KalmanFilter) SetMeasurementNoiseCov ¶ added in v0.32.1
func (kf *KalmanFilter) SetMeasurementNoiseCov(measurementNoiseCov Mat)
SetMeasurementNoiseCov sets the Kalman filter's measurementNoiseCov Mat.
func (*KalmanFilter) SetProcessNoiseCov ¶ added in v0.32.1
func (kf *KalmanFilter) SetProcessNoiseCov(processNoiseCov Mat)
SetProcessNoiseCov sets the Kalman filter's processNoiseCov Mat.
func (*KalmanFilter) SetStatePost ¶ added in v0.32.1
func (kf *KalmanFilter) SetStatePost(statePost Mat)
SetStatePost sets the Kalman filter's statePost Mat.
func (*KalmanFilter) SetStatePre ¶ added in v0.32.1
func (kf *KalmanFilter) SetStatePre(statePre Mat)
SetStatePre sets the Kalman filter's statePre Mat.
func (*KalmanFilter) SetTransitionMatrix ¶ added in v0.32.1
func (kf *KalmanFilter) SetTransitionMatrix(transitionMatrix Mat)
SetTransitionMatrix sets the Kalman filter's transitionMatrix Mat.
type KeyPoint ¶ added in v0.6.0
KeyPoint is data structure for salient point detectors.
For further details, please see: https://docs.opencv.org/master/d2/d29/classcv_1_1KeyPoint.html
type Layer ¶ added in v0.16.0
type Layer struct {
// contains filtered or unexported fields
}
Layer is a wrapper around the cv::dnn::Layer algorithm.
func (*Layer) InputNameToIndex ¶ added in v0.16.0
InputNameToIndex returns index of input blob in input array.
For further details, please see: https://docs.opencv.org/master/d3/d6c/classcv_1_1dnn_1_1Layer.html#a60ffc8238f3fa26cd3f49daa7ac0884b
func (*Layer) OutputNameToIndex ¶ added in v0.16.0
OutputNameToIndex returns index of output blob in output array.
For further details, please see: https://docs.opencv.org/master/d3/d6c/classcv_1_1dnn_1_1Layer.html#a60ffc8238f3fa26cd3f49daa7ac0884b
type LineType ¶ added in v0.22.0
type LineType int
LineType are the line libraries included in OpenCV.
For more information, see: https://vovkos.github.io/doxyrest-showcase/opencv/sphinx_rtd_theme/enum_cv_LineTypes.html
type MSER ¶ added in v0.8.0
type MSER struct {
// contains filtered or unexported fields
}
MSER is a wrapper around the cv::MSER algorithm.
func NewMSER ¶ added in v0.8.0
func NewMSER() MSER
NewMSER returns a new MSER algorithm
For further details, please see: https://docs.opencv.org/master/d3/d28/classcv_1_1MSER.html
type Mat ¶
type Mat struct {
// contains filtered or unexported fields
}
Mat represents an n-dimensional dense numerical single-channel or multi-channel array. It can be used to store real or complex-valued vectors and matrices, grayscale or color images, voxel volumes, vector fields, point clouds, tensors, and histograms.
For further details, please see: http://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html
func BlobFromImage ¶ added in v0.8.0
func BlobFromImage(img Mat, scaleFactor float64, size image.Point, mean Scalar, swapRB bool, crop bool) Mat
BlobFromImage 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.
For further details, please see: https://docs.opencv.org/trunk/d6/d0f/group__dnn.html#ga152367f253c81b53fe6862b299f5c5cd
func BlobFromImageWithParams ¶ added in v0.38.0
func BlobFromImageWithParams(img Mat, params ImageToBlobParams) Mat
BlobFromImageWithParams 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.
For further details, please see: https://docs.opencv.org/4.10.0/d6/d0f/group__dnn.html#gadc12e5f4a801fd3c1d802f4c8c5d311c
func EstimateAffine2D ¶ added in v0.29.0
func EstimateAffine2D(from, to Point2fVector) Mat
EstimateAffine2D Computes an optimal affine transformation between two 2D point sets.
For further details, please see: https://docs.opencv.org/4.0.0/d9/d0c/group__calib3d.html#ga27865b1d26bac9ce91efaee83e94d4dd
func EstimateAffine2DWithParams ¶ added in v0.30.0
func EstimateAffine2DWithParams(from Point2fVector, to Point2fVector, inliers Mat, method int, ransacReprojThreshold float64, maxIters uint, confidence float64, refineIters uint) Mat
EstimateAffine2DWithParams Computes an optimal affine transformation between two 2D point sets with additional optional parameters.
For further details, please see: https://docs.opencv.org/4.0.0/d9/d0c/group__calib3d.html#ga27865b1d26bac9ce91efaee83e94d4dd
func EstimateAffinePartial2D ¶ added in v0.24.0
func EstimateAffinePartial2D(from, to Point2fVector) Mat
EstimateAffinePartial2D computes an optimal limited affine transformation with 4 degrees of freedom between two 2D point sets.
For further details, please see: https://docs.opencv.org/master/d9/d0c/group__calib3d.html#gad767faff73e9cbd8b9d92b955b50062d
func EstimateAffinePartial2DWithParams ¶ added in v0.32.1
func EstimateAffinePartial2DWithParams(from Point2fVector, to Point2fVector, inliers Mat, method int, ransacReprojThreshold float64, maxIters uint, confidence float64, refineIters uint) Mat
EstimateAffinePartial2DWithParams computes an optimal limited affine transformation with 4 degrees of freedom between two 2D point sets with additional optional parameters.
For further details, please see: https://docs.opencv.org/master/d9/d0c/group__calib3d.html#gad767faff73e9cbd8b9d92b955b50062d
func Eye ¶ added in v0.26.0
Returns an identity matrix of the specified size and type.
The method returns a Matlab-style identity matrix initializer, similarly to Mat::zeros. Similarly to Mat::ones. For further details, please see: https://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html#a2cf9b9acde7a9852542bbc20ef851ed2
func FindHomography ¶ added in v0.24.0
func FindHomography(srcPoints Mat, dstPoints *Mat, method HomographyMethod, ransacReprojThreshold float64, mask *Mat, maxIters int, confidence float64) Mat
FindHomography finds an optimal homography matrix using 4 or more point pairs (as opposed to GetPerspectiveTransform, which uses exactly 4)
For further details, please see: https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga4abc2ece9fab9398f2e560d53c8c9780
func GetAffineTransform ¶ added in v0.24.0
func GetAffineTransform(src, dst PointVector) Mat
GetAffineTransform returns a 2x3 affine transformation matrix for the corresponding 3 point pairs as image.Point.
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#ga8f6d378f9f8eebb5cb55cd3ae295a999
func GetAffineTransform2f ¶ added in v0.24.0
func GetAffineTransform2f(src, dst Point2fVector) Mat
GetAffineTransform2f returns a 2x3 affine transformation matrix for the corresponding 3 point pairs as gocv.Point2f.
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#ga8f6d378f9f8eebb5cb55cd3ae295a999
func GetBlobChannel ¶ added in v0.16.0
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,
a bones structure from pose detection, or a color plane from Colorization)
func GetGaussianKernel ¶ added in v0.23.0
GetGaussianKernel returns Gaussian filter coefficients.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gac05a120c1ae92a6060dd0db190a61afa
func GetGaussianKernelWithParams ¶ added in v0.23.0
GetGaussianKernelWithParams returns Gaussian filter coefficients.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gac05a120c1ae92a6060dd0db190a61afa
func GetOptimalNewCameraMatrixWithParams ¶ added in v0.19.0
func GetOptimalNewCameraMatrixWithParams(cameraMatrix Mat, distCoeffs Mat, imageSize image.Point, alpha float64, newImgSize image.Point, centerPrincipalPoint bool) (Mat, image.Rectangle)
GetOptimalNewCameraMatrixWithParams computes and returns the optimal new camera matrix based on the free scaling parameter.
For further details, please see: https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga7a6c4e032c97f03ba747966e6ad862b1
func GetPerspectiveTransform ¶ added in v0.16.0
func GetPerspectiveTransform(src, dst PointVector) Mat
GetPerspectiveTransform returns 3x3 perspective transformation for the corresponding 4 point pairs as image.Point.
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#ga8c1ae0e3589a9d77fffc962c49b22043
func GetPerspectiveTransform2f ¶ added in v0.23.0
func GetPerspectiveTransform2f(src, dst Point2fVector) Mat
GetPerspectiveTransform2f returns 3x3 perspective transformation for the corresponding 4 point pairs as gocv.Point2f.
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#ga8c1ae0e3589a9d77fffc962c49b22043
func GetRotationMatrix2D ¶ added in v0.8.0
GetRotationMatrix2D calculates an affine matrix of 2D rotation.
For further details, please see: https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#gafbbc470ce83812914a70abfb604f4326
func GetStructuringElement ¶ added in v0.3.0
func GetStructuringElement(shape MorphShape, ksize image.Point) Mat
GetStructuringElement returns a structuring element of the specified size and shape for morphological operations.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gac342a1bb6eabf6f55c803b09268e36dc
func HOGDefaultPeopleDetector ¶ added in v0.3.0
func HOGDefaultPeopleDetector() Mat
HOGDefaultPeopleDetector returns a new Mat with the HOG DefaultPeopleDetector.
For further details, please see: https://docs.opencv.org/master/d5/d33/structcv_1_1HOGDescriptor.html#a660e5cd036fd5ddf0f5767b352acd948
func IMDecode ¶ added in v0.7.0
func IMDecode(buf []byte, flags IMReadFlag) (Mat, error)
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.
For further details, please see: https://docs.opencv.org/master/d4/da8/group__imgcodecs.html#ga26a67788faa58ade337f8d28ba0eb19e
func IMRead ¶
func IMRead(name string, flags IMReadFlag) 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.
For further details, please see: http://docs.opencv.org/master/d4/da8/group__imgcodecs.html#ga288b8b3da0892bd651fce07b3bbd3a56
func IMReadMulti ¶ added in v0.38.0
func IMReadMulti(name string, flags IMReadFlag) []Mat
IMReadMulti reads multi-page 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.
For further details, please see: https://docs.opencv.org/4.x/d4/da8/group__imgcodecs.html#gaaeb5e219c706fd6aa1ec6cf17b172080
func IMReadMulti_WithParams ¶ added in v0.38.0
func IMReadMulti_WithParams(name string, start int, count int, flags IMReadFlag) []Mat
IMReadMulti reads multi-page 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.
For further details, please see: https://docs.opencv.org/4.x/d4/da8/group__imgcodecs.html#ga55e88dc40b65807cfbe2c62d27f7fdf9
func ImageGrayToMatGray ¶ added in v0.16.0
ImageGrayToMatGray converts image.Gray to gocv.Mat, which represents grayscale image 8bit. Type of Mat is gocv.MatTypeCV8UC1.
func ImageToMatRGB ¶ added in v0.16.0
ImageToMatRGB converts image.Image to gocv.Mat, which represents RGB image having 8bit for each component. Type of Mat is gocv.MatTypeCV8UC3.
func ImageToMatRGBA ¶ added in v0.16.0
ImageToMatRGBA converts image.Image to gocv.Mat, which represents RGBA image having 8bit for each component. Type of Mat is gocv.MatTypeCV8UC4.
func NewMatFromBytes ¶ added in v0.9.0
NewMatFromBytes returns a new Mat with a specific size and type, initialized from a []byte.
func NewMatFromCMat ¶ added in v0.38.0
NewMatFromCMat returns a new Mat from an unsafe.Pointer(C.Mat).
func NewMatFromScalar ¶ added in v0.3.0
NewMatFromScalar returns a new Mat for a specific Scalar value
func NewMatWithSize ¶
NewMatWithSize returns a new Mat with a specific size and type.
func NewMatWithSizeFromScalar ¶ added in v0.16.0
NewMatWithSizeFromScalar returns a new Mat for a specific Scala value with a specific size and type This simplifies creation of specific color filters or creating Mats of specific colors and sizes
func NewMatWithSizes ¶ added in v0.26.0
NewMatWithSizes returns a new multidimensional Mat with a specific size and type.
func NewMatWithSizesFromBytes ¶ added in v0.26.0
NewMatWithSizesWithScalar returns a new multidimensional Mat with a specific size, type and preexisting data.
func NewMatWithSizesWithScalar ¶ added in v0.26.0
NewMatWithSizesWithScalar returns a new multidimensional Mat with a specific size, type and scalar value.
func Ones ¶ added in v0.26.0
Returns an array of all 1's of the specified size and type.
The method returns a Matlab-style 1's array initializer For further details, please see: https://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html#a69ae0402d116fc9c71908d8508dc2f09
func Split ¶ added in v0.16.0
Split creates an array of single channel images from a multi-channel image Created images should be closed manualy to avoid memory leaks.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga0547c7fed86152d7e9d0096029c8518a
func Zeros ¶ added in v0.26.0
Returns a zero array of the specified size and type.
The method returns a Matlab-style zero array initializer. For further details, please see: https://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html#a0b57b6a326c8876d944d188a46e0f556
func (*Mat) AddFloat ¶ added in v0.16.0
AddFloat adds a float value to each element in the Mat. Performs a mat += val operation.
func (*Mat) AddUChar ¶ added in v0.16.0
AddUChar adds a uchar value to each element in the Mat. Performs a mat += val operation.
func (*Mat) Col ¶ added in v0.36.0
Col creates a matrix header for the specified matrix column. The underlying data of the new matrix is shared with the original matrix.
func (*Mat) ColRange ¶ added in v0.22.0
ColRange creates a matrix header for the specified column span.
For further details, please see: https://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html#aadc8f9210fe4dec50513746c246fa8d9
func (*Mat) ConvertFp16 ¶ added in v0.9.0
ConvertFp16 converts a Mat to half-precision floating point.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga9c25d9ef44a2a48ecc3774b30cb80082
func (*Mat) ConvertTo ¶ added in v0.9.0
ConvertTo converts Mat into destination Mat.
For further details, please see: https://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html#adf88c60c5b4980e05bb556080916978b
func (*Mat) ConvertToWithParams ¶ added in v0.25.0
func (*Mat) CopyTo ¶ added in v0.3.0
CopyTo copies Mat into destination Mat.
For further details, please see: https://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html#a33fd5d125b4c302b0c9aa86980791a77
func (*Mat) CopyToWithMask ¶ added in v0.16.0
CopyToWithMask copies Mat into destination Mat after applying the mask Mat.
For further details, please see: https://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html#a626fe5f96d02525e2604d2ad46dd574f
func (*Mat) DataPtrFloat32 ¶ added in v0.16.0
DataPtrFloat32 returns a slice that references the OpenCV allocated data.
The data is no longer valid once the Mat has been closed. Any data that needs to be accessed after the Mat is closed must be copied into Go memory.
func (*Mat) DataPtrFloat64 ¶ added in v0.16.0
DataPtrFloat64 returns a slice that references the OpenCV allocated data.
The data is no longer valid once the Mat has been closed. Any data that needs to be accessed after the Mat is closed must be copied into Go memory.
func (*Mat) DataPtrInt16 ¶ added in v0.16.0
DataPtrInt16 returns a slice that references the OpenCV allocated data.
The data is no longer valid once the Mat has been closed. Any data that needs to be accessed after the Mat is closed must be copied into Go memory.
func (*Mat) DataPtrInt8 ¶ added in v0.16.0
DataPtrInt8 returns a slice that references the OpenCV allocated data.
The data is no longer valid once the Mat has been closed. Any data that needs to be accessed after the Mat is closed must be copied into Go memory.
func (*Mat) DataPtrUint16 ¶ added in v0.16.0
DataPtrUint16 returns a slice that references the OpenCV allocated data.
The data is no longer valid once the Mat has been closed. Any data that needs to be accessed after the Mat is closed must be copied into Go memory.
func (*Mat) DataPtrUint8 ¶ added in v0.16.0
DataPtrUint8 returns a slice that references the OpenCV allocated data.
The data is no longer valid once the Mat has been closed. Any data that needs to be accessed after the Mat is closed must be copied into Go memory.
func (*Mat) DivideFloat ¶ added in v0.16.0
DivideFloat divides each element in the Mat by a float value. Performs a mat /= val operation.
func (*Mat) DivideUChar ¶ added in v0.16.0
DivideUChar divides each element in the Mat by a uint value. Performs a mat /= val operation.
func (*Mat) FromPtr ¶ added in v0.16.0
FromPtr returns a new Mat with a specific size and type, initialized from a Mat Ptr.
func (*Mat) GetDoubleAt ¶
GetDoubleAt returns a value from a specific row/col in this Mat expecting it to be of type double aka CV_64F.
func (*Mat) GetDoubleAt3 ¶ added in v0.16.0
GetDoubleAt3 returns a value from a specific x, y, z coordinate location in this Mat expecting it to be of type double aka CV_64F.
func (*Mat) GetFloatAt ¶
GetFloatAt returns a value from a specific row/col in this Mat expecting it to be of type float aka CV_32F.
func (*Mat) GetFloatAt3 ¶ added in v0.16.0
GetFloatAt3 returns a value from a specific x, y, z coordinate location in this Mat expecting it to be of type float aka CV_32F.
func (*Mat) GetIntAt ¶
GetIntAt returns a value from a specific row/col in this Mat expecting it to be of type int aka CV_32S.
func (*Mat) GetIntAt3 ¶ added in v0.16.0
GetIntAt3 returns a value from a specific x, y, z coordinate location in this Mat expecting it to be of type int aka CV_32S.
func (*Mat) GetSCharAt ¶
GetSCharAt returns a value from a specific row/col in this Mat expecting it to be of type schar aka CV_8S.
func (*Mat) GetSCharAt3 ¶ added in v0.16.0
GetSCharAt3 returns a value from a specific x, y, z coordinate location in this Mat expecting it to be of type schar aka CV_8S.
func (*Mat) GetShortAt ¶
GetShortAt returns a value from a specific row/col in this Mat expecting it to be of type short aka CV_16S.
func (*Mat) GetShortAt3 ¶ added in v0.16.0
GetShortAt3 returns a value from a specific x, y, z coordinate location in this Mat expecting it to be of type short aka CV_16S.
func (*Mat) GetUCharAt ¶
GetUCharAt returns a value from a specific row/col in this Mat expecting it to be of type uchar aka CV_8U.
func (*Mat) GetUCharAt3 ¶ added in v0.16.0
GetUCharAt3 returns a value from a specific x, y, z coordinate location in this Mat expecting it to be of type uchar aka CV_8U.
func (*Mat) GetVecbAt ¶ added in v0.24.0
GetVecbAt returns a vector of bytes. Its size corresponds to the number of channels of the Mat.
func (*Mat) GetVecdAt ¶ added in v0.24.0
GetVecdAt returns a vector of float64s. Its size corresponds to the number of channels of the Mat.
func (*Mat) GetVecfAt ¶ added in v0.16.0
GetVecfAt returns a vector of floats. Its size corresponds to the number of channels of the Mat.
func (*Mat) GetVeciAt ¶ added in v0.16.0
GetVeciAt returns a vector of integers. Its size corresponds to the number of channels of the Mat.
func (*Mat) Inv ¶ added in v0.36.0
func (m *Mat) Inv()
Inv inverses a matrix.
For further details, please see: https://docs.opencv.org/4.x/d3/d63/classcv_1_1Mat.html#a039eb3c6740a850696a12519a4b8bfc6
func (*Mat) IsContinuous ¶ added in v0.26.0
IsContinuous determines if the Mat is continuous.
For further details, please see: https://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html#aa90cea495029c7d1ee0a41361ccecdf3
func (*Mat) Mean ¶ added in v0.4.1
Mean calculates the mean value M of array elements, independently for each channel, and return it as Scalar For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga191389f8a0e58180bb13a727782cd461
func (*Mat) MeanWithMask ¶ added in v0.21.0
MeanWithMask calculates the mean value M of array elements,independently for each channel, and returns it as Scalar vector while applying the mask. https://docs.opencv.org/master/d2/de8/group__core__array.html#ga191389f8a0e58180bb13a727782cd461
func (*Mat) MultiplyFloat ¶ added in v0.16.0
MultiplyFloat multiplies each element in the Mat by a float value. Performs a mat *= val operation.
func (*Mat) MultiplyMatrix ¶ added in v0.22.0
MultiplyMatrix multiplies matrix (m*x)
func (*Mat) MultiplyUChar ¶ added in v0.16.0
MultiplyUChar multiplies each element in the Mat by a uint value. Performs a mat *= val operation.
func (*Mat) PatchNaNs ¶ added in v0.16.0
func (m *Mat) PatchNaNs()
PatchNaNs converts NaN's to zeros.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga62286befb7cde3568ff8c7d14d5079da
func (*Mat) Region ¶
Region returns a new Mat that points to a region of this Mat. Changes made to the region Mat will affect the original Mat, since they are pointers to the underlying OpenCV Mat object.
func (*Mat) Reshape ¶ added in v0.8.0
Reshape changes the shape and/or the number of channels of a 2D matrix without copying the data.
For further details, please see: https://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html#a4eb96e3251417fa88b78e2abd6cfd7d8
func (*Mat) Row ¶ added in v0.36.0
Row creates a matrix header for the specified matrix row. The underlying data of the new matrix is shared with the original matrix.
func (*Mat) RowRange ¶ added in v0.22.0
RowRange creates a matrix header for the specified row span.
For further details, please see: https://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html#aa6542193430356ad631a9beabc624107
func (*Mat) SetDoubleAt ¶ added in v0.8.0
SetDoubleAt sets a value at a specific row/col in this Mat expecting it to be of type double aka CV_64F.
func (*Mat) SetDoubleAt3 ¶ added in v0.16.0
SetDoubleAt3 sets a value at a specific x, y, z coordinate location in this Mat expecting it to be of type double aka CV_64F.
func (*Mat) SetFloatAt ¶ added in v0.8.0
SetFloatAt sets a value at a specific row/col in this Mat expecting it to be of type float aka CV_32F.
func (*Mat) SetFloatAt3 ¶ added in v0.16.0
SetFloatAt3 sets a value at a specific x, y, z coordinate location in this Mat expecting it to be of type float aka CV_32F.
func (*Mat) SetIntAt ¶ added in v0.8.0
SetIntAt sets a value at a specific row/col in this Mat expecting it to be of type int aka CV_32S.
func (*Mat) SetIntAt3 ¶ added in v0.16.0
SetIntAt3 sets a value at a specific x, y, z coordinate location in this Mat expecting it to be of type int aka CV_32S.
func (*Mat) SetSCharAt ¶ added in v0.8.0
SetSCharAt sets a value at a specific row/col in this Mat expecting it to be of type schar aka CV_8S.
func (*Mat) SetSCharAt3 ¶ added in v0.16.0
SetSCharAt3 sets a value at a specific x, y, z coordinate location in this Mat expecting it to be of type schar aka CV_8S.
func (*Mat) SetShortAt ¶ added in v0.8.0
SetShortAt sets a value at a specific row/col in this Mat expecting it to be of type short aka CV_16S.
func (*Mat) SetShortAt3 ¶ added in v0.16.0
SetShortAt3 sets a value at a specific x, y, z coordinate location in this Mat expecting it to be of type short aka CV_16S.
func (*Mat) SetTo ¶ added in v0.16.0
SetTo sets all or some of the array elements to the specified scalar value.
func (*Mat) SetUCharAt ¶ added in v0.8.0
SetUCharAt sets a value at a specific row/col in this Mat expecting it to be of type uchar aka CV_8U.
func (*Mat) SetUCharAt3 ¶ added in v0.16.0
SetUCharAt3 sets a value at a specific x, y, z coordinate location in this Mat expecting it to be of type uchar aka CV_8U.
func (*Mat) Size ¶ added in v0.16.0
Size returns an array with one element for each dimension containing the size of that dimension for the Mat.
For further details, please see: https://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html#aa4d317d43fb0cba9c2503f3c61b866c8
func (*Mat) Sqrt ¶ added in v0.16.0
Sqrt calculates a square root of array elements.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga186222c3919657890f88df5a1f64a7d7
func (*Mat) SubtractFloat ¶ added in v0.16.0
SubtractFloat subtracts a float value from each element in the Mat. Performs a mat -= val operation.
func (*Mat) SubtractUChar ¶ added in v0.16.0
SubtractUChar subtracts a uchar value from each element in the Mat. Performs a mat -= val operation.
func (*Mat) Sum ¶ added in v0.16.0
Sum calculates the per-channel pixel sum of an image.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga716e10a2dd9e228e4d3c95818f106722
func (*Mat) T ¶ added in v0.22.0
T transpose matrix https://docs.opencv.org/4.1.2/d3/d63/classcv_1_1Mat.html#aaa428c60ccb6d8ea5de18f63dfac8e11
func (*Mat) ToBytes ¶ added in v0.8.0
ToBytes copies the underlying Mat data to a byte array.
For further details, please see: https://docs.opencv.org/3.3.1/d3/d63/classcv_1_1Mat.html#a4d33bed1c850265370d2af0ff02e1564
func (*Mat) ToImageYUV ¶ added in v0.27.0
ToImageYUV converts a Mat to a image.YCbCr using image.YCbCrSubsampleRatio420 as default subsampling param.
func (*Mat) ToImageYUVWithParams ¶ added in v0.27.0
ToImageYUV converts a Mat to a image.YCbCr using provided YUV subsample ratio param.
func (*Mat) Total ¶ added in v0.16.0
Total returns the total number of array elements.
For further details, please see: https://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html#aa4d317d43fb0cba9c2503f3c61b866c8
type MatType ¶
type MatType int
MatType is the type for the various different kinds of Mat you can create.
type MergeMertens ¶ added in v0.28.0
type MergeMertens struct {
// contains filtered or unexported fields
}
MergeMertens is a wrapper around the cv::MergeMertens.
func NewMergeMertens ¶ added in v0.28.0
func NewMergeMertens() MergeMertens
NewMergeMertens returns returns a new MergeMertens white LDR merge algorithm. of type MergeMertens with default parameters. MergeMertens algorithm merge the ldr image should result in a HDR image.
For further details, please see: https://docs.opencv.org/master/d6/df5/group__photo__hdr.html https://docs.opencv.org/master/d7/dd6/classcv_1_1MergeMertens.html https://docs.opencv.org/master/d6/df5/group__photo__hdr.html#ga79d59aa3cb3a7c664e59a4b5acc1ccb6
func NewMergeMertensWithParams ¶ added in v0.28.0
func NewMergeMertensWithParams(contrast_weight float32, saturation_weight float32, exposure_weight float32) MergeMertens
NewMergeMertensWithParams returns a new MergeMertens white LDR merge algorithm of type MergeMertens with customized parameters. MergeMertens algorithm merge the ldr image should result in a HDR image.
For further details, please see: https://docs.opencv.org/master/d6/df5/group__photo__hdr.html https://docs.opencv.org/master/d7/dd6/classcv_1_1MergeMertens.html https://docs.opencv.org/master/d6/df5/group__photo__hdr.html#ga79d59aa3cb3a7c664e59a4b5acc1ccb6
func (*MergeMertens) Close ¶ added in v0.28.0
func (b *MergeMertens) Close() error
Close MergeMertens.
func (*MergeMertens) Process ¶ added in v0.28.0
func (b *MergeMertens) Process(src []Mat, dst *Mat)
BalanceWhite computes merge LDR images using the current MergeMertens. Return a image MAT : 8bits 3 channel image ( RGB 8 bits ) For further details, please see: https://docs.opencv.org/master/d7/dd6/classcv_1_1MergeMertens.html#a2d2254b2aab722c16954de13a663644d
type MorphShape ¶ added in v0.3.0
type MorphShape int
MorphShape is the shape of the structuring element used for Morphing operations.
const ( // MorphRect is the rectangular morph shape. MorphRect MorphShape = 0 // MorphCross is the cross morph shape. MorphCross MorphShape = 1 // MorphEllipse is the ellipse morph shape. MorphEllipse MorphShape = 2 )
func (MorphShape) String ¶ added in v0.22.0
func (c MorphShape) String() string
type MorphType ¶ added in v0.3.0
type MorphType int
MorphType type of morphological operation.
const ( // MorphErode operation MorphErode MorphType = 0 // MorphDilate operation MorphDilate MorphType = 1 // MorphOpen operation MorphOpen MorphType = 2 // MorphClose operation MorphClose MorphType = 3 // MorphGradient operation MorphGradient MorphType = 4 // MorphTophat operation MorphTophat MorphType = 5 // MorphBlackhat operation MorphBlackhat MorphType = 6 // MorphHitmiss operation MorphHitmiss MorphType = 7 )
type MouseHandlerFunc ¶ added in v0.38.0
type NativeByteBuffer ¶ added in v0.28.0
type NativeByteBuffer struct {
// contains filtered or unexported fields
}
func IMEncode ¶
func IMEncode(fileExt FileExt, img Mat) (buf *NativeByteBuffer, err error)
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.
For further details, please see: http://docs.opencv.org/master/d4/da8/group__imgcodecs.html#ga461f9ac09887e47797a54567df3b8b63
func IMEncodeWithParams ¶ added in v0.17.0
func IMEncodeWithParams(fileExt FileExt, img Mat, params []int) (buf *NativeByteBuffer, err error)
IMEncodeWithParams 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.
Usage example:
buffer, err := gocv.IMEncodeWithParams(gocv.JPEGFileExt, img, []int{gocv.IMWriteJpegQuality, quality})
For further details, please see: http://docs.opencv.org/master/d4/da8/group__imgcodecs.html#ga461f9ac09887e47797a54567df3b8b63
Example ¶
img := IMRead(path.Join(os.Getenv("GOPATH"), "src/gocv.io/x/gocv/images/face-detect.jpg"), IMReadColor) if img.Empty() { log.Fatal("Invalid Mat") } imgHandler := func(w http.ResponseWriter, req *http.Request) { quality := 75 if q, err := strconv.Atoi(req.URL.Query().Get("q")); err == nil { quality = q } buffer, err := IMEncodeWithParams(JPEGFileExt, img, []int{IMWriteJpegQuality, quality}) if err != nil { w.WriteHeader(http.StatusInternalServerError) io.WriteString(w, err.Error()) return } defer buffer.Close() w.Header().Set("Content-Type", "image/jpeg") w.WriteHeader(http.StatusOK) w.Write(buffer.GetBytes()) } http.HandleFunc("/img", imgHandler) fmt.Println("Open in browser http://127.0.0.1:8080/img?q=10 where q is a JPEG quality parameter") log.Fatal(http.ListenAndServe("127.0.0.1:8080", nil))
Output:
func (*NativeByteBuffer) Close ¶ added in v0.28.0
func (buffer *NativeByteBuffer) Close()
Close the buffer releasing all its resources
func (*NativeByteBuffer) GetBytes ¶ added in v0.28.0
func (buffer *NativeByteBuffer) GetBytes() []byte
GetBytes returns slice of bytes backed by native buffer
func (*NativeByteBuffer) Len ¶ added in v0.28.0
func (buffer *NativeByteBuffer) Len() int
Len - returns length in bytes of underlying buffer
type Net ¶ added in v0.8.0
type Net struct {
// contains filtered or unexported fields
}
Net allows you to create and manipulate comprehensive artificial neural networks.
For further details, please see: https://docs.opencv.org/master/db/d30/classcv_1_1dnn_1_1Net.html
func ReadNet ¶ added in v0.16.0
ReadNet reads a deep learning network represented in one of the supported formats.
For further details, please see: https://docs.opencv.org/3.4/d6/d0f/group__dnn.html#ga3b34fe7a29494a6a4295c169a7d32422
func ReadNetBytes ¶ added in v0.19.0
ReadNetBytes reads a deep learning network represented in one of the supported formats.
For further details, please see: https://docs.opencv.org/master/d6/d0f/group__dnn.html#ga138439da76f26266fdefec9723f6c5cd
func ReadNetFromCaffe ¶ added in v0.8.0
ReadNetFromCaffe reads a network model stored in Caffe framework's format.
For further details, please see: https://docs.opencv.org/master/d6/d0f/group__dnn.html#ga29d0ea5e52b1d1a6c2681e3f7d68473a
func ReadNetFromCaffeBytes ¶ added in v0.19.0
ReadNetFromCaffeBytes reads a network model stored in Caffe model in memory.
For further details, please see: https://docs.opencv.org/master/d6/d0f/group__dnn.html#ga946b342af1355185a7107640f868b64a
func ReadNetFromONNX ¶ added in v0.26.0
ReadNetFromONNX reads a network model stored in ONNX framework's format.
check net.Empty() for read failure
For further details, please see: https://docs.opencv.org/master/d6/d0f/group__dnn.html#ga7faea56041d10c71dbbd6746ca854197
func ReadNetFromONNXBytes ¶ added in v0.26.0
ReadNetFromONNXBytes reads a network model stored in ONNX framework's format.
For further details, please see: https://docs.opencv.org/master/d6/d0f/group__dnn.html#ga9198ecaac7c32ddf0aa7a1bcbd359567
func ReadNetFromTensorflow ¶ added in v0.8.0
ReadNetFromTensorflow reads a network model stored in Tensorflow framework's format.
For further details, please see: https://docs.opencv.org/master/d6/d0f/group__dnn.html#gad820b280978d06773234ba6841e77e8d
func ReadNetFromTensorflowBytes ¶ added in v0.19.0
ReadNetFromTensorflowBytes reads a network model stored in Tensorflow framework's format.
For further details, please see: https://docs.opencv.org/master/d6/d0f/group__dnn.html#gacdba30a7c20db2788efbf5bb16a7884d
func ReadNetFromTorch ¶ added in v0.25.0
ReadNetFromTorch reads a network model stored in Torch framework's format (t7).
check net.Empty() for read failure
For further details, please see: https://docs.opencv.org/master/d6/d0f/group__dnn.html#gaaaed8c8530e9e92fe6647700c13d961e
func (*Net) Empty ¶ added in v0.8.0
Empty returns true if there are no layers in the network.
For further details, please see: https://docs.opencv.org/master/db/d30/classcv_1_1dnn_1_1Net.html#a6a5778787d5b8770deab5eda6968e66c
func (*Net) Forward ¶ added in v0.8.0
Forward runs forward pass to compute output of layer with name outputName.
For further details, please see: https://docs.opencv.org/trunk/db/d30/classcv_1_1dnn_1_1Net.html#a98ed94cb6ef7063d3697259566da310b
func (*Net) ForwardLayers ¶ added in v0.16.0
ForwardLayers forward pass to compute outputs of layers listed in outBlobNames.
For further details, please see: https://docs.opencv.org/3.4.1/db/d30/classcv_1_1dnn_1_1Net.html#adb34d7650e555264c7da3b47d967311b
func (*Net) GetLayer ¶ added in v0.16.0
GetLayer returns pointer to layer with specified id from the network.
For further details, please see: https://docs.opencv.org/master/db/d30/classcv_1_1dnn_1_1Net.html#a70aec7f768f38c32b1ee25f3a56526df
func (*Net) GetLayerNames ¶ added in v0.22.0
GetLayerNames returns all layer names.
For furtherdetails, please see: https://docs.opencv.org/master/db/d30/classcv_1_1dnn_1_1Net.html#ae8be9806024a0d1d41aba687cce99e6b
func (*Net) GetPerfProfile ¶ added in v0.16.0
GetPerfProfile returns overall time for inference and timings (in ticks) for layers
For further details, please see: https://docs.opencv.org/master/db/d30/classcv_1_1dnn_1_1Net.html#a06ce946f675f75d1c020c5ddbc78aedc
func (*Net) GetUnconnectedOutLayers ¶ added in v0.16.0
GetUnconnectedOutLayers returns indexes of layers with unconnected outputs.
For further details, please see: https://docs.opencv.org/master/db/d30/classcv_1_1dnn_1_1Net.html#ae62a73984f62c49fd3e8e689405b056a
func (*Net) SetInput ¶ added in v0.8.0
SetInput sets the new value for the layer output blob.
For further details, please see: https://docs.opencv.org/trunk/db/d30/classcv_1_1dnn_1_1Net.html#a672a08ae76444d75d05d7bfea3e4a328
func (*Net) SetPreferableBackend ¶ added in v0.16.0
func (net *Net) SetPreferableBackend(backend NetBackendType) error
SetPreferableBackend ask network to use specific computation backend.
For further details, please see: https://docs.opencv.org/3.4/db/d30/classcv_1_1dnn_1_1Net.html#a7f767df11386d39374db49cd8df8f59e
func (*Net) SetPreferableTarget ¶ added in v0.16.0
func (net *Net) SetPreferableTarget(target NetTargetType) error
SetPreferableTarget ask network to make computations on specific target device.
For further details, please see: https://docs.opencv.org/3.4/db/d30/classcv_1_1dnn_1_1Net.html#a9dddbefbc7f3defbe3eeb5dc3d3483f4
type NetBackendType ¶ added in v0.16.0
type NetBackendType int
NetBackendType is the type for the various different kinds of DNN backends.
const ( // NetBackendDefault is the default backend. NetBackendDefault NetBackendType = 0 // NetBackendHalide is the Halide backend. NetBackendHalide NetBackendType = 1 // NetBackendOpenVINO is the OpenVINO backend. NetBackendOpenVINO NetBackendType = 2 // NetBackendOpenCV is the OpenCV backend. NetBackendOpenCV NetBackendType = 3 // NetBackendVKCOM is the Vulkan backend. NetBackendVKCOM NetBackendType = 4 // NetBackendCUDA is the Cuda backend. NetBackendCUDA NetBackendType = 5 )
func ParseNetBackend ¶ added in v0.16.0
func ParseNetBackend(backend string) NetBackendType
ParseNetBackend returns a valid NetBackendType given a string. Valid values are: - halide - openvino - opencv - vulkan - cuda - default
func (NetBackendType) String ¶ added in v0.22.0
func (c NetBackendType) String() string
type NetTargetType ¶ added in v0.16.0
type NetTargetType int
NetTargetType is the type for the various different kinds of DNN device targets.
const ( // NetTargetCPU is the default CPU device target. NetTargetCPU NetTargetType = 0 // NetTargetFP32 is the 32-bit OpenCL target. NetTargetFP32 NetTargetType = 1 // NetTargetFP16 is the 16-bit OpenCL target. NetTargetFP16 NetTargetType = 2 // NetTargetVPU is the Movidius VPU target. NetTargetVPU NetTargetType = 3 // NetTargetVulkan is the NVIDIA Vulkan target. NetTargetVulkan NetTargetType = 4 // NetTargetFPGA is the FPGA target. NetTargetFPGA NetTargetType = 5 // NetTargetCUDA is the CUDA target. NetTargetCUDA NetTargetType = 6 // NetTargetCUDAFP16 is the CUDA target. NetTargetCUDAFP16 NetTargetType = 7 )
func ParseNetTarget ¶ added in v0.16.0
func ParseNetTarget(target string) NetTargetType
ParseNetTarget returns a valid NetTargetType given a string. Valid values are: - cpu - fp32 - fp16 - vpu - vulkan - fpga - cuda - cudafp16
func (NetTargetType) String ¶ added in v0.22.0
func (c NetTargetType) String() string
type NormType ¶ added in v0.3.0
type NormType int
NormType for normalization operations.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gad12cefbcb5291cf958a85b4b67b6149f
const ( // NormInf indicates use infinite normalization. NormInf NormType = 1 // NormL1 indicates use L1 normalization. NormL1 NormType = 2 // NormL2 indicates use L2 normalization. NormL2 NormType = 4 // NormL2Sqr indicates use L2 squared normalization. NormL2Sqr NormType = 5 // NormHamming indicates use Hamming normalization. NormHamming NormType = 6 // NormHamming2 indicates use Hamming 2-bit normalization. NormHamming2 NormType = 7 // NormTypeMask indicates use type mask for normalization. NormTypeMask NormType = 7 // NormRelative indicates use relative normalization. NormRelative NormType = 8 // NormMinMax indicates use min/max normalization. NormMinMax NormType = 32 )
type ORB ¶ added in v0.6.0
type ORB struct {
// contains filtered or unexported fields
}
ORB is a wrapper around the cv::ORB.
func NewORB ¶ added in v0.6.0
func NewORB() ORB
NewORB returns a new ORB algorithm
For further details, please see: https://docs.opencv.org/master/db/d95/classcv_1_1ORB.html
func NewORBWithParams ¶ added in v0.28.0
func NewORBWithParams(nFeatures int, scaleFactor float32, nLevels int, edgeThreshold int, firstLevel int, WTAK int, scoreType ORBScoreType, patchSize int, fastThreshold int) ORB
NewORBWithParams returns a new ORB algorithm with parameters
For further details, please see: https://docs.opencv.org/master/db/d95/classcv_1_1ORB.html#aeff0cbe668659b7ca14bb85ff1c4073b
func (*ORB) Compute ¶ added in v0.36.0
Compute keypoints in an image using ORB.
For further details, please see: https://docs.opencv.org/4.x/d0/d13/classcv_1_1Feature2D.html#ab3cce8d56f4fc5e1d530b5931e1e8dc0
func (*ORB) Detect ¶ added in v0.6.0
Detect keypoints in an image using ORB.
For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#aa4e9a7082ec61ebc108806704fbd7887
func (*ORB) DetectAndCompute ¶ added in v0.6.0
DetectAndCompute detects keypoints and computes from an image using ORB.
For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#a8be0d1c20b08eb867184b8d74c15a677
type ORBScoreType ¶ added in v0.28.0
type ORBScoreType int
const ( ORBScoreTypeHarris ORBScoreType = 0 ORBScoreTypeFAST ORBScoreType = 1 )
type PaddingModeType ¶ added in v0.38.0
type PaddingModeType int
const ( PaddingModeNull PaddingModeType = iota PaddingModeCropCenter PaddingModeLetterbox )
type Point2f ¶ added in v0.23.0
func NewPoint2f ¶ added in v0.29.0
func PhaseCorrelate ¶ added in v0.23.0
Apply phaseCorrelate.
For further details, please see: https://docs.opencv.org/master/d7/df3/group__imgproc__motion.html#ga552420a2ace9ef3fb053cd630fdb4952
type Point2fVector ¶ added in v0.27.0
type Point2fVector struct {
// contains filtered or unexported fields
}
Point2fVector is a wrapper around a std::vector< cv::Point2f >* This is needed anytime that you need to pass or receive a collection of points.
func NewPoint2fVector ¶ added in v0.27.0
func NewPoint2fVector() Point2fVector
NewPoint2fVector returns a new empty Point2fVector.
func NewPoint2fVectorFromMat ¶ added in v0.28.0
func NewPoint2fVectorFromMat(mat Mat) Point2fVector
NewPoint2fVectorFromMat returns a new Point2fVector that has been wrapped around a Mat of type CV_32FC2 with a single columm.
func NewPoint2fVectorFromPoints ¶ added in v0.27.0
func NewPoint2fVectorFromPoints(pts []Point2f) Point2fVector
NewPoint2fVectorFromPoints returns a new Point2fVector that has been initialized to a slice of image.Point.
func (Point2fVector) At ¶ added in v0.27.0
func (pfv Point2fVector) At(idx int) Point2f
At returns the image.Point
func (Point2fVector) Close ¶ added in v0.27.0
func (pfv Point2fVector) Close()
Close closes and frees memory for this Point2fVector.
func (Point2fVector) IsNil ¶ added in v0.27.0
func (pfv Point2fVector) IsNil() bool
IsNil checks the CGo pointer in the Point2fVector.
func (Point2fVector) Size ¶ added in v0.27.0
func (pfv Point2fVector) Size() int
Size returns how many Point are in the PointVector.
func (Point2fVector) ToPoints ¶ added in v0.27.0
func (pfv Point2fVector) ToPoints() []Point2f
ToPoints returns a slice of image.Point for the data in this PointVector.
type Point3f ¶ added in v0.29.0
func NewPoint3f ¶ added in v0.29.0
type Point3fVector ¶ added in v0.29.0
type Point3fVector struct {
// contains filtered or unexported fields
}
Point3fVector is a wrapper around a std::vector< cv::Point3f >*
func NewPoint3fVector ¶ added in v0.29.0
func NewPoint3fVector() Point3fVector
NewPoint3fVector returns a new empty Point3fVector.
func NewPoint3fVectorFromMat ¶ added in v0.29.0
func NewPoint3fVectorFromMat(mat Mat) Point3fVector
NewPoint3fVectorFromMat returns a new Point3fVector that has been wrapped around a Mat of type CV_32FC3 with a single columm.
func NewPoint3fVectorFromPoints ¶ added in v0.29.0
func NewPoint3fVectorFromPoints(pts []Point3f) Point3fVector
NewPoint3fVectorFromPoints returns a new Point3fVector that has been initialized to a slice of image.Point.
func (Point3fVector) Append ¶ added in v0.29.0
func (pfv Point3fVector) Append(point Point3f)
func (Point3fVector) At ¶ added in v0.29.0
func (pfv Point3fVector) At(idx int) Point3f
At returns the Point3f
func (Point3fVector) Close ¶ added in v0.29.0
func (pfv Point3fVector) Close()
Close closes and frees memory for this Point3fVector.
func (Point3fVector) IsNil ¶ added in v0.29.0
func (pfv Point3fVector) IsNil() bool
IsNil checks the CGo pointer in the Point3fVector.
func (Point3fVector) Size ¶ added in v0.29.0
func (pfv Point3fVector) Size() int
Size returns how many Point are in the Point3fVector.
func (Point3fVector) ToPoints ¶ added in v0.29.0
func (pfv Point3fVector) ToPoints() []Point3f
ToPoints returns a slice of Point3f for the data in this Point3fVector.
type PointVector ¶ added in v0.27.0
type PointVector struct {
// contains filtered or unexported fields
}
PointVector is a wrapper around a std::vector< cv::Point >* This is needed anytime that you need to pass or receive a collection of points.
func ApproxPolyDP ¶ added in v0.9.0
func ApproxPolyDP(curve PointVector, epsilon float64, closed bool) PointVector
ApproxPolyDP approximates a polygonal curve(s) with the specified precision.
For further details, please see:
https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#ga0012a5fdaea70b8a9970165d98722b4c
func NewPointVector ¶ added in v0.27.0
func NewPointVector() PointVector
NewPointVector returns a new empty PointVector.
func NewPointVectorFromMat ¶ added in v0.28.0
func NewPointVectorFromMat(mat Mat) PointVector
NewPointVectorFromMat returns a new PointVector that has been wrapped around a Mat of type CV_32SC2 with a single columm.
func NewPointVectorFromPoints ¶ added in v0.27.0
func NewPointVectorFromPoints(pts []image.Point) PointVector
NewPointVectorFromPoints returns a new PointVector that has been initialized to a slice of image.Point.
func (PointVector) Append ¶ added in v0.27.0
func (pv PointVector) Append(point image.Point)
Append appends an image.Point at end of the PointVector.
func (PointVector) At ¶ added in v0.27.0
func (pv PointVector) At(idx int) image.Point
At returns the image.Point
func (PointVector) Close ¶ added in v0.27.0
func (pv PointVector) Close()
Close closes and frees memory for this PointVector.
func (PointVector) IsNil ¶ added in v0.27.0
func (pv PointVector) IsNil() bool
IsNil checks the CGo pointer in the PointVector.
func (PointVector) Size ¶ added in v0.27.0
func (pv PointVector) Size() int
Size returns how many Point are in the PointVector.
func (PointVector) ToPoints ¶ added in v0.27.0
func (pv PointVector) ToPoints() []image.Point
ToPoints returns a slice of image.Point for the data in this PointVector.
type Points2fVector ¶ added in v0.29.0
type Points2fVector struct {
// contains filtered or unexported fields
}
Points2fVector is a wrapper around a std::vector< std::vector< cv::Point2f > >*
func NewPoints2fVector ¶ added in v0.29.0
func NewPoints2fVector() Points2fVector
NewPoints2fVector returns a new empty Points2fVector.
func NewPoints2fVectorFromPoints ¶ added in v0.29.0
func NewPoints2fVectorFromPoints(pts [][]Point2f) Points2fVector
NewPoints2fVectorFromPoints returns a new Points2fVector that has been initialized to a slice of slices of Point2f.
func (Points2fVector) Append ¶ added in v0.29.0
func (pvs Points2fVector) Append(pv Point2fVector)
Append appends a Point2fVector at end of the Points2fVector.
func (Points2fVector) At ¶ added in v0.29.0
func (pvs Points2fVector) At(idx int) Point2fVector
At returns the Point2fVector at that index of the Points2fVector.
func (Points2fVector) Close ¶ added in v0.29.0
func (pvs Points2fVector) Close()
Close closes and frees memory for this Points2fVector.
func (Points2fVector) IsNil ¶ added in v0.29.0
func (pvs Points2fVector) IsNil() bool
IsNil checks the CGo pointer in the Points2fVector.
func (Points2fVector) P ¶ added in v0.29.0
func (pvs Points2fVector) P() C.Points2fVector
func (Points2fVector) Size ¶ added in v0.29.0
func (pvs Points2fVector) Size() int
Size returns how many vectors of Points are in the Points2fVector.
func (Points2fVector) ToPoints ¶ added in v0.29.0
func (pvs Points2fVector) ToPoints() [][]Point2f
ToPoints returns a slice of slices of Point2f for the data in this Points2fVector.
type Points3fVector ¶ added in v0.29.0
type Points3fVector struct {
// contains filtered or unexported fields
}
Points3fVector is a wrapper around a std::vector< std::vector< cv::Point3f > >*
func NewPoints3fVector ¶ added in v0.29.0
func NewPoints3fVector() Points3fVector
NewPoints3fVector returns a new empty Points3fVector.
func NewPoints3fVectorFromPoints ¶ added in v0.29.0
func NewPoints3fVectorFromPoints(pts [][]Point3f) Points3fVector
NewPoints3fVectorFromPoints returns a new Points3fVector that has been initialized to a slice of slices of Point3f.
func (Points3fVector) Append ¶ added in v0.29.0
func (pvs Points3fVector) Append(pv Point3fVector)
Append appends a Point3fVector at end of the Points3fVector.
func (Points3fVector) At ¶ added in v0.29.0
func (pvs Points3fVector) At(idx int) Point3fVector
At returns the Point3fVector at that index of the Points3fVector.
func (Points3fVector) Close ¶ added in v0.29.0
func (pvs Points3fVector) Close()
Close closes and frees memory for this Points3fVector.
func (Points3fVector) IsNil ¶ added in v0.29.0
func (pvs Points3fVector) IsNil() bool
IsNil checks the CGo pointer in the Points3fVector.
func (Points3fVector) Size ¶ added in v0.29.0
func (pvs Points3fVector) Size() int
Size returns how many vectors of Points are in the Points3fVector.
func (Points3fVector) ToPoints ¶ added in v0.29.0
func (pvs Points3fVector) ToPoints() [][]Point3f
ToPoints returns a slice of slices of Point3f for the data in this Points3fVector.
type PointsVector ¶ added in v0.27.0
type PointsVector struct {
// contains filtered or unexported fields
}
PointsVector is a wrapper around a std::vector< std::vector< cv::Point > >*
func FindContours ¶ added in v0.4.1
func FindContours(src Mat, mode RetrievalMode, method ContourApproximationMode) PointsVector
FindContours finds contours in a binary image.
For further details, please see: https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#ga95f5b48d01abc7c2e0732db24689837b
func FindContoursWithParams ¶ added in v0.27.0
func FindContoursWithParams(src Mat, hierarchy *Mat, mode RetrievalMode, method ContourApproximationMode) PointsVector
FindContoursWithParams finds contours in a binary image.
For further details, please see: https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#ga17ed9f5d79ae97bd4c7cf18403e1689a
func NewPointsVector ¶ added in v0.27.0
func NewPointsVector() PointsVector
NewPointsVector returns a new empty PointsVector.
func NewPointsVectorFromPoints ¶ added in v0.27.0
func NewPointsVectorFromPoints(pts [][]image.Point) PointsVector
NewPointsVectorFromPoints returns a new PointsVector that has been initialized to a slice of slices of image.Point.
func (PointsVector) Append ¶ added in v0.27.0
func (pvs PointsVector) Append(pv PointVector)
Append appends a PointVector at end of the PointsVector.
func (PointsVector) At ¶ added in v0.27.0
func (pvs PointsVector) At(idx int) PointVector
At returns the PointVector at that index of the PointsVector.
func (PointsVector) Close ¶ added in v0.27.0
func (pvs PointsVector) Close()
Close closes and frees memory for this PointsVector.
func (PointsVector) IsNil ¶ added in v0.27.0
func (pvs PointsVector) IsNil() bool
IsNil checks the CGo pointer in the PointsVector.
func (PointsVector) P ¶ added in v0.29.0
func (pvs PointsVector) P() C.PointsVector
func (PointsVector) Size ¶ added in v0.27.0
func (pvs PointsVector) Size() int
Size returns how many vectors of Points are in the PointsVector.
func (PointsVector) ToPoints ¶ added in v0.27.0
func (pvs PointsVector) ToPoints() [][]image.Point
ToPoints returns a slice of slices of image.Point for the data in this PointsVector.
type QRCodeDetector ¶ added in v0.22.0
type QRCodeDetector struct {
// contains filtered or unexported fields
}
QRCodeDetector groups the object candidate rectangles.
For further details, please see: https://docs.opencv.org/master/de/dc3/classcv_1_1QRCodeDetector.html
func NewQRCodeDetector ¶ added in v0.22.0
func NewQRCodeDetector() QRCodeDetector
func (*QRCodeDetector) Close ¶ added in v0.22.0
func (a *QRCodeDetector) Close() error
func (*QRCodeDetector) Decode ¶ added in v0.22.0
func (a *QRCodeDetector) Decode(input Mat, points Mat, straight_qrcode *Mat) string
Decode decodes QR code in image once it's found by the detect() method. Returns UTF8-encoded output string or empty string if the code cannot be decoded.
For further details, please see: https://docs.opencv.org/master/de/dc3/classcv_1_1QRCodeDetector.html#a4172c2eb4825c844fb1b0ae67202d329
func (*QRCodeDetector) Detect ¶ added in v0.22.0
func (a *QRCodeDetector) Detect(input Mat, points *Mat) bool
Detect detects QR code in image and returns the quadrangle containing the code.
For further details, please see: https://docs.opencv.org/master/de/dc3/classcv_1_1QRCodeDetector.html#a64373f7d877d27473f64fe04bb57d22b
func (*QRCodeDetector) DetectAndDecode ¶ added in v0.22.0
func (a *QRCodeDetector) DetectAndDecode(input Mat, points *Mat, straight_qrcode *Mat) string
DetectAndDecode Both detects and decodes QR code.
Returns true as long as some QR code was detected even in case where the decoding failed For further details, please see: https://docs.opencv.org/master/de/dc3/classcv_1_1QRCodeDetector.html#a7290bd6a5d59b14a37979c3a14fbf394
func (*QRCodeDetector) DetectAndDecodeMulti ¶ added in v0.25.0
func (a *QRCodeDetector) DetectAndDecodeMulti(input Mat, decoded []string, points *Mat, qrCodes []Mat) bool
Detects QR codes in image, finds the quadrangles containing the codes, and decodes the QRCodes to strings.
Each quadrangle would be returned as a row in the `points` Mat and each point is a Vecf. Returns true as long as some QR code was detected even in case where the decoding failed For usage please see TestQRCodeDetector For further details, please see: https://docs.opencv.org/master/de/dc3/classcv_1_1QRCodeDetector.html#a188b63ffa17922b2c65d8a0ab7b70775
func (*QRCodeDetector) DetectMulti ¶ added in v0.25.0
func (a *QRCodeDetector) DetectMulti(input Mat, points *Mat) bool
Detects QR codes in image and finds of the quadrangles containing the codes.
Each quadrangle would be returned as a row in the `points` Mat and each point is a Vecf. Returns true if QR code was detected For usage please see TestQRCodeDetector For further details, please see: https://docs.opencv.org/master/de/dc3/classcv_1_1QRCodeDetector.html#aaf2b6b2115b8e8fbc9acf3a8f68872b6
type RNG ¶ added in v0.27.0
type RNG struct {
// contains filtered or unexported fields
}
RNG Random Number Generator. It encapsulates the state (currently, a 64-bit integer) and has methods to return scalar random values and to fill arrays with random values
For further details, please see: https://docs.opencv.org/master/d1/dd6/classcv_1_1RNG.html
func TheRNG ¶ added in v0.27.0
func TheRNG() RNG
TheRNG Returns the default random number generator.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga75843061d150ad6564b5447e38e57722
func (*RNG) Fill ¶ added in v0.27.0
func (r *RNG) Fill(mat *Mat, distType RNGDistType, a, b float64, saturateRange bool)
Fill Fills arrays with random numbers.
For further details, please see: https://docs.opencv.org/master/d1/dd6/classcv_1_1RNG.html#ad26f2b09d9868cf108e84c9814aa682d
func (*RNG) Gaussian ¶ added in v0.27.0
Gaussian Returns the next random number sampled from the Gaussian distribution.
For further details, please see: https://docs.opencv.org/master/d1/dd6/classcv_1_1RNG.html#a8df8ce4dc7d15916cee743e5a884639d
func (*RNG) Next ¶ added in v0.27.0
Next The method updates the state using the MWC algorithm and returns the next 32-bit random number.
For further details, please see: https://docs.opencv.org/master/d1/dd6/classcv_1_1RNG.html#a8df8ce4dc7d15916cee743e5a884639d
type RNGDistType ¶ added in v0.27.0
type RNGDistType int
const ( // Uniform distribution RNGDistUniform RNGDistType = 0 // Normal distribution RNGDistNormal RNGDistType = 1 )
type ReduceTypes ¶ added in v0.17.0
type ReduceTypes int
const ( // The output is the sum of all rows/columns of the matrix. ReduceSum ReduceTypes = 0 // The output is the mean vector of all rows/columns of the matrix. ReduceAvg ReduceTypes = 1 // The output is the maximum (column/row-wise) of all rows/columns of the matrix. ReduceMax ReduceTypes = 2 // The output is the minimum (column/row-wise) of all rows/columns of the matrix. ReduceMin ReduceTypes = 3 )
func (ReduceTypes) String ¶ added in v0.22.0
func (c ReduceTypes) String() string
type RetrievalMode ¶ added in v0.4.1
type RetrievalMode int
RetrievalMode is the mode of the contour retrieval algorithm.
const ( // RetrievalExternal retrieves only the extreme outer contours. // It sets `hierarchy[i][2]=hierarchy[i][3]=-1` for all the contours. RetrievalExternal RetrievalMode = 0 // RetrievalList retrieves all of the contours without establishing // any hierarchical relationships. RetrievalList RetrievalMode = 1 // RetrievalCComp retrieves all of the contours and organizes them into // a two-level hierarchy. At the top level, there are external boundaries // of the components. At the second level, there are boundaries of the holes. // If there is another contour inside a hole of a connected component, it // is still put at the top level. RetrievalCComp RetrievalMode = 2 // RetrievalTree retrieves all of the contours and reconstructs a full // hierarchy of nested contours. RetrievalTree RetrievalMode = 3 // RetrievalFloodfill lacks a description in the original header. RetrievalFloodfill RetrievalMode = 4 )
func (RetrievalMode) String ¶ added in v0.22.0
func (c RetrievalMode) String() string
type RotateFlag ¶ added in v0.16.0
type RotateFlag int
RotateFlag for image rotation
For further details please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga6f45d55c0b1cc9d97f5353a7c8a7aac2
const ( // Rotate90Clockwise allows to rotate image 90 degrees clockwise Rotate90Clockwise RotateFlag = 0 // Rotate180Clockwise allows to rotate image 180 degrees clockwise Rotate180Clockwise RotateFlag = 1 // Rotate90CounterClockwise allows to rotate 270 degrees clockwise Rotate90CounterClockwise RotateFlag = 2 )
func (RotateFlag) String ¶ added in v0.22.0
func (c RotateFlag) String() string
type RotatedRect ¶ added in v0.16.0
type RotatedRect struct { Points []image.Point BoundingRect image.Rectangle Center image.Point Width int Height int Angle float64 }
func FitEllipse ¶ added in v0.22.0
func FitEllipse(pts PointVector) RotatedRect
FitEllipse Fits an ellipse around a set of 2D points.
For further details, please see: https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#gaf259efaad93098103d6c27b9e4900ffa
func MinAreaRect ¶ added in v0.16.0
func MinAreaRect(points PointVector) RotatedRect
MinAreaRect finds a rotated rectangle of the minimum area enclosing the input 2D point set.
For further details, please see: https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#ga3d476a3417130ae5154aea421ca7ead9
func NewRotatedRect ¶ added in v0.38.0
NewRotatedRect creates RotatedRect (i.e. not up-right) rectangle on a plane.
For further information, see: https://docs.opencv.org/4.x/db/dd6/classcv_1_1RotatedRect.html#aba20dfc8444fff72bd820b616f0297ee
type RotatedRect2f ¶ added in v0.36.0
type RotatedRect2f struct { Points []Point2f BoundingRect image.Rectangle Center Point2f Width float32 Height float32 Angle float64 }
func MinAreaRect2f ¶ added in v0.36.0
func MinAreaRect2f(points PointVector) RotatedRect2f
MinAreaRect finds a rotated rectangle of the minimum area enclosing the input 2D point set.
For further details, please see: https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#ga3d476a3417130ae5154aea421ca7ead9
func NewRotatedRect2f ¶ added in v0.38.0
func NewRotatedRect2f(center Point2f, width float32, height float32, angle float64) RotatedRect2f
NewRotatedRect2f creates RotatedRect2f (i.e. not up-right) rectangle on a plane.
For further information, see: https://docs.opencv.org/4.x/db/dd6/classcv_1_1RotatedRect.html#aba20dfc8444fff72bd820b616f0297ee
type SIFT ¶ added in v0.24.0
type SIFT struct {
// contains filtered or unexported fields
}
SIFT is a wrapper around the cv::SIFT algorithm. Due to the patent having expired, this is now in the main OpenCV code modules.
func NewSIFT ¶ added in v0.24.0
func NewSIFT() SIFT
NewSIFT returns a new SIFT algorithm.
For further details, please see: https://docs.opencv.org/master/d5/d3c/classcv_1_1xfeatures2d_1_1SIFT.html
func NewSIFTWithParams ¶ added in v0.38.0
func (*SIFT) Compute ¶ added in v0.36.0
Compute keypoints in an image using SIFT.
For further details, please see: https://docs.opencv.org/4.x/d0/d13/classcv_1_1Feature2D.html#ab3cce8d56f4fc5e1d530b5931e1e8dc0
func (*SIFT) Detect ¶ added in v0.24.0
Detect keypoints in an image using SIFT.
For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#aa4e9a7082ec61ebc108806704fbd7887
func (*SIFT) DetectAndCompute ¶ added in v0.24.0
DetectAndCompute detects and computes keypoints in an image using SIFT.
For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#a8be0d1c20b08eb867184b8d74c15a677
type Scalar ¶
Scalar is a 4-element vector widely used in OpenCV to pass pixel values.
For further details, please see: http://docs.opencv.org/master/d1/da0/classcv_1_1Scalar__.html
func GetBlobSize ¶ added in v0.16.0
GetBlobSize retrieves the 4 dimensional size information in (N,C,H,W) order
func MorphologyDefaultBorderValue ¶ added in v0.20.0
func MorphologyDefaultBorderValue() Scalar
MorphologyDefaultBorder returns "magic" border value for erosion and dilation. It is automatically transformed to Scalar::all(-DBL_MAX) for dilation.
For further details, please see: https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga94756fad83d9d24d29c9bf478558c40a
func NewScalar ¶
NewScalar returns a new Scalar. These are usually colors typically being in BGR order.
func Trace ¶ added in v0.17.0
Trace returns the trace of a matrix.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga3419ac19c7dcd2be4bd552a23e147dd8
type SeamlessCloneFlags ¶ added in v0.26.0
type SeamlessCloneFlags int
SeamlessCloneFlags seamlessClone algorithm flags
const ( // NormalClone The power of the method is fully expressed when inserting objects with complex outlines into a new background. NormalClone SeamlessCloneFlags = iota // MixedClone The classic method, color-based selection and alpha masking might be time consuming and often leaves an undesirable halo. Seamless cloning, even averaged with the original image, is not effective. Mixed seamless cloning based on a loose selection proves effective. MixedClone // MonochromeTransfer Monochrome transfer allows the user to easily replace certain features of one object by alternative features. MonochromeTransfer )
func (SeamlessCloneFlags) String ¶ added in v0.26.0
func (c SeamlessCloneFlags) String() string
type ShapeMatchModes ¶ added in v0.32.1
type ShapeMatchModes int
Shape matching methods.
For further details, please see: https://docs.opencv.org/4.x/d3/dc0/group__imgproc__shape.html#gaadc90cb16e2362c9bd6e7363e6e4c317
const ( ContoursMatchI1 ShapeMatchModes = 1 ContoursMatchI2 ShapeMatchModes = 2 ContoursMatchI3 ShapeMatchModes = 3 )
type SimpleBlobDetector ¶ added in v0.6.0
type SimpleBlobDetector struct {
// contains filtered or unexported fields
}
SimpleBlobDetector is a wrapper around the cv::SimpleBlobDetector.
func NewSimpleBlobDetector ¶ added in v0.6.0
func NewSimpleBlobDetector() SimpleBlobDetector
NewSimpleBlobDetector returns a new SimpleBlobDetector algorithm
For further details, please see: https://docs.opencv.org/master/d0/d7a/classcv_1_1SimpleBlobDetector.html
func NewSimpleBlobDetectorWithParams ¶ added in v0.20.0
func NewSimpleBlobDetectorWithParams(params SimpleBlobDetectorParams) SimpleBlobDetector
NewSimpleBlobDetectorWithParams returns a new SimpleBlobDetector with custom parameters
For further details, please see: https://docs.opencv.org/master/d0/d7a/classcv_1_1SimpleBlobDetector.html
func (*SimpleBlobDetector) Close ¶ added in v0.6.0
func (b *SimpleBlobDetector) Close() error
Close SimpleBlobDetector.
func (*SimpleBlobDetector) Detect ¶ added in v0.6.0
func (b *SimpleBlobDetector) Detect(src Mat) []KeyPoint
Detect keypoints in an image using SimpleBlobDetector.
For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#aa4e9a7082ec61ebc108806704fbd7887
type SimpleBlobDetectorParams ¶ added in v0.20.0
type SimpleBlobDetectorParams struct {
// contains filtered or unexported fields
}
SimpleBlobDetector_Params is a wrapper around the cv::SimpleBlobdetector::Params
func NewSimpleBlobDetectorParams ¶ added in v0.20.0
func NewSimpleBlobDetectorParams() SimpleBlobDetectorParams
NewSimpleBlobDetectorParams returns the default parameters for the SimpleBobDetector
func (*SimpleBlobDetectorParams) GetBlobColor ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetBlobColor() int
GetBlobColor gets the blobColor field
func (*SimpleBlobDetectorParams) GetFilterByArea ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetFilterByArea() bool
GetFilterByArea gets the filterByArea field
func (*SimpleBlobDetectorParams) GetFilterByCircularity ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetFilterByCircularity() bool
GetFilterByCircularity gets the filterByCircularity field
func (*SimpleBlobDetectorParams) GetFilterByColor ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetFilterByColor() bool
GetFilterByColor gets the filterByColor field
func (*SimpleBlobDetectorParams) GetFilterByConvexity ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetFilterByConvexity() bool
GetFilterByConvexity gets the filterByConvexity field
func (*SimpleBlobDetectorParams) GetFilterByInertia ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetFilterByInertia() bool
GetFilterByInertia gets the filterByInertia field
func (*SimpleBlobDetectorParams) GetMaxArea ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetMaxArea() float64
GetMaxArea sets the maxArea parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) GetMaxCircularity ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetMaxCircularity() float64
GetMaxCircularity sets the maxCircularity parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) GetMaxConvexity ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetMaxConvexity() float64
GetMaxConvexity sets the maxConvexity parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) GetMaxInertiaRatio ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetMaxInertiaRatio() float64
GetMaxInertiaRatio sets the maxCConvexity parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) GetMaxThreshold ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetMaxThreshold() float64
GetMaxThreshold sets the maxCConvexity parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) GetMinArea ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetMinArea() float64
GetMinArea sets theinArea parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) GetMinCircularity ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetMinCircularity() float64
GetMinCircularity sets the minCircularity parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) GetMinConvexity ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetMinConvexity() float64
GetMinConvexity sets the minConvexity parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) GetMinDistBetweenBlobs ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetMinDistBetweenBlobs() float64
GetMinDistBetweenBlobs sets the minDistBetweenBlobs parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) GetMinInertiaRatio ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetMinInertiaRatio() float64
GetMinInertiaRatio sets the minInertiaRatio parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) GetMinRepeatability ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetMinRepeatability() int
GetMinInertiaRatio sets the minRepeatability parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) GetMinThreshold ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetMinThreshold() float64
GetMinThreshold sets the minInertiaRatio parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) GetThresholdStep ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) GetThresholdStep() float64
GetMinThreshold sets the minInertiaRatio parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) SetBlobColor ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetBlobColor(blobColor int)
SetBlobColor sets the blobColor field
func (*SimpleBlobDetectorParams) SetFilterByArea ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetFilterByArea(filterByArea bool)
SetFilterByArea sets the filterByArea field
func (*SimpleBlobDetectorParams) SetFilterByCircularity ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetFilterByCircularity(filterByCircularity bool)
SetFilterByCircularity sets the filterByCircularity field
func (*SimpleBlobDetectorParams) SetFilterByColor ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetFilterByColor(filterByColor bool)
SetFilterByColor sets the filterByColor field
func (*SimpleBlobDetectorParams) SetFilterByConvexity ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetFilterByConvexity(filterByConvexity bool)
SetFilterByConvexity sets the filterByConvexity field
func (*SimpleBlobDetectorParams) SetFilterByInertia ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetFilterByInertia(filterByInertia bool)
SetFilterByInertia sets the filterByInertia field
func (*SimpleBlobDetectorParams) SetMaxArea ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetMaxArea(maxArea float64)
SetMaxArea sets the maxArea parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) SetMaxCircularity ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetMaxCircularity(maxCircularity float64)
SetMaxCircularity sets the maxCircularity parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) SetMaxConvexity ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetMaxConvexity(maxConvexity float64)
SetMaxConvexity sets the maxConvexity parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) SetMaxInertiaRatio ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetMaxInertiaRatio(maxInertiaRatio float64)
SetMaxInertiaRatio sets the maxInertiaRatio parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) SetMaxThreshold ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetMaxThreshold(maxThreshold float64)
SetMaxThreshold sets the maxThreshold parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) SetMinArea ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetMinArea(minArea float64)
SetMinArea sets the minArea parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) SetMinCircularity ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetMinCircularity(minCircularity float64)
SetMinCircularity sets the minCircularity parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) SetMinConvexity ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetMinConvexity(minConvexity float64)
SetMinConvexity sets the minConvexity parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) SetMinDistBetweenBlobs ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetMinDistBetweenBlobs(minDistBetweenBlobs float64)
SetMinDistBetweenBlobs sets the minDistBetweenBlobs parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) SetMinInertiaRatio ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetMinInertiaRatio(minInertiaRatio float64)
SetMinInertiaRatio sets the minInertiaRatio parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) SetMinRepeatability ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetMinRepeatability(minRepeatability int)
SetMinRepeatability sets the minRepeatability parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) SetMinThreshold ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetMinThreshold(minThreshold float64)
SetMinThreshold sets the minThreshold parameter for SimpleBlobDetector_Params
func (*SimpleBlobDetectorParams) SetThresholdStep ¶ added in v0.20.0
func (p *SimpleBlobDetectorParams) SetThresholdStep(thresholdStep float64)
SetMinThreshold sets the minThreshold parameter for SimpleBlobDetector_Params
type SolveDecompositionFlags ¶ added in v0.17.0
type SolveDecompositionFlags int
const ( // Gaussian elimination with the optimal pivot element chosen. SolveDecompositionLu SolveDecompositionFlags = 0 // Singular value decomposition (SVD) method. The system can be over-defined and/or the matrix src1 can be singular. SolveDecompositionSvd SolveDecompositionFlags = 1 // Eigenvalue decomposition. The matrix src1 must be symmetrical. SolveDecompositionEing SolveDecompositionFlags = 2 // Cholesky LL^T factorization. The matrix src1 must be symmetrical and positively defined. SolveDecompositionCholesky SolveDecompositionFlags = 3 // QR factorization. The system can be over-defined and/or the matrix src1 can be singular. SolveDecompositionQr SolveDecompositionFlags = 4 // While all the previous flags are mutually exclusive, this flag can be used together with any of the previous. // It means that the normal equations 𝚜𝚛𝚌𝟷^T⋅𝚜𝚛𝚌𝟷⋅𝚍𝚜𝚝=𝚜𝚛𝚌𝟷^T𝚜𝚛𝚌𝟸 are solved instead of the original system // 𝚜𝚛𝚌𝟷⋅𝚍𝚜𝚝=𝚜𝚛𝚌𝟸. SolveDecompositionNormal SolveDecompositionFlags = 5 )
func (SolveDecompositionFlags) String ¶ added in v0.22.0
func (c SolveDecompositionFlags) String() string
type SortFlags ¶ added in v0.17.0
type SortFlags int
const ( // Each matrix row is sorted independently SortEveryRow SortFlags = 0 // Each matrix column is sorted independently; this flag and the previous one are mutually exclusive. SortEveryColumn SortFlags = 1 // Each matrix row is sorted in the ascending order. SortAscending SortFlags = 0 // Each matrix row is sorted in the descending order; this flag and the previous one are also mutually exclusive. SortDescending SortFlags = 16 )
type TemplateMatchMode ¶ added in v0.9.0
type TemplateMatchMode int
TemplateMatchMode is the type of the template matching operation.
const ( // TmSqdiff maps to TM_SQDIFF TmSqdiff TemplateMatchMode = 0 // TmSqdiffNormed maps to TM_SQDIFF_NORMED TmSqdiffNormed TemplateMatchMode = 1 // TmCcorr maps to TM_CCORR TmCcorr TemplateMatchMode = 2 // TmCcorrNormed maps to TM_CCORR_NORMED TmCcorrNormed TemplateMatchMode = 3 // TmCcoeff maps to TM_CCOEFF TmCcoeff TemplateMatchMode = 4 // TmCcoeffNormed maps to TM_CCOEFF_NORMED TmCcoeffNormed TemplateMatchMode = 5 )
func (TemplateMatchMode) String ¶ added in v0.22.0
func (c TemplateMatchMode) String() string
type TermCriteria ¶ added in v0.5.0
type TermCriteria struct {
// contains filtered or unexported fields
}
TermCriteria is the criteria for iterative algorithms.
For further details, please see: https://docs.opencv.org/master/d9/d5d/classcv_1_1TermCriteria.html
func NewTermCriteria ¶ added in v0.5.0
func NewTermCriteria(typ TermCriteriaType, maxCount int, epsilon float64) TermCriteria
NewTermCriteria returns a new TermCriteria.
func (*TermCriteria) Ptr ¶ added in v0.39.0
func (tc *TermCriteria) Ptr() C.TermCriteria
Ptr returns the underlying C.TermCriteria
type TermCriteriaType ¶ added in v0.5.0
type TermCriteriaType int
TermCriteriaType for TermCriteria.
For further details, please see: https://docs.opencv.org/master/d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57
const ( // Count is the maximum number of iterations or elements to compute. Count TermCriteriaType = 1 // MaxIter is the maximum number of iterations or elements to compute. MaxIter TermCriteriaType = 1 // EPS is the desired accuracy or change in parameters at which the // iterative algorithm stops. EPS TermCriteriaType = 2 )
func (TermCriteriaType) String ¶ added in v0.22.0
func (c TermCriteriaType) String() string
type ThresholdType ¶ added in v0.4.1
type ThresholdType int
ThresholdType type of threshold operation.
const ( // ThresholdBinary threshold type ThresholdBinary ThresholdType = 0 // ThresholdBinaryInv threshold type ThresholdBinaryInv ThresholdType = 1 // ThresholdTrunc threshold type ThresholdTrunc ThresholdType = 2 // ThresholdToZero threshold type ThresholdToZero ThresholdType = 3 // ThresholdToZeroInv threshold type ThresholdToZeroInv ThresholdType = 4 // ThresholdMask threshold type ThresholdMask ThresholdType = 7 // ThresholdOtsu threshold type ThresholdOtsu ThresholdType = 8 // ThresholdTriangle threshold type ThresholdTriangle ThresholdType = 16 )
func (ThresholdType) String ¶ added in v0.22.0
func (c ThresholdType) String() string
type Trackbar ¶ added in v0.3.0
type Trackbar struct {
// contains filtered or unexported fields
}
Trackbar is a wrapper around OpenCV's "HighGUI" window Trackbars.
func (*Trackbar) GetPos ¶ added in v0.3.0
GetPos returns the trackbar position.
For further details, please see: https://docs.opencv.org/master/d7/dfc/group__highgui.html#ga122632e9e91b9ec06943472c55d9cda8
func (*Trackbar) SetMax ¶ added in v0.3.0
SetMax sets the trackbar maximum position.
For further details, please see: https://docs.opencv.org/master/d7/dfc/group__highgui.html#ga7e5437ccba37f1154b65210902fc4480
func (*Trackbar) SetMin ¶ added in v0.3.0
SetMin sets the trackbar minimum position.
For further details, please see: https://docs.opencv.org/master/d7/dfc/group__highgui.html#gabe26ffe8d2b60cc678895595a581b7aa
func (*Trackbar) SetPos ¶ added in v0.3.0
SetPos sets the trackbar position.
For further details, please see: https://docs.opencv.org/master/d7/dfc/group__highgui.html#ga67d73c4c9430f13481fd58410d01bd8d
type Tracker ¶ added in v0.26.0
type Tracker interface { // Close closes, as Trackers need to be Closed manually. // Close() error // Init initializes the tracker with a known bounding box that surrounded the target. // Note: this can only be called once. If you lose the object, you have to Close() the instance, // create a new one, and call Init() on it again. // // see: https://docs.opencv.org/master/d0/d0a/classcv_1_1Tracker.html#a4d285747589b1bdd16d2e4f00c3255dc // Init(image Mat, boundingBox image.Rectangle) bool // Update updates the tracker, returns a new bounding box and a boolean determining whether the tracker lost the target. // // see: https://docs.opencv.org/master/d0/d0a/classcv_1_1Tracker.html#a549159bd0553e6a8de356f3866df1f18 // Update(image Mat) (image.Rectangle, bool) }
Tracker is the base interface for object tracking.
see: https://docs.opencv.org/master/d0/d0a/classcv_1_1Tracker.html
func NewTrackerMIL ¶ added in v0.26.0
func NewTrackerMIL() Tracker
NewTrackerMIL returns a new TrackerMIL.
type TrackerGOTURN ¶ added in v0.38.0
type TrackerGOTURN struct {
// contains filtered or unexported fields
}
func NewTrackerGOTURN ¶ added in v0.38.0
func NewTrackerGOTURN() TrackerGOTURN
NewTrackerGOTURN the GOTURN (Generic Object Tracking Using Regression Networks) tracker GOTURN ([122]) is kind of trackers based on Convolutional Neural Networks (CNN).
For further details, please see: https://docs.opencv.org/4.x/d7/d4c/classcv_1_1TrackerGOTURN.html#details
func NewTrackerGOTURNWithParams ¶ added in v0.38.0
func NewTrackerGOTURNWithParams(modelBin string, modelTxt string) TrackerGOTURN
NewTrackerGOTURNWithParams the GOTURN (Generic Object Tracking Using Regression Networks) tracker GOTURN ([122]) is kind of trackers based on Convolutional Neural Networks (CNN).
For further details, please see: https://docs.opencv.org/4.x/d7/d4c/classcv_1_1TrackerGOTURN.html#details
func (TrackerGOTURN) Close ¶ added in v0.38.0
func (t TrackerGOTURN) Close() error
func (TrackerGOTURN) Init ¶ added in v0.38.0
func (t TrackerGOTURN) Init(mat Mat, boundingBox image.Rectangle) bool
Init initializes the tracker with a known bounding box that surrounded the target. Note: this can only be called once. If you lose the object, you have to Close() the instance, create a new one, and call Init() on it again.
see: https://docs.opencv.org/master/d0/d0a/classcv_1_1Tracker.html#a4d285747589b1bdd16d2e4f00c3255dc
func (TrackerGOTURN) Update ¶ added in v0.38.0
func (t TrackerGOTURN) Update(mat Mat) (image.Rectangle, bool)
Update updates the tracker, returns a new bounding box and a boolean determining whether the tracker lost the target.
see: https://docs.opencv.org/master/d0/d0a/classcv_1_1Tracker.html#a549159bd0553e6a8de356f3866df1f18
type TrackerMIL ¶ added in v0.26.0
type TrackerMIL struct {
// contains filtered or unexported fields
}
TrackerMIL is a Tracker that uses the MIL algorithm. MIL trains a classifier in an online manner to separate the object from the background. Multiple Instance Learning avoids the drift problem for a robust tracking.
For further details, please see: https://docs.opencv.org/master/d0/d26/classcv_1_1TrackerMIL.html
func (TrackerMIL) Close ¶ added in v0.26.0
func (trk TrackerMIL) Close() error
Close closes the TrackerMIL.
type VideoCapture ¶
type VideoCapture struct {
// contains filtered or unexported fields
}
VideoCapture is a wrapper around the OpenCV VideoCapture class.
For further details, please see: http://docs.opencv.org/master/d8/dfe/classcv_1_1VideoCapture.html
func OpenVideoCapture ¶ added in v0.16.0
func OpenVideoCapture(v interface{}) (*VideoCapture, error)
OpenVideoCapture return VideoCapture specified by device ID if v is a number. Return VideoCapture created from video file, URL, or GStreamer pipeline if v is a string.
func OpenVideoCaptureWithAPI ¶ added in v0.25.0
func OpenVideoCaptureWithAPI(v interface{}, apiPreference VideoCaptureAPI) (*VideoCapture, error)
OpenVideoCaptureWithAPI return VideoCapture specified by device ID if v is a number. Return VideoCapture created from video file, URL, or GStreamer pipeline if v is a string.
func OpenVideoCaptureWithAPIParams ¶ added in v0.38.0
func OpenVideoCaptureWithAPIParams(v interface{}, apiPreference VideoCaptureAPI, params []VideoCaptureProperties) (*VideoCapture, error)
OpenVideoCaptureWithAPIParams return VideoCapture specified by device ID if v is a number. Return VideoCapture created from video file, URL, or GStreamer pipeline if v is a string.
func VideoCaptureDevice ¶
func VideoCaptureDevice(device int) (vc *VideoCapture, err error)
VideoCaptureDevice opens a VideoCapture from a device and prepares to start capturing. It returns error if it fails to open the video device.
func VideoCaptureDeviceWithAPI ¶ added in v0.25.0
func VideoCaptureDeviceWithAPI(device int, apiPreference VideoCaptureAPI) (vc *VideoCapture, err error)
VideoCaptureDeviceWithAPI opens a VideoCapture from a device with the api preference. It returns error if it fails to open the video device.
func VideoCaptureDeviceWithAPIParams ¶ added in v0.38.0
func VideoCaptureDeviceWithAPIParams(device int, apiPreference VideoCaptureAPI, params []VideoCaptureProperties) (vc *VideoCapture, err error)
VideoCaptureDeviceWithAPIParams opens a VideoCapture from a device with the api preference. It returns error if it fails to open the video device.
func VideoCaptureFile ¶
func VideoCaptureFile(uri string) (vc *VideoCapture, err error)
VideoCaptureFile opens a VideoCapture from a file and prepares to start capturing. It returns error if it fails to open the file stored in uri path.
func VideoCaptureFileWithAPI ¶ added in v0.25.0
func VideoCaptureFileWithAPI(uri string, apiPreference VideoCaptureAPI) (vc *VideoCapture, err error)
VideoCaptureFile opens a VideoCapture from a file and prepares to start capturing. It returns error if it fails to open the file stored in uri path.
func VideoCaptureFileWithAPIParams ¶ added in v0.38.0
func VideoCaptureFileWithAPIParams(uri string, apiPreference VideoCaptureAPI, params []VideoCaptureProperties) (vc *VideoCapture, err error)
VideoCaptureFileWithAPIParams opens a VideoCapture from a file and prepares to start capturing. It returns error if it fails to open the file stored in uri path.
func (*VideoCapture) CodecString ¶ added in v0.16.0
func (v *VideoCapture) CodecString() string
CodecString returns a string representation of FourCC bytes, i.e. the name of a codec
func (VideoCapture) Get ¶ added in v0.3.0
func (v VideoCapture) Get(prop VideoCaptureProperties) float64
Get parameter with property (=key).
func (*VideoCapture) Grab ¶
func (v *VideoCapture) Grab(skip int)
Grab skips a specific number of frames.
func (*VideoCapture) IsOpened ¶
func (v *VideoCapture) IsOpened() bool
IsOpened returns if the VideoCapture has been opened to read from a file or capture device.
func (*VideoCapture) Read ¶
func (v *VideoCapture) Read(m *Mat) bool
Read reads the next frame from the VideoCapture to the Mat passed in as the param. It returns false if the VideoCapture cannot read frame.
func (*VideoCapture) Retrieve ¶ added in v0.36.0
func (v *VideoCapture) Retrieve(m *Mat) bool
Retrieve decodes and returns the grabbed video frame. Should be used after Grab
For further details, please see: http://docs.opencv.org/master/d8/dfe/classcv_1_1VideoCapture.html#a9ac7f4b1cdfe624663478568486e6712
func (*VideoCapture) Set ¶
func (v *VideoCapture) Set(prop VideoCaptureProperties, param float64)
Set parameter with property (=key).
func (*VideoCapture) ToCodec ¶ added in v0.21.0
func (v *VideoCapture) ToCodec(codec string) float64
ToCodec returns an float64 representation of FourCC bytes
type VideoCaptureAPI ¶ added in v0.25.0
type VideoCaptureAPI int
Select preferred API for a capture object. Note: Backends are available only if they have been built with your OpenCV binaries
const ( // Auto detect == 0 VideoCaptureAny VideoCaptureAPI = 0 // Video For Windows (obsolete, removed) VideoCaptureVFW VideoCaptureAPI = 200 // V4L/V4L2 capturing support VideoCaptureV4L VideoCaptureAPI = 200 // Same as VideoCaptureV4L VideoCaptureV4L2 VideoCaptureAPI = 200 // IEEE 1394 drivers VideoCaptureFirewire VideoCaptureAPI = 300 // Same value as VideoCaptureFirewire VideoCaptureFireware VideoCaptureAPI = 300 // Same value as VideoCaptureFirewire VideoCaptureIEEE1394 VideoCaptureAPI = 300 // Same value as VideoCaptureFirewire VideoCaptureDC1394 VideoCaptureAPI = 300 // Same value as VideoCaptureFirewire VideoCaptureCMU1394 VideoCaptureAPI = 300 // QuickTime (obsolete, removed) VideoCaptureQT VideoCaptureAPI = 500 // Unicap drivers (obsolete, removed) VideoCaptureUnicap VideoCaptureAPI = 600 // DirectShow (via videoInput) VideoCaptureDshow VideoCaptureAPI = 700 // PvAPI, Prosilica GigE SDK VideoCapturePvAPI VideoCaptureAPI = 800 // OpenNI (for Kinect) VideoCaptureOpenNI VideoCaptureAPI = 900 // OpenNI (for Asus Xtion) VideoCaptureOpenNIAsus VideoCaptureAPI = 910 // Android - not used VideoCaptureAndroid VideoCaptureAPI = 1000 // XIMEA Camera API VideoCaptureXiAPI VideoCaptureAPI = 1100 // AVFoundation framework for iOS (OS X Lion will have the same API) VideoCaptureAVFoundation VideoCaptureAPI = 1200 // Smartek Giganetix GigEVisionSDK VideoCaptureGiganetix VideoCaptureAPI = 1300 // Microsoft Media Foundation (via videoInput) VideoCaptureMSMF VideoCaptureAPI = 1400 // Microsoft Windows Runtime using Media Foundation VideoCaptureWinRT VideoCaptureAPI = 1410 // RealSense (former Intel Perceptual Computing SDK) VideoCaptureIntelPerc VideoCaptureAPI = 1500 // Synonym for VideoCaptureIntelPerc VideoCaptureRealsense VideoCaptureAPI = 1500 // OpenNI2 (for Kinect) VideoCaptureOpenNI2 VideoCaptureAPI = 1600 // OpenNI2 (for Asus Xtion and Occipital Structure sensors) VideoCaptureOpenNI2Asus VideoCaptureAPI = 1610 // gPhoto2 connection VideoCaptureGPhoto2 VideoCaptureAPI = 1700 // GStreamer VideoCaptureGstreamer VideoCaptureAPI = 1800 // Open and record video file or stream using the FFMPEG library VideoCaptureFFmpeg VideoCaptureAPI = 1900 // OpenCV Image Sequence (e.g. img_%02d.jpg) VideoCaptureImages VideoCaptureAPI = 2000 // Aravis SDK VideoCaptureAravis VideoCaptureAPI = 2100 // Built-in OpenCV MotionJPEG codec VideoCaptureOpencvMjpeg VideoCaptureAPI = 2200 // Intel MediaSDK VideoCaptureIntelMFX VideoCaptureAPI = 2300 // XINE engine (Linux) VideoCaptureXINE VideoCaptureAPI = 2400 )
func (VideoCaptureAPI) String ¶ added in v0.25.0
func (c VideoCaptureAPI) String() string
type VideoCaptureProperties ¶
type VideoCaptureProperties int
VideoCaptureProperties are the properties used for VideoCapture operations.
const ( // VideoCapturePosMsec contains current position of the // video file in milliseconds. VideoCapturePosMsec VideoCaptureProperties = 0 // VideoCapturePosFrames 0-based index of the frame to be // decoded/captured next. VideoCapturePosFrames VideoCaptureProperties = 1 // VideoCapturePosAVIRatio relative position of the video file: // 0=start of the film, 1=end of the film. VideoCapturePosAVIRatio VideoCaptureProperties = 2 // VideoCaptureFrameWidth is width of the frames in the video stream. VideoCaptureFrameWidth VideoCaptureProperties = 3 // VideoCaptureFrameHeight controls height of frames in the video stream. VideoCaptureFrameHeight VideoCaptureProperties = 4 // VideoCaptureFPS controls capture frame rate. VideoCaptureFPS VideoCaptureProperties = 5 // VideoCaptureFOURCC contains the 4-character code of codec. // see VideoWriter::fourcc for details. VideoCaptureFOURCC VideoCaptureProperties = 6 // VideoCaptureFrameCount contains number of frames in the video file. VideoCaptureFrameCount VideoCaptureProperties = 7 // VideoCaptureFormat format of the Mat objects returned by // VideoCapture::retrieve(). VideoCaptureFormat VideoCaptureProperties = 8 // VideoCaptureMode contains backend-specific value indicating // the current capture mode. VideoCaptureMode VideoCaptureProperties = 9 // VideoCaptureBrightness is brightness of the image // (only for those cameras that support). VideoCaptureBrightness VideoCaptureProperties = 10 // VideoCaptureContrast is contrast of the image // (only for cameras that support it). VideoCaptureContrast VideoCaptureProperties = 11 // VideoCaptureSaturation saturation of the image // (only for cameras that support). VideoCaptureSaturation VideoCaptureProperties = 12 // VideoCaptureHue hue of the image (only for cameras that support). VideoCaptureHue VideoCaptureProperties = 13 // VideoCaptureGain is the gain of the capture image. // (only for those cameras that support). VideoCaptureGain VideoCaptureProperties = 14 // VideoCaptureExposure is the exposure of the capture image. // (only for those cameras that support). VideoCaptureExposure VideoCaptureProperties = 15 // VideoCaptureConvertRGB is a boolean flags indicating whether // images should be converted to RGB. VideoCaptureConvertRGB VideoCaptureProperties = 16 // VideoCaptureWhiteBalanceBlueU is currently unsupported. VideoCaptureWhiteBalanceBlueU VideoCaptureProperties = 17 // VideoCaptureRectification is the rectification flag for stereo cameras. // Note: only supported by DC1394 v 2.x backend currently. VideoCaptureRectification VideoCaptureProperties = 18 // VideoCaptureMonochrome indicates whether images should be // converted to monochrome. VideoCaptureMonochrome VideoCaptureProperties = 19 // VideoCaptureSharpness controls image capture sharpness. VideoCaptureSharpness VideoCaptureProperties = 20 // VideoCaptureAutoExposure controls the DC1394 exposure control // done by camera, user can adjust reference level using this feature. VideoCaptureAutoExposure VideoCaptureProperties = 21 // VideoCaptureGamma controls video capture gamma. VideoCaptureGamma VideoCaptureProperties = 22 // VideoCaptureTemperature controls video capture temperature. VideoCaptureTemperature VideoCaptureProperties = 23 // VideoCaptureTrigger controls video capture trigger. VideoCaptureTrigger VideoCaptureProperties = 24 // VideoCaptureTriggerDelay controls video capture trigger delay. VideoCaptureTriggerDelay VideoCaptureProperties = 25 // VideoCaptureWhiteBalanceRedV controls video capture setting for // white balance. VideoCaptureWhiteBalanceRedV VideoCaptureProperties = 26 // VideoCaptureZoom controls video capture zoom. VideoCaptureZoom VideoCaptureProperties = 27 // VideoCaptureFocus controls video capture focus. VideoCaptureFocus VideoCaptureProperties = 28 // VideoCaptureGUID controls video capture GUID. VideoCaptureGUID VideoCaptureProperties = 29 // VideoCaptureISOSpeed controls video capture ISO speed. VideoCaptureISOSpeed VideoCaptureProperties = 30 // VideoCaptureBacklight controls video capture backlight. VideoCaptureBacklight VideoCaptureProperties = 32 // VideoCapturePan controls video capture pan. VideoCapturePan VideoCaptureProperties = 33 // VideoCaptureTilt controls video capture tilt. VideoCaptureTilt VideoCaptureProperties = 34 // VideoCaptureRoll controls video capture roll. VideoCaptureRoll VideoCaptureProperties = 35 // VideoCaptureIris controls video capture iris. VideoCaptureIris VideoCaptureProperties = 36 // VideoCaptureSettings is the pop up video/camera filter dialog. Note: // only supported by DSHOW backend currently. The property value is ignored. VideoCaptureSettings VideoCaptureProperties = 37 // VideoCaptureBufferSize controls video capture buffer size. VideoCaptureBufferSize VideoCaptureProperties = 38 // VideoCaptureAutoFocus controls video capture auto focus.. VideoCaptureAutoFocus VideoCaptureProperties = 39 // VideoCaptureSarNumerator controls the sample aspect ratio: num/den (num) VideoCaptureSarNumerator VideoCaptureProperties = 40 // VideoCaptureSarDenominator controls the sample aspect ratio: num/den (den) VideoCaptureSarDenominator VideoCaptureProperties = 41 // VideoCaptureBackend is the current api backend (VideoCaptureAPI). Read-only property. VideoCaptureBackend VideoCaptureProperties = 42 // VideoCaptureChannel controls the video input or channel number (only for those cameras that support). VideoCaptureChannel VideoCaptureProperties = 43 // VideoCaptureAutoWB controls the auto white-balance. VideoCaptureAutoWB VideoCaptureProperties = 44 // VideoCaptureWBTemperature controls the white-balance color temperature VideoCaptureWBTemperature VideoCaptureProperties = 45 // VideoCaptureCodecPixelFormat shows the the codec's pixel format (4-character code). Read-only property. // Subset of AV_PIX_FMT_* or -1 if unknown. VideoCaptureCodecPixelFormat VideoCaptureProperties = 46 // VideoCaptureBitrate displays the video bitrate in kbits/s. Read-only property. VideoCaptureBitrate VideoCaptureProperties = 47 // VideoCaptureHWAcceleration Hardware acceleration type. VideoCaptureHWAcceleration VideoCaptureProperties = 50 // VideoCaptureHWDevice Hardware device index (select GPU if multiple available). VideoCaptureHWDevice VideoCaptureProperties = 51 )
func (VideoCaptureProperties) String ¶ added in v0.22.0
func (c VideoCaptureProperties) String() string
type VideoRegistryType ¶ added in v0.39.0
type VideoRegistryType struct{}
var VideoRegistry VideoRegistryType
VideoRegistry
For further details, please see: https://docs.opencv.org/4.x/de/db1/group__videoio__registry.html
func (VideoRegistryType) GetBackendName ¶ added in v0.39.0
func (VideoRegistryType) GetBackendName(api VideoCaptureAPI) string
GetBackendName Returns backend API name or "UnknownVideoAPI(xxx)".
For further details, please see: https://docs.opencv.org/4.x/de/db1/group__videoio__registry.html#ga6723e68832186e20bd44cd3c2b0d8c60
func (VideoRegistryType) GetBackends ¶ added in v0.39.0
func (VideoRegistryType) GetBackends() []VideoCaptureAPI
GetBackends Returns list of all available backends.
For further details, please see: https://docs.opencv.org/4.x/de/db1/group__videoio__registry.html#ga973abd27c3ea165472f789fa511d9f7b
func (VideoRegistryType) GetCameraBackendPluginVersion ¶ added in v0.39.0
func (VideoRegistryType) GetCameraBackendPluginVersion(api VideoCaptureAPI) (string, int, int)
GetCameraBackendPluginVersion Returns description and ABI/API version of videoio plugin's camera interface.
For further details, please see: https://docs.opencv.org/4.x/de/db1/group__videoio__registry.html#gab36e3e19ab2396410b74046de141323c
func (VideoRegistryType) GetCameraBackends ¶ added in v0.39.0
func (VideoRegistryType) GetCameraBackends() []VideoCaptureAPI
GetCameraBackends Returns list of available backends which works via gocv.VideoCapture(int index)
For further details, please see: https://docs.opencv.org/4.x/de/db1/group__videoio__registry.html#ga043347faf6f5590b867a8b621906f7a9
func (VideoRegistryType) GetStreamBackendPluginVersion ¶ added in v0.39.0
func (VideoRegistryType) GetStreamBackendPluginVersion(api VideoCaptureAPI) (string, int, int)
GetStreamBackendPluginVersion Returns description and ABI/API version of videoio plugin's stream capture interface
For further details, please see: https://docs.opencv.org/4.x/de/db1/group__videoio__registry.html#gadf3c0c355f0917ccf754ac1af79d605a
func (VideoRegistryType) GetStreamBackends ¶ added in v0.39.0
func (VideoRegistryType) GetStreamBackends() []VideoCaptureAPI
GetStreamBackends Returns list of available backends which works via gocv.VideoCapture(filename string)
For further details, please see: https://docs.opencv.org/4.x/de/db1/group__videoio__registry.html#ga29296d4c06ed9a9ff8bddae9fe581de1
func (VideoRegistryType) GetWriterBackendPluginVersion ¶ added in v0.39.0
func (VideoRegistryType) GetWriterBackendPluginVersion(api VideoCaptureAPI) (string, int, int)
GetWriterBackendPluginVersion Returns description and ABI/API version of videoio plugin's writer interface.
For further details, please see: https://docs.opencv.org/4.x/de/db1/group__videoio__registry.html#gac41a544552a08bf3dc8142d687fbe4e5
func (VideoRegistryType) GetWriterBackends ¶ added in v0.39.0
func (VideoRegistryType) GetWriterBackends() []VideoCaptureAPI
GetWriterBackends Returns list of available backends which works via gocv.VideoWriter()
For further details, please see: https://docs.opencv.org/4.x/de/db1/group__videoio__registry.html#gaed03e49e6a45ca5b20afe1b9f78955e0
func (VideoRegistryType) HasBackend ¶ added in v0.39.0
func (VideoRegistryType) HasBackend(api VideoCaptureAPI) bool
HasBackend Returns true if backend is available.
For further details, please see: https://docs.opencv.org/4.x/de/db1/group__videoio__registry.html#ga9068310d50ef430c2f5f6b185a99a24b
func (VideoRegistryType) IsBackendBuiltIn ¶ added in v0.39.0
func (VideoRegistryType) IsBackendBuiltIn(api VideoCaptureAPI) bool
IsBackendBuiltIn Returns true if backend is built in (false if backend is used as plugin)
For further details, please see: https://docs.opencv.org/4.x/de/db1/group__videoio__registry.html#gadf24ec0854bb893a75591306ad9f3878
type VideoWriter ¶
type VideoWriter struct {
// contains filtered or unexported fields
}
VideoWriter is a wrapper around the OpenCV VideoWriter`class.
For further details, please see: http://docs.opencv.org/master/dd/d9e/classcv_1_1VideoWriter.html
func VideoWriterFile ¶
func VideoWriterFile(name string, codec string, fps float64, width int, height int, isColor bool) (vw *VideoWriter, err error)
VideoWriterFile opens a VideoWriter with a specific output file. The "codec" param should be the four-letter code for the desired output codec, for example "MJPG".
For further details, please see: http://docs.opencv.org/master/dd/d9e/classcv_1_1VideoWriter.html#a0901c353cd5ea05bba455317dab81130
func (*VideoWriter) IsOpened ¶
func (vw *VideoWriter) IsOpened() bool
IsOpened checks if the VideoWriter is open and ready to be written to.
For further details, please see: http://docs.opencv.org/master/dd/d9e/classcv_1_1VideoWriter.html#a9a40803e5f671968ac9efa877c984d75
func (*VideoWriter) Write ¶
func (vw *VideoWriter) Write(img Mat) error
Write the next video frame from the Mat image to the open VideoWriter.
For further details, please see: http://docs.opencv.org/master/dd/d9e/classcv_1_1VideoWriter.html#a3115b679d612a6a0b5864a0c88ed4b39
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
Window is a wrapper around OpenCV's "HighGUI" named windows. While OpenCV was designed for use in full-scale applications and can be used within functionally rich UI frameworks (such as Qt*, WinForms*, or Cocoa*) or without any UI at all, sometimes there it is required to try functionality quickly and visualize the results. This is what the HighGUI module has been designed for.
For further details, please see: http://docs.opencv.org/master/d7/dfc/group__highgui.html
func NewWindow ¶
NewWindow creates a new named OpenCV window
For further details, please see: http://docs.opencv.org/master/d7/dfc/group__highgui.html#ga5afdf8410934fd099df85c75b2e0888b
func (*Window) Close ¶
Close closes and deletes a named OpenCV Window.
For further details, please see: http://docs.opencv.org/master/d7/dfc/group__highgui.html#ga851ccdd6961022d1d5b4c4f255dbab34
func (*Window) CreateTrackbar ¶ added in v0.3.0
CreateTrackbar creates a trackbar and attaches it to the specified window.
For further details, please see: https://docs.opencv.org/master/d7/dfc/group__highgui.html#gaf78d2155d30b728fc413803745b67a9b
func (*Window) CreateTrackbarWithValue ¶ added in v0.28.0
CreateTrackbarWithValue works like CreateTrackbar but also assigns a variable value to be a position synchronized with the trackbar.
For further details, please see: https://docs.opencv.org/master/d7/dfc/group__highgui.html#gaf78d2155d30b728fc413803745b67a9b
func (*Window) GetWindowProperty ¶ added in v0.7.0
func (w *Window) GetWindowProperty(flag WindowPropertyFlag) float64
GetWindowProperty returns properties of a window.
For further details, please see: https://docs.opencv.org/master/d7/dfc/group__highgui.html#gaaf9504b8f9cf19024d9d44a14e461656
func (*Window) IMShow ¶
IMShow displays an image Mat in the specified window. This function should be followed by the WaitKey function which displays the image for specified milliseconds. Otherwise, it won't display the image.
For further details, please see: http://docs.opencv.org/master/d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563
func (*Window) MoveWindow ¶ added in v0.7.0
MoveWindow moves window to the specified position.
For further details, please see: https://docs.opencv.org/master/d7/dfc/group__highgui.html#ga8d86b207f7211250dbe6e28f76307ffb
func (*Window) PollKey ¶ added in v0.38.0
PollKey polls for a pressed key. The function pollKey polls for a key event without waiting. It returns the code of the pressed key or -1 if no key was pressed since the last invocation. To wait until a key was pressed, use waitKey.
The functions waitKey and pollKey are the only methods in HighGUI that can fetch and handle GUI events, so one of them needs to be called periodically for normal event processing unless HighGUI is used within an environment that takes care of event processing. The function only works if there is at least one HighGUI window created and the window is active. If there are several HighGUI windows, any of them can be active.
For further details, please see: https://docs.opencv.org/4.x/d7/dfc/group__highgui.html#ga6d20fbd3100ec3badc1eaa653aff99d7
func (*Window) ResizeWindow ¶ added in v0.7.0
ResizeWindow resizes window to the specified size.
For further details, please see: https://docs.opencv.org/master/d7/dfc/group__highgui.html#ga9e80e080f7ef33f897e415358aee7f7e
func (*Window) SelectROI ¶ added in v0.25.0
SelectROI selects a Region Of Interest (ROI) on the given image. It creates a window and allows user to select a ROI using mouse.
Controls: use space or enter to finish selection, use key c to cancel selection (function will return a zero Rect).
For further details, please see: https://docs.opencv.org/master/d7/dfc/group__highgui.html#ga8daf4730d3adf7035b6de9be4c469af5
func (*Window) SelectROIs ¶ added in v0.25.0
SelectROIs selects multiple Regions Of Interest (ROI) on the given image. It creates a window and allows user to select ROIs using mouse.
Controls: use space or enter to finish current selection and start a new one use esc to terminate multiple ROI selection process
For further details, please see: https://docs.opencv.org/master/d7/dfc/group__highgui.html#ga0f11fad74a6432b8055fb21621a0f893
func (*Window) SetMouseHandler ¶ added in v0.38.0
func (w *Window) SetMouseHandler(onMOuse MouseHandlerFunc, userdata interface{})
func (*Window) SetWindowProperty ¶ added in v0.4.1
func (w *Window) SetWindowProperty(flag WindowPropertyFlag, value WindowFlag)
SetWindowProperty changes parameters of a window dynamically.
For further details, please see: https://docs.opencv.org/master/d7/dfc/group__highgui.html#ga66e4a6db4d4e06148bcdfe0d70a5df27
func (*Window) SetWindowTitle ¶ added in v0.7.0
SetWindowTitle updates window title.
For further details, please see: https://docs.opencv.org/master/d7/dfc/group__highgui.html#ga56f8849295fd10d0c319724ddb773d96
func (*Window) WaitKey ¶ added in v0.6.0
WaitKey waits for a pressed key. This function is the only method in OpenCV's HighGUI that can fetch and handle events, so it needs to be called periodically for normal event processing
For further details, please see: http://docs.opencv.org/master/d7/dfc/group__highgui.html#ga5628525ad33f52eab17feebcfba38bd7
func (*Window) WaitKeyEx ¶ added in v0.38.0
WaitKeyEx Similar to waitKey, but returns full key code. Note Key code is implementation specific and depends on used backend: QT/GTK/Win32/etc
For further details, please see: https://docs.opencv.org/4.x/d7/dfc/group__highgui.html#gafa15c0501e0ddd90918f17aa071d3dd0
type WindowFlag ¶ added in v0.4.1
type WindowFlag float32
WindowFlag value for SetWindowProperty / GetWindowProperty.
const ( // WindowNormal indicates a normal window. WindowNormal WindowFlag = 0x00000000 // WindowAutosize indicates a window sized based on the contents. WindowAutosize WindowFlag = 0x00000001 // WindowFullscreen indicates a full-screen window. WindowFullscreen WindowFlag = 1 // WindowFreeRatio indicates allow the user to resize without maintaining aspect ratio. WindowFreeRatio WindowFlag = 0x00000100 // WindowKeepRatio indicates always maintain an aspect ratio that matches the contents. WindowKeepRatio WindowFlag = 0x00000000 )
func (WindowFlag) String ¶ added in v0.22.0
func (c WindowFlag) String() string
type WindowPropertyFlag ¶ added in v0.4.1
type WindowPropertyFlag int
WindowPropertyFlag flags for SetWindowProperty / GetWindowProperty.
const ( // WindowPropertyFullscreen fullscreen property // (can be WINDOW_NORMAL or WINDOW_FULLSCREEN). WindowPropertyFullscreen WindowPropertyFlag = 0 // WindowPropertyAutosize is autosize property // (can be WINDOW_NORMAL or WINDOW_AUTOSIZE). WindowPropertyAutosize WindowPropertyFlag = 1 // WindowPropertyAspectRatio window's aspect ration // (can be set to WINDOW_FREERATIO or WINDOW_KEEPRATIO). WindowPropertyAspectRatio WindowPropertyFlag = 2 // WindowPropertyOpenGL opengl support. WindowPropertyOpenGL WindowPropertyFlag = 3 // WindowPropertyVisible or not. WindowPropertyVisible WindowPropertyFlag = 4 )
func (WindowPropertyFlag) String ¶ added in v0.22.0
func (c WindowPropertyFlag) String() string
Source Files ¶
- aruco.go
- aruco_dictionaries.go
- calib3d.go
- calib3d_string.go
- cgo.go
- core.go
- core_string.go
- dnn.go
- dnn_ext.go
- dnn_string.go
- features2d.go
- features2d_string.go
- gocv.go
- highgui.go
- highgui_string.go
- imgcodecs.go
- imgproc.go
- imgproc_colorcodes.go
- imgproc_colorcodes_string.go
- imgproc_string.go
- mat_noprofile.go
- objdetect.go
- persistence_filenode.go
- persistence_filestorage.go
- photo.go
- photo_string.go
- svd.go
- version.go
- video.go
- videoio.go
- videoio_string.go
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
kalman-filter
What it does:
|
What it does: |
yolo-detection
What it does:
|
What it does: |
Package contrib is the GoCV wrapper around OpenCV Contrib.
|
Package contrib is the GoCV wrapper around OpenCV Contrib. |
Package cuda is the GoCV wrapper around OpenCV cuda.
|
Package cuda is the GoCV wrapper around OpenCV cuda. |
Package openvino is the GoCV wrapper around the Intel OpenVINO toolkit.
|
Package openvino is the GoCV wrapper around the Intel OpenVINO toolkit. |
ie
Package ie is the GoCV wrapper around the Intel OpenVINO toolkit's Inference Engine.
|
Package ie is the GoCV wrapper around the Intel OpenVINO toolkit's Inference Engine. |