Extract Digital Numbers from Image
이전 댓글 표시
Hi All.
I have lots of scale images that I would like to extract the scale reading from. I have looked through many sources such as "ocr" but when applying that it doesn't read the numbers shown. Attached is an image after processing (cropping. brightining..etc). I appreciate if someone can help me find a way to extract the numbers out of the image.
채택된 답변
추가 답변 (2개)
Image Analyst
2021년 8월 3일
1 개 추천
I tried it with my new computer and developed a solution for seven segment LED displays that uses masking to examine the 7 locations where a segment would be. From the pattern or lit or non-lit, I can turn that into a number. It works, as in the attached demo.
I got word from a developer on the Computer Vision team that the ocr() function was not trained for seven segment characters. Still it's surprising how bad it is for certain numbers like thinking a 2 was an 8 and the 8 was a 9.

ANKUR KUMAR
2021년 7월 13일
편집: ANKUR KUMAR
2021년 7월 13일
0 개 추천
You can simply use ocr command to do that. Refer to this documentation for some example, which would be a good starting point for you to take it forward.
댓글 수: 3
Image Analyst
2021년 7월 13일
Yep, I looked at that in my Answer. And I presume @Abdullah Azzam did too. Did you run my code or try the ocr function? So why is it saying the 2 is an 8?
Abdullah Azzam
2021년 7월 13일
ANKUR KUMAR
2021년 7월 13일
@Image Analyst OCR behaves wierd. I just tune the masking factor, and getting 137.313.
mask = conv2(double(mask), ones(windowSize)/windowSize^2, 'full') > 0.3;
I replaced 0.5 to 0.3. I played around masking thresholds and all, but not getting the exact value.
카테고리
도움말 센터 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
