org.yccheok.numrecognition
Class ROI

java.lang.Object
  extended by org.yccheok.numrecognition.ROI

public class ROI
extends java.lang.Object

Region of interest for an image.


Field Summary
 float height
          Height of ROI.
 float width
          Width of ROI.
 float x
          Left most coordinate of ROI.
 float y
          Top most coordinate of ROI.
 
Constructor Summary
ROI(float x, float y, float width, float height)
          Constructs ROI with a specified upper-left coordinate and size.
 
Method Summary
 boolean isContain(ROI roi)
          Whether the given ROI is re-inside this ROI.
 java.lang.String toString()
          Returns String representation of this ROI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public final float x
Left most coordinate of ROI.


y

public final float y
Top most coordinate of ROI.


width

public final float width
Width of ROI.


height

public final float height
Height of ROI.

Constructor Detail

ROI

public ROI(float x,
           float y,
           float width,
           float height)
Constructs ROI with a specified upper-left coordinate and size.

Parameters:
x - Left most coordinate of ROI.
y - Right most coordinate of ROI.
width - Width of ROI.
height - Height of ROI.
Method Detail

isContain

public boolean isContain(ROI roi)
Whether the given ROI is re-inside this ROI.

Parameters:
roi - The ROI used to checked whether it is re-inside this ROI.
Returns:
true if the given ROI is re-inside this ROI.

toString

public java.lang.String toString()
Returns String representation of this ROI.

Overrides:
toString in class java.lang.Object
Returns:
String representation of this ROI.