Class FrameGrabberRecognizer
- java.lang.Object
-
- com.microblink.documentverification.entities.Entity<T>
-
- com.microblink.documentverification.entities.recognizers.Recognizer<FrameGrabberRecognizer.Result>
-
- com.microblink.documentverification.entities.recognizers.framegrabber.FrameGrabberRecognizer
-
- All Implemented Interfaces:
android.os.Parcelable,JsonizableEntity
public final class FrameGrabberRecognizer extends Recognizer<FrameGrabberRecognizer.Result>
A recognizer that never produces a result, but sends every frame that it receives to givenFrameCallback.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFrameGrabberRecognizer.Result
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<FrameGrabberRecognizer>CREATOR
-
Constructor Summary
Constructors Constructor Description FrameGrabberRecognizer(FrameCallback frameCallback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FrameGrabberRecognizerclone()Create a copy of the entity.voidconsumeResultFrom(Entity other)Consume result from other entity.protected voiddeserializeNativeSettings(byte[] serializedSettings)FrameCallbackgetFrameCallback()TheFrameCallbackthat will receive frames.protected byte[]serializeNativeSettings()voidsetFrameCallback(FrameCallback frameCallback)TheFrameCallbackthat will receive frames.voidsetGrabFocusedFrames(boolean grabFocusedFrames)Allow sending focused camera frames toFrameCallback.voidsetGrabUnfocusedFrames(boolean grabUnfocusedFrames)Allow sending unfocused camera frames toFrameCallback.booleanshouldGrabFocusedFrames()Allow sending focused camera frames toFrameCallback.booleanshouldGrabUnfocusedFrames()Allow sending unfocused camera frames toFrameCallback.protected voidterminateNative(long nativeContext)voidwriteToParcel(android.os.Parcel dest, int i)-
Methods inherited from class com.microblink.documentverification.entities.recognizers.Recognizer
getName, isExcludedFromPing, requiresAutofocus, requiresLandscapeMode, signedJsonNativeGet, toSignedJson
-
Methods inherited from class com.microblink.documentverification.entities.Entity
describeContents, finalize, getNativeContext, getResult, nativeGetNativeResultContext, readFromParcel
-
-
-
-
Field Detail
-
CREATOR
@NonNull public static final android.os.Parcelable.Creator<FrameGrabberRecognizer> CREATOR
-
-
Constructor Detail
-
FrameGrabberRecognizer
public FrameGrabberRecognizer(@NonNull FrameCallback frameCallback)- Parameters:
frameCallback- TheFrameCallbackthat will receive frames.
-
-
Method Detail
-
setFrameCallback
public void setFrameCallback(@NonNull FrameCallback frameCallback)TheFrameCallbackthat will receive frames.
-
getFrameCallback
@NonNull public FrameCallback getFrameCallback()
TheFrameCallbackthat will receive frames.
-
setGrabFocusedFrames
public void setGrabFocusedFrames(boolean grabFocusedFrames)
Allow sending focused camera frames toFrameCallback.
-
shouldGrabFocusedFrames
public boolean shouldGrabFocusedFrames()
Allow sending focused camera frames toFrameCallback.
-
setGrabUnfocusedFrames
public void setGrabUnfocusedFrames(boolean grabUnfocusedFrames)
Allow sending unfocused camera frames toFrameCallback.
-
shouldGrabUnfocusedFrames
public boolean shouldGrabUnfocusedFrames()
Allow sending unfocused camera frames toFrameCallback.
-
terminateNative
protected void terminateNative(long nativeContext)
- Specified by:
terminateNativein classEntity<FrameGrabberRecognizer.Result>
-
writeToParcel
public void writeToParcel(@NonNull android.os.Parcel dest, int i)- Specified by:
writeToParcelin interfaceandroid.os.Parcelable- Overrides:
writeToParcelin classEntity<FrameGrabberRecognizer.Result>
-
serializeNativeSettings
@Nullable protected byte[] serializeNativeSettings()
- Specified by:
serializeNativeSettingsin classEntity<FrameGrabberRecognizer.Result>
-
deserializeNativeSettings
protected void deserializeNativeSettings(@NonNull byte[] serializedSettings)- Specified by:
deserializeNativeSettingsin classEntity<FrameGrabberRecognizer.Result>
-
clone
@NonNull public FrameGrabberRecognizer clone()
Description copied from class:EntityCreate a copy of the entity. This is required if properties of the entity must be modified while background thread performs processing. In order to avoid race conditions, changing properties is not allowed while entity is used in background processing. However, you are able to make a copy of the entity, change properties of it and then update theRecognizerRunnerVieworRecognizerRunnerwith the updated entity hierarchy.- Specified by:
clonein classRecognizer<FrameGrabberRecognizer.Result>- Returns:
- a copy of the entity
-
consumeResultFrom
public void consumeResultFrom(@NonNull Entity other)Description copied from class:EntityConsume result from other entity. The result from other will be put instead current result of this entity. This method is used insideBaseIntentTransferable.loadFromIntent(Intent)and similar methods to replace the result content of the saved entities with results that have arrived overIntent- Specified by:
consumeResultFromin classEntity<FrameGrabberRecognizer.Result>- Parameters:
other- Entity from which result should be consumed.
-
-