Uses of Class
org.opencv.core.Mat
Packages that use Mat
Package
Description
-
Uses of Mat in org.opencv.core
Subclasses of Mat in org.opencv.coreModifier and TypeClassDescriptionclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassMethods in org.opencv.core that return MatModifier and TypeMethodDescriptionMat.adjustROI(int dtop, int dbottom, int dleft, int dright) Mat.clone()Mat.col(int x) Mat.colRange(int startcol, int endcol) Mat.diag()Mat.diag(int d) static Matstatic MatMat.eye(int rows, int cols, int type) static MatMat.inv()Mat.inv(int method) Matrix multiplicationElement-wise multiplicationElement-wise multiplication with scale factorstatic MatMat.ones(int[] sizes, int type) static MatMat.ones(int rows, int cols, int type) static MatMat.reshape(int cn) Mat.reshape(int cn, int rows) Mat.reshape(int cn, int[] newshape) Mat.row(int y) Mat.rowRange(int startrow, int endrow) Mat.submat(int rowStart, int rowEnd, int colStart, int colEnd) Mat.t()static MatMat.zeros(int[] sizes, int type) static MatMat.zeros(int rows, int cols, int type) static MatMethods in org.opencv.core with parameters of type MatModifier and TypeMethodDescriptionstatic voidCalculates the per-element absolute difference between two arrays or between an array and a scalar.static voidstatic voidCalculates the per-element sum of two arrays or an array and a scalar.static voidCalculates the per-element sum of two arrays or an array and a scalar.static voidCalculates the per-element sum of two arrays or an array and a scalar.static voidstatic voidstatic voidstatic voidCore.addWeighted(Mat src1, double alpha, Mat src2, double beta, double gamma, Mat dst) Calculates the weighted sum of two arrays.static voidCore.addWeighted(Mat src1, double alpha, Mat src2, double beta, double gamma, Mat dst, int dtype) Calculates the weighted sum of two arrays.voidvoidstatic voidCore.batchDistance(Mat src1, Mat src2, Mat dist, int dtype, Mat nidx) naive nearest neighbor finder see http://en.wikipedia.org/wiki/Nearest_neighbor_search TODO: documentstatic voidCore.batchDistance(Mat src1, Mat src2, Mat dist, int dtype, Mat nidx, int normType) naive nearest neighbor finder see http://en.wikipedia.org/wiki/Nearest_neighbor_search TODO: documentstatic voidCore.batchDistance(Mat src1, Mat src2, Mat dist, int dtype, Mat nidx, int normType, int K) naive nearest neighbor finder see http://en.wikipedia.org/wiki/Nearest_neighbor_search TODO: documentstatic voidCore.batchDistance(Mat src1, Mat src2, Mat dist, int dtype, Mat nidx, int normType, int K, Mat mask) naive nearest neighbor finder see http://en.wikipedia.org/wiki/Nearest_neighbor_search TODO: documentstatic voidCore.batchDistance(Mat src1, Mat src2, Mat dist, int dtype, Mat nidx, int normType, int K, Mat mask, int update) naive nearest neighbor finder see http://en.wikipedia.org/wiki/Nearest_neighbor_search TODO: documentstatic voidCore.batchDistance(Mat src1, Mat src2, Mat dist, int dtype, Mat nidx, int normType, int K, Mat mask, int update, boolean crosscheck) naive nearest neighbor finder see http://en.wikipedia.org/wiki/Nearest_neighbor_search TODO: documentstatic voidCore.bitwise_and(Mat src1, Mat src2, Mat dst) 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.static voidCore.bitwise_and(Mat src1, Mat src2, Mat dst, Mat mask) 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.static voidCore.bitwise_not(Mat src, Mat dst) Inverts every bit of an array.static voidCore.bitwise_not(Mat src, Mat dst, Mat mask) Inverts every bit of an array.static voidCore.bitwise_or(Mat src1, Mat src2, Mat dst) Calculates the per-element bit-wise disjunction of two arrays or an array and a scalar.static voidCore.bitwise_or(Mat src1, Mat src2, Mat dst, Mat mask) Calculates the per-element bit-wise disjunction of two arrays or an array and a scalar.static voidCore.bitwise_xor(Mat src1, Mat src2, Mat dst) Calculates the per-element bit-wise "exclusive or" operation on two arrays or an array and a scalar.static voidCore.bitwise_xor(Mat src1, Mat src2, Mat dst, Mat mask) Calculates the per-element bit-wise "exclusive or" operation on two arrays or an array and a scalar.static voidBroadcast the given Mat to the given shape.static voidCore.calcCovarMatrix(Mat samples, Mat covar, Mat mean, int flags) Note: use #COVAR_ROWS or #COVAR_COLS flagstatic voidCore.calcCovarMatrix(Mat samples, Mat covar, Mat mean, int flags, int ctype) Note: use #COVAR_ROWS or #COVAR_COLS flagstatic voidCore.cartToPolar(Mat x, Mat y, Mat magnitude, Mat angle) Calculates the magnitude and angle of 2D vectors.static voidCore.cartToPolar(Mat x, Mat y, Mat magnitude, Mat angle, boolean angleInDegrees) Calculates the magnitude and angle of 2D vectors.static booleanCore.checkRange(Mat a) Checks every element of an input array for invalid values.static booleanCore.checkRange(Mat a, boolean quiet) Checks every element of an input array for invalid values.static booleanCore.checkRange(Mat a, boolean quiet, double minVal) Checks every element of an input array for invalid values.static booleanCore.checkRange(Mat a, boolean quiet, double minVal, double maxVal) Checks every element of an input array for invalid values.static voidPerforms the per-element comparison of two arrays or an array and scalar value.static voidstatic voidCore.completeSymm(Mat m) Copies the lower or the upper half of a square matrix to its another half.static voidCore.completeSymm(Mat m, boolean lowerToUpper) Copies the lower or the upper half of a square matrix to its another half.static voidCore.convertFp16(Mat src, Mat dst) Converts an array to half precision floating number.static voidCore.convertScaleAbs(Mat src, Mat dst) Scales, calculates absolute values, and converts the result to 8-bit.static voidCore.convertScaleAbs(Mat src, Mat dst, double alpha) Scales, calculates absolute values, and converts the result to 8-bit.static voidCore.convertScaleAbs(Mat src, Mat dst, double alpha, double beta) Scales, calculates absolute values, and converts the result to 8-bit.voidvoidvoidstatic voidCore.copyMakeBorder(Mat src, Mat dst, int top, int bottom, int left, int right, int borderType) Forms a border around an image.static voidCore.copyMakeBorder(Mat src, Mat dst, int top, int bottom, int left, int right, int borderType, Scalar value) Forms a border around an image.voidstatic voidThis is an overloaded member function, provided for convenience (python) Copies the matrix to another one.voidvoidstatic intCore.countNonZero(Mat src) Counts non-zero array elements.static voidPerforms a forward or inverse discrete Cosine transform of 1D or 2D array.static voidPerforms a forward or inverse discrete Cosine transform of 1D or 2D array.static doubleCore.determinant(Mat mtx) Returns the determinant of a square floating-point matrix.static voidPerforms a forward or inverse Discrete Fourier transform of a 1D or 2D floating-point array.static voidPerforms a forward or inverse Discrete Fourier transform of a 1D or 2D floating-point array.static voidPerforms a forward or inverse Discrete Fourier transform of a 1D or 2D floating-point array.static Matstatic voidstatic voidstatic voidPerforms per-element division of two arrays or a scalar by an array.static voidPerforms per-element division of two arrays or a scalar by an array.static voidPerforms per-element division of two arrays or a scalar by an array.static voidstatic voidstatic voiddoublestatic booleanCalculates eigenvalues and eigenvectors of a symmetric matrix.static booleanCalculates eigenvalues and eigenvectors of a symmetric matrix.static voidCore.eigenNonSymmetric(Mat src, Mat eigenvalues, Mat eigenvectors) Calculates eigenvalues and eigenvectors of a non-symmetric matrix (real eigenvalues only).static voidCalculates the exponent of every array element.static voidCore.extractChannel(Mat src, Mat dst, int coi) Extracts a single channel from src (coi is 0-based index)static voidCore.findNonZero(Mat src, Mat idx) Returns the list of locations of non-zero pixels Given a binary matrix (likely returned from an operation such as threshold(), compare(), >, ==, etc, return all of the non-zero indices as a cv::Mat or std::vector<cv::Point> (x,y) For example:cv::Mat binaryImage; // input, binary image cv::Mat locations; // output, locations of non-zero pixels cv::findNonZero(binaryImage, locations); // access pixel coordinates Point pnt = locations.at<Point>(i);orcv::Mat binaryImage; // input, binary image vector<Point> locations; // output, locations of non-zero pixels cv::findNonZero(binaryImage, locations); // access pixel coordinates Point pnt = locations[i];static voidFlips a 2D array around vertical, horizontal, or both axes.static voidFlips a n-dimensional at given axisstatic voidPerforms generalized matrix multiplication.static voidPerforms generalized matrix multiplication.static booleanCore.hasNonZero(Mat src) Checks for the presence of at least one non-zero array element.static voidstd::vector<cv::Mat> matrices = { cv::Mat(4, 1, CV_8UC1, cv::Scalar(1)), cv::Mat(4, 1, CV_8UC1, cv::Scalar(2)), cv::Mat(4, 1, CV_8UC1, cv::Scalar(3)),}; cv::Mat out; cv::hconcat( matrices, out ); //out: //[1, 2, 3; // 1, 2, 3; // 1, 2, 3; // 1, 2, 3]static voidCalculates the inverse Discrete Cosine Transform of a 1D or 2D array.static voidCalculates the inverse Discrete Cosine Transform of a 1D or 2D array.static voidCalculates the inverse Discrete Fourier Transform of a 1D or 2D array.static voidCalculates the inverse Discrete Fourier Transform of a 1D or 2D array.static voidCalculates the inverse Discrete Fourier Transform of a 1D or 2D array.static voidChecks if array elements lie between the elements of two other arrays.static voidCore.insertChannel(Mat src, Mat dst, int coi) Inserts a single channel to dst (coi is 0-based index)static doubleFinds the inverse or pseudo-inverse of a matrix.static doubleFinds the inverse or pseudo-inverse of a matrix.static doubleCore.kmeans(Mat data, int K, Mat bestLabels, TermCriteria criteria, int attempts, int flags) Finds centers of clusters and groups input samples around the clusters.static doubleCore.kmeans(Mat data, int K, Mat bestLabels, TermCriteria criteria, int attempts, int flags, Mat centers) Finds centers of clusters and groups input samples around the clusters.static voidCalculates the natural logarithm of every array element.static voidPerforms a look-up table transform of an array.static voidCalculates the magnitude of 2D vectors.static doubleCore.Mahalanobis(Mat v1, Mat v2, Mat icovar) Calculates the Mahalanobis distance between two vectors.Matrix multiplicationstatic voidCalculates per-element maximum of two arrays or an array and a scalar.static voidstatic ScalarCalculates an average (mean) of array elements.static ScalarCalculates an average (mean) of array elements.static voidCore.meanStdDev(Mat src, MatOfDouble mean, MatOfDouble stddev) Calculates a mean and standard deviation of array elements.static voidCore.meanStdDev(Mat src, MatOfDouble mean, MatOfDouble stddev, Mat mask) Calculates a mean and standard deviation of array elements.static voidstatic voidCalculates per-element minimum of two arrays or an array and a scalar.static voidstatic Core.MinMaxLocResultstatic Core.MinMaxLocResultElement-wise multiplicationElement-wise multiplication with scale factorstatic voidCore.mulSpectrums(Mat a, Mat b, Mat c, int flags) Performs the per-element multiplication of two Fourier spectrums.static voidCore.mulSpectrums(Mat a, Mat b, Mat c, int flags, boolean conjB) Performs the per-element multiplication of two Fourier spectrums.static voidCalculates the per-element scaled product of two arrays.static voidCalculates the per-element scaled product of two arrays.static voidCalculates the per-element scaled product of two arrays.static voidstatic voidstatic voidstatic voidCore.mulTransposed(Mat src, Mat dst, boolean aTa) Calculates the product of a matrix and its transposition.static voidCore.mulTransposed(Mat src, Mat dst, boolean aTa, Mat delta) Calculates the product of a matrix and its transposition.static voidCore.mulTransposed(Mat src, Mat dst, boolean aTa, Mat delta, double scale) Calculates the product of a matrix and its transposition.static voidCore.mulTransposed(Mat src, Mat dst, boolean aTa, Mat delta, double scale, int dtype) Calculates the product of a matrix and its transposition.static doubleCalculates the absolute norm of an array.static doubleCalculates the absolute norm of an array.static doubleCalculates the absolute norm of an array.static doubleCalculates an absolute difference norm or a relative difference norm.static doubleCalculates an absolute difference norm or a relative difference norm.static doubleCalculates an absolute difference norm or a relative difference norm.static voidNormalizes the norm or value range of an array.static voidNormalizes the norm or value range of an array.static voidNormalizes the norm or value range of an array.static voidNormalizes the norm or value range of an array.static voidNormalizes the norm or value range of an array.static voidNormalizes the norm or value range of an array.static voidReplaces NaNs by given numberstatic voidReplaces NaNs by given numberstatic voidCore.PCABackProject(Mat data, Mat mean, Mat eigenvectors, Mat result) wrap PCA::backProjectstatic voidCore.PCACompute(Mat data, Mat mean, Mat eigenvectors) wrap PCA::operator()static voidCore.PCACompute(Mat data, Mat mean, Mat eigenvectors, double retainedVariance) wrap PCA::operator()static voidCore.PCACompute(Mat data, Mat mean, Mat eigenvectors, int maxComponents) wrap PCA::operator()static voidCore.PCACompute2(Mat data, Mat mean, Mat eigenvectors, Mat eigenvalues) wrap PCA::operator() and add eigenvalues output parameterstatic voidCore.PCACompute2(Mat data, Mat mean, Mat eigenvectors, Mat eigenvalues, double retainedVariance) wrap PCA::operator() and add eigenvalues output parameterstatic voidCore.PCACompute2(Mat data, Mat mean, Mat eigenvectors, Mat eigenvalues, int maxComponents) wrap PCA::operator() and add eigenvalues output parameterstatic voidCore.PCAProject(Mat data, Mat mean, Mat eigenvectors, Mat result) wrap PCA::projectstatic voidCore.perspectiveTransform(Mat src, Mat dst, Mat m) Performs the perspective matrix transformation of vectors.static voidCalculates the rotation angle of 2D vectors.static voidCalculates the rotation angle of 2D vectors.static voidCore.polarToCart(Mat magnitude, Mat angle, Mat x, Mat y) Calculates x and y coordinates of 2D vectors from their magnitude and angle.static voidCore.polarToCart(Mat magnitude, Mat angle, Mat x, Mat y, boolean angleInDegrees) Calculates x and y coordinates of 2D vectors from their magnitude and angle.static voidRaises every array element to a power.static doubleComputes the Peak Signal-to-Noise Ratio (PSNR) image quality metric.static doubleComputes the Peak Signal-to-Noise Ratio (PSNR) image quality metric.voidstatic voidFills the array with normally distributed random numbers.static voidCore.randShuffle(Mat dst) Shuffles the array elements randomly.static voidCore.randShuffle(Mat dst, double iterFactor) Shuffles the array elements randomly.static voidGenerates a single uniformly-distributed random number or an array of random numbers.static voidReduces a matrix to a vector.static voidReduces a matrix to a vector.static voidCore.reduceArgMax(Mat src, Mat dst, int axis) Finds indices of max elements along provided axis Note: - If input or output array is not continuous, this function will create an internal copy. - NaN handling is left unspecified, see patchNaNs(). - The returned index is always in bounds of input matrix.static voidCore.reduceArgMax(Mat src, Mat dst, int axis, boolean lastIndex) Finds indices of max elements along provided axis Note: - If input or output array is not continuous, this function will create an internal copy. - NaN handling is left unspecified, see patchNaNs(). - The returned index is always in bounds of input matrix.static voidCore.reduceArgMin(Mat src, Mat dst, int axis) Finds indices of min elements along provided axis Note: - If input or output array is not continuous, this function will create an internal copy. - NaN handling is left unspecified, see patchNaNs(). - The returned index is always in bounds of input matrix.static voidCore.reduceArgMin(Mat src, Mat dst, int axis, boolean lastIndex) Finds indices of min elements along provided axis Note: - If input or output array is not continuous, this function will create an internal copy. - NaN handling is left unspecified, see patchNaNs(). - The returned index is always in bounds of input matrix.static voidFills the output array with repeated copies of the input array.static voidRotates a 2D array in multiples of 90 degrees.static voidCalculates the sum of a scaled array and another array.static voidCore.setIdentity(Mat mtx) Initializes a scaled identity matrix.static voidCore.setIdentity(Mat mtx, Scalar s) Initializes a scaled identity matrix.static booleanSolves one or more linear systems or least-squares problems.static booleanSolves one or more linear systems or least-squares problems.static intCore.solveCubic(Mat coeffs, Mat roots) Finds the real roots of a cubic equation.static doubleFinds the real or complex roots of a polynomial equation.static doubleFinds the real or complex roots of a polynomial equation.static voidSorts each row or each column of a matrix.static voidSorts each row or each column of a matrix.static voidstatic voidCalculates a square root of array elements.static voidCalculates the per-element difference between two arrays or array and a scalar.static voidCalculates the per-element difference between two arrays or array and a scalar.static voidCalculates the per-element difference between two arrays or array and a scalar.static voidstatic voidstatic voidstatic ScalarCalculates the sum of array elements.static voidwrap SVD::backSubststatic voidwrap SVD::computestatic voidwrap SVD::computestatic ScalarReturns the trace of a matrix.static voidPerforms the matrix transformation of every array element.static voidTransposes a matrix.static voidCore.transposeND(Mat src, MatOfInt order, Mat dst) Transpose for n-dimensional matrices.static voidstd::vector<cv::Mat> matrices = { cv::Mat(1, 4, CV_8UC1, cv::Scalar(1)), cv::Mat(1, 4, CV_8UC1, cv::Scalar(2)), cv::Mat(1, 4, CV_8UC1, cv::Scalar(3)),}; cv::Mat out; cv::vconcat( matrices, out ); //out: //[1, 1, 1, 1; // 2, 2, 2, 2; // 3, 3, 3, 3]Method parameters in org.opencv.core with type arguments of type MatModifier and TypeMethodDescriptionstatic voidstd::vector<cv::Mat> matrices = { cv::Mat(4, 1, CV_8UC1, cv::Scalar(1)), cv::Mat(4, 1, CV_8UC1, cv::Scalar(2)), cv::Mat(4, 1, CV_8UC1, cv::Scalar(3)),}; cv::Mat out; cv::hconcat( matrices, out ); //out: //[1, 2, 3; // 1, 2, 3; // 1, 2, 3; // 1, 2, 3]static voidstatic voidstatic voidstatic voidstd::vector<cv::Mat> matrices = { cv::Mat(1, 4, CV_8UC1, cv::Scalar(1)), cv::Mat(1, 4, CV_8UC1, cv::Scalar(2)), cv::Mat(1, 4, CV_8UC1, cv::Scalar(3)),}; cv::Mat out; cv::vconcat( matrices, out ); //out: //[1, 1, 1, 1; // 2, 2, 2, 2; // 3, 3, 3, 3]Constructors in org.opencv.core with parameters of type MatModifierConstructorDescriptionMatOfDMatch(Mat m) MatOfDouble(Mat m) MatOfFloat(Mat m) MatOfFloat4(Mat m) MatOfFloat6(Mat m) MatOfKeyPoint(Mat m) MatOfPoint(Mat m) MatOfPoint2f(Mat m) MatOfPoint3(Mat m) MatOfPoint3f(Mat m) MatOfRect2d(Mat m) -
Uses of Mat in org.opencv.img_hash
Methods in org.opencv.img_hash with parameters of type MatModifier and TypeMethodDescriptionstatic voidImg_hash.averageHash(Mat inputArr, Mat outputArr) Calculates img_hash::AverageHash in one callstatic voidImg_hash.blockMeanHash(Mat inputArr, Mat outputArr) Computes block mean hash of the input imagestatic voidImg_hash.blockMeanHash(Mat inputArr, Mat outputArr, int mode) Computes block mean hash of the input imagestatic voidImg_hash.colorMomentHash(Mat inputArr, Mat outputArr) Computes color moment hash of the input, the algorithm is come from the paper "Perceptual Hashing for Color Images Using Invariant Moments"doubleCompare the hash value between inOne and inTwovoidComputes hash of the input imagestatic voidImg_hash.marrHildrethHash(Mat inputArr, Mat outputArr) Computes average hash value of the input imagestatic voidImg_hash.marrHildrethHash(Mat inputArr, Mat outputArr, float alpha) Computes average hash value of the input imagestatic voidImg_hash.marrHildrethHash(Mat inputArr, Mat outputArr, float alpha, float scale) Computes average hash value of the input imagestatic voidComputes pHash value of the input imagestatic voidImg_hash.radialVarianceHash(Mat inputArr, Mat outputArr) Computes radial variance hash of the input imagestatic voidImg_hash.radialVarianceHash(Mat inputArr, Mat outputArr, double sigma) Computes radial variance hash of the input imagestatic voidImg_hash.radialVarianceHash(Mat inputArr, Mat outputArr, double sigma, int numOfAngleLine) Computes radial variance hash of the input image -
Uses of Mat in org.opencv.imgcodecs
Methods in org.opencv.imgcodecs that return MatModifier and TypeMethodDescriptionstatic MatImgcodecs.dicomJpgFileRead(String filename, MatOfDouble segposition, MatOfDouble seglength) Loads a jpeg image (jpeg, jpeg-losseless, jpeg-ls and jpeg-2000) from file segments.static MatImgcodecs.dicomJpgFileRead(String filename, MatOfDouble segposition, MatOfDouble seglength, int dicomflags) Loads a jpeg image (jpeg, jpeg-losseless, jpeg-ls and jpeg-2000) from file segments.static MatImgcodecs.dicomJpgFileRead(String filename, MatOfDouble segposition, MatOfDouble seglength, int dicomflags, int flags) Loads a jpeg image (jpeg, jpeg-losseless, jpeg-ls and jpeg-2000) from file segments.static MatImgcodecs.dicomJpgMatRead(Mat buf) Loads a jpeg image (jpeg, jpeg-losseless, jpeg-ls and jpeg-2000) from Mat.static MatImgcodecs.dicomJpgMatRead(Mat buf, int dicomflags) Loads a jpeg image (jpeg, jpeg-losseless, jpeg-ls and jpeg-2000) from Mat.static MatImgcodecs.dicomJpgMatRead(Mat buf, int dicomflags, int flags) Loads a jpeg image (jpeg, jpeg-losseless, jpeg-ls and jpeg-2000) from Mat.static MatImgcodecs.dicomJpgWrite(Mat image, MatOfInt dicomParams, String colormodel) Encodes an DICOM image into a memory buffer.static MatImgcodecs.dicomRawFileRead(String filename, MatOfDouble segposition, MatOfDouble seglength, MatOfInt dicomparams, String colormodel) Loads a raw image (include RLE compressed image) from file segments.static MatImgcodecs.dicomRawMatRead(Mat buf, MatOfInt dicomParams, String colormodel) Loads a raw image (include RLE compressed image) from Mat.static MatReads an image from a buffer in memory.static MatLoads an image from a file.static MatLoads an image from a file.Methods in org.opencv.imgcodecs with parameters of type MatModifier and TypeMethodDescriptionstatic MatImgcodecs.dicomJpgMatRead(Mat buf) Loads a jpeg image (jpeg, jpeg-losseless, jpeg-ls and jpeg-2000) from Mat.static MatImgcodecs.dicomJpgMatRead(Mat buf, int dicomflags) Loads a jpeg image (jpeg, jpeg-losseless, jpeg-ls and jpeg-2000) from Mat.static MatImgcodecs.dicomJpgMatRead(Mat buf, int dicomflags, int flags) Loads a jpeg image (jpeg, jpeg-losseless, jpeg-ls and jpeg-2000) from Mat.static MatImgcodecs.dicomJpgWrite(Mat image, MatOfInt dicomParams, String colormodel) Encodes an DICOM image into a memory buffer.static MatImgcodecs.dicomRawMatRead(Mat buf, MatOfInt dicomParams, String colormodel) Loads a raw image (include RLE compressed image) from Mat.static MatReads an image from a buffer in memory.static booleanImgcodecs.imdecodemulti(Mat buf, int flags, List<Mat> mats) Reads a multi-page image from a buffer in memory.static booleanImgcodecs.imdecodemulti(Mat buf, int flags, List<Mat> mats, Range range) Reads a multi-page image from a buffer in memory.static booleanEncodes an image into a memory buffer.static booleanEncodes an image into a memory buffer.static booleanSaves an image to a specified file.static booleanSaves an image to a specified file.Method parameters in org.opencv.imgcodecs with type arguments of type MatModifier and TypeMethodDescriptionstatic booleanImgcodecs.imdecodemulti(Mat buf, int flags, List<Mat> mats) Reads a multi-page image from a buffer in memory.static booleanImgcodecs.imdecodemulti(Mat buf, int flags, List<Mat> mats, Range range) Reads a multi-page image from a buffer in memory.static booleanImgcodecs.imreadmulti(String filename, List<Mat> mats) Loads a multi-page image from a file.static booleanImgcodecs.imreadmulti(String filename, List<Mat> mats, int flags) Loads a multi-page image from a file.static booleanImgcodecs.imreadmulti(String filename, List<Mat> mats, int start, int count) Loads a of images of a multi-page image from a file.static booleanImgcodecs.imreadmulti(String filename, List<Mat> mats, int start, int count, int flags) Loads a of images of a multi-page image from a file.static booleanImgcodecs.imwritemulti(String filename, List<Mat> img) static booleanImgcodecs.imwritemulti(String filename, List<Mat> img, MatOfInt params) -
Uses of Mat in org.opencv.imgproc
Methods in org.opencv.imgproc that return MatModifier and TypeMethodDescriptionstatic MatImgproc.getAffineTransform(MatOfPoint2f src, MatOfPoint2f dst) static MatImgproc.getGaborKernel(Size ksize, double sigma, double theta, double lambd, double gamma) Returns Gabor filter coefficients.static MatImgproc.getGaborKernel(Size ksize, double sigma, double theta, double lambd, double gamma, double psi) Returns Gabor filter coefficients.static MatImgproc.getGaborKernel(Size ksize, double sigma, double theta, double lambd, double gamma, double psi, int ktype) Returns Gabor filter coefficients.static MatImgproc.getGaussianKernel(int ksize, double sigma) Returns Gaussian filter coefficients.static MatImgproc.getGaussianKernel(int ksize, double sigma, int ktype) Returns Gaussian filter coefficients.static MatImgproc.getPerspectiveTransform(Mat src, Mat dst) Calculates a perspective transform from four pairs of the corresponding points.static MatImgproc.getPerspectiveTransform(Mat src, Mat dst, int solveMethod) Calculates a perspective transform from four pairs of the corresponding points.static MatImgproc.getRotationMatrix2D(Point center, double angle, double scale) Calculates an affine matrix of 2D rotation.static MatImgproc.getStructuringElement(int shape, Size ksize) Returns a structuring element of the specified size and shape for morphological operations.static MatImgproc.getStructuringElement(int shape, Size ksize, Point anchor) Returns a structuring element of the specified size and shape for morphological operations.Methods in org.opencv.imgproc with parameters of type MatModifier and TypeMethodDescriptionstatic voidImgproc.accumulate(Mat src, Mat dst) Adds an image to the accumulator image.static voidImgproc.accumulate(Mat src, Mat dst, Mat mask) Adds an image to the accumulator image.static voidImgproc.accumulateProduct(Mat src1, Mat src2, Mat dst) Adds the per-element product of two input images to the accumulator image.static voidImgproc.accumulateProduct(Mat src1, Mat src2, Mat dst, Mat mask) Adds the per-element product of two input images to the accumulator image.static voidImgproc.accumulateSquare(Mat src, Mat dst) Adds the square of a source image to the accumulator image.static voidImgproc.accumulateSquare(Mat src, Mat dst, Mat mask) Adds the square of a source image to the accumulator image.static voidImgproc.accumulateWeighted(Mat src, Mat dst, double alpha) Updates a running average.static voidImgproc.accumulateWeighted(Mat src, Mat dst, double alpha, Mat mask) Updates a running average.static voidImgproc.adaptiveThreshold(Mat src, Mat dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C) Applies an adaptive threshold to an array.voidEqualizes the histogram of a grayscale image using Contrast Limited Adaptive Histogram Equalization.static voidImgproc.applyColorMap(Mat src, Mat dst, int colormap) Applies a GNU Octave/MATLAB equivalent colormap on a given image.static voidImgproc.applyColorMap(Mat src, Mat dst, Mat userColor) Applies a user colormap on a given image.IntelligentScissorsMB.applyImage(Mat image) Specify input image and extract image featuresIntelligentScissorsMB.applyImageFeatures(Mat non_edge, Mat gradient_direction, Mat gradient_magnitude) Specify custom features of input image Customized advanced variant of applyImage() call.IntelligentScissorsMB.applyImageFeatures(Mat non_edge, Mat gradient_direction, Mat gradient_magnitude, Mat image) Specify custom features of input image Customized advanced variant of applyImage() call.static voidImgproc.arrowedLine(Mat img, Point pt1, Point pt2, Scalar color) Draws an arrow segment pointing from the first point to the second one.static voidImgproc.arrowedLine(Mat img, Point pt1, Point pt2, Scalar color, int thickness) Draws an arrow segment pointing from the first point to the second one.static voidImgproc.arrowedLine(Mat img, Point pt1, Point pt2, Scalar color, int thickness, int line_type) Draws an arrow segment pointing from the first point to the second one.static voidImgproc.arrowedLine(Mat img, Point pt1, Point pt2, Scalar color, int thickness, int line_type, int shift) Draws an arrow segment pointing from the first point to the second one.static voidImgproc.arrowedLine(Mat img, Point pt1, Point pt2, Scalar color, int thickness, int line_type, int shift, double tipLength) Draws an arrow segment pointing from the first point to the second one.static voidImgproc.bilateralFilter(Mat src, Mat dst, int d, double sigmaColor, double sigmaSpace) Applies the bilateral filter to an image.static voidImgproc.bilateralFilter(Mat src, Mat dst, int d, double sigmaColor, double sigmaSpace, int borderType) Applies the bilateral filter to an image.static voidvariant withoutmaskparameterstatic voidBlurs an image using the normalized box filter.static voidBlurs an image using the normalized box filter.static voidBlurs an image using the normalized box filter.static RectImgproc.boundingRect(Mat array) Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image.static voidBlurs an image using the box filter.static voidBlurs an image using the box filter.static voidBlurs an image using the box filter.static voidImgproc.boxFilter(Mat src, Mat dst, int ddepth, Size ksize, Point anchor, boolean normalize, int borderType) Blurs an image using the box filter.static voidImgproc.boxPoints(RotatedRect box, Mat points) Finds the four vertices of a rotated rect.static voidImgproc.calcBackProject(List<Mat> images, MatOfInt channels, Mat hist, Mat dst, MatOfFloat ranges, double scale) static voidImgproc.calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges) this variant supports only uniform histograms.static voidImgproc.calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges, boolean accumulate) this variant supports only uniform histograms.static voidFinds edges in an image using the Canny algorithm CITE: Canny86 .static voidFinds edges in an image using the Canny algorithm CITE: Canny86 .static voidImgproc.Canny(Mat image, Mat edges, double threshold1, double threshold2, int apertureSize, boolean L2gradient) Finds edges in an image using the Canny algorithm CITE: Canny86 .static void\overload Finds edges in an image using the Canny algorithm with custom image gradient.static void\overload Finds edges in an image using the Canny algorithm with custom image gradient.static voidDraws a circle.static voidDraws a circle.static voidDraws a circle.static voidImgproc.circle(Mat img, Point center, int radius, Scalar color, int thickness, int lineType, int shift) Draws a circle.static doubleImgproc.compareHist(Mat H1, Mat H2, int method) Compares two histograms.intLineSegmentDetector.compareSegments(Size size, Mat lines1, Mat lines2) Draws two groups of lines in blue and red, counting the non overlapping (mismatching) pixels.intLineSegmentDetector.compareSegments(Size size, Mat lines1, Mat lines2, Mat image) Draws two groups of lines in blue and red, counting the non overlapping (mismatching) pixels.static intImgproc.connectedComponents(Mat image, Mat labels) static intImgproc.connectedComponents(Mat image, Mat labels, int connectivity) static intImgproc.connectedComponents(Mat image, Mat labels, int connectivity, int ltype) static intImgproc.connectedComponentsWithAlgorithm(Mat image, Mat labels, int connectivity, int ltype, int ccltype) computes the connected components labeled image of boolean image image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 represents the background label. ltype specifies the output label image type, an important consideration based on the total number of labels or alternatively the total number of pixels in the source image. ccltype specifies the connected components labeling algorithm to use, currently Bolelli (Spaghetti) CITE: Bolelli2019, Grana (BBDT) CITE: Grana2010 and Wu's (SAUF) CITE: Wu2009 algorithms are supported, see the #ConnectedComponentsAlgorithmsTypes for details.static intImgproc.connectedComponentsWithStats(Mat image, Mat labels, Mat stats, Mat centroids) static intImgproc.connectedComponentsWithStats(Mat image, Mat labels, Mat stats, Mat centroids, int connectivity) static intImgproc.connectedComponentsWithStats(Mat image, Mat labels, Mat stats, Mat centroids, int connectivity, int ltype) static intImgproc.connectedComponentsWithStatsWithAlgorithm(Mat image, Mat labels, Mat stats, Mat centroids, int connectivity, int ltype, int ccltype) computes the connected components labeled image of boolean image and also produces a statistics output for each label image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 represents the background label. ltype specifies the output label image type, an important consideration based on the total number of labels or alternatively the total number of pixels in the source image. ccltype specifies the connected components labeling algorithm to use, currently Bolelli (Spaghetti) CITE: Bolelli2019, Grana (BBDT) CITE: Grana2010 and Wu's (SAUF) CITE: Wu2009 algorithms are supported, see the #ConnectedComponentsAlgorithmsTypes for details.static doubleImgproc.contourArea(Mat contour) Calculates a contour area.static doubleImgproc.contourArea(Mat contour, boolean oriented) Calculates a contour area.static voidImgproc.convertMaps(Mat map1, Mat map2, Mat dstmap1, Mat dstmap2, int dstmap1type) Converts image transformation maps from one representation to another.static voidImgproc.convertMaps(Mat map1, Mat map2, Mat dstmap1, Mat dstmap2, int dstmap1type, boolean nninterpolation) Converts image transformation maps from one representation to another.static voidImgproc.cornerEigenValsAndVecs(Mat src, Mat dst, int blockSize, int ksize) Calculates eigenvalues and eigenvectors of image blocks for corner detection.static voidImgproc.cornerEigenValsAndVecs(Mat src, Mat dst, int blockSize, int ksize, int borderType) Calculates eigenvalues and eigenvectors of image blocks for corner detection.static voidImgproc.cornerHarris(Mat src, Mat dst, int blockSize, int ksize, double k) Harris corner detector.static voidImgproc.cornerHarris(Mat src, Mat dst, int blockSize, int ksize, double k, int borderType) Harris corner detector.static voidImgproc.cornerMinEigenVal(Mat src, Mat dst, int blockSize) Calculates the minimal eigenvalue of gradient matrices for corner detection.static voidImgproc.cornerMinEigenVal(Mat src, Mat dst, int blockSize, int ksize) Calculates the minimal eigenvalue of gradient matrices for corner detection.static voidImgproc.cornerMinEigenVal(Mat src, Mat dst, int blockSize, int ksize, int borderType) Calculates the minimal eigenvalue of gradient matrices for corner detection.static voidImgproc.cornerSubPix(Mat image, Mat corners, Size winSize, Size zeroZone, TermCriteria criteria) Refines the corner locations.static voidImgproc.createHanningWindow(Mat dst, Size winSize, int type) This function computes a Hanning window coefficients in two dimensions.static voidConverts an image from one color space to another.static voidConverts an image from one color space to another.static voidImgproc.cvtColorTwoPlane(Mat src1, Mat src2, Mat dst, int code) Converts an image from one color space to another where the source image is stored in two planes.static voidImgproc.demosaicing(Mat src, Mat dst, int code) main function for all demosaicing processesstatic voidImgproc.demosaicing(Mat src, Mat dst, int code, int dstCn) main function for all demosaicing processesvoidvoidvoidvoidvoidFinds lines in the input image.voidFinds lines in the input image.voidFinds lines in the input image.voidFinds lines in the input image.static voidDilates an image by using a specific structuring element.static voidDilates an image by using a specific structuring element.static voidDilates an image by using a specific structuring element.static voidDilates an image by using a specific structuring element.static voidImgproc.dilate(Mat src, Mat dst, Mat kernel, Point anchor, int iterations, int borderType, Scalar borderValue) Dilates an image by using a specific structuring element.static voidImgproc.distanceTransform(Mat src, Mat dst, int distanceType, int maskSize) static voidImgproc.distanceTransform(Mat src, Mat dst, int distanceType, int maskSize, int dstType) static voidImgproc.distanceTransformWithLabels(Mat src, Mat dst, Mat labels, int distanceType, int maskSize) Calculates the distance to the closest zero pixel for each pixel of the source image.static voidImgproc.distanceTransformWithLabels(Mat src, Mat dst, Mat labels, int distanceType, int maskSize, int labelType) Calculates the distance to the closest zero pixel for each pixel of the source image.static voidImgproc.divSpectrums(Mat a, Mat b, Mat c, int flags) Performs the per-element division of the first Fourier spectrum by the second Fourier spectrum.static voidImgproc.divSpectrums(Mat a, Mat b, Mat c, int flags, boolean conjB) Performs the per-element division of the first Fourier spectrum by the second Fourier spectrum.static voidImgproc.drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color) Draws contours outlines or filled contours.static voidImgproc.drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color, int thickness) Draws contours outlines or filled contours.static voidImgproc.drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color, int thickness, int lineType) Draws contours outlines or filled contours.static voidImgproc.drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy) Draws contours outlines or filled contours.static voidImgproc.drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy, int maxLevel) Draws contours outlines or filled contours.static voidImgproc.drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy, int maxLevel, Point offset) Draws contours outlines or filled contours.static voidImgproc.drawMarker(Mat img, Point position, Scalar color) Draws a marker on a predefined position in an image.static voidImgproc.drawMarker(Mat img, Point position, Scalar color, int markerType) Draws a marker on a predefined position in an image.static voidImgproc.drawMarker(Mat img, Point position, Scalar color, int markerType, int markerSize) Draws a marker on a predefined position in an image.static voidImgproc.drawMarker(Mat img, Point position, Scalar color, int markerType, int markerSize, int thickness) Draws a marker on a predefined position in an image.static voidImgproc.drawMarker(Mat img, Point position, Scalar color, int markerType, int markerSize, int thickness, int line_type) Draws a marker on a predefined position in an image.voidLineSegmentDetector.drawSegments(Mat image, Mat lines) Draws the line segments on a given image.static voidImgproc.ellipse(Mat img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color) Draws a simple or thick elliptic arc or fills an ellipse sector.static voidImgproc.ellipse(Mat img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color, int thickness) Draws a simple or thick elliptic arc or fills an ellipse sector.static voidImgproc.ellipse(Mat img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color, int thickness, int lineType) Draws a simple or thick elliptic arc or fills an ellipse sector.static voidImgproc.ellipse(Mat img, Point center, Size axes, double angle, double startAngle, double endAngle, Scalar color, int thickness, int lineType, int shift) Draws a simple or thick elliptic arc or fills an ellipse sector.static voidImgproc.ellipse(Mat img, RotatedRect box, Scalar color) static voidImgproc.ellipse(Mat img, RotatedRect box, Scalar color, int thickness) static voidImgproc.ellipse(Mat img, RotatedRect box, Scalar color, int thickness, int lineType) static floatComputes the "minimal work" distance between two weighted point configurations.static floatComputes the "minimal work" distance between two weighted point configurations.static floatComputes the "minimal work" distance between two weighted point configurations.static voidImgproc.equalizeHist(Mat src, Mat dst) Equalizes the histogram of a grayscale image.static voidErodes an image by using a specific structuring element.static voidErodes an image by using a specific structuring element.static voidErodes an image by using a specific structuring element.static voidErodes an image by using a specific structuring element.static voidImgproc.erode(Mat src, Mat dst, Mat kernel, Point anchor, int iterations, int borderType, Scalar borderValue) Erodes an image by using a specific structuring element.static voidImgproc.fillConvexPoly(Mat img, MatOfPoint points, Scalar color) Fills a convex polygon.static voidImgproc.fillConvexPoly(Mat img, MatOfPoint points, Scalar color, int lineType) Fills a convex polygon.static voidImgproc.fillConvexPoly(Mat img, MatOfPoint points, Scalar color, int lineType, int shift) Fills a convex polygon.static voidImgproc.fillPoly(Mat img, List<MatOfPoint> pts, Scalar color) Fills the area bounded by one or more polygons.static voidImgproc.fillPoly(Mat img, List<MatOfPoint> pts, Scalar color, int lineType) Fills the area bounded by one or more polygons.static voidImgproc.fillPoly(Mat img, List<MatOfPoint> pts, Scalar color, int lineType, int shift) Fills the area bounded by one or more polygons.static voidImgproc.fillPoly(Mat img, List<MatOfPoint> pts, Scalar color, int lineType, int shift, Point offset) Fills the area bounded by one or more polygons.static voidConvolves an image with the kernel.static voidConvolves an image with the kernel.static voidConvolves an image with the kernel.static voidImgproc.filter2D(Mat src, Mat dst, int ddepth, Mat kernel, Point anchor, double delta, int borderType) Convolves an image with the kernel.static voidImgproc.findContours(Mat image, List<MatOfPoint> contours, Mat hierarchy, int mode, int method) Finds contours in a binary image.static voidImgproc.findContours(Mat image, List<MatOfPoint> contours, Mat hierarchy, int mode, int method, Point offset) Finds contours in a binary image.static RotatedRectImgproc.fitEllipseAMS(Mat points) Fits an ellipse around a set of 2D points.static RotatedRectImgproc.fitEllipseDirect(Mat points) Fits an ellipse around a set of 2D points.static voidFits a line to a 2D or 3D point set.static intFills a connected component with the given color.static intFills a connected component with the given color.static intFills a connected component with the given color.static intImgproc.floodFill(Mat image, Mat mask, Point seedPoint, Scalar newVal, Rect rect, Scalar loDiff, Scalar upDiff) Fills a connected component with the given color.static intImgproc.floodFill(Mat image, Mat mask, Point seedPoint, Scalar newVal, Rect rect, Scalar loDiff, Scalar upDiff, int flags) Fills a connected component with the given color.static voidImgproc.GaussianBlur(Mat src, Mat dst, Size ksize, double sigmaX) Blurs an image using a Gaussian filter.static voidImgproc.GaussianBlur(Mat src, Mat dst, Size ksize, double sigmaX, double sigmaY) Blurs an image using a Gaussian filter.static voidImgproc.GaussianBlur(Mat src, Mat dst, Size ksize, double sigmaX, double sigmaY, int borderType) Blurs an image using a Gaussian filter.voidIntelligentScissorsMB.getContour(Point targetPt, Mat contour) Extracts optimal contour for the given target point on the image Note: buildMap() must be called before this callvoidIntelligentScissorsMB.getContour(Point targetPt, Mat contour, boolean backward) Extracts optimal contour for the given target point on the image Note: buildMap() must be called before this callstatic voidImgproc.getDerivKernels(Mat kx, Mat ky, int dx, int dy, int ksize) Returns filter coefficients for computing spatial image derivatives.static voidImgproc.getDerivKernels(Mat kx, Mat ky, int dx, int dy, int ksize, boolean normalize) Returns filter coefficients for computing spatial image derivatives.static voidImgproc.getDerivKernels(Mat kx, Mat ky, int dx, int dy, int ksize, boolean normalize, int ktype) Returns filter coefficients for computing spatial image derivatives.static MatImgproc.getPerspectiveTransform(Mat src, Mat dst) Calculates a perspective transform from four pairs of the corresponding points.static MatImgproc.getPerspectiveTransform(Mat src, Mat dst, int solveMethod) Calculates a perspective transform from four pairs of the corresponding points.static voidImgproc.getRectSubPix(Mat image, Size patchSize, Point center, Mat patch) Retrieves a pixel rectangle from an image with sub-pixel accuracy.static voidImgproc.getRectSubPix(Mat image, Size patchSize, Point center, Mat patch, int patchType) Retrieves a pixel rectangle from an image with sub-pixel accuracy.static voidImgproc.goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance) Determines strong corners on an image.static voidImgproc.goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask) Determines strong corners on an image.static voidImgproc.goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize) Determines strong corners on an image.static voidImgproc.goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, boolean useHarrisDetector) Determines strong corners on an image.static voidImgproc.goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, boolean useHarrisDetector, double k) Determines strong corners on an image.static voidImgproc.goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, int gradientSize) static voidImgproc.goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, int gradientSize, boolean useHarrisDetector) static voidImgproc.goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, int gradientSize, boolean useHarrisDetector, double k) static voidImgproc.goodFeaturesToTrackWithQuality(Mat image, Mat corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, Mat cornersQuality) Same as above, but returns also quality measure of the detected corners.static voidImgproc.goodFeaturesToTrackWithQuality(Mat image, Mat corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, Mat cornersQuality, int blockSize) Same as above, but returns also quality measure of the detected corners.static voidImgproc.goodFeaturesToTrackWithQuality(Mat image, Mat corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, Mat cornersQuality, int blockSize, int gradientSize) Same as above, but returns also quality measure of the detected corners.static voidImgproc.goodFeaturesToTrackWithQuality(Mat image, Mat corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, Mat cornersQuality, int blockSize, int gradientSize, boolean useHarrisDetector) Same as above, but returns also quality measure of the detected corners.static voidImgproc.goodFeaturesToTrackWithQuality(Mat image, Mat corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, Mat cornersQuality, int blockSize, int gradientSize, boolean useHarrisDetector, double k) Same as above, but returns also quality measure of the detected corners.static voidRuns the GrabCut algorithm.static voidRuns the GrabCut algorithm.static voidImgproc.HoughCircles(Mat image, Mat circles, int method, double dp, double minDist) Finds circles in a grayscale image using the Hough transform.static voidImgproc.HoughCircles(Mat image, Mat circles, int method, double dp, double minDist, double param1) Finds circles in a grayscale image using the Hough transform.static voidImgproc.HoughCircles(Mat image, Mat circles, int method, double dp, double minDist, double param1, double param2) Finds circles in a grayscale image using the Hough transform.static voidImgproc.HoughCircles(Mat image, Mat circles, int method, double dp, double minDist, double param1, double param2, int minRadius) Finds circles in a grayscale image using the Hough transform.static voidImgproc.HoughCircles(Mat image, Mat circles, int method, double dp, double minDist, double param1, double param2, int minRadius, int maxRadius) Finds circles in a grayscale image using the Hough transform.static voidImgproc.HoughLines(Mat image, Mat lines, double rho, double theta, int threshold) Finds lines in a binary image using the standard Hough transform.static voidImgproc.HoughLines(Mat image, Mat lines, double rho, double theta, int threshold, double srn) Finds lines in a binary image using the standard Hough transform.static voidImgproc.HoughLines(Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn) Finds lines in a binary image using the standard Hough transform.static voidImgproc.HoughLines(Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn, double min_theta) Finds lines in a binary image using the standard Hough transform.static voidImgproc.HoughLines(Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn, double min_theta, double max_theta) Finds lines in a binary image using the standard Hough transform.static voidImgproc.HoughLinesP(Mat image, Mat lines, double rho, double theta, int threshold) Finds line segments in a binary image using the probabilistic Hough transform.static voidImgproc.HoughLinesP(Mat image, Mat lines, double rho, double theta, int threshold, double minLineLength) Finds line segments in a binary image using the probabilistic Hough transform.static voidImgproc.HoughLinesP(Mat image, Mat lines, double rho, double theta, int threshold, double minLineLength, double maxLineGap) Finds line segments in a binary image using the probabilistic Hough transform.static voidImgproc.HoughLinesPointSet(Mat point, Mat lines, int lines_max, int threshold, double min_rho, double max_rho, double rho_step, double min_theta, double max_theta, double theta_step) Finds lines in a set of points using the standard Hough transform.static voidImgproc.HoughLinesWithAccumulator(Mat image, Mat lines, double rho, double theta, int threshold) Finds lines in a binary image using the standard Hough transform and get accumulator.static voidImgproc.HoughLinesWithAccumulator(Mat image, Mat lines, double rho, double theta, int threshold, double srn) Finds lines in a binary image using the standard Hough transform and get accumulator.static voidImgproc.HoughLinesWithAccumulator(Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn) Finds lines in a binary image using the standard Hough transform and get accumulator.static voidImgproc.HoughLinesWithAccumulator(Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn, double min_theta) Finds lines in a binary image using the standard Hough transform and get accumulator.static voidImgproc.HoughLinesWithAccumulator(Mat image, Mat lines, double rho, double theta, int threshold, double srn, double stn, double min_theta, double max_theta) Finds lines in a binary image using the standard Hough transform and get accumulator.static voidstatic voidstatic voidstatic voidstatic voidstatic voidstatic voidCalculates the integral of an image.static voidCalculates the integral of an image.static voidCalculates the integral of an image.static floatImgproc.intersectConvexConvex(Mat p1, Mat p2, Mat p12) Finds intersection of two convex polygonsstatic floatImgproc.intersectConvexConvex(Mat p1, Mat p2, Mat p12, boolean handleNested) Finds intersection of two convex polygonsstatic voidImgproc.invertAffineTransform(Mat M, Mat iM) Inverts an affine transformation.static voidCalculates the Laplacian of an image.static voidCalculates the Laplacian of an image.static voidCalculates the Laplacian of an image.static voidCalculates the Laplacian of an image.static voidImgproc.Laplacian(Mat src, Mat dst, int ddepth, int ksize, double scale, double delta, int borderType) Calculates the Laplacian of an image.static voidDraws a line segment connecting two points.static voidDraws a line segment connecting two points.static voidDraws a line segment connecting two points.static voidDraws a line segment connecting two points.static voidImgproc.linearPolar(Mat src, Mat dst, Point center, double maxRadius, int flags) Deprecated.This function produces same result as cv::warpPolar(src, dst, src.size(), center, maxRadius, flags) Transform the source image using the following transformation (See REF: polar_remaps_reference_image "Polar remaps reference image c)"): \(\begin{array}{l} dst( \rho , \phi ) = src(x,y) \\ dst.size() \leftarrow src.size() \end{array}\) where \(\begin{array}{l} I = (dx,dy) = (x - center.x,y - center.y) \\ \rho = Kmag \cdot \texttt{magnitude} (I) ,\\ \phi = angle \cdot \texttt{angle} (I) \end{array}\) and \(\begin{array}{l} Kx = src.cols / maxRadius \\ Ky = src.rows / 2\Pi \end{array}\)static voidDeprecated.This function produces same result as cv::warpPolar(src, dst, src.size(), center, maxRadius, flags+WARP_POLAR_LOG); Transform the source image using the following transformation (See REF: polar_remaps_reference_image "Polar remaps reference image d)"): \(\begin{array}{l} dst( \rho , \phi ) = src(x,y) \\ dst.size() \leftarrow src.size() \end{array}\) where \(\begin{array}{l} I = (dx,dy) = (x - center.x,y - center.y) \\ \rho = M \cdot log_e(\texttt{magnitude} (I)) ,\\ \phi = Kangle \cdot \texttt{angle} (I) \\ \end{array}\) and \(\begin{array}{l} M = src.cols / log_e(maxRadius) \\ Kangle = src.rows / 2\Pi \\ \end{array}\) The function emulates the human "foveal" vision and can be used for fast scale and rotation-invariant template matching, for object tracking and so forth.static doubleImgproc.matchShapes(Mat contour1, Mat contour2, int method, double parameter) Compares two shapes.static voidImgproc.matchTemplate(Mat image, Mat templ, Mat result, int method) Compares a template against overlapped image regions.static voidImgproc.matchTemplate(Mat image, Mat templ, Mat result, int method, Mat mask) Compares a template against overlapped image regions.static voidImgproc.medianBlur(Mat src, Mat dst, int ksize) Blurs an image using the median filter.static doubleImgproc.minEnclosingTriangle(Mat points, Mat triangle) Finds a triangle of minimum area enclosing a 2D point set and returns its area.static MomentsCalculates all of the moments up to the third order of a polygon or rasterized shape.static MomentsCalculates all of the moments up to the third order of a polygon or rasterized shape.static voidImgproc.morphologyEx(Mat src, Mat dst, int op, Mat kernel) Performs advanced morphological transformations.static voidImgproc.morphologyEx(Mat src, Mat dst, int op, Mat kernel, Point anchor) Performs advanced morphological transformations.static voidImgproc.morphologyEx(Mat src, Mat dst, int op, Mat kernel, Point anchor, int iterations) Performs advanced morphological transformations.static voidImgproc.morphologyEx(Mat src, Mat dst, int op, Mat kernel, Point anchor, int iterations, int borderType) Performs advanced morphological transformations.static voidImgproc.morphologyEx(Mat src, Mat dst, int op, Mat kernel, Point anchor, int iterations, int borderType, Scalar borderValue) Performs advanced morphological transformations.static PointImgproc.phaseCorrelate(Mat src1, Mat src2) The function is used to detect translational shifts that occur between two images.static PointImgproc.phaseCorrelate(Mat src1, Mat src2, Mat window) The function is used to detect translational shifts that occur between two images.static PointImgproc.phaseCorrelate(Mat src1, Mat src2, Mat window, double[] response) The function is used to detect translational shifts that occur between two images.static voidImgproc.polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color) Draws several polygonal curves.static voidImgproc.polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color, int thickness) Draws several polygonal curves.static voidImgproc.polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color, int thickness, int lineType) Draws several polygonal curves.static voidImgproc.polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color, int thickness, int lineType, int shift) Draws several polygonal curves.static voidImgproc.preCornerDetect(Mat src, Mat dst, int ksize) Calculates a feature map for corner detection.static voidImgproc.preCornerDetect(Mat src, Mat dst, int ksize, int borderType) Calculates a feature map for corner detection.static voidDraws a text string.static voidImgproc.putText(Mat img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness) Draws a text string.static voidImgproc.putText(Mat img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness, int lineType) Draws a text string.static voidImgproc.putText(Mat img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness, int lineType, boolean bottomLeftOrigin) Draws a text string.static voidBlurs an image and downsamples it.static voidBlurs an image and downsamples it.static voidBlurs an image and downsamples it.static voidImgproc.pyrMeanShiftFiltering(Mat src, Mat dst, double sp, double sr) Performs initial step of meanshift segmentation of an image.static voidImgproc.pyrMeanShiftFiltering(Mat src, Mat dst, double sp, double sr, int maxLevel) Performs initial step of meanshift segmentation of an image.static voidImgproc.pyrMeanShiftFiltering(Mat src, Mat dst, double sp, double sr, int maxLevel, TermCriteria termcrit) Performs initial step of meanshift segmentation of an image.static voidUpsamples an image and then blurs it.static voidUpsamples an image and then blurs it.static voidUpsamples an image and then blurs it.static voidDraws a simple, thick, or filled up-right rectangle.static voidDraws a simple, thick, or filled up-right rectangle.static voidDraws a simple, thick, or filled up-right rectangle.static voidImgproc.rectangle(Mat img, Point pt1, Point pt2, Scalar color, int thickness, int lineType, int shift) Draws a simple, thick, or filled up-right rectangle.static voiduserecparameter as alternative specification of the drawn rectangle: `r.tl() and r.br()-Point(1,1)` are opposite cornersstatic voiduserecparameter as alternative specification of the drawn rectangle: `r.tl() and r.br()-Point(1,1)` are opposite cornersstatic voiduserecparameter as alternative specification of the drawn rectangle: `r.tl() and r.br()-Point(1,1)` are opposite cornersstatic voiduserecparameter as alternative specification of the drawn rectangle: `r.tl() and r.br()-Point(1,1)` are opposite cornersstatic voidApplies a generic geometrical transformation to an image.static voidApplies a generic geometrical transformation to an image.static voidImgproc.remap(Mat src, Mat dst, Mat map1, Mat map2, int interpolation, int borderMode, Scalar borderValue) Applies a generic geometrical transformation to an image.static voidResizes an image.static voidResizes an image.static voidResizes an image.static voidResizes an image.static intImgproc.rotatedRectangleIntersection(RotatedRect rect1, RotatedRect rect2, Mat intersectingRegion) Finds out if there is any intersection between two rotated rectangles.static voidCalculates the first x- or y- image derivative using Scharr operator.static voidCalculates the first x- or y- image derivative using Scharr operator.static voidCalculates the first x- or y- image derivative using Scharr operator.static voidImgproc.Scharr(Mat src, Mat dst, int ddepth, int dx, int dy, double scale, double delta, int borderType) Calculates the first x- or y- image derivative using Scharr operator.static voidImgproc.sepFilter2D(Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY) Applies a separable linear filter to an image.static voidApplies a separable linear filter to an image.static voidImgproc.sepFilter2D(Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor, double delta) Applies a separable linear filter to an image.static voidImgproc.sepFilter2D(Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor, double delta, int borderType) Applies a separable linear filter to an image.voidGeneralizedHough.setTemplate(Mat templ) voidGeneralizedHough.setTemplate(Mat edges, Mat dx, Mat dy) voidGeneralizedHough.setTemplate(Mat edges, Mat dx, Mat dy, Point templCenter) voidGeneralizedHough.setTemplate(Mat templ, Point templCenter) static voidCalculates the first, second, third, or mixed image derivatives using an extended Sobel operator.static voidCalculates the first, second, third, or mixed image derivatives using an extended Sobel operator.static voidCalculates the first, second, third, or mixed image derivatives using an extended Sobel operator.static voidCalculates the first, second, third, or mixed image derivatives using an extended Sobel operator.static voidImgproc.Sobel(Mat src, Mat dst, int ddepth, int dx, int dy, int ksize, double scale, double delta, int borderType) Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator.static voidImgproc.spatialGradient(Mat src, Mat dx, Mat dy) Calculates the first order image derivative in both x and y using a Sobel operator Equivalent to calling:Sobel( src, dx, CV_16SC1, 1, 0, 3 ); Sobel( src, dy, CV_16SC1, 0, 1, 3 );static voidImgproc.spatialGradient(Mat src, Mat dx, Mat dy, int ksize) Calculates the first order image derivative in both x and y using a Sobel operator Equivalent to calling:Sobel( src, dx, CV_16SC1, 1, 0, 3 ); Sobel( src, dy, CV_16SC1, 0, 1, 3 );static voidImgproc.spatialGradient(Mat src, Mat dx, Mat dy, int ksize, int borderType) Calculates the first order image derivative in both x and y using a Sobel operator Equivalent to calling:Sobel( src, dx, CV_16SC1, 1, 0, 3 ); Sobel( src, dy, CV_16SC1, 0, 1, 3 );static voidImgproc.sqrBoxFilter(Mat src, Mat dst, int ddepth, Size ksize) Calculates the normalized sum of squares of the pixel values overlapping the filter.static voidImgproc.sqrBoxFilter(Mat src, Mat dst, int ddepth, Size ksize, Point anchor) Calculates the normalized sum of squares of the pixel values overlapping the filter.static voidImgproc.sqrBoxFilter(Mat src, Mat dst, int ddepth, Size ksize, Point anchor, boolean normalize) Calculates the normalized sum of squares of the pixel values overlapping the filter.static voidImgproc.sqrBoxFilter(Mat src, Mat dst, int ddepth, Size ksize, Point anchor, boolean normalize, int borderType) Calculates the normalized sum of squares of the pixel values overlapping the filter.static voidBlurs an image using the stackBlur.static doubleApplies a fixed-level threshold to each array element.static voidImgproc.warpAffine(Mat src, Mat dst, Mat M, Size dsize) Applies an affine transformation to an image.static voidImgproc.warpAffine(Mat src, Mat dst, Mat M, Size dsize, int flags) Applies an affine transformation to an image.static voidImgproc.warpAffine(Mat src, Mat dst, Mat M, Size dsize, int flags, int borderMode) Applies an affine transformation to an image.static voidImgproc.warpAffine(Mat src, Mat dst, Mat M, Size dsize, int flags, int borderMode, Scalar borderValue) Applies an affine transformation to an image.static voidImgproc.warpPerspective(Mat src, Mat dst, Mat M, Size dsize) Applies a perspective transformation to an image.static voidImgproc.warpPerspective(Mat src, Mat dst, Mat M, Size dsize, int flags) Applies a perspective transformation to an image.static voidImgproc.warpPerspective(Mat src, Mat dst, Mat M, Size dsize, int flags, int borderMode) Applies a perspective transformation to an image.static voidImgproc.warpPerspective(Mat src, Mat dst, Mat M, Size dsize, int flags, int borderMode, Scalar borderValue) Applies a perspective transformation to an image.static voidRemaps an image to polar or semilog-polar coordinates space polar_remaps_reference_image !static voidPerforms a marker-based image segmentation using the watershed algorithm.Method parameters in org.opencv.imgproc with type arguments of type MatModifier and TypeMethodDescriptionstatic voidImgproc.calcBackProject(List<Mat> images, MatOfInt channels, Mat hist, Mat dst, MatOfFloat ranges, double scale) static voidImgproc.calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges) this variant supports only uniform histograms.static voidImgproc.calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges, boolean accumulate) this variant supports only uniform histograms. -
Uses of Mat in org.opencv.utils
Methods in org.opencv.utils that return MatModifier and TypeMethodDescriptionstatic MatConverters.vector_char_to_Mat(List<Byte> bs) static MatConverters.vector_DMatch_to_Mat(List<DMatch> matches) static MatConverters.vector_double_to_Mat(List<Double> ds) static MatConverters.vector_float_to_Mat(List<Float> fs) static MatConverters.vector_int_to_Mat(List<Integer> is) static MatConverters.vector_KeyPoint_to_Mat(List<KeyPoint> kps) static MatConverters.vector_Mat_to_Mat(List<Mat> mats) static MatConverters.vector_Point_to_Mat(List<Point> pts) static MatConverters.vector_Point_to_Mat(List<Point> pts, int typeDepth) static MatConverters.vector_Point2d_to_Mat(List<Point> pts) static MatConverters.vector_Point2f_to_Mat(List<Point> pts) static MatConverters.vector_Point3_to_Mat(List<Point3> pts, int typeDepth) static MatConverters.vector_Point3d_to_Mat(List<Point3> pts) static MatConverters.vector_Point3f_to_Mat(List<Point3> pts) static MatConverters.vector_Point3i_to_Mat(List<Point3> pts) static MatConverters.vector_Rect_to_Mat(List<Rect> rs) static MatConverters.vector_Rect2d_to_Mat(List<Rect2d> rs) static MatConverters.vector_RotatedRect_to_Mat(List<RotatedRect> rs) static MatConverters.vector_uchar_to_Mat(List<Byte> bs) static MatConverters.vector_vector_char_to_Mat(List<MatOfByte> lvb, List<Mat> mats) static MatConverters.vector_vector_DMatch_to_Mat(List<MatOfDMatch> lvdm, List<Mat> mats) static MatConverters.vector_vector_KeyPoint_to_Mat(List<MatOfKeyPoint> kps, List<Mat> mats) static MatConverters.vector_vector_Point_to_Mat(List<MatOfPoint> pts, List<Mat> mats) static MatConverters.vector_vector_Point2f_to_Mat(List<MatOfPoint2f> pts, List<Mat> mats) static MatConverters.vector_vector_Point3f_to_Mat(List<MatOfPoint3f> pts, List<Mat> mats) Methods in org.opencv.utils with parameters of type MatModifier and TypeMethodDescriptionstatic voidConverters.Mat_to_vector_char(Mat m, List<Byte> bs) static voidConverters.Mat_to_vector_DMatch(Mat m, List<DMatch> matches) static voidConverters.Mat_to_vector_double(Mat m, List<Double> ds) static voidConverters.Mat_to_vector_float(Mat m, List<Float> fs) static voidConverters.Mat_to_vector_int(Mat m, List<Integer> is) static voidConverters.Mat_to_vector_KeyPoint(Mat m, List<KeyPoint> kps) static voidConverters.Mat_to_vector_Mat(Mat m, List<Mat> mats) static voidConverters.Mat_to_vector_Point(Mat m, List<Point> pts) static voidConverters.Mat_to_vector_Point2d(Mat m, List<Point> pts) static voidConverters.Mat_to_vector_Point2f(Mat m, List<Point> pts) static voidConverters.Mat_to_vector_Point3(Mat m, List<Point3> pts) static voidConverters.Mat_to_vector_Point3d(Mat m, List<Point3> pts) static voidConverters.Mat_to_vector_Point3f(Mat m, List<Point3> pts) static voidConverters.Mat_to_vector_Point3i(Mat m, List<Point3> pts) static voidConverters.Mat_to_vector_Rect(Mat m, List<Rect> rs) static voidConverters.Mat_to_vector_Rect2d(Mat m, List<Rect2d> rs) static voidConverters.Mat_to_vector_RotatedRect(Mat m, List<RotatedRect> rs) static voidConverters.Mat_to_vector_uchar(Mat m, List<Byte> us) static voidConverters.Mat_to_vector_vector_char(Mat m, List<List<Byte>> llb) static voidConverters.Mat_to_vector_vector_DMatch(Mat m, List<MatOfDMatch> lvdm) static voidConverters.Mat_to_vector_vector_KeyPoint(Mat m, List<MatOfKeyPoint> kps) static voidConverters.Mat_to_vector_vector_Point(Mat m, List<MatOfPoint> pts) static voidConverters.Mat_to_vector_vector_Point2f(Mat m, List<MatOfPoint2f> pts) static voidConverters.Mat_to_vector_vector_Point3f(Mat m, List<MatOfPoint3f> pts) Method parameters in org.opencv.utils with type arguments of type MatModifier and TypeMethodDescriptionstatic voidConverters.Mat_to_vector_Mat(Mat m, List<Mat> mats) static MatConverters.vector_Mat_to_Mat(List<Mat> mats)