|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Facemorph.haar.HaarCascade
public class HaarCascade
The HaarCascade is essentially a list of HaarStages.
Constructor Summary | |
---|---|
HaarCascade(BufferedImg img)
Construct a new cascade. |
Method Summary | |
---|---|
static Face |
average(java.util.ArrayList<Face> faces)
Finds the average of a groupd of object boxes |
java.util.List<Face> |
doCascade(HaarReader haar,
double stepSize,
double shift,
double minScale,
double maxScale,
int xstart,
int ystart,
int scanWidth,
int scanHeight,
boolean group)
Performs the cascade referenced by haar on the picture in this object. |
java.util.List<Face> |
doCascade(HaarReader haar,
double stepSize,
double shift,
double minScale,
double maxScale,
java.util.List<Face> faces,
int xstart,
int ystart,
int scanWidth,
int scanHeight,
boolean flip,
boolean group)
Performs the cascade referenced by haar on the picture in this object. |
boolean |
doCascade(HaarReader haar,
int xOffset,
int yOffset,
double scale,
boolean flip)
Performs the cascade referenced by haar on the picture in this object. |
SAT |
getSAT()
Returns the summed area table associated with this object. |
java.util.List<Face> |
groupResults(java.util.List<Face> inlist,
int baseSize)
Groups overlapping boxes |
boolean |
overlap(Face f1,
Face f2,
int baseSize)
boolean test to see if 2 boxes are overlapping by some amount |
void |
setCascadeListener(CascadeListener cl)
Sets the cascade listener if e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HaarCascade(BufferedImg img)
img
- The image to searchMethod Detail |
---|
public SAT getSAT()
public void setCascadeListener(CascadeListener cl)
cl
- The CascadeListener that will be notified of Cascade eventspublic java.util.List<Face> doCascade(HaarReader haar, double stepSize, double shift, double minScale, double maxScale, int xstart, int ystart, int scanWidth, int scanHeight, boolean group)
shift
- How big to step between applying this filter.minScale
- The minimum scale to scan atmaxScale
- The maximum scale to scan atxstart
- The start x positionystart
- The start y positionscanWidth
- The width of the box to scanscanHeight
- The height of the box to scangroup
- Flag to indicate if you should group overlapping boxeshaar
- The cascade to perform on the image.stepSize
- The default step size to use as a fraction of the cascade default image size.
public java.util.List<Face> doCascade(HaarReader haar, double stepSize, double shift, double minScale, double maxScale, java.util.List<Face> faces, int xstart, int ystart, int scanWidth, int scanHeight, boolean flip, boolean group)
faces
- List of faces to add any found faces tooflip
- Flag indicating if the cascade should be flippedshift
- How big to step between applying this filter.minScale
- The minimum scale to scan atmaxScale
- The maximum scale to scan atxstart
- The start x positionystart
- The start y positionscanWidth
- The width of the box to scanscanHeight
- The height of the box to scangroup
- Flag to indicate if you should group overlapping boxeshaar
- The cascade to perform on the image.stepSize
- The default step size to use as a fraction of the cascade default image size.
public java.util.List<Face> groupResults(java.util.List<Face> inlist, int baseSize)
inlist
- Input list of object's foundbaseSize
- The original baseSize
public static Face average(java.util.ArrayList<Face> faces)
faces
- The list of faces boxes to average
public boolean overlap(Face f1, Face f2, int baseSize)
f1
- First face boxf2
- Second face boxbaseSize
- original ize of the training box
public boolean doCascade(HaarReader haar, int xOffset, int yOffset, double scale, boolean flip)
flip
- flag to indicate if left-right should be flippedhaar
- The cascade to perform on the image.xOffset
- The X offset to look at the picture from.yOffset
- The Y offset to look at the picture from.scale
- The scaling factor to use
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |