Package com.banuba.sdk.recognizer
Interface Recognizer
- All Known Implementing Classes:
Recognizer.CppProxy
public interface Recognizer
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Recognizer.CppProxy
-
Method Summary
Modifier and Type Method Description void
addFeature(Feature feature, java.util.HashSet<FeatureId> dependencies, boolean needsGpu)
void
clear()
clear input and output buffers and pipeline state, also clean cached featuresstatic Recognizer
create(RecognizerMode mode, java.lang.Integer maxTokens)
Feature
getFeature(FeatureId feature)
static long
getFeatureId(FeatureId feature)
boolean
getNnEnable()
boolean
isDeviceNnCompatible()
Check if device compatible with NN player.void
pause()
pause the recognizerboolean
popFrameData(FrameData outputFrameData)
void
process(FrameData frameData)
void
pushCameraFrame(FrameData inputFrameData)
void
removeFeature(Feature feature)
void
setEyesCorrection(boolean on)
sets eyes correctionvoid
setFaceSearchMode(FaceSearchMode mode)
Clear pipeline state and set face search modevoid
setFeatures(java.util.HashSet<FeatureId> features)
void
setLipsCorrection(boolean on)
sets lips correctionvoid
setMaxFaces(int num)
sets maximum allowed face results, if face tracking feature is presentvoid
setNnEnable(boolean enable)
Set flag which enable NN's features.void
setOfflineMode(boolean on)
void
start()
start the recognizervoid
stop()
pause + clear
-
Method Details
-
getFeature
-
setFeatures
-
addFeature
-
removeFeature
-
setMaxFaces
void setMaxFaces(int num)sets maximum allowed face results, if face tracking feature is present -
setOfflineMode
void setOfflineMode(boolean on) -
setNnEnable
void setNnEnable(boolean enable)Set flag which enable NN's features. True by default, if device compatible with NN player When this flag is false, recognizer will skip NN-dependent features during set_features call. In case when device have no NN player support (is_device_nn_compatible return false), setting enable to true have no any effect -
getNnEnable
boolean getNnEnable() -
setEyesCorrection
void setEyesCorrection(boolean on)sets eyes correction -
setLipsCorrection
void setLipsCorrection(boolean on)sets lips correction -
isDeviceNnCompatible
boolean isDeviceNnCompatible()Check if device compatible with NN player. -
setFaceSearchMode
Clear pipeline state and set face search mode -
process
-
pushCameraFrame
-
popFrameData
-
start
void start()start the recognizer -
pause
void pause()pause the recognizer -
stop
void stop()pause + clear -
clear
void clear()clear input and output buffers and pipeline state, also clean cached features -
create
@Nullable static Recognizer create(@NonNull RecognizerMode mode, @Nullable java.lang.Integer maxTokens)- Parameters:
maxTokens
- If greater than 0: recognizer will run processing on push-ed() frame only if it can "consume" a token - and will wait for the token to become available if all maxTokens tokens have been used up. Consumed tokens are "produced" again one-by-one when pop-ping() processed frame(s). This mode prevents processing frames more often than a consumer(e.g. renderer) can use: potentially reducing energy consumption at the cost of higher latency. Only for asynchronous mode.
-
getFeatureId
-