public enum HaarFeatureType extends Enum<HaarFeatureType>
Enum Constant and Description |
---|
CS
Centre-surround feature:
|
TX2
Tilted two component feature:
|
TX3
Tilted three component feature:
|
TX4
Tilted three component feature:
|
TY2
Tilted two component feature:
|
TY3
Tilted three component feature:
|
TY4
Tilted three component feature:
|
X2
Two component feature:
|
X2Y2
Four component feature:
|
X3
Three component feature:
|
X4
Three component feature:
|
Y2
Two component feature:
|
Y3
Three component feature:
|
Y4
Three component feature:
|
Modifier and Type | Field and Description |
---|---|
static EnumSet<HaarFeatureType> |
ALL
Set of all the features
|
static EnumSet<HaarFeatureType> |
BASIC
Set of the basic features (non tilted edges & lines +
X2Y2 ) |
static EnumSet<HaarFeatureType> |
CORE
Set of the core features (all but tilted features)
|
Modifier and Type | Method and Description |
---|---|
abstract HaarFeature |
create(int x,
int y,
int dx,
int dy,
int winWidth,
int winHeight)
Create a feature.
|
static List<HaarFeature> |
generateFeatures(int winWidth,
int winHeight,
Collection<HaarFeatureType> types)
Generate features of the given types for all possible locations and sizes
in the given window bounds.
|
static List<HaarFeature> |
generateFeatures(int winWidth,
int winHeight,
HaarFeatureType... types)
Generate features of the given types for all possible locations and sizes
in the given window bounds.
|
static HaarFeatureType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HaarFeatureType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HaarFeatureType X2
0 X
public static final HaarFeatureType Y2
0 X
public static final HaarFeatureType X3
0 X 0
public static final HaarFeatureType Y3
0 X 0
public static final HaarFeatureType X4
0 X X 0
public static final HaarFeatureType Y4
0 X X 0
public static final HaarFeatureType X2Y2
X 0 0 X
public static final HaarFeatureType CS
0 0 0 0 X 0 0 0 0
public static final HaarFeatureType TX2
0 - -X
public static final HaarFeatureType TY2
- 0 X -
public static final HaarFeatureType TX3
0 - - -X - - -0
public static final HaarFeatureType TY3
- - 0 - X - 0 - -
public static final HaarFeatureType TX4
0 - - - -X - - - -X - - - -0
public static final HaarFeatureType TY4
- - - 0 - - X - - X - - 0 - - -
public static EnumSet<HaarFeatureType> ALL
public static EnumSet<HaarFeatureType> BASIC
X2Y2
)public static EnumSet<HaarFeatureType> CORE
public static HaarFeatureType[] values()
for (HaarFeatureType c : HaarFeatureType.values()) System.out.println(c);
public static HaarFeatureType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract HaarFeature create(int x, int y, int dx, int dy, int winWidth, int winHeight)
x
- x-locationy
- y-locationdx
- x-deltady
- y-deltawinWidth
- window widthwinHeight
- window heightpublic static List<HaarFeature> generateFeatures(int winWidth, int winHeight, HaarFeatureType... types)
winWidth
- window widthwinHeight
- window heighttypes
- types of feature to generatepublic static List<HaarFeature> generateFeatures(int winWidth, int winHeight, Collection<HaarFeatureType> types)
winWidth
- window widthwinHeight
- window heighttypes
- types of feature to generate