|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.ed.inf.sdp2012.group7.vision.Plate
public class Plate
Finding rectangles around the green plate
Constructor Summary | |
---|---|
Plate()
|
Method Summary | |
---|---|
int |
dot(java.awt.Point a,
java.awt.Point b)
Dot product? |
java.awt.Point |
getCentroid(java.util.ArrayList<java.awt.Point> points)
Get centroid of plate? |
java.awt.Point[] |
getCorners(java.util.ArrayList<java.awt.Point> points)
Get the corners of a plate Use Dale's triangle method to get the corners of a plate |
boolean |
isInRectangle(java.awt.Point p,
java.awt.Point[] points)
Use the triangle stuff to generate rectangle |
boolean |
isPointInNotShitTriangle(java.awt.Point a,
java.awt.Point b,
java.awt.Point c,
java.awt.Point p)
Like Dale's but doesn't look too far Used for orientation finding so that we don't look off of green plate |
boolean |
isPointInTriangle(java.awt.Point a,
java.awt.Point b,
java.awt.Point c,
java.awt.Point p)
Dale's triangle Looks slightly further than it should to ensure it finds the farthest point |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Plate()
Method Detail |
---|
public java.awt.Point[] getCorners(java.util.ArrayList<java.awt.Point> points)
points
- The list of points that make up a plate
public boolean isPointInTriangle(java.awt.Point a, java.awt.Point b, java.awt.Point c, java.awt.Point p)
a
- One of the corners of triangleb
- One of the corners of trianglec
- One of the corners of trianglep
- The point to check if its in the triangle
public boolean isPointInNotShitTriangle(java.awt.Point a, java.awt.Point b, java.awt.Point c, java.awt.Point p)
a
- One of the corners of triangleb
- One of the corners of trianglec
- One of the corners of trianglep
- The point to check if its in the triangle
public int dot(java.awt.Point a, java.awt.Point b)
a
- One Pointb
- One Point
public java.awt.Point getCentroid(java.util.ArrayList<java.awt.Point> points)
points
- The points that make up the plate
public boolean isInRectangle(java.awt.Point p, java.awt.Point[] points)
a
- point parray
- of four points, forming a rectangle
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |