Troubleshootocr
Function Results
Performance Options with theocr
Function
If yourocr
results are not what you expect, try one or more of the following options:
增加图像大小的2到4倍。
If the characters in the image are too close together or their edges are touching, use morphology to thin out the characters. Using morphology to thin out the characters separates the characters.
Use binarization to check for non-uniform lighting issues. Use the
graythresh
andimbinarize
functions to binarize the image. If the characters are not visible in the results of the binarization, it indicates a potential non-uniform lighting issue. Try top hat, using theimtophat
function, or other techniques that deal with removing non-uniform illumination.Use the region of interest
roi
option to isolate the text. Specify theroi
manually or use text detection.If your image looks like a natural scene containing words, like a street scene, rather than a scanned document, try setting the
TextLayout
property to either'Block'
or'Word'
.
See Also
ocr
|visionSupportPackages
|ocrText
|graythresh
|imbinarize
|imtophat