How do I import a table containing numbers in a picture with OCR?
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mattia Tosi
am 29 Jan. 2020
Kommentiert: Mattia Tosi
am 4 Feb. 2020
I have a picture of a table with numeric data in it. Like this:
How do I import the values with ocr? Is there a better method?
I tried to use ocr, but it's not working properly.
Thank you
3 Kommentare
Mohammad Sami
am 30 Jan. 2020
Another option, that might improve the ocr accuracy sometimes is to imresize the input image.
Akzeptierte Antwort
Mohammad Sami
am 30 Jan. 2020
Try resizing the image. It would hopefully improve the accuracy.
a = imread('image.jpeg');
a = imresize(a,2);
txt = ocr(a,'CharacterSet','0123456789.');
Iocr = insertObjectAnnotation(a, 'rectangle', ...
txt.WordBoundingBoxes, ...
txt.WordConfidences);
for i = 1:length(txt.Words)
Iocr = insertText(Iocr,txt.WordBoundingBoxes(i,1:2),txt.Words{i},'AnchorPoint','Center');
end
figure; imshow(Iocr);
4 Kommentare
Mohammad Sami
am 31 Jan. 2020
If you know the font that was used to produce your images. you can follow this tutorial
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!