Class DeepOCREngineOptions
java.lang.Object
com.microblink.photopay.entities.ocrengine.AbstractOCREngineOptions<DeepOCREngineOptions>
com.microblink.photopay.entities.ocrengine.deep.DeepOCREngineOptions
- All Implemented Interfaces:
android.os.Parcelable
Options used in Deep OCR.
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic android.os.Parcelable.Creator<DeepOCREngineOptions>
Parcelable creator.Fields inherited from class com.microblink.photopay.entities.ocrengine.AbstractOCREngineOptions
mNativeContext
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.DeepOCREngineOptions
(long nativeContext, Object keep) Constructor from native object. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a copy ofDeepOCREngineOptions
object.protected void
deserializeNative
(byte[] bytes) final float
Returns the maximum height of the line of text given in float from range <0, 1>, which represents height percentage of the input image that is being processed.final float
Returns the minimum height of char that can be classified given in float from range <0, 1>, which represents height percentage of the input image that is being processed.final float
Returns the minimum height of the line of text given in float from range <0, 1>, which represents height percentage of the input image that is being processed.Returns the current Deep OCR model.protected byte[]
final DeepOCREngineOptions
setMaximumLineHeight
(float maximumLineHeight) Sets the maximum height of the line of text given in float from range <0, 1>, which represents height percentage of the input image that is being processed.final DeepOCREngineOptions
setMinimumCharHeight
(float minimumCharHeight) Sets the minimum height of the char that can be classified given in float from range <0, 1>, which represents height percentage of the input image that is being processed.final DeepOCREngineOptions
setMinimumLineHeight
(float minimumLineHeight) Sets the minimum height of the line of text given in float from range <0, 1>, which represents height percentage of the input image that is being processed.setOCRModel
(DeepOCRModel model) Specifies the Deep OCR model that will be used.protected void
terminateNative
(long nativeContext) Methods inherited from class com.microblink.photopay.entities.ocrengine.AbstractOCREngineOptions
describeContents, finalize, getMaximumAllowedCharRecognitionVariants, getMaximumCharsExpected, getNativeContext, isColorDropoutEnabled, setColorDropoutEnabled, setMaximumAllowedCharRecognitionVariants, setMaximumCharsExpected, writeToParcel
-
Field Details
-
CREATOR
Parcelable creator.
-
-
Constructor Details
-
DeepOCREngineOptions
public DeepOCREngineOptions()Default constructor. -
DeepOCREngineOptions
Constructor from native object.- Parameters:
nativeContext
- Native engine options object.keep
- Owner of the native engine options object.
-
-
Method Details
-
clone
Returns a copy ofDeepOCREngineOptions
object. -
terminateNative
protected void terminateNative(long nativeContext) - Specified by:
terminateNative
in classAbstractOCREngineOptions<DeepOCREngineOptions>
-
serializeNative
@NonNull protected byte[] serializeNative()- Specified by:
serializeNative
in classAbstractOCREngineOptions<DeepOCREngineOptions>
-
deserializeNative
protected void deserializeNative(@NonNull byte[] bytes) - Specified by:
deserializeNative
in classAbstractOCREngineOptions<DeepOCREngineOptions>
-
getMinimumLineHeight
@FloatRange(from=0.0, to=1.0) public final float getMinimumLineHeight()Returns the minimum height of the line of text given in float from range <0, 1>, which represents height percentage of the input image that is being processed. All lines smaller than this value are ignored. Line height is defined as height of largest character in line.- Returns:
- minimum height of the line
-
setMinimumLineHeight
@NonNull public final DeepOCREngineOptions setMinimumLineHeight(@FloatRange(from=0.0,to=1.0) float minimumLineHeight) Sets the minimum height of the line of text given in float from range <0, 1>, which represents height percentage of the input image that is being processed. All chars smaller than this value will be ignored.- Parameters:
minimumLineHeight
- minimum height of the line from range <0, 1>- Returns:
- this object, to support chaining of operations.
-
getMaximumLineHeight
@FloatRange(from=0.0, to=1.0) public final float getMaximumLineHeight()Returns the maximum height of the line of text given in float from range <0, 1>, which represents height percentage of the input image that is being processed. All chars larger than this value are ignored.- Returns:
- maximum height of the line
-
setMaximumLineHeight
@NonNull public final DeepOCREngineOptions setMaximumLineHeight(@FloatRange(from=0.0,to=1.0) float maximumLineHeight) Sets the maximum height of the line of text given in float from range <0, 1>, which represents height percentage of the input image that is being processed. All chars larger than this value will be ignored.- Parameters:
maximumLineHeight
- maximum height of the line- Returns:
- this object, to support chaining of operations.
-
getMinimumCharHeight
@FloatRange(from=0.0, to=1.0) public final float getMinimumCharHeight()Returns the minimum height of char that can be classified given in float from range <0, 1>, which represents height percentage of the input image that is being processed. All chars smaller than this value are ignored.- Returns:
- minimum height of the char
-
setMinimumCharHeight
@NonNull public final DeepOCREngineOptions setMinimumCharHeight(@FloatRange(from=0.0,to=1.0) float minimumCharHeight) Sets the minimum height of the char that can be classified given in float from range <0, 1>, which represents height percentage of the input image that is being processed. All chars smaller than this value are ignored. UnlikesetMinimumLineHeight(float)
, this value refers to individual chars, whilesetMinimumLineHeight(float)
refers to line height, which equals to height of largest char in line.- Parameters:
minimumCharHeight
- minimum height of the char- Returns:
- this object, to support chaining of operations
-
setOCRModel
Specifies the Deep OCR model that will be used. Deep OCR model defines how OCR is performed, which characted can be recognized and which types of images are supported.By default, it is set to
DeepOCRModel.BlinkInput
- Parameters:
model
- Desired Deep OCR model that will be used.- Returns:
- this object, to support chaining of operations
-
getOCRModel
Returns the current Deep OCR model. SeesetOCRModel(DeepOCRModel)
.- Returns:
- current Deep OCR model.
-