How to detect letters or numbers in MATLAB?

11 次查看(过去 30 天)
I'm working on a college project, I need to detect letters or numbers. I used OCR and it worked with this image that I captured with the camera:
Code:
%%Find and Highlight Text in an Image
% Copyright 2015 The MathWorks, Inc.
businessCard = imread('texto_1.png');
ocrResults = ocr(businessCard);
bboxes = locateText(ocrResults, 'C', 'IgnoreCase', true);
Iocr = insertShape(businessCard, 'FilledRectangle', bboxes);
figure; imshow(Iocr);
but when I tried with this image, it did not work:
Does anyone know how I can solve this problem? Or do you have any code so I can mirror?
I'm grateful already!

采纳的回答

Image Analyst
Image Analyst 2018-5-13
ocr() says that the characters must be at least 20 pixels high. Yours are right at that, so it's possible that you don't have enough resolution.
You might try deep learning instead.
  6 个评论
Image Analyst
Image Analyst 2018-5-15
Try the Color Thresholder on the Apps tab of the tool ribbon.
Raphael Ferreira
Raphael Ferreira 2018-5-15
I think I'm beginning to understand. Soon I will post the result. Thank you both!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Computer Vision Toolbox 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by