public class DocumentRecognitionSettings extends Object
Constructor and Description |
---|
DocumentRecognitionSettings(int pagesNumber)
Initializes a new instance of the @see #DocumentRecognitionSettings class with default properties.
|
DocumentRecognitionSettings(int startPage,
int pagesNumber)
Initializes a new instance of the @see #DocumentRecognitionSettings class with short set of properties.
|
DocumentRecognitionSettings(int startPage,
int pagesNumber,
Language language,
boolean detectAreas,
boolean autoSkew,
int threshold)
Initializes a new instance of the @see #DocumentRecognitionSettings class with full set of properties.
|
Modifier and Type | Method and Description |
---|---|
int |
getPagesNumber()
Total amount of pages from pdf file to extract i,ages (start with startPage).
|
int |
getStartPage()
First page in pdf file to extract images.
|
void |
setAllowedCharacters(CharactersAllowedType allowedCharacters)
Allowed characters set.
|
void |
setAllowedCharacters(String allowedCharacters)
Allowed characters set.
|
void |
setAutoContrast(boolean autoContrast)
Allows using an additional contrast correction algorithm for the image before recognition.
|
void |
setAutoDenoising(boolean autoDenoising)
Enables the use of an additional neural network to improve the image - reduce noise.
|
void |
setAutoSkew(boolean autoSkew) |
void |
setDetectAreas(boolean detectAreas) |
void |
setDetectAreasMode(DetectAreasMode detectAreasMode)
Determines the type of neural network used for areas detection.
|
void |
setIgnoredCharacters(String ignoredCharacters) |
void |
setLanguage(Language language) |
void |
setLinesFiltration(boolean linesFiltration) |
void |
setPagesNumber(int pagesNumber) |
void |
setSkew(double skew)
Sets angle in degrees for image rotation.
|
void |
setStartPage(int startPage) |
void |
setThreadsCount(int threadsCount)
Gets or sets the number of threads for processing.
|
void |
setThresholdValue(int thresholdValue) |
void |
setUpscaleSmallFont(boolean upscaleSmallFont)
Allows you to use additional algorithms specifically for small font recognition.
|
public DocumentRecognitionSettings(int pagesNumber)
pagesNumber
- Set the number of pages for recognition multipage pdf file.public DocumentRecognitionSettings(int startPage, int pagesNumber)
startPage
- Set the first page for recognition.pagesNumber
- Set the number of pages for recognition multipage pdf file.public DocumentRecognitionSettings(int startPage, int pagesNumber, Language language, boolean detectAreas, boolean autoSkew, int threshold)
startPage
- Set the first page for recognition. 0 by default.pagesNumber
- Set the number of pages for recognition multipage pdf file.language
- Language used for OCR.detectAreas
- Enable automatic text areas detection.autoSkew
- Enable automatic image skew correction.threshold
- Custom image binarization thresholdpublic void setDetectAreas(boolean detectAreas)
public void setAutoSkew(boolean autoSkew)
public void setLanguage(Language language)
public void setThresholdValue(int thresholdValue)
public void setIgnoredCharacters(String ignoredCharacters)
public void setLinesFiltration(boolean linesFiltration)
public void setStartPage(int startPage)
public void setPagesNumber(int pagesNumber)
public void setThreadsCount(int threadsCount)
threadsCount
- the number of threads that will be created for parallel recognition of image fragments.public void setAutoContrast(boolean autoContrast)
autoContrast
- contains boolean value - a contrast correction filter is set.public void setAutoDenoising(boolean autoDenoising)
autoDenoising
- contains boolean value - a denoising is set.public void setAllowedCharacters(CharactersAllowedType allowedCharacters)
allowedCharacters
- contains enum @see CharactersAllowedType
value.public void setAllowedCharacters(String allowedCharacters)
allowedCharacters
- contains array.public void setDetectAreasMode(DetectAreasMode detectAreasMode)
detectAreasMode
- contains enum @see DetectAreasMode
value.public void setSkew(double skew)
setAutoSkew(boolean)
property, so that auto skew correction is not applied.skew
- Rotate image on specified angle.public void setUpscaleSmallFont(boolean upscaleSmallFont)
upscaleSmallFont
- contains boolean value - a upscaleSmallFont is set.public int getStartPage()
public int getPagesNumber()
Copyright © 2022 Aspose. All rights reserved.