Package org.photonvision.vision.opencv
Class Contour
java.lang.Object
org.photonvision.vision.opencv.Contour
- All Implemented Interfaces:
Releasable
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal org.opencv.core.MatOfPoint
static final Comparator<Contour>
-
Constructor Summary
Constructors -
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
-
-
Constructor Details
-
Contour
-
Contour
-
-
Method Details
-
getMat2f
-
getConvexHull
-
getApproxPolyDp
-
getApproxPolyDp
-
getArea
-
getPerimeter
-
getMinAreaRect
-
getBoundingRect
-
getMoments
-
getCenterPoint
-
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
- Specified by:
release
in interfaceReleasable
-
convertIndexesToPoints
public static org.opencv.core.MatOfPoint2f convertIndexesToPoints(org.opencv.core.MatOfPoint contour, org.opencv.core.MatOfInt indexes)
-