public final class RawParser extends Parser
Modifier and Type | Class and Description |
---|---|
static class |
RawParser.Result |
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator |
CREATOR |
CLASS_NAME
Constructor and Description |
---|
RawParser() |
Modifier and Type | Method and Description |
---|---|
void |
clearResult()
Clears parser result.
|
RawParser |
clone()
Create a copy of the entity.
|
void |
consumeResult(RawParser.Result resultToConsume)
Consumes given result.
|
void |
consumeResultFrom(Entity other)
Consume result from other entity.
|
protected void |
deserializeNativeSettings(byte[] serializedSettings) |
AbstractOCREngineOptions |
getOcrEngineOptions()
Returns the OCR engine options used in Regex OCR parser.
|
protected byte[] |
serializeNativeSettings() |
void |
setOcrEngineOptions(AbstractOCREngineOptions ocrEngineOptions)
Sets the OCR engine options used in Regex OCR parser.
|
void |
setUseSieve(boolean useSieve)
Enable the usage of algorithm for combining consecutive OCR results between video frames
for improving OCR quality.
|
boolean |
shouldUseSieve()
Returns true if algorithm for combining consecutive OCR results between video frames
for improving OCR quality is used.
|
protected void |
terminateNative(long nativeContext) |
getPriority, isRequired, setRequired
describeContents, finalize, getNativeContext, getResult, nativeGetNativeResultContext, readFromParcel, writeToParcel
public void setOcrEngineOptions(@NonNull AbstractOCREngineOptions ocrEngineOptions)
BlinkOCREngineOptions
'.ocrEngineOptions
- OCR engine options used in Regex OCR parser@NonNull public AbstractOCREngineOptions getOcrEngineOptions()
BlinkOCREngineOptions
'.public void setUseSieve(boolean useSieve)
BlinkOCREngineOptions
is given
to RawParser.setOcrEngineOptions(com.microblink.blinkinput.entities.ocrengine.AbstractOCREngineOptions)
. Otherwise, it will not be
enabled and IllegalArgumentException
will be thrown.useSieve
- whether or not sieve algorithm should be usedpublic boolean shouldUseSieve()
protected void terminateNative(long nativeContext)
terminateNative
in class Entity
@Nullable protected byte[] serializeNativeSettings()
serializeNativeSettings
in class Entity
protected void deserializeNativeSettings(@NonNull byte[] serializedSettings)
deserializeNativeSettings
in class Entity
public RawParser clone()
Entity
RecognizerRunnerView
or RecognizerRunner
with the updated entity hierarchy.public void consumeResultFrom(@NonNull Entity other)
Entity
com.microblink.blinkinput.entities.recognizers.RecognizerBundle#loadFromIntent(Intent)
and similar methods to replace the result content of the saved entities with results that
have arrived over Intent
consumeResultFrom
in class Entity
other
- Entity from which result should be consumed.public void consumeResult(@NonNull RawParser.Result resultToConsume)
Parser
consumeResult
in class Parser
resultToConsume
- Result that should be consumed.public void clearResult()
Parser
clearResult
in class Parser