T - The type of Imagepublic abstract class TextExtractor<T extends Image<?,T>> extends Object implements ImageProcessor<T>
Note that this is an ImageProcessor extension so that the
TextExtractor should process the image prior to the
getTextRegions() method being called.
This class will deal with the processing of extracted text regions
with the OCR processor. Use setOCRProcessor(OCRProcessor) to
choose with OCR processor will be used on the extracted regions.
| Constructor and Description |
|---|
TextExtractor() |
| Modifier and Type | Method and Description |
|---|---|
OCRProcessor<T> |
getOCRProcessor()
Return the OCR processor being used to extract text from the
image.
|
Map<Rectangle,IndependentPair<T,String>> |
getText()
Get text that can be extracted from an image.
|
abstract Map<Rectangle,T> |
getTextRegions()
Get the text regions that can be extracted from an image.
|
List<String> |
getTextStrings()
If you're not interested in where the strings are located in the image
you can use this method to simply get a list of extracted strings.
|
void |
setOCRProcessor(OCRProcessor<T> ocr)
For the text regions that are extracted to be associated with textual
representations of the text regions, an OCR processor must be used.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessImagepublic TextExtractor()
public abstract Map<Rectangle,T> getTextRegions()
public Map<Rectangle,IndependentPair<T,String>> getText()
public List<String> getTextStrings()
List of strings extracted from the image.public void setOCRProcessor(OCRProcessor<T> ocr)
ocr - The OCRProcessor to usepublic OCRProcessor<T> getOCRProcessor()
OCRProcessor