public class DetectedFace extends Object implements ReadWriteableBinary
| Modifier and Type | Field and Description | 
|---|---|
| protected Rectangle | boundsThe upright bounds of the face in the image in which it was detected | 
| protected float | confidenceThe confidence of the detection; higher numbers mean higher confidence. | 
| protected FImage | facePatchThe extracted sub-image representing the face. | 
| Constructor and Description | 
|---|
| DetectedFace()Default constructor with an empty rectangle as bounds | 
| DetectedFace(Rectangle bounds,
            FImage patch,
            float confidence)Construct with a bounds rectangle (the bounding box of the face in the
 detection image) and an image patch that describes the contents of the
 bounds rectangle from the original image. | 
| Modifier and Type | Method and Description | 
|---|---|
| byte[] | binaryHeader()Header for binary input. | 
| Rectangle | getBounds()Get the bounding box of the face in the detection image. | 
| float | getConfidence()Get the confidence of the detection. | 
| FImage | getFacePatch()Returns the sub-image representing the face. | 
| Shape | getShape()Get the shape of the detection. | 
| void | readBinary(DataInput in)Read internal state from in. | 
| void | setBounds(Rectangle rect)Set the bounds of this face. | 
| void | setConfidence(int confidence)Set the confidence of the detection. | 
| void | setFacePatch(FImage img)Reset the face patch image | 
| void | writeBinary(DataOutput out)Write the content of this as binary to out. | 
protected Rectangle bounds
protected FImage facePatch
protected float confidence
public DetectedFace()
public DetectedFace(Rectangle bounds, FImage patch, float confidence)
bounds - The bounding box of the face in the detection image.patch - The subimage describing the contents of the bounding box.confidence - The confidence of the detection.public FImage getFacePatch()
public void setFacePatch(FImage img)
img - The imagepublic Rectangle getBounds()
getShape(), or it might
 encompass that shape.public void setBounds(Rectangle rect)
rect - The new boundspublic void writeBinary(DataOutput out) throws IOException
WriteableBinarywriteBinary in interface WriteableBinaryout - sink to write toIOException - an error writing to outpublic byte[] binaryHeader()
ReadableBinarybinaryHeader in interface ReadableBinarybinaryHeader in interface WriteableBinarypublic void readBinary(DataInput in) throws IOException
ReadableBinaryreadBinary in interface ReadableBinaryin - source to read from.IOException - an error reading inputpublic float getConfidence()
public Shape getShape()
public void setConfidence(int confidence)
confidence - the confidence.