FindImageText
FindImageText[image]
detects text in image and returns a single bounding box.
FindImageText[image,level]
returns a list of bounding boxes at the specified structural level.
FindImageText[image,level,prop]
returns prop for text at the given level.
Details and Options
- FindImageText is used to detect the region of an image containing text. When asking for a specific structural level, it returns a list of bounding boxes, each given as a Parallelogram.
- Coordinates {x,y} are assumed to be in the standard image coordinate system.
- Use TextRecognize to recognize the content of the detected text.
- Possible settings for level include:
-
Automatic text found in the whole image as a single result (default) "Block" a list of results for each block of text "Line" a list of results for each line "Word" a list of results for each word "Character" a list of results for each character - Possible settings for prop include:
-
"AlignedImage" cropped aligned image containing each detected text "BoundingBox" bounding box around each detected text as a Rectangle "BoundingBoxArea" area of the bounding box around each text "Confidence" strength of the recognized text "DeskewAngle" deskew angle of the detected text "Image" cropped image containing the detected text "OrientedBoundingBox" parallelogram around each detected text (default) "RegionCentroid" centroid of bounding box around the text {prop1,prop2,…} a list of properties - The following options can be specified:
-
AcceptanceThreshold Automatic detection acceptance threshold MaxFeatures All number of text boxes to return MaxOverlapFraction Automatic maximum allowed overlap fraction Method Automatic method to use PaddingSize 0 amount of padding around each detection - Possible settings for Method include:
-
Automatic automatic choice of the method "Document" optimized for detection in scanned documents "NaturalScene" optimized for detection in natural scene images detector the text detection method to use - Possible setting for detector are:
-
"DBNet" differentiable binarization net "Tesseract" Tesseract engine - FindImageText uses machine learning. Its methods, training sets and biases included therein may change and yield varied results in different versions of the Wolfram Language.
- FindImageText may download resources that will be stored in your local object store at $LocalBase, and that can be listed using LocalObjects[] and removed using ResourceRemove.
Examples
open allclose allScope (8)
Level (1)
Properties (5)
By default, an oriented bounding box is returned for every detection:
Return the standard axis-aligned bounding box:
Extract the portion of the image containing each detected word:
Align the crops to the image frame:
Extract the bounding box area of each detected word:
Options (7)
AcceptanceThreshold (1)
MaxFeatures (1)
By default, all detected text is returned:
Use MaxFeatures30 to return only the 30 strongest detections:
MaxOverlapFraction (1)
Method (3)
By default, FindImageText tries to pick the detection method more suitable to the image:
Using an unsuitable method might not give a good result:
Use Method"NaturalScene" to detect text present in natural scenes:
Use Method"Document" for scanned documents:
PaddingSize (1)
Use PaddingSizes to specify a padding for the detected word bounding boxes:
Use different padding sizes along the two bounding box axes:
Applications (1)
It might be difficult to perform OCR on an image with a lot of non-textual content:
Use FindImageText first to preprocess the image:
Properties & Relations (3)
FindImageText can detect text regardless of the orientation:
FindImageText is used to detect text content within an image:
Use TextRecognize to perform OCR on the image content:
Use FindImageText to detect the license plate in the image:
Use TextRecognize to recognize the license plate and highlight it in the original image:
Text
Wolfram Research (2020), FindImageText, Wolfram Language function, https://reference.wolfram.com/language/ref/FindImageText.html (updated 2024).
CMS
Wolfram Language. 2020. "FindImageText." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/FindImageText.html.
APA
Wolfram Language. (2020). FindImageText. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindImageText.html