Effacer les filtres
Effacer les filtres

Row by Row character extraction

1 vue (au cours des 30 derniers jours)
dream
dream le 7 Avr 2014
Commenté : Image Analyst le 7 Mai 2017
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 commentaire
moahaimen talib
moahaimen talib le 7 Mai 2017
could you please provide the full code? specially the type of input images thank you

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 7 Avr 2014
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 commentaires
dream
dream le 8 Avr 2014
Can you give the code for extracting the characters line by line?
Image Analyst
Image Analyst le 7 Mai 2017

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by