Package org.opencv.core

Examples of org.opencv.core.MatOfInt


   * Returns a new Contour representing the convex hull.
   *
   * @return Contour
   */
  public Contour getConvexHull(){
      MatOfInt hull = new MatOfInt();
      MatOfPoint points = new MatOfPoint(pointMat);
     
     
      Imgproc.convexHull(points, hull);
      Point[] hp = new Point[hull.height()];
     
      for(int i = 0; i < hull.height(); i++){
        int index = (int)hull.get(i,0)[0];
        hp[i] = new Point(pointMat.get(index,0));
      }
      MatOfPoint hullPoints = new MatOfPoint();
      hullPoints.fromArray(hp);

View Full Code Here


  }
 
 
  public Histogram findHistogram(Mat mat, int numBins, boolean normalize){
   
    MatOfInt channels = new MatOfInt(0);
    MatOfInt histSize = new MatOfInt(numBins);
    float[] r = {0f, 256f};
    MatOfFloat ranges = new MatOfFloat(r);
    Mat hist = new Mat();
   
    ArrayList<Mat> images = new ArrayList<Mat>();
View Full Code Here

TOP

Related Classes of org.opencv.core.MatOfInt

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.