|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiewald_CV_kit.utility.Polyline
public abstract class Polyline
the class Polyline provides some convenient static methods to edit/analyse/etc. polygons.
Method Summary | |
---|---|
static float |
AREA(Contour contour)
returns the surface area of the contour |
static float |
AREA(ConvexHullDiwi convex_hull)
returns the surface area of the convex_hull |
static float |
AREA(List<Pixel> polyline)
returns the surface area of the polyline |
static float |
AREA(Pixel[] polyline)
returns the surface area of the polyline |
static double |
distance(float x1,
float y1,
float x2,
float y2)
returns the distance between two coordinate pairs |
static double |
distance(Pixel p1,
Pixel p2)
returns the distance between two pixels |
static float |
distancePoint2Line(Pixel p1,
Pixel p2,
Pixel p3)
returns the shortest distance of a point(p3) to a line (p1-p2) |
static boolean |
INSIDE(Contour contour,
int x,
int y)
check if a given coordinate pair is inside a contour. |
static boolean |
INSIDE(ConvexHullDiwi convex_hull,
int x,
int y)
check if a given coordinate pair is inside a convex_hull. |
static boolean |
INSIDE(List<Pixel> polyline,
int x,
int y)
check if a given coordinate pair is inside a polyline. |
static boolean |
INSIDE(Pixel[] polyline,
int x,
int y)
check if a given coordinate pair is inside a polyline. |
static float |
LENGTH(Contour contour)
returns the length of the contour |
static float |
LENGTH(ConvexHullDiwi convex_hull)
returns the length of the convex_hull |
static float |
LENGTH(List<Pixel> polyline)
returns the length of the polyline |
static float |
LENGTH(Pixel[] polyline)
returns the length of the polyline |
static ArrayList<Pixel> |
SIMPLIFY(Contour contour,
int step,
float max_offset)
returns a new simplified polyline, from a given contour |
static ArrayList<Pixel> |
SIMPLIFY(ConvexHullDiwi convex_hull,
int step,
float max_offset)
returns a new simplified polyline, from a given convex_hull |
static ArrayList<Pixel> |
SIMPLIFY(List<Pixel> polyline,
int step,
float max_offset)
returns a new simplified polyline, from a given polyline |
static ArrayList<Pixel> |
SIMPLIFY(Pixel[] polyline,
int step,
float max_offset)
returns a new simplified polyline, from a given polyline |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final float AREA(Pixel[] polyline)
polyline
- the polyline to get the length from
public static final float AREA(List<Pixel> polyline)
polyline
- the polyline to get the length from
public static final float AREA(Contour contour)
contour
- the polyline to get the length from
public static final float AREA(ConvexHullDiwi convex_hull)
convex_hull
- the polyline to get the length from
public static final float LENGTH(Pixel[] polyline)
polyline
- the polyline to get the length from
public static final float LENGTH(List<Pixel> polyline)
polyline
- the polyline to get the length from
public static final float LENGTH(Contour contour)
contour
- the polyline to get the length from
public static final float LENGTH(ConvexHullDiwi convex_hull)
convex_hull
- the polyline to get the length from
public static final ArrayList<Pixel> SIMPLIFY(Contour contour, int step, float max_offset)
contour
- to simplifystep
- the number of vertices in a row, that are checked for the maximum offsetmax_offset
- maximum offset a vertice can have
public static final ArrayList<Pixel> SIMPLIFY(ConvexHullDiwi convex_hull, int step, float max_offset)
convex_hull
- to simplifystep
- the number of vertices in a row, that are checked for the maximum offsetmax_offset
- maximum offset a vertice can have
public static final ArrayList<Pixel> SIMPLIFY(List<Pixel> polyline, int step, float max_offset)
polyline
- to simplifystep
- the number of vertices in a row, that are checked for the maximum offsetmax_offset
- maximum offset a vertice can have
public static final ArrayList<Pixel> SIMPLIFY(Pixel[] polyline, int step, float max_offset)
polyline
- to simplifystep
- the number of vertices in a row, that are checked for the maximum offsetmax_offset
- maximum offset a vertice can have
public static final boolean INSIDE(Pixel[] polyline, int x, int y)
public static final boolean INSIDE(List<Pixel> polyline, int x, int y)
public static final boolean INSIDE(Contour contour, int x, int y)
public static final boolean INSIDE(ConvexHullDiwi convex_hull, int x, int y)
public static final double distance(Pixel p1, Pixel p2)
public static final double distance(float x1, float y1, float x2, float y2)
public static final float distancePoint2Line(Pixel p1, Pixel p2, Pixel p3)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |