public class BoundaryDistanceDescriptor extends Object implements ConnectedComponentProcessor, FeatureVectorProvider<DoubleFV>
Modifier and Type | Field and Description |
---|---|
double[] |
descriptor
The descriptor vector, measusring distance from centroid per degree
|
static int |
DESCRIPTOR_LENGTH
The number of samples
|
protected boolean |
normaliseAngle |
protected boolean |
normaliseScale |
Constructor and Description |
---|
BoundaryDistanceDescriptor()
Construct the BoundaryDistanceDescriptor with both scale and
orientation normalisation enabled
|
BoundaryDistanceDescriptor(boolean normaliseDistance,
boolean normaliseAngle)
Construct the BoundaryDistanceDescriptor with optional scale and
orientation invariance.
|
Modifier and Type | Method and Description |
---|---|
DoubleFV |
getFeatureVector()
Get the FeatureVector associated with this object.
|
double[] |
getFeatureVectorArray()
Get the feature vector as a double array
|
void |
process(ConnectedComponent cc)
Perform an operation on the given
ConnectedComponent . |
public static final int DESCRIPTOR_LENGTH
public double[] descriptor
protected boolean normaliseScale
protected boolean normaliseAngle
public BoundaryDistanceDescriptor()
public BoundaryDistanceDescriptor(boolean normaliseDistance, boolean normaliseAngle)
normaliseDistance
- enable scale invariancenormaliseAngle
- enable rotation invariancepublic void process(ConnectedComponent cc)
ConnectedComponentProcessor
ConnectedComponent
.process
in interface ConnectedComponentProcessor
cc
- The ConnectedComponent
to process.public double[] getFeatureVectorArray()
public DoubleFV getFeatureVector()
FeatureVectorProvider
getFeatureVector
in interface FeatureVectorProvider<DoubleFV>