How to detect letters or numbers in MATLAB?
조회 수: 12 (최근 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);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/190527/image.jpeg)
but when I tried with this image, it did not work:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/190528/image.jpeg)
Does anyone know how I can solve this problem? Or do you have any code so I can mirror?
I'm grateful already!
댓글 수: 1
Image Analyst
2018년 5월 13일
Try the color thresholder app on the Apps tab of the tool ribbon, or see some color segmentation demos in my File Exchange: https://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862&sort=downloads_desc
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Computer Vision Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!