Package org.photonvision.vision.opencv
Class Contour
java.lang.Object
org.photonvision.vision.opencv.Contour
- All Implemented Interfaces:
Releasable
-
Field Summary
Modifier and TypeFieldDescriptionfinal org.opencv.core.MatOfPoint
static final Comparator<Contour>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
areIntersecting
(Contour firstContour, Contour secondContour, ContourIntersectionDirection intersectionDirection) static Contour
combineContourList
(Collection<Contour> contours) static Contour
combineContours
(Contour... contours) static org.opencv.core.MatOfPoint2f
convertIndexesToPoints
(org.opencv.core.MatOfPoint contour, org.opencv.core.MatOfInt indexes) @Nullable org.opencv.core.MatOfPoint2f
org.opencv.core.MatOfPoint2f
getApproxPolyDp
(double epsilon, boolean closed) double
getArea()
org.opencv.core.Rect
org.opencv.core.Point
org.opencv.core.MatOfPoint2f
org.opencv.core.MatOfPoint2f
getMat2f()
org.opencv.core.RotatedRect
org.opencv.imgproc.Moments
double
static Contour
groupContoursByIntersection
(Contour firstContour, Contour secondContour, ContourIntersectionDirection intersection) boolean
isEmpty()
boolean
isIntersecting
(Contour secondContour, ContourIntersectionDirection intersectionDirection) void
release()
-
Field Details
-
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
-
combineContourList
-
release
public void release()- Specified by:
release
in interfaceReleasable
-
convertIndexesToPoints
public static org.opencv.core.MatOfPoint2f convertIndexesToPoints(org.opencv.core.MatOfPoint contour, org.opencv.core.MatOfInt indexes)
-