|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gab.opencv.Contour
public class Contour
Field Summary | |
---|---|
MatOfPoint |
pointMat
|
Constructor Summary | |
---|---|
Contour(PApplet parent,
MatOfPoint mat)
|
|
Contour(PApplet parent,
MatOfPoint2f mat)
|
Method Summary | |
---|---|
float |
area()
The area of the Contour's bounding box. |
boolean |
containsPoint(int x,
int y)
Check if the Contour contains a given x-y point. |
void |
draw()
Draw the Contour as a closed shape with one vertex per-point. |
Rectangle |
getBoundingBox()
Get the bounding box for the Contour. |
Contour |
getConvexHull()
Calculate a convex hull from the current Contour. |
ArrayList<PVector> |
getPoints()
Get the points that make up the Contour. |
Contour |
getPolygonApproximation()
Get a new Contour that results from calculating the polygon approximation of the current Contour. |
double |
getPolygonApproximationFactor()
Access the current polygonApproximationFactor. |
void |
loadPoints(Point[] pts)
|
int |
numPoints()
The number of points in the Contour. |
void |
setPolygonApproximationFactor(double polygonApproximationFactor)
The polygonApproximationFactor is used to determine how strictly to follow a curvy polygon when converting it into a simpler polygon with getPolygonApproximation(). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public MatOfPoint pointMat
Constructor Detail |
---|
public Contour(PApplet parent, MatOfPoint mat)
public Contour(PApplet parent, MatOfPoint2f mat)
Method Detail |
---|
public void loadPoints(Point[] pts)
public boolean containsPoint(int x, int y)
x
- y
-
public void setPolygonApproximationFactor(double polygonApproximationFactor)
polygonApproximationFactor,
- a doublepublic double getPolygonApproximationFactor()
public Contour getPolygonApproximation()
public Contour getConvexHull()
public void draw()
public ArrayList<PVector> getPoints()
public int numPoints()
public Rectangle getBoundingBox()
public float area()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |