public class FrameDetector extends Detector
Detector.FaceListener, Detector.ImageListener
Constructor and Description |
---|
FrameDetector(android.content.Context context)
Creates a FrameProcessor.
|
Modifier and Type | Method and Description |
---|---|
void |
process(Frame frame,
float timestamp)
Asks the Detector to process the passed facePicture.
|
void |
reset()
Resets the baselines used to detect expressions and emotions.
|
void |
start()
Initializes the FrameDetector in preparation for handling frames subsequently pushed via
process(com.affectiva.android.affdex.sdk.Frame, float) |
void |
stop()
Notifies the FrameDetector that the last frame has been pushed via
process(com.affectiva.android.affdex.sdk.Frame, float) , allowing it to
deallocate resources. |
getDetectAnger, getDetectAttention, getDetectBrowFurrow, getDetectBrowRaise, getDetectChinRaiser, getDetectContempt, getDetectDisgust, getDetectEngagement, getDetectEyeClosure, getDetectFear, getDetectGender, getDetectInnerBrowRaiser, getDetectJoy, getDetectLipDepressor, getDetectLipPress, getDetectLipPucker, getDetectLipSuck, getDetectMouthOpen, getDetectNoseWrinkler, getDetectSadness, getDetectSmile, getDetectSmirk, getDetectSurprise, getDetectUpperLipRaiser, getDetectValence, getPercentFaceDetected, isRunning, setAllEmotions, setAllExpressions, setDetectAnger, setDetectAttention, setDetectBrowFurrow, setDetectBrowRaise, setDetectChinRaiser, setDetectContempt, setDetectDisgust, setDetectEngagement, setDetectEyeClosure, setDetectFear, setDetectGender, setDetectInnerBrowRaiser, setDetectJoy, setDetectLipDepressor, setDetectLipPress, setDetectLipPucker, setDetectLipSuck, setDetectMouthOpen, setDetectNoseWrinkler, setDetectSadness, setDetectSmile, setDetectSmirk, setDetectSurprise, setDetectUpperLipRaiser, setDetectValence, setFaceListener, setImageListener, setLicensePath, setLicenseStream
public FrameDetector(android.content.Context context)
context
- application's context.public void start()
process(com.affectiva.android.affdex.sdk.Frame, float)
start
in class Detector
LicenseException
- if no or invalid license was provided see: Detector.setLicensePath(String)
.AffdexException
- if the detector did not initialize successfully.public void stop()
process(com.affectiva.android.affdex.sdk.Frame, float)
, allowing it to
deallocate resources.stop
in class Detector
IllegalStateException
- if called before Detector.start()
.Detector.getPercentFaceDetected()
public void reset()
public void process(Frame frame, float timestamp)
frame
- A Frame
to process. Must be right side up: use Frame.rotateImage(android.graphics.Bitmap, float)
before calling.timestamp
- A timestamp (non-negative), in seconds; expected to be larger than the previous call to this method.NullPointerException
- if frame
is null
.IllegalArgumentException
- if timestampSec
is negative or is smaller than or equal to the previous call.Copyright © 2015. All rights reserved.