Search in sources :

Example 46 with Mat

use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.

the class Calib3d method solvePnP.

// 
// C++:  bool solvePnP(vector_Point3f objectPoints, vector_Point2f imagePoints, Mat cameraMatrix, vector_double distCoeffs, Mat& rvec, Mat& tvec, bool useExtrinsicGuess = false, int flags = SOLVEPNP_ITERATIVE)
// 
// javadoc: solvePnP(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess, flags)
public static boolean solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int flags) {
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnP_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, flags);
    return retVal;
}
Also used : Mat(org.opencv.core.Mat)

Example 47 with Mat

use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.

the class Calib3d method findChessboardCorners.

// 
// C++:  bool findChessboardCorners(Mat image, Size patternSize, vector_Point2f& corners, int flags = CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE)
// 
// javadoc: findChessboardCorners(image, patternSize, corners, flags)
public static boolean findChessboardCorners(Mat image, Size patternSize, MatOfPoint2f corners, int flags) {
    Mat corners_mat = corners;
    boolean retVal = findChessboardCorners_0(image.nativeObj, patternSize.width, patternSize.height, corners_mat.nativeObj, flags);
    return retVal;
}
Also used : Mat(org.opencv.core.Mat)

Example 48 with Mat

use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.

the class Calib3d method initCameraMatrix2D.

// 
// C++:  Mat initCameraMatrix2D(vector_vector_Point3f objectPoints, vector_vector_Point2f imagePoints, Size imageSize, double aspectRatio = 1.0)
// 
// javadoc: initCameraMatrix2D(objectPoints, imagePoints, imageSize, aspectRatio)
public static Mat initCameraMatrix2D(List<MatOfPoint3f> objectPoints, List<MatOfPoint2f> imagePoints, Size imageSize, double aspectRatio) {
    List<Mat> objectPoints_tmplm = new ArrayList<Mat>((objectPoints != null) ? objectPoints.size() : 0);
    Mat objectPoints_mat = Converters.vector_vector_Point3f_to_Mat(objectPoints, objectPoints_tmplm);
    List<Mat> imagePoints_tmplm = new ArrayList<Mat>((imagePoints != null) ? imagePoints.size() : 0);
    Mat imagePoints_mat = Converters.vector_vector_Point2f_to_Mat(imagePoints, imagePoints_tmplm);
    Mat retVal = new Mat(initCameraMatrix2D_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, aspectRatio));
    return retVal;
}
Also used : Mat(org.opencv.core.Mat) ArrayList(java.util.ArrayList)

Example 49 with Mat

use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.

the class Imgcodecs method imencode.

// 
// C++:  bool imencode(String ext, Mat img, vector_uchar& buf, vector_int params = std::vector<int>())
// 
// javadoc: imencode(ext, img, buf, params)
public static boolean imencode(String ext, Mat img, MatOfByte buf, MatOfInt params) {
    Mat buf_mat = buf;
    Mat params_mat = params;
    boolean retVal = imencode_0(ext, img.nativeObj, buf_mat.nativeObj, params_mat.nativeObj);
    return retVal;
}
Also used : Mat(org.opencv.core.Mat)

Example 50 with Mat

use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.

the class Imgcodecs method imencode.

// javadoc: imencode(ext, img, buf)
public static boolean imencode(String ext, Mat img, MatOfByte buf) {
    Mat buf_mat = buf;
    boolean retVal = imencode_1(ext, img.nativeObj, buf_mat.nativeObj);
    return retVal;
}
Also used : Mat(org.opencv.core.Mat)

Aggregations

Mat (org.opencv.core.Mat)239 ArrayList (java.util.ArrayList)34 Point (org.opencv.core.Point)33 MatOfPoint (org.opencv.core.MatOfPoint)27 MatOfKeyPoint (org.opencv.core.MatOfKeyPoint)19 KeyPoint (org.opencv.core.KeyPoint)18 Size (org.opencv.core.Size)17 Rect (org.opencv.core.Rect)15 Scalar (org.opencv.core.Scalar)9 File (java.io.File)7 BufferedImage (java.awt.image.BufferedImage)5 FilterContext (de.serviceflow.frankenstein.plugin.api.FilterContext)4 SegmentVideoFilter (de.serviceflow.frankenstein.plugin.api.SegmentVideoFilter)4 DefaultFilterContext (de.serviceflow.frankenstein.vf.DefaultFilterContext)4 VideoFilter (de.serviceflow.frankenstein.vf.VideoFilter)4 DataBufferByte (java.awt.image.DataBufferByte)4 FilterElement (de.serviceflow.frankenstein.vf.FilterElement)3 IOException (java.io.IOException)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)3 ImageNotFoundException (org.getopentest.exceptions.ImageNotFoundException)3