public class CCDetectedFace extends DetectedFace
DetectedFace
that is represented/detected by a
ConnectedComponent
.bounds, confidence, facePatch
Constructor and Description |
---|
CCDetectedFace()
Default constructor.
|
CCDetectedFace(Rectangle bounds,
FImage patch,
ConnectedComponent cc,
float confidence)
Construct with a bounds rectangle (the bounding box of the face in the
detection image),an image patch that describes the contents of the bounds
rectangle from the original image, and a
ConnectedComponent
describing the shape of the detected face. |
Modifier and Type | Method and Description |
---|---|
byte[] |
binaryHeader()
Header for binary input.
|
PixelSet |
getConnectedComponent() |
Shape |
getShape()
Get the shape of the detection.
|
void |
readBinary(DataInput in)
Read internal state from in.
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
getBounds, getConfidence, getFacePatch, setBounds, setConfidence, setFacePatch
public CCDetectedFace()
public CCDetectedFace(Rectangle bounds, FImage patch, ConnectedComponent cc, float confidence)
ConnectedComponent
describing the shape of the detected face.bounds
- The bounding box of the face in the detection imagepatch
- The subimage describing the contents of the bounding box.cc
- The connected component representing the face.confidence
- The confidence of the detectionpublic PixelSet getConnectedComponent()
public void writeBinary(DataOutput out) throws IOException
WriteableBinary
writeBinary
in interface WriteableBinary
writeBinary
in class DetectedFace
out
- sink to write toIOException
- an error writing to outpublic byte[] binaryHeader()
ReadableBinary
binaryHeader
in interface ReadableBinary
binaryHeader
in interface WriteableBinary
binaryHeader
in class DetectedFace
public void readBinary(DataInput in) throws IOException
ReadableBinary
readBinary
in interface ReadableBinary
readBinary
in class DetectedFace
in
- source to read from.IOException
- an error reading inputpublic Shape getShape()
DetectedFace
getShape
in class DetectedFace