Modifier and Type | Field and Description |
---|---|
ComponentFeature[] |
features
List of features representing this component
|
boolean |
isMSER
Whether this component represents an MSER
|
IntValuePixel |
pivot
The pivot pixel
|
Constructor and Description |
---|
Component(IntValuePixel p,
Class<? extends ComponentFeature>... featureClasses)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accumulate(IntValuePixel p)
Add a pixel to the component
|
Component |
clone() |
<T extends ComponentFeature> |
getFeature(Class<T> featureClass)
Get the feature matching the given class if it exists.
|
ComponentFeature |
getFeature(int index)
Get the feature at the given index
|
Set<Pixel> |
getPixels()
Get the pixels in the component.
|
void |
merge(Component p)
Merge another component with this one
|
int |
size()
The size of the component (i.e.
|
String |
toString() |
public boolean isMSER
public ComponentFeature[] features
public IntValuePixel pivot
@SafeVarargs public Component(IntValuePixel p, Class<? extends ComponentFeature>... featureClasses)
p
- The grey level of the componentfeatureClasses
- the list of features to create for the componentpublic String toString()
toString
in class Object
AbstractCollection.toString()
public void accumulate(IntValuePixel p)
p
- the pixel to addpublic void merge(Component p)
p
- the component to merge into thispublic int size()
public Set<Pixel> getPixels()
PixelsFeature
then the pixels will be returned from that;
otherwise a set containing just the pivot pixel will be returned.public ComponentFeature getFeature(int index)
index
- the indexpublic <T extends ComponentFeature> T getFeature(Class<T> featureClass)
T
- the class of the featurefeatureClass
- the class of the feature