필터 지우기
필터 지우기

Why is ocr not working in this case

조회 수: 3 (최근 30일)
Matteo Bonhomme
Matteo Bonhomme 2023년 3월 28일
편집: Matteo Bonhomme 2023년 3월 29일
Hello,
I have a picture with text written on it and ocr doesn't work on it
I = imread('image1_bw.png');
imshow(I);
roi = [117,82,307,213];
hold on
rectangle('Position',roi,'EdgeColor','r')
hold off
text=ocr(I,roi)
text =
ocrText with properties: Text: 'OPO↵Ot↵ONO↵PENG↵↵' CharacterBoundingBoxes: [17×4 double] CharacterConfidences: [17×1 single] Words: {4×1 cell} WordBoundingBoxes: [4×4 double] WordConfidences: [4×1 single] TextLines: {4×1 cell} TextLineBoundingBoxes: [4×4 double] TextLineConfidences: [4×1 single]
I should add that on my machine the result is different as I get
Text: ''
Probably because the version is different I'm using the 2021a release and the version 10.0 of the computer toolbox
I have no idea why ocr is not working in this case. If someone has a fix it will be very helpfull :)

채택된 답변

Matteo Bonhomme
Matteo Bonhomme 2023년 3월 28일
편집: Matteo Bonhomme 2023년 3월 29일
I ended up training ocr on more sample and now it's working.
I think the issue was that the basekit function doesn't know this specific font.

추가 답변 (1개)

Image Analyst
Image Analyst 2023년 3월 28일
ocr() has lots of options. Try experimenting wtih them.

카테고리

Help CenterFile Exchange에서 Computer Vision Toolbox에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by