|
Enrollment 28.2.0
|
Face capture can contains one or group of people, faces or full body. More...
#include <FaceCapture.h>
Public Member Functions | |
| void | WriteTo (Writer &writer) const final |
| Write itself into writer. | |
| std::vector< std::shared_ptr< Face > > | DetectWith (FaceCaptureSegmentation &detector) |
| Detects faces in the current face capture. | |
| std::shared_ptr< Image > | CropFace (const Rectangle &rectangle, const RGBA &backgroundColor) const |
| It crops image with given rectangle and background color. | |
| bool | IsWholeCroppedRectangleInside (const Rectangle &rectangle) const |
| Calculates intersection of image and cropping rectangle. | |
| std::shared_ptr< Image > | Draw (const std::vector< std::shared_ptr< Face > > &faces, const ImageShapeAttributes &attr) const |
| It draws rounding boxes into FaceCapture. | |
| std::shared_ptr< FaceCapture > | ResizeToMaxDimension (ImageDimension maxDimension) |
| Returns new FaceCapture with resized image to given max dimension. | |
| ImageDimension | MaxImageDimension () const |
| Returns max dimension of image in FaceCapture. | |
| std::shared_ptr< Image > | Draw (const Rectangle &boundingBox, const ImageShapeAttributes &attr) const |
| It draws bounding box into FaceCapture. | |
Static Public Member Functions | |
| static std::shared_ptr< FaceCapture > | Create (std::shared_ptr< Image > img, const FaceAttributes &fa=FaceAttributes()) |
| Constructor of FaceCapture. | |
| static std::shared_ptr< FaceCapture > | FromIsoImage (const std::vector< uint8_t > &isoImage) |
| Function creates Face object from ISO image based on ISO/IEC 19794-5 (Face image data). | |
Public Attributes | |
| const std::shared_ptr< Image > | image |
| Provides FaceCapture Image. | |
| const FaceAttributes | faceAttributes |
| Provides FaceAttributes. | |
Face capture can contains one or group of people, faces or full body.
|
inlinestaticnodiscard |
Constructor of FaceCapture.
| img | face capture image, will be moved into this class |
| fa | FaceAttributes |
| NullArgumentException | when image is null |
Referenced by FromIsoImage(), CroppedFace::GetFaceCapture(), and ResizeToMaxDimension().
|
inlinenodiscard |
Detects faces in the current face capture.
This method uses the provided face detection algorithm to find faces within the current face capture. The detector must be an implementation of FaceCaptureSegmentation, such as FaceDetector.
| detector | A reference to a FaceCaptureSegmentation implementation used for face detection. |
| EnrollmentException | If the detector encounters an error during face detection. |
|
inlinenodiscard |
It draws bounding box into FaceCapture.
| boundingBox | bounding box to draw |
| attr | ShapeAttributes of rounding boxes |
References GlobalLogger::Get(), image, and FormattingLogger::LogInfo().
|
inlinenodiscard |
It draws rounding boxes into FaceCapture.
| faces | detected faces |
| attr | ShapeAttributes of rounding boxes |
References GlobalLogger::Get(), image, and FormattingLogger::LogInfo().
|
inlinestaticnodiscard |
Function creates Face object from ISO image based on ISO/IEC 19794-5 (Face image data).
| isoImage | ISO image from ISO/IEC 19794-5 (Face image data) |
| ImageException | when type is not supported or image data are corrupted |
| EnrollmentInvalidArgumentException | when not possible to decode ISO image |
References Create(), Image::Decode(), IsoToFaceCaptureDeviceTechnology(), FaceAttributes::SetCaptureDeviceTechnology(), FaceAttributes::SetCaptureDeviceTypeID(), and FaceAttributes::SetCaptureDeviceVendorID().
|
inlinenodiscard |
Calculates intersection of image and cropping rectangle.
| rectangle | Rectangle to crop |
References image, Image::INSIDE, and Image::SAME.
|
inlinenodiscard |
Returns max dimension of image in FaceCapture.
References image.
|
inlinenodiscard |
Returns new FaceCapture with resized image to given max dimension.
When any image dimension does not exceed given maximum dimension then original FaceCapture is returned. Otherwise new FaceCapture with resized image is returned.
| maxDimension | max dimension of new Image in FaceCapture |
References Create(), and image.
|
inlinefinalvirtual |
Write itself into writer.
| writer | Writer to use to serialize this Serializable |
Implements Serializable.
References faceAttributes, and image.