當前位置: 首頁>>代碼示例>>Java>>正文


Java MatOfPoint類代碼示例

本文整理匯總了Java中org.opencv.core.MatOfPoint的典型用法代碼示例。如果您正苦於以下問題:Java MatOfPoint類的具體用法?Java MatOfPoint怎麽用?Java MatOfPoint使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MatOfPoint類屬於org.opencv.core包,在下文中一共展示了MatOfPoint類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createParticleReports

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
/**
 * Takes the base OpenCV list of contours and changes the output to be easier to
 * work with.
 * 
 * @param contours
 *            The input from the base OpenCV contours output
 */
private void createParticleReports (List<MatOfPoint> contours)
{
    ParticleReport[] reports = new ParticleReport[contours.size()];

    for (int i = 0; i < reports.length; i++)
        {
        reports[i] = new ParticleReport();
        Rect r = Imgproc.boundingRect(contours.get(i));
        reports[i].area = r.area();
        reports[i].center = new Point(r.x + (r.width / 2),
                r.y + (r.height / 2));
        reports[i].boundingRect = r;
        }

    this.particleReports = reports;
}
 
開發者ID:FIRST-Team-339,項目名稱:2017,代碼行數:24,代碼來源:VisionProcessor.java

示例2: Mat_to_vector_vector_Point

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
public static void Mat_to_vector_vector_Point(Mat m, List<MatOfPoint> 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) {
        MatOfPoint pt = new MatOfPoint(mi);
        pts.add(pt);
        mi.release();
    }
    mats.clear();
}
 
開發者ID:beast,項目名稱:react-native-scan-doc,代碼行數:17,代碼來源:Converters.java

示例3: goodFeaturesToTrack

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
public static void goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, boolean useHarrisDetector, double k)
{
    Mat corners_mat = corners;
    goodFeaturesToTrack_0(image.nativeObj, corners_mat.nativeObj, maxCorners, qualityLevel, minDistance, mask.nativeObj, blockSize, useHarrisDetector, k);
    
    return;
}
 
開發者ID:linzuzeng,項目名稱:Microsphere,代碼行數:8,代碼來源:Imgproc.java

示例4: fillPoly

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
public static void fillPoly(Mat img, List<MatOfPoint> pts, Scalar color)
{
    List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
    Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
    fillPoly_1(img.nativeObj, pts_mat.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3]);
    
    return;
}
 
開發者ID:johnhany,項目名稱:MOAAP,代碼行數:9,代碼來源:Imgproc.java

示例5: detectRegions

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
public  void detectRegions(Mat image, List<MatOfPoint> msers, MatOfRect bboxes)
{
    Mat msers_mat = new Mat();
    Mat bboxes_mat = bboxes;
    detectRegions_0(nativeObj, image.nativeObj, msers_mat.nativeObj, bboxes_mat.nativeObj);
    Converters.Mat_to_vector_vector_Point(msers_mat, msers);
    msers_mat.release();
    return;
}
 
開發者ID:vipycm,項目名稱:mao-android,代碼行數:10,代碼來源:MSER.java

示例6: drawContours

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
public static void drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy, int maxLevel, Point offset)
{
    List<Mat> contours_tmplm = new ArrayList<Mat>((contours != null) ? contours.size() : 0);
    Mat contours_mat = Converters.vector_vector_Point_to_Mat(contours, contours_tmplm);
    drawContours_0(image.nativeObj, contours_mat.nativeObj, contourIdx, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, hierarchy.nativeObj, maxLevel, offset.x, offset.y);
    
    return;
}
 
開發者ID:PawelTypiak,項目名稱:Checkerboard-IMU-Comparator,代碼行數:9,代碼來源:Imgproc.java

示例7: polylines

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
public static void polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color, int thickness)
{
    List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
    Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
    polylines_1(img.nativeObj, pts_mat.nativeObj, isClosed, color.val[0], color.val[1], color.val[2], color.val[3], thickness);
    
    return;
}
 
開發者ID:daquexian,項目名稱:DNNLibrary,代碼行數:9,代碼來源:Imgproc.java

示例8: convexHull

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
public static void convexHull(MatOfPoint points, MatOfInt hull, boolean clockwise)
{
    Mat points_mat = points;
    Mat hull_mat = hull;
    convexHull_0(points_mat.nativeObj, hull_mat.nativeObj, clockwise);
    
    return;
}
 
開發者ID:GTHSRobotics,項目名稱:DogeCV,代碼行數:9,代碼來源:Imgproc.java

示例9: findContours

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
public static void findContours(Mat image, List<MatOfPoint> contours, Mat hierarchy, int mode, int method)
{
    Mat contours_mat = new Mat();
    findContours_1(image.nativeObj, contours_mat.nativeObj, hierarchy.nativeObj, mode, method);
    Converters.Mat_to_vector_vector_Point(contours_mat, contours);
    contours_mat.release();
    return;
}
 
開發者ID:daquexian,項目名稱:DNNLibrary,代碼行數:9,代碼來源:Imgproc.java

示例10: isContourConvex

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
public static boolean isContourConvex(MatOfPoint contour)
{
    Mat contour_mat = contour;
    boolean retVal = isContourConvex_0(contour_mat.nativeObj);
    
    return retVal;
}
 
開發者ID:vipycm,項目名稱:mao-android,代碼行數:8,代碼來源:Imgproc.java

示例11: ellipse2Poly

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
public static void ellipse2Poly(Point center, Size axes, int angle, int arcStart, int arcEnd, int delta, MatOfPoint pts)
{
    Mat pts_mat = pts;
    ellipse2Poly_0(center.x, center.y, axes.width, axes.height, angle, arcStart, arcEnd, delta, pts_mat.nativeObj);
    
    return;
}
 
開發者ID:typer9527,項目名稱:FaceDetectDemo,代碼行數:8,代碼來源:Imgproc.java

示例12: detect

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
public  void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights)
{
    Mat foundLocations_mat = foundLocations;
    Mat weights_mat = weights;
    detect_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj);
    
    return;
}
 
開發者ID:TheBigBombman,項目名稱:RobotIGS,代碼行數:9,代碼來源:HOGDescriptor.java

示例13: polylines

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
public static void polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color)
{
    List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0);
    Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm);
    polylines_2(img.nativeObj, pts_mat.nativeObj, isClosed, color.val[0], color.val[1], color.val[2], color.val[3]);
    
    return;
}
 
開發者ID:spacejake,項目名稱:android-age-estimator,代碼行數:9,代碼來源:Imgproc.java

示例14: goodFeaturesToTrack

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
public static void goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance)
{
    Mat corners_mat = corners;
    goodFeaturesToTrack_1(image.nativeObj, corners_mat.nativeObj, maxCorners, qualityLevel, minDistance);
    
    return;
}
 
開發者ID:vulovicv23,項目名稱:opencv-documentscanner-android,代碼行數:8,代碼來源:Imgproc.java

示例15: convexHull

import org.opencv.core.MatOfPoint; //導入依賴的package包/類
public static void convexHull(MatOfPoint points, MatOfInt hull)
{
    Mat points_mat = points;
    Mat hull_mat = hull;
    convexHull_1(points_mat.nativeObj, hull_mat.nativeObj);
    
    return;
}
 
開發者ID:TheBigBombman,項目名稱:RobotIGS,代碼行數:9,代碼來源:Imgproc.java


注:本文中的org.opencv.core.MatOfPoint類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。