Package org.opencv.core

Examples of org.opencv.core.MatOfPoint2f


   * @param y
   * @return boolean
   */
  public boolean containsPoint(int x, int y){
    Point p = new Point(x,y);
    MatOfPoint2f m = new MatOfPoint2f(pointMat.toArray());
       
    double r = Imgproc.pointPolygonTest(m,p, false);
    return r == 1;
  }
View Full Code Here


   * See setPolygonApproximationFactor() and getPolygonApproximationFactor().
   *
   * @return
   */
  public Contour getPolygonApproximation(){
    MatOfPoint2f approx = new MatOfPoint2f();
      Imgproc.approxPolyDP(new MatOfPoint2f(inputPoints), approx, polygonApproximationFactor, true);
    return new Contour(parent, approx);
  }
View Full Code Here

   
    return result;
  }
 
  public ArrayList<PVector> findChessboardCorners(int patternWidth, int patternHeight){
    MatOfPoint2f corners = new MatOfPoint2f();
    Calib3d.findChessboardCorners(getCurrentMat(), new Size(patternWidth,patternHeight), corners);
    return matToPVectors(corners);
  }
View Full Code Here

TOP

Related Classes of org.opencv.core.MatOfPoint2f

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.