Package adams.data.image
Interface CropAlgorithm<T>
-
- All Known Implementing Classes:
AbstractCropAlgorithm
,BinaryCrop
,CropBackground
,NoCrop
,RectangleCrop
,RelativeCrop
,SimpleCrop
,ThresholdedCrop
public interface CropAlgorithm<T>
Interface for crop algorithms.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static String
CROP_BOTTOM
the constant for the bottom.static String
CROP_LEFT
the constant for the left.static String
CROP_RIGHT
the constant for the right.static String
CROP_TOP
the constant for the top.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
crop(T img)
Crops the image.Point
getBottomRight()
Returns the bottom-right coordinates of the cropped image in the original image.Point
getTopLeft()
Returns the top-left coordinates of the cropped image in the original image.
-
-
-
Field Detail
-
CROP_TOP
static final String CROP_TOP
the constant for the top.- See Also:
- Constant Field Values
-
CROP_LEFT
static final String CROP_LEFT
the constant for the left.- See Also:
- Constant Field Values
-
CROP_BOTTOM
static final String CROP_BOTTOM
the constant for the bottom.- See Also:
- Constant Field Values
-
CROP_RIGHT
static final String CROP_RIGHT
the constant for the right.- See Also:
- Constant Field Values
-
-
Method Detail
-
crop
T crop(T img)
Crops the image.- Parameters:
img
- the image to crop- Returns:
- the (potentially) cropped image
-
getTopLeft
Point getTopLeft()
Returns the top-left coordinates of the cropped image in the original image.- Returns:
- the top-left corner
-
getBottomRight
Point getBottomRight()
Returns the bottom-right coordinates of the cropped image in the original image.- Returns:
- the bottom-right corner
-
-