public class Blob
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DRAW_CONVEX_HULL |
static int |
DRAW_HOLES |
static int |
DRAW_LABEL |
static java.lang.String |
GETAREATOPERIMETERRATIO
Method name of getAreaToPerimeterRatio (for filtering).
|
static java.lang.String |
GETCIRCULARITY
Method name of getCircularity (for filtering).
|
static java.lang.String |
GETCONTOURTEMPERATURE
Method name of getContourTemperature (for filtering).
|
static java.lang.String |
GETELONGATION
Method name of getElongation (for filtering).
|
static java.lang.String |
GETENCLOSEDAREA
Method name of getEnclosedArea (for filtering).
|
static java.lang.String |
GETFERETDIAMETER
Method name of getFeretDiameter (for filtering).
|
static java.lang.String |
GETFRACTALBOXDIMENSION
Method name of getContourTemperature (for filtering).
|
static java.lang.String |
GETNUMBEROFHOLES
Method name of getNumberofHoles (for filtering).
|
static java.lang.String |
GETPERIMETER
Method name of getPerimeter (for filtering).
|
static java.lang.String |
GETPERIMETERCONVEXHULL
Method name of getPerimeterConvexHull (for filtering).
|
static java.lang.String |
GETTHINNESRATIO
Method name of getThinnesRatio (for filtering).
|
| Constructor and Description |
|---|
Blob(java.awt.Polygon outerContour,
int label) |
| Modifier and Type | Method and Description |
|---|---|
static void |
addCustomFeature(CustomBlobFeature feature) |
void |
draw(ImageProcessor ip)
Draws the Blob with its holes.
|
void |
draw(ImageProcessor ip,
int options)
Draws the Blob with or without its holes.
|
java.lang.Object |
evaluateCustomFeature(java.lang.String methodName,
java.lang.Object... params)
Evaluates the Custom Feature and return its value
|
double |
getAreaToPerimeterRatio()
Area/Perimeter
|
java.awt.Point |
getCenterOfGravity()
Return the geometric center of gravity of the blob.
|
double |
getCentralMoments(int p,
int q)
Central Moments Definition of "Gorman et. al.
|
double |
getCircularity()
Calculates the circularity of the outer contour: (perimeter*perimeter) / (enclosed area).
|
double |
getContourTemperature()
Calculates the Contour Temperatur.
|
java.awt.Polygon |
getConvexHull()
Returns the convex hull of the blob.
|
double |
getEigenvalueMajorAxis()
Calculates Eigenvalue from the major axis using the moments of the boundary
|
double |
getEigenvalueMinorAxis()
Calculates Eigenvalue from the minor axis using the moments of the boundary
|
double |
getElongation()
The Elongation of the Blob based on a fitted ellipse (1 - minor axis / major axis)
|
double |
getEnclosedArea()
Calculates the enclosed are of the outer contour without subsctracting possible holes.
|
double |
getFeretDiameter()
Calculates the feret diameter of the outer contour using its chain code
|
double |
getFractalBoxDimension() |
double |
getFractalBoxDimension(int[] boxSizes)
Box Dimension of the blob boundary.
|
double |
getFractalDimensionGoodness()
The goodness of the "best fit" line of the fractal box dimension estimation.
|
java.util.ArrayList<java.awt.Polygon> |
getInnerContours()
Return all inner contours (holes) of the blob.
|
int |
getLabel()
Return the label of the blob in the labeled image
|
double |
getMoment(int p,
int q)
Region-Based Moments Definition of "Gorman et. al.
|
int |
getNumberofHoles()
The number of inner contours (Holes) of a blob.
|
double |
getOrientationMajorAxis() |
double |
getOrientationMinorAxis() |
java.awt.Polygon |
getOuterContour()
The outer contour of an object (polygon points are pixel indicies)
|
int[] |
getOuterContourAsChainCode()
Calculates the freeman chain code the outer contour
|
double |
getPerimeter()
Calculates the perimeter of the outer contour using its chain code
|
double |
getPerimeterConvexHull()
Calculates the perimeter of the convex hull
|
double |
getThinnesRatio()
The Thinnes Ratio of the blob (normed).
|
static void |
setDefaultColor(java.awt.Color defaultColor)
Changes the default blob color.
|
public static final int DRAW_HOLES
public static final int DRAW_CONVEX_HULL
public static final int DRAW_LABEL
public static final java.lang.String GETFERETDIAMETER
public static final java.lang.String GETELONGATION
public static final java.lang.String GETPERIMETER
public static final java.lang.String GETPERIMETERCONVEXHULL
public static final java.lang.String GETENCLOSEDAREA
public static final java.lang.String GETCIRCULARITY
public static final java.lang.String GETTHINNESRATIO
public static final java.lang.String GETAREATOPERIMETERRATIO
public static final java.lang.String GETCONTOURTEMPERATURE
public static final java.lang.String GETFRACTALBOXDIMENSION
public static final java.lang.String GETNUMBEROFHOLES
public static void addCustomFeature(CustomBlobFeature feature)
public static void setDefaultColor(java.awt.Color defaultColor)
defaultColor - The default color.public java.lang.Object evaluateCustomFeature(java.lang.String methodName,
java.lang.Object... params)
Method - name The method name of the method in the feature classparams - the parameters of the method specified by the method namepublic void draw(ImageProcessor ip,
int options)
ip - The ImageProcesser in which the blob has to be drawn.options - Drawing Options are DRAW_HOLES, DRAW_CONVEX_HULL, DRAW_LABEL. Combinations with | are possible.public void draw(ImageProcessor ip)
ip - The ImageProcesser in which the blob has to be drawn.public java.awt.Point getCenterOfGravity()
public double getFeretDiameter()
public double getMoment(int p,
int q)
q - (order = (p + q))p - (order = (p + q))public double getCentralMoments(int p,
int q)
q - (order = (p + q))p - (order = (p + q))public double getOrientationMajorAxis()
public double getOrientationMinorAxis()
public double getEigenvalueMajorAxis()
public double getEigenvalueMinorAxis()
public double getElongation()
public java.awt.Polygon getOuterContour()
public int[] getOuterContourAsChainCode()
public java.util.ArrayList<java.awt.Polygon> getInnerContours()
public int getLabel()
public double getPerimeter()
public double getPerimeterConvexHull()
public java.awt.Polygon getConvexHull()
public double getEnclosedArea()
public double getCircularity()
public double getThinnesRatio()
public double getAreaToPerimeterRatio()
public double getContourTemperature()
in Luciano da Fontoura Costa, Roberto Marcondes Cesar,
Jr.Shape Classification and Analysis: Theory and Practice, Second Edition, 2009, CRC Presspublic double getFractalBoxDimension(int[] boxSizes)
boxSizes - ordered array of Box-Sizespublic double getFractalBoxDimension()
public double getFractalDimensionGoodness()
public int getNumberofHoles()