public final class OCRConfig
extends java.lang.Object
Configuration for OCR system.
OcrEngine ocr = new OcrEngine(); ocr.getConfig().setNeedRotationCorrection(false);
Constructor and Description |
---|
OCRConfig() |
Modifier and Type | Method and Description |
---|---|
int |
getAdjustRotation()
Gets a value of adjust rotation mode
AdjustRotationMode . |
double |
getAdjustRotationAngle()
Gets a value of clockwise rotation angle, in degrees.
|
int |
getAdjustUpsideDownRotation()
Gets a value of adjust upsidedown rotation mode
AdjustUpsideDownRotationMode . |
CorrectionFilters |
getCorrectionFilters()
Gets filters for correction before recognition
|
IDictionaryReader |
getDictionaryReader()
Get any of available dictionary readers for post processing, if not set, post processing is not turned on.
|
boolean |
getNeedRotationCorrection()
Gets a value that indicates whether need picture rotate correction
|
int |
getOcrAlgorithmMode()
Gets recognition mode.
|
int |
getProbabilityRow()
Gets row with probable symbols to return probable symbols from.
|
boolean |
getProcessColoredBackground()
Turn on this option if input image have complex colored background, ansd standart method of thresholding work bad
|
int |
getQuantizationPalleteSize()
It is advanced option, which control number of colors to image pallete while quantization; this option make sence olny if ProcessColoredBackground is true; defalt value if 5
|
boolean |
getUseDefaultDictionaries()
If DictionaryReader property is null, this property indicates whether to use default dictionaries
|
void |
setAdjustRotation(int value)
Sets a value of adjust rotation mode
AdjustRotationMode . |
void |
setAdjustRotationAngle(double value)
Sets a value of clockwise rotation angle, in degrees.
|
void |
setAdjustUpsideDownRotation(int value)
Sets a value of adjust upsidedown rotation mode
AdjustUpsideDownRotationMode . |
void |
setCorrectionFilters(CorrectionFilters value)
Sets filters for correction before recognition
|
void |
setDictionaryReader(IDictionaryReader value)
Set any of available dictionary readers for post processing, if not set, post processing is not turned on.
|
void |
setNeedRotationCorrection(boolean value)
Sets a value that indicates whether need picture rotate correction
|
void |
setOcrAlgorithmMode(int value)
Sets recognition mode.
|
void |
setProbabilityRow(int value)
Sets row with probable symbols to return probable symbols from.
|
void |
setProcessColoredBackground(boolean value) |
void |
setQuantizationPalleteSize(int value) |
void |
setUseDefaultDictionaries(boolean value)
If DictionaryReader property is null, this property indicates whether to use default dictionaries
|
public int getAdjustRotation()
Gets a value of adjust rotation mode AdjustRotationMode
.
public double getAdjustRotationAngle()
Gets a value of clockwise rotation angle, in degrees. Use only when AdjustRotation is equal AdjustRotationMode.UserDefined.
public int getAdjustUpsideDownRotation()
Gets a value of adjust upsidedown rotation mode AdjustUpsideDownRotationMode
.
public CorrectionFilters getCorrectionFilters()
Gets filters for correction before recognition
public IDictionaryReader getDictionaryReader()
Get any of available dictionary readers for post processing, if not set, post processing is not turned on. This property (if not null) overides UseDefaultDictionaries property.
public boolean getNeedRotationCorrection()
Gets a value that indicates whether need picture rotate correction
public int getOcrAlgorithmMode()
Gets recognition mode.
public int getProbabilityRow()
Gets row with probable symbols to return probable symbols from. Default value is 0, so only the most probable symbols return.
public boolean getProcessColoredBackground()
Turn on this option if input image have complex colored background, ansd standart method of thresholding work bad
public int getQuantizationPalleteSize()
It is advanced option, which control number of colors to image pallete while quantization; this option make sence olny if ProcessColoredBackground is true; defalt value if 5
public boolean getUseDefaultDictionaries()
If DictionaryReader property is null, this property indicates whether to use default dictionaries
public void setAdjustRotation(int value)
Sets a value of adjust rotation mode AdjustRotationMode
.
public void setAdjustRotationAngle(double value)
Sets a value of clockwise rotation angle, in degrees. Use only when AdjustRotation is equal AdjustRotationMode.UserDefined.
public void setAdjustUpsideDownRotation(int value)
Sets a value of adjust upsidedown rotation mode AdjustUpsideDownRotationMode
.
public void setCorrectionFilters(CorrectionFilters value)
Sets filters for correction before recognition
public void setDictionaryReader(IDictionaryReader value)
Set any of available dictionary readers for post processing, if not set, post processing is not turned on. This property (if not null) overides UseDefaultDictionaries property.
public void setNeedRotationCorrection(boolean value)
Sets a value that indicates whether need picture rotate correction
public void setOcrAlgorithmMode(int value)
Sets recognition mode.
public void setProbabilityRow(int value)
Sets row with probable symbols to return probable symbols from. Default value is 0, so only the most probable symbols return.
public void setProcessColoredBackground(boolean value)
public void setQuantizationPalleteSize(int value)
public void setUseDefaultDictionaries(boolean value)
If DictionaryReader property is null, this property indicates whether to use default dictionaries