public class FaceAnalyser
extends java.lang.Object
implements java.lang.AutoCloseable, java.io.Serializable
| Constructor and Description |
|---|
FaceAnalyser()
Creates a new instance of the FaceAnalyser class.
|
FaceAnalyser(long handle)
Creates a new instance of the FaceAnalyser class.
|
| Modifier and Type | Method and Description |
|---|---|
Image |
applyAlphaMask(Image image,
Image mask)
Applies an alpha mask to suppress the background and returns a 32-bit BGRA image.
|
Image |
applyMask(Image image,
Image mask,
int red,
int green,
int blue)
Applies a mask to replace the background with the specified color and returns a 24-bit BGR image.
|
boolean |
checkColorizedImage(Image image)
Verifies if an image is colorized or grayscale.
|
void |
close()
Releases all resources used by this FaceAnalyser.
|
int |
computeAge(Image image,
DetectedFace detectedFace)
Computes the age of a detected face.
|
FaceAttributes |
computeAttributes(Image image,
DetectedFace detectedFace)
Computes the attributes of a detected face.
|
BackgroundUniformity |
computeBackgroundUniformity(Image image,
DetectedFace detectedFace)
Computes the background uniformity behind a detected face.
|
FaceExpression |
computeExpression(Image image,
DetectedFace detectedFace)
Computes the expression of a detected face.
|
EyeGaze |
computeEyeGaze(Image image,
DetectedFace detectedFace,
PointList landmarks)
Computes the eye gaze of a detected face.
|
int[] |
computeEyeOpenness(Image image,
DetectedFace detectedFace,
PointList landmarks)
Computes the eye openness of a detected face.
|
int[] |
computeEyeRedness(Image image,
DetectedFace detectedFace,
PointList landmarks)
Computes the eye redness of a detected face.
|
GeometricAttributes |
computeGeometricAttributes(Image image,
DetectedFace detectedFace,
PointList landmarks)
Computes the geometric attributes of a detected face.
|
GlassesAttributes |
computeGlassesAttributes(Image image,
DetectedFace detectedFace,
PointList landmarks)
Computes the glasses attributes of a detected face.
|
PointList |
computeLandmarks(Image image,
DetectedFace detectedFace)
Computes 68 landmarks of a detected face.
|
int |
computeNoise(Image image)
Measures the image noise.
|
PhotographicAttributes |
computePhotographicAttributes(Image image,
DetectedFace detectedFace,
PointList landmarks)
Computes the photographic attributes of a detected face.
|
FacePose |
computePose(DetectedFace detectedFace)
Computes the pose of a detected face.
|
FacePose |
computePoseWithLandmarks(DetectedFace detectedFace,
PointList landmarks)
Computes the pose of a detected face using the specified 68-point landmarks.
|
int |
detectFaceMask(Image image,
DetectedFace detectedFace)
Detects the presence of a face mask on a detected face.
|
FaceOcclusionScores |
detectOcclusions(Image image,
DetectedFace detectedFace)
Detects occlusions on the subject's face.
|
protected void |
finalize()
Finalizer for this class.
|
int |
getExpressionSensibility()
Gets the sensibility of the expression classifier.
|
long |
getHandle()
Gets the native handle.
|
int |
getOverExposureSensibility()
Gets the sensibility of the over-exposure classifier, from 0 to 255.
|
int |
getThreadCount()
Gets the number of threads to be used for face analysis.
|
int |
getUnderExposureSensibility()
Gets the sensibility of the under-exposure classifier, from 0 to 255.
|
Image |
removeCompressionArtifacts(Image image)
Upscale and enhance the image of a face.
|
Image |
segmentBackground(Image image)
Computes face segmentation mask for background removal.
|
Image |
segmentFace(Image image)
Computes a segmentation map of a face.
|
void |
setExpressionSensibility(int expressionSensibility)
Sets the sensibility of the expression classifier.
|
void |
setOverExposureSensibility(int overExposureSensibility)
Sets the sensibility of the over-exposure classifier, from 0 to 255.
|
void |
setThreadCount(int threadCount)
Sets the number of threads to be used for face analysis.
|
void |
setUnderExposureSensibility(int underExposureSensibility)
Sets the sensibility of the under-exposure classifier, from 0 to 255.
|
public FaceAnalyser()
throws FaceException
FaceException - An error has occurred during Face Library execution.public FaceAnalyser(long handle)
throws FaceException
handle - Handle to the FaceAnalyser.FaceException - An error has occurred during Face Library execution.public void close()
close in interface java.lang.AutoCloseableprotected void finalize()
finalize in class java.lang.Objectpublic long getHandle()
public int getExpressionSensibility()
throws FaceException
FaceException - An error has occurred during Face Library execution.public void setExpressionSensibility(int expressionSensibility)
throws FaceException
expressionSensibility - Sensibility of the expression classifier.FaceException - An error has occurred during Face Library execution.public int getOverExposureSensibility()
throws FaceException
FaceException - An error has occurred during Face Library execution.public void setOverExposureSensibility(int overExposureSensibility)
throws FaceException
overExposureSensibility - Sensibility of the over-exposure classifier, from 0 to 255.FaceException - An error has occurred during Face Library execution.public int getThreadCount()
throws FaceException
FaceException - An error has occurred during Face Library execution.public void setThreadCount(int threadCount)
throws FaceException
threadCount - Number of threads to be used for face analysis.FaceException - An error has occurred during Face Library execution.public int getUnderExposureSensibility()
throws FaceException
FaceException - An error has occurred during Face Library execution.public void setUnderExposureSensibility(int underExposureSensibility)
throws FaceException
underExposureSensibility - Sensibility of the under-exposure classifier, from 0 to 255.FaceException - An error has occurred during Face Library execution.public Image applyAlphaMask(Image image, Image mask) throws FaceException
image - Source image to process.mask - Mask of segmented face.FaceException - An error has occurred during Face Library execution.public Image applyMask(Image image, Image mask, int red, int green, int blue) throws FaceException
image - Source image to process.mask - Mask to be applied. Must be a 8-bit greyscale image of same size as the input image.red - Green channel of the background color. Must be a value from 0 to 255.green - Red channel of the background color. Must be a value from 0 to 255.blue - Blue channel of the background color. Must be a value from 0 to 255.FaceException - An error has occurred during Face Library execution.public boolean checkColorizedImage(Image image) throws FaceException
image - Source image to process.FaceException - An error has occurred during Face Library execution.public int computeAge(Image image, DetectedFace detectedFace) throws FaceException
image - Source image to process.detectedFace - Detected face to process.FaceException - An error has occurred during Face Library execution.public FaceAttributes computeAttributes(Image image, DetectedFace detectedFace) throws FaceException
image - Source image to process.detectedFace - Detected face to process.FaceException - An error has occurred during Face Library execution.public BackgroundUniformity computeBackgroundUniformity(Image image, DetectedFace detectedFace) throws FaceException
image - Source image to process.detectedFace - Detected face to process.FaceException - An error has occurred during Face Library execution.public FaceExpression computeExpression(Image image, DetectedFace detectedFace) throws FaceException
image - Source image to process.detectedFace - Detected face to process.FaceException - An error has occurred during Face Library execution.public EyeGaze computeEyeGaze(Image image, DetectedFace detectedFace, PointList landmarks) throws FaceException
image - Source image to process.detectedFace - Detected face to process.landmarks - Estimated landmarks of the detected face. Must be computed with the face analyser.FaceException - An error has occurred during Face Library execution.public int[] computeEyeOpenness(Image image, DetectedFace detectedFace, PointList landmarks) throws FaceException
image - Source image to process.detectedFace - Detected face to process.landmarks - Estimated landmarks of the detected face. Must be computed with the face analyser.FaceException - An error has occurred during Face Library execution.public int[] computeEyeRedness(Image image, DetectedFace detectedFace, PointList landmarks) throws FaceException
image - Source image to process.detectedFace - Detected face to process.landmarks - Estimated landmarks of the detected face. Must be computed with the face analyser.FaceException - An error has occurred during Face Library execution.public GeometricAttributes computeGeometricAttributes(Image image, DetectedFace detectedFace, PointList landmarks) throws FaceException
image - Source image to process.detectedFace - Detected face to process.landmarks - Estimated landmarks of the detected face. Must be computed with the face analyser.FaceException - An error has occurred during Face Library execution.public GlassesAttributes computeGlassesAttributes(Image image, DetectedFace detectedFace, PointList landmarks) throws FaceException
image - Source image to process.detectedFace - Detected face to process.landmarks - Estimated landmarks of the detected face. Must be computed with the face analyser.FaceException - An error has occurred during Face Library execution.public PointList computeLandmarks(Image image, DetectedFace detectedFace) throws FaceException
image - Source image to process.detectedFace - Detected face to process.FaceException - An error has occurred during Face Library execution.public int computeNoise(Image image) throws FaceException
image - Source image to process.FaceException - An error has occurred during Face Library execution.public PhotographicAttributes computePhotographicAttributes(Image image, DetectedFace detectedFace, PointList landmarks) throws FaceException
image - Source image to process.detectedFace - Detected face to process.landmarks - Estimated landmarks of the detected face. Must be computed with the face analyser.FaceException - An error has occurred during Face Library execution.public FacePose computePose(DetectedFace detectedFace) throws FaceException
detectedFace - Detected face to process.FaceException - An error has occurred during Face Library execution.public FacePose computePoseWithLandmarks(DetectedFace detectedFace, PointList landmarks) throws FaceException
detectedFace - Detected face to process.landmarks - Estimated landmarks of the detected face. Must be computed with the face analyser.FaceException - An error has occurred during Face Library execution.public int detectFaceMask(Image image, DetectedFace detectedFace) throws FaceException
image - Source image to process.detectedFace - Detected face to process.FaceException - An error has occurred during Face Library execution.public FaceOcclusionScores detectOcclusions(Image image, DetectedFace detectedFace) throws FaceException
image - Source image to process.detectedFace - Detected face to process.FaceException - An error has occurred during Face Library execution.public Image removeCompressionArtifacts(Image image) throws FaceException
image - Source image to process.FaceException - An error has occurred during Face Library execution.public Image segmentBackground(Image image) throws FaceException
image - Source image to process.FaceException - An error has occurred during Face Library execution.public Image segmentFace(Image image) throws FaceException
image - Source image to process.FaceException - An error has occurred during Face Library execution.Copyright © id3 Technologies. All rights reserved. eu.id3.face