Package com.banuba.sdk.recognizer
Class Recognizer.CppProxy
java.lang.Object
com.banuba.sdk.recognizer.Recognizer.CppProxy
- All Implemented Interfaces:
Recognizer
- Enclosing interface:
- Recognizer
public static final class Recognizer.CppProxy extends java.lang.Object implements Recognizer
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.banuba.sdk.recognizer.Recognizer
Recognizer.CppProxy
-
Method Summary
Modifier and Type Method Description void
_djinni_private_destroy()
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)
protected void
finalize()
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 + clearMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
_djinni_private_destroy
public void _djinni_private_destroy() -
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
getFeature
- Specified by:
getFeature
in interfaceRecognizer
-
setFeatures
- Specified by:
setFeatures
in interfaceRecognizer
-
addFeature
public void addFeature(Feature feature, java.util.HashSet<FeatureId> dependencies, boolean needsGpu)- Specified by:
addFeature
in interfaceRecognizer
-
removeFeature
- Specified by:
removeFeature
in interfaceRecognizer
-
setMaxFaces
public void setMaxFaces(int num)Description copied from interface:Recognizer
sets maximum allowed face results, if face tracking feature is present- Specified by:
setMaxFaces
in interfaceRecognizer
-
setOfflineMode
public void setOfflineMode(boolean on)- Specified by:
setOfflineMode
in interfaceRecognizer
-
setNnEnable
public void setNnEnable(boolean enable)Description copied from interface:Recognizer
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- Specified by:
setNnEnable
in interfaceRecognizer
-
getNnEnable
public boolean getNnEnable()- Specified by:
getNnEnable
in interfaceRecognizer
-
setEyesCorrection
public void setEyesCorrection(boolean on)Description copied from interface:Recognizer
sets eyes correction- Specified by:
setEyesCorrection
in interfaceRecognizer
-
setLipsCorrection
public void setLipsCorrection(boolean on)Description copied from interface:Recognizer
sets lips correction- Specified by:
setLipsCorrection
in interfaceRecognizer
-
isDeviceNnCompatible
public boolean isDeviceNnCompatible()Description copied from interface:Recognizer
Check if device compatible with NN player.- Specified by:
isDeviceNnCompatible
in interfaceRecognizer
-
setFaceSearchMode
Description copied from interface:Recognizer
Clear pipeline state and set face search mode- Specified by:
setFaceSearchMode
in interfaceRecognizer
-
process
- Specified by:
process
in interfaceRecognizer
-
pushCameraFrame
- Specified by:
pushCameraFrame
in interfaceRecognizer
-
popFrameData
- Specified by:
popFrameData
in interfaceRecognizer
-
start
public void start()Description copied from interface:Recognizer
start the recognizer- Specified by:
start
in interfaceRecognizer
-
pause
public void pause()Description copied from interface:Recognizer
pause the recognizer- Specified by:
pause
in interfaceRecognizer
-
stop
public void stop()Description copied from interface:Recognizer
pause + clear- Specified by:
stop
in interfaceRecognizer
-
clear
public void clear()Description copied from interface:Recognizer
clear input and output buffers and pipeline state, also clean cached features- Specified by:
clear
in interfaceRecognizer
-
create
@Nullable public static Recognizer create(@NonNull RecognizerMode mode, @Nullable java.lang.Integer maxTokens)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
-