@Reference(type=Article, author={"Sandeep, K","Rajagopalan, A N"}, title="Human Face Detection in Cluttered Color Images Using Skin Color and Edge Information", year="2002", journal="Electrical Engineering", url="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.12.730&rep=rep1&type=pdf", publisher="Citeseer") public class SandeepFaceDetector extends Object implements FaceDetector<CCDetectedFace,MBFImage>
Modifier and Type | Field and Description |
---|---|
static double |
GOLDEN_RATIO
The golden ratio (for comparing facial height/width)
|
Constructor and Description |
---|
SandeepFaceDetector()
Construct a new
SandeepFaceDetector with the default skin-tone
model. |
SandeepFaceDetector(MBFPixelClassificationModel skinModel)
Construct the detector with the given pixel classification model.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
binaryHeader()
Header for binary input.
|
List<CCDetectedFace> |
detectFaces(MBFImage inputRGB)
Detect faces in the image and return a list of faces found.
|
protected List<CCDetectedFace> |
extractFaces(FImage faceMap,
FImage skinMap,
FImage image) |
protected FImage |
generateFaceMap(FImage skin,
FImage edge) |
protected FImage |
generateSkinColorMap(MBFImage inputHS) |
protected FImage |
generateSobelMagnitudes(MBFImage inputRGB) |
float |
getEdgeThreshold() |
float |
getPercentageThreshold() |
MBFPixelClassificationModel |
getSkinModel() |
float |
getSkinThreshold() |
static void |
main(String[] args)
Run the face detector following the conventions of the ocv detector
|
void |
readBinary(DataInput in)
Read internal state from in.
|
void |
setEdgeThreshold(float edgeThreshold)
Set the edge threshold.
|
void |
setPercentageThreshold(float percentageThreshold)
Set the percentage threshold
|
void |
setSkinModel(MBFPixelClassificationModel skinModel)
Set the underlying skin-tone classifier
|
void |
setSkinThreshold(float skinThreshold)
Set the detection threshold.
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
public static final double GOLDEN_RATIO
public SandeepFaceDetector()
SandeepFaceDetector
with the default skin-tone
model.public SandeepFaceDetector(MBFPixelClassificationModel skinModel)
skinModel
- the underlying classification model.protected FImage generateSkinColorMap(MBFImage inputHS)
protected FImage generateSobelMagnitudes(MBFImage inputRGB)
protected FImage generateFaceMap(FImage skin, FImage edge)
protected List<CCDetectedFace> extractFaces(FImage faceMap, FImage skinMap, FImage image)
public List<CCDetectedFace> detectFaces(MBFImage inputRGB)
FaceDetector
detectFaces
in interface FaceDetector<CCDetectedFace,MBFImage>
inputRGB
- Image to search inpublic MBFPixelClassificationModel getSkinModel()
public void setSkinModel(MBFPixelClassificationModel skinModel)
skinModel
- public float getSkinThreshold()
public void setSkinThreshold(float skinThreshold)
skinThreshold
- public float getEdgeThreshold()
public void setEdgeThreshold(float edgeThreshold)
edgeThreshold
- public float getPercentageThreshold()
public void setPercentageThreshold(float percentageThreshold)
percentageThreshold
- public static void main(String[] args) throws IOException
args
- IOException
public void readBinary(DataInput in) throws IOException
ReadableBinary
readBinary
in interface ReadableBinary
in
- source to read from.IOException
- an error reading inputpublic byte[] binaryHeader()
ReadableBinary
binaryHeader
in interface ReadableBinary
binaryHeader
in interface WriteableBinary
public void writeBinary(DataOutput out) throws IOException
WriteableBinary
writeBinary
in interface WriteableBinary
out
- sink to write toIOException
- an error writing to out