Please help me in segmenting the Hindi text into number of lines and words and characters
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I have attached a Hindi text . How can I divide into number of lines,words and characters using
regionprops function in MATLAB.
I have written the code like this, where is the error
clc;
clear all;
a=imread('D:/sahoo/sample.jpg');
%figure,imshow(a)
b=rgb2gray(a);
%Igray1=medfilt2(b);
Ibw = im2bw(b,graythresh(b));
[m n] = size(Ibw);
Ibw2=~Ibw;
Iedge = edge(uint8(Ibw));
imshow(Iedge)
se = strel('square',2);
Iedge2 = imdilate(Iedge, se);
imshow(Iedge2);
%Image Filling
Ifill= imfill(Iedge2,'holes');
imshow(Ifill)
Ilabel = bwlabel(Ifill);
%disp(num);
Ibox = regionprops(Ilabel,'BoundingBox');
Ibox(1)
%Ibox = [Iprops.BoundingBox];
%Ibox = reshape(Ibox,[4 15]);
imshow(Ibw2)
hold on;
for cnt = 1:53
rectangle('position',Ibox(:,cnt),'edgecolor','r');
end
0 commentaires
Réponses (1)
Image Analyst
le 6 Jan 2014
We help with MATLAB programming, not OCR algorithm development. Go here: http://iris.usc.edu/Vision-Notes/bibliography/contentschar.html#OCR,%20Document%20Analysis%20and%20Character%20Recognition%20Systems and pick a published algorithm that might be better than yours. If you really want to continue using yours you'll have to upload your picture so we can try your code.
Also, please read this and fix your posting so we can read it: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
1 commentaire
Walter Roberson
le 6 Jan 2014
Image Analyst also posted another relevant link earlier; see http://www.mathworks.co.uk/matlabcentral/answers/67432-handwrriten-hindi-character-recognition
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!