Class Contour

java.lang.Object
org.photonvision.vision.opencv.Contour
All Implemented Interfaces:
Releasable

public class Contour extends Object implements Releasable
  • Field Details

    • SortByMomentsX

      public static final Comparator<Contour> SortByMomentsX
    • mat

      public final org.opencv.core.MatOfPoint mat
  • Constructor Details

    • Contour

      public Contour(org.opencv.core.MatOfPoint mat)
    • Contour

      public Contour(org.opencv.core.Rect2d box)
  • Method Details

    • getMat2f

      public org.opencv.core.MatOfPoint2f getMat2f()
    • getConvexHull

      public org.opencv.core.MatOfPoint2f getConvexHull()
    • getApproxPolyDp

      public org.opencv.core.MatOfPoint2f getApproxPolyDp(double epsilon, boolean closed)
    • getApproxPolyDp

      @Nullable public @Nullable org.opencv.core.MatOfPoint2f getApproxPolyDp()
    • getArea

      public double getArea()
    • getPerimeter

      public double getPerimeter()
    • getMinAreaRect

      public org.opencv.core.RotatedRect getMinAreaRect()
    • getBoundingRect

      public org.opencv.core.Rect getBoundingRect()
    • getMoments

      public org.opencv.imgproc.Moments getMoments()
    • getCenterPoint

      public org.opencv.core.Point getCenterPoint()
    • isEmpty

      public boolean isEmpty()
    • isIntersecting

      public boolean isIntersecting(Contour secondContour, ContourIntersectionDirection intersectionDirection)
    • groupContoursByIntersection

      public static Contour groupContoursByIntersection(Contour firstContour, Contour secondContour, ContourIntersectionDirection intersection)
    • areIntersecting

      public static boolean areIntersecting(Contour firstContour, Contour secondContour, ContourIntersectionDirection intersectionDirection)
    • combineContours

      public static Contour combineContours(Contour... contours)
    • combineContourList

      public static Contour combineContourList(Collection<Contour> contours)
    • release

      public void release()
      Specified by:
      release in interface Releasable
    • convertIndexesToPoints

      public static org.opencv.core.MatOfPoint2f convertIndexesToPoints(org.opencv.core.MatOfPoint contour, org.opencv.core.MatOfInt indexes)