本文整理汇总了Java中org.opencv.core.MatOfPoint2f类的典型用法代码示例。如果您正苦于以下问题:Java MatOfPoint2f类的具体用法?Java MatOfPoint2f怎么用?Java MatOfPoint2f使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MatOfPoint2f类属于org.opencv.core包,在下文中一共展示了MatOfPoint2f类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: minAreaRect
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
public static RotatedRect minAreaRect(MatOfPoint2f points)
{
Mat points_mat = points;
RotatedRect retVal = new RotatedRect(minAreaRect_0(points_mat.nativeObj));
return retVal;
}
示例2: Mat_to_vector_vector_Point2f
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
public static void Mat_to_vector_vector_Point2f(Mat m, List<MatOfPoint2f> 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) {
MatOfPoint2f pt = new MatOfPoint2f(mi);
pts.add(pt);
mi.release();
}
mats.clear();
}
示例3: findFundamentalMat
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
public static Mat findFundamentalMat(MatOfPoint2f points1, MatOfPoint2f points2, int method, double param1, double param2)
{
Mat points1_mat = points1;
Mat points2_mat = points2;
Mat retVal = new Mat(findFundamentalMat_1(points1_mat.nativeObj, points2_mat.nativeObj, method, param1, param2));
return retVal;
}
示例4: projectPoints
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
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;
}
示例5: Mat_to_vector_vector_Point2f
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
public static void Mat_to_vector_vector_Point2f(Mat m, List<MatOfPoint2f> 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) {
MatOfPoint2f pt = new MatOfPoint2f(mi);
pts.add(pt);
}
}
示例6: pointPolygonTest
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
public static double pointPolygonTest(MatOfPoint2f contour, Point pt, boolean measureDist)
{
Mat contour_mat = contour;
double retVal = pointPolygonTest_0(contour_mat.nativeObj, pt.x, pt.y, measureDist);
return retVal;
}
示例7: solvePnP
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
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;
}
示例8: solvePnPRansac
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
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;
}
示例9: calcOpticalFlowPyrLK
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel)
{
Mat prevPts_mat = prevPts;
Mat nextPts_mat = nextPts;
Mat status_mat = status;
Mat err_mat = err;
calcOpticalFlowPyrLK_1(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel);
return;
}
示例10: minEnclosingCircle
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
public static void minEnclosingCircle(MatOfPoint2f points, Point center, float[] radius)
{
Mat points_mat = points;
double[] center_out = new double[2];
double[] radius_out = new double[1];
minEnclosingCircle_0(points_mat.nativeObj, center_out, radius_out);
if(center!=null){ center.x = center_out[0]; center.y = center_out[1]; }
if(radius!=null) radius[0] = (float)radius_out[0];
return;
}
示例11: insert
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
public void insert(MatOfPoint2f ptvec)
{
Mat ptvec_mat = ptvec;
insert_1(nativeObj, ptvec_mat.nativeObj);
return;
}
示例12: solvePnPRansac
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, Mat inliers, int flags)
{
Mat objectPoints_mat = objectPoints;
Mat imagePoints_mat = imagePoints;
Mat distCoeffs_mat = distCoeffs;
boolean retVal = solvePnPRansac_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers.nativeObj, flags);
return retVal;
}
示例13: findHomography
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
public static Mat findHomography(MatOfPoint2f srcPoints, MatOfPoint2f dstPoints, int method, double ransacReprojThreshold, Mat mask, int maxIters, double confidence)
{
Mat srcPoints_mat = srcPoints;
Mat dstPoints_mat = dstPoints;
Mat retVal = new Mat(findHomography_0(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj, method, ransacReprojThreshold, mask.nativeObj, maxIters, confidence));
return retVal;
}
示例14: arcLength
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
public static double arcLength(MatOfPoint2f curve, boolean closed)
{
Mat curve_mat = curve;
double retVal = arcLength_0(curve_mat.nativeObj, closed);
return retVal;
}
示例15: solvePnP
import org.opencv.core.MatOfPoint2f; //导入依赖的package包/类
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;
}