public class BasicShapeDescriptor extends Object implements org.openimaj.image.processor.connectedcomponent.ConnectedComponentProcessor, FeatureVectorProvider<DoubleFV>
| Modifier and Type | Class and Description |
|---|---|
static class |
BasicShapeDescriptor.BasicShapeDescriptorType
An enum of all the different basic shape descriptors.
|
| Modifier and Type | Field and Description |
|---|---|
double |
area
The area of the component
|
double |
chfit
The ratio of the area of the component to the area of its convex hull
|
double |
compactness
The compactness of the component.
|
double |
cornerEst
The estimated number of corners of the component
|
double |
cx
The x coordinate of the component centroid
|
double |
cy
The y coordinate of the component centroid
|
double |
direction
The primary orientation of the component
|
double |
elongatedness
The elongatedness of the component.
|
| Constructor and Description |
|---|
BasicShapeDescriptor() |
| Modifier and Type | Method and Description |
|---|---|
DoubleFV |
getFeatureVector() |
double[] |
getFeatureVectorArray()
Get all the values of the descriptor as an array in the order area,
centroid_x, centroid_y, direction, elongatedness, compactness
convex_hull_fit, corner_count
|
void |
process(org.openimaj.image.pixel.ConnectedComponent cc) |
public double area
PixelSet.calculateArea()public double cx
PixelSet.calculateCentroid()public double cy
PixelSet.calculateCentroid()public double direction
PixelSet.calculateDirection()public double elongatedness
ConnectedComponent.calculateOrientatedBoundingBoxAspectRatio()public double compactness
public double chfit
ConnectedComponent.calculatePercentageConvexHullFit()public double cornerEst
ConnectedComponent.estimateNumberOfVertices(int, int)public BasicShapeDescriptor()
public void process(org.openimaj.image.pixel.ConnectedComponent cc)
process in interface org.openimaj.image.processor.connectedcomponent.ConnectedComponentProcessorpublic double[] getFeatureVectorArray()
public DoubleFV getFeatureVector()
getFeatureVector in interface FeatureVectorProvider<DoubleFV>