how to extract data from table image?
조회 수: 11 (최근 30일)
이전 댓글 표시
댓글 수: 4
Benjamin Ehrlich
2021년 8월 18일
I have experienced the OCR having a really rough time with vertical and horizontal lines...
답변 (1개)
Image Analyst
2021년 8월 19일
You need to have at least 20 lines in the numbers for ocr() to work -- it says so in the help. Also, you can get rid of lines by thresholding and removing the largest blob, but you might want to use them to extract each rectangle one at a time so you can do ocr on just that one rectangle. If you still need help, attach a higher resolution image
댓글 수: 2
Abdelrahman
2023년 3월 11일
편집: Abdelrahman
2023년 3월 11일
Can you elaborate more how to get rid of the lines please?
Image Analyst
2023년 3월 11일
If the lines are connected to the edge of the image you can do
mask = grayImage > somethreshold;
mask = imclearborder(mask);
otherwise, the grid looks like it would be the biggest blob in the mask you can use bwareafilt
mask = mask & ~bwareafilt(mask, 1);
참고 항목
카테고리
Help Center 및 File Exchange에서 Recognition, Object Detection, and Semantic Segmentation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!