필터 지우기
필터 지우기

Row by Row character extraction

조회 수: 1 (최근 30일)
dream
dream 2014년 4월 7일
댓글: Image Analyst 2017년 5월 7일
I am working on handwritten character recognition from input image. Here is the code which extracts characters from input image
%%Label connected components
[L Ne]=bwlabel(Ifill);
disp(Ne);
%%Measure properties of image regions
propied=regionprops(L,'BoundingBox');
hold on
%%Plot Bounding Box
for n=1:size(propied,1)
rectangle('Position',propied(n).BoundingBox,'EdgeColor','g','LineWidth',2)
end
hold off
%%Characters being Extracted
figure
for n=1:Ne
[r,c] = find(L==n);
n1=imagen(min(r):max(r),min(c):max(c));
imshow(~n1);
end
But this code is extracting characters randomly from the input image. Can anyone please tell me how to extract the characters row by row?
  댓글 수: 1
moahaimen talib
moahaimen talib 2017년 5월 7일
could you please provide the full code? specially the type of input images thank you

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

답변 (1개)

Image Analyst
Image Analyst 2014년 4월 7일
It's not random. It extracts in column major order like most things in MATLAB. So it goes down column 1, looking for parts of a letter. If it finds one, then it labels it (which may make an incursion into other columns of course) and continues down the column. Then it moves to the next column and goes down looking for letters that have not yet been assigned a label. If it finds one, it labels it. And so on. If you want to go from left to right (or vice versa), then you're going to have to extract a line at a time. Otherwise, it could get the 10th line of handwriting first if that happens to stick out farther to the left than above lines of text. Like line 1 doesn't appear until column 200 but line 10 shows up in column 50, so it would "find" left-most character on the 10th line first.
  댓글 수: 2
dream
dream 2014년 4월 8일
Can you give the code for extracting the characters line by line?
Image Analyst
Image Analyst 2017년 5월 7일

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

Community Treasure Hunt

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

Start Hunting!

Translated by