Why my OCR isn't working on a very easy image
이전 댓글 표시
I have a binary image with 7 characters on.
It could not be easier for the ocr() function to detect, yet it still returns nothing.
An help would be appreciated
x = %My binary image
v = ocr(X).
But when I call v. It returns an empty vector for text?
Any advice/help would be greatly appreciated
답변 (1개)
sir,may be need some process,make it to white background and black text
clc;clear all;close all;
X = imread('https://ww2.mathworks.cn/matlabcentral/answers/uploaded_files/804884/skew.jpg');
bw = im2bw(X);
bw = imclearborder(bw);
bw = ~bw;
v = ocr(bw)
Iocr = insertObjectAnnotation(X, 'rectangle', ...
v.WordBoundingBoxes, ...
v.Words);
figure; imshow(Iocr);
카테고리
도움말 센터 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
