reading letters using OCR

조회 수: 2 (최근 30일)
Pat
Pat 2013년 2월 15일
I have a image in want to read the letters,but those letters are not read it shows just one letter,plz tell how to read it using ocr
my inage
  댓글 수: 5
Walter Roberson
Walter Roberson 2013년 2월 15일
Which is the original? The green one or the gray one?
Pat
Pat 2013년 2월 15일
the green one is original,i had converted to gray scale and processed it

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2013년 2월 15일
Instead of converting to grayscale, threshold on the green channel.
  댓글 수: 1
Pat
Pat 2013년 2월 15일
Walter i did as following even though text is not clear
clc
clear all
close all
I=imread('elgi1.bmp');
imshow(I);
K=imcrop(I);
thresh=80;
Rchannel = K(:,:,1);
Gchannel = K(:,:,2);
Bchannel = K(:,:,3);
Map = Gchannel>thresh;
figure,imshow(Map)
u= bsxfun(@times,K,uint8(Map)); %apply map to whole image
figure,imshow(u)

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2013년 2월 15일
Those are very crude letters. It will probably take a pretty sophisticated OCR routine to recognize those. This MATLAB forum does not go into OCR much, except to refer you to the File Exchange or a web search. But you'll have trouble finding any OCR that can recognize those letters. You'd need substantial processing to turn them into something a lot more recognizable, and we just don't get into that kind of complicated algorithm development here. About all I could suggest is to use something like imclose() and bwmorph() to try to morph them into something that looks more like normal letters.
  댓글 수: 1
Pat
Pat 2013년 2월 18일
MY code so far
clc
clear all
close all
I=imread('elgi1.bmp');
imshow(I);
K=imcrop(I);
J=rgb2gray(K);
% bw = im2bw(J,graythresh(K))
bw=im2bw(J);
figure,imshow(bw)
se = strel('disk',5);
closeBW = imclose(bw,se);
figure, imshow(closeBW)
BW2 = bwmorph(closeBW,'thicken');
figure, imshow(BW2)
BW3 = bwmorph(BW2,'spur');
figure, imshow(BW3)
se1 = strel('square',8)
closeBW1 = imclose(BW3 ,se1);
figure, imshow(closeBW1)
is there still more way ti read those letters as normal one,pleas eassist

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by