Facemorph.haar
Class Rect

java.lang.Object
  extended by Facemorph.haar.Rect

public class Rect
extends java.lang.Object

A rectangle with a weight


Constructor Summary
Rect(int x, int y, int w, int h)
          Construct a rectange with the parameters given, weight=0
Rect(int x, int y, int w, int h, double weight)
          Construct a rectange with the parameters given
Rect(java.lang.String rect)
          Constructs a rectangle from the XML data
 
Method Summary
 int getHeight()
           
 double getWeight()
           
 int getWidth()
           
 int getX1()
           
 int getX2()
           
 int getY1()
           
 int getY2()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Rect

public Rect(java.lang.String rect)
Constructs a rectangle from the XML data

Parameters:
rect - The XML data to retrieve the next rectangle from starting at the rectangle

Rect

public Rect(int x,
            int y,
            int w,
            int h,
            double weight)
Construct a rectange with the parameters given

Parameters:
x - x-location
y - y-location
w - width
h - height
weight - weight

Rect

public Rect(int x,
            int y,
            int w,
            int h)
Construct a rectange with the parameters given, weight=0

Parameters:
x - x-location
y - y-location
w - width
h - height
Method Detail

getX1

public int getX1()
Returns:
The X coordinates of the filter location

getY1

public int getY1()
Returns:
The Y coordinates of the filter location

getX2

public int getX2()
Returns:
The calculated X coordinate of the filter ending

getY2

public int getY2()
Returns:
The calculated Y coordinate of the filter ending

getWidth

public int getWidth()
Returns:
The width of the filter

getHeight

public int getHeight()
Returns:
The height of the filter

getWeight

public double getWeight()
Returns:
The relative weight of the filter

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
The filter as a string