org.opencv.core.MatOfPoint3f Java Examples

The following examples show how to use org.opencv.core.MatOfPoint3f. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Converters.java    From LPR with Apache License 2.0 6 votes vote down vote up
public static void Mat_to_vector_vector_Point3f(Mat m, List<MatOfPoint3f> pts) {
    if (pts == null)
        throw new java.lang.IllegalArgumentException("Output List can't be null");

    if (m == null)
        throw new java.lang.IllegalArgumentException("Input Mat can't be null");

    List<Mat> mats = new ArrayList<Mat>(m.rows());
    Mat_to_vector_Mat(m, mats);
    for (Mat mi : mats) {
        MatOfPoint3f pt = new MatOfPoint3f(mi);
        pts.add(pt);
        mi.release();
    }
    mats.clear();
}
 
Example #2
Source File: Converters.java    From MOAAP with MIT License 6 votes vote down vote up
public static void Mat_to_vector_vector_Point3f(Mat m, List<MatOfPoint3f> pts) {
    if (pts == null)
        throw new java.lang.IllegalArgumentException("Output List can't be null");

    if (m == null)
        throw new java.lang.IllegalArgumentException("Input Mat can't be null");

    List<Mat> mats = new ArrayList<Mat>(m.rows());
    Mat_to_vector_Mat(m, mats);
    for (Mat mi : mats) {
        MatOfPoint3f pt = new MatOfPoint3f(mi);
        pts.add(pt);
        mi.release();
    }
    mats.clear();
}
 
Example #3
Source File: Converters.java    From OpenCvFaceDetect with Apache License 2.0 6 votes vote down vote up
public static void Mat_to_vector_vector_Point3f(Mat m, List<MatOfPoint3f> pts) {
    if (pts == null)
        throw new java.lang.IllegalArgumentException("Output List can't be null");

    if (m == null)
        throw new java.lang.IllegalArgumentException("Input Mat can't be null");

    List<Mat> mats = new ArrayList<Mat>(m.rows());
    Mat_to_vector_Mat(m, mats);
    for (Mat mi : mats) {
        MatOfPoint3f pt = new MatOfPoint3f(mi);
        pts.add(pt);
        mi.release();
    }
    mats.clear();
}
 
Example #4
Source File: Converters.java    From FaceDetectDemo with Apache License 2.0 6 votes vote down vote up
public static void Mat_to_vector_vector_Point3f(Mat m, List<MatOfPoint3f> pts) {
    if (pts == null)
        throw new java.lang.IllegalArgumentException("Output List can't be null");

    if (m == null)
        throw new java.lang.IllegalArgumentException("Input Mat can't be null");

    List<Mat> mats = new ArrayList<Mat>(m.rows());
    Mat_to_vector_Mat(m, mats);
    for (Mat mi : mats) {
        MatOfPoint3f pt = new MatOfPoint3f(mi);
        pts.add(pt);
        mi.release();
    }
    mats.clear();
}
 
Example #5
Source File: Converters.java    From Camdroid with Apache License 2.0 6 votes vote down vote up
public static void Mat_to_vector_vector_Point3f(Mat m, List<MatOfPoint3f> pts) {
    if (pts == null)
        throw new java.lang.IllegalArgumentException("Output List can't be null");

    if (m == null)
        throw new java.lang.IllegalArgumentException("Input Mat can't be null");

    List<Mat> mats = new ArrayList<Mat>(m.rows());
    Mat_to_vector_Mat(m, mats);
    for (Mat mi : mats) {
        MatOfPoint3f pt = new MatOfPoint3f(mi);
        pts.add(pt);
        mi.release();
    }
    mats.clear();
}
 
Example #6
Source File: Converters.java    From real_time_circle_detection_android with MIT License 6 votes vote down vote up
public static void Mat_to_vector_vector_Point3f(Mat m, List<MatOfPoint3f> pts) {
    if (pts == null)
        throw new java.lang.IllegalArgumentException("Output List can't be null");

    if (m == null)
        throw new java.lang.IllegalArgumentException("Input Mat can't be null");

    List<Mat> mats = new ArrayList<Mat>(m.rows());
    Mat_to_vector_Mat(m, mats);
    for (Mat mi : mats) {
        MatOfPoint3f pt = new MatOfPoint3f(mi);
        pts.add(pt);
        mi.release();
    }
    mats.clear();
}
 
Example #7
Source File: Converters.java    From Image-Detection-Samples with Apache License 2.0 6 votes vote down vote up
public static void Mat_to_vector_vector_Point3f(Mat m, List<MatOfPoint3f> pts) {
    if (pts == null)
        throw new java.lang.IllegalArgumentException("Output List can't be null");

    if (m == null)
        throw new java.lang.IllegalArgumentException("Input Mat can't be null");

    List<Mat> mats = new ArrayList<Mat>(m.rows());
    Mat_to_vector_Mat(m, mats);
    for (Mat mi : mats) {
        MatOfPoint3f pt = new MatOfPoint3f(mi);
        pts.add(pt);
        mi.release();
    }
    mats.clear();
}
 
Example #8
Source File: Converters.java    From MOAAP with MIT License 6 votes vote down vote up
public static void Mat_to_vector_vector_Point3f(Mat m, List<MatOfPoint3f> pts) {
    if (pts == null)
        throw new java.lang.IllegalArgumentException("Output List can't be null");

    if (m == null)
        throw new java.lang.IllegalArgumentException("Input Mat can't be null");

    List<Mat> mats = new ArrayList<Mat>(m.rows());
    Mat_to_vector_Mat(m, mats);
    for (Mat mi : mats) {
        MatOfPoint3f pt = new MatOfPoint3f(mi);
        pts.add(pt);
        mi.release();
    }
    mats.clear();
}
 
Example #9
Source File: Calib3d.java    From MOAAP with MIT License 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha, Mat jacobian)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    projectPoints_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj, alpha, jacobian.nativeObj);
    
    return;
}
 
Example #10
Source File: Calib3d.java    From ml-authentication with Apache License 2.0 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints)
{
    Mat objectPoints_mat = objectPoints;
    Mat distCoeffs_mat = distCoeffs;
    Mat imagePoints_mat = imagePoints;
    projectPoints_1(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj);
    
    return;
}
 
Example #11
Source File: Calib3d.java    From Chinese-number-gestures-recognition with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints)
{
    Mat objectPoints_mat = objectPoints;
    Mat distCoeffs_mat = distCoeffs;
    Mat imagePoints_mat = imagePoints;
    projectPoints_1(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj);
    
    return;
}
 
Example #12
Source File: Calib3d.java    From LicensePlateDiscern with MIT License 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints, Mat jacobian)
{
    Mat objectPoints_mat = objectPoints;
    Mat distCoeffs_mat = distCoeffs;
    Mat imagePoints_mat = imagePoints;
    projectPoints_1(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj, jacobian.nativeObj);
    
    return;
}
 
Example #13
Source File: Calib3d.java    From MOAAP with MIT License 5 votes vote down vote up
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;
}
 
Example #14
Source File: Calib3d.java    From Camdroid with Apache License 2.0 5 votes vote down vote up
public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnPRansac_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj);
    
    return retVal;
}
 
Example #15
Source File: Calib3d.java    From OpenCvFaceDetect with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example #16
Source File: Calib3d.java    From FaceT with Mozilla Public License 2.0 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha, Mat jacobian)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    projectPoints_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj, alpha, jacobian.nativeObj);
    
    return;
}
 
Example #17
Source File: Calib3d.java    From real_time_circle_detection_android with MIT License 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints, Mat jacobian, double aspectRatio)
{
    Mat objectPoints_mat = objectPoints;
    Mat distCoeffs_mat = distCoeffs;
    Mat imagePoints_mat = imagePoints;
    projectPoints_0(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj, jacobian.nativeObj, aspectRatio);
    
    return;
}
 
Example #18
Source File: Calib3d.java    From MOAAP with MIT License 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints, Mat jacobian, double aspectRatio)
{
    Mat objectPoints_mat = objectPoints;
    Mat distCoeffs_mat = distCoeffs;
    Mat imagePoints_mat = imagePoints;
    projectPoints_0(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj, jacobian.nativeObj, aspectRatio);
    
    return;
}
 
Example #19
Source File: Calib3d.java    From PixaToon with GNU General Public License v3.0 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat rvec, Mat tvec, Mat K, Mat D)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    projectPoints_3(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj);
    
    return;
}
 
Example #20
Source File: Calib3d.java    From real_time_circle_detection_android with MIT License 5 votes vote down vote up
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;
}
 
Example #21
Source File: Calib3d.java    From ml-authentication with Apache License 2.0 5 votes vote down vote up
public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnPRansac_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj);
    
    return retVal;
}
 
Example #22
Source File: Calib3d.java    From Chinese-number-gestures-recognition with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public static boolean solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnP_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj);
    
    return retVal;
}
 
Example #23
Source File: Calib3d.java    From FTCVision with MIT License 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints)
{
    Mat objectPoints_mat = objectPoints;
    Mat distCoeffs_mat = distCoeffs;
    Mat imagePoints_mat = imagePoints;
    projectPoints_1(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj);
    
    return;
}
 
Example #24
Source File: Calib3d.java    From ml-authentication with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example #25
Source File: Calib3d.java    From FtcSamples with MIT License 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints)
{
    Mat objectPoints_mat = objectPoints;
    Mat distCoeffs_mat = distCoeffs;
    Mat imagePoints_mat = imagePoints;
    projectPoints_1(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj);
    
    return;
}
 
Example #26
Source File: Calib3d.java    From SmartPaperScan with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example #27
Source File: Calib3d.java    From FaceDetectDemo with Apache License 2.0 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints, Mat jacobian, double aspectRatio)
{
    Mat objectPoints_mat = objectPoints;
    Mat distCoeffs_mat = distCoeffs;
    Mat imagePoints_mat = imagePoints;
    projectPoints_0(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj, jacobian.nativeObj, aspectRatio);
    
    return;
}
 
Example #28
Source File: Calib3d.java    From MOAAP with MIT License 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha, Mat jacobian)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    projectPoints_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj, alpha, jacobian.nativeObj);
    
    return;
}
 
Example #29
Source File: Calib3d.java    From Form-N-Fun with MIT License 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat rvec, Mat tvec, Mat K, Mat D, double alpha, Mat jacobian)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    projectPoints_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj, alpha, jacobian.nativeObj);
    
    return;
}
 
Example #30
Source File: Calib3d.java    From LPR with Apache License 2.0 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints)
{
    Mat objectPoints_mat = objectPoints;
    Mat distCoeffs_mat = distCoeffs;
    Mat imagePoints_mat = imagePoints;
    projectPoints_2(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj);
    
    return;
}