Please help me in segmenting the Hindi text into number of lines and words and characters
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Image Analyst
2014년 1월 6일
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
Walter Roberson
2014년 1월 6일
Image Analyst also posted another relevant link earlier; see http://www.mathworks.co.uk/matlabcentral/answers/67432-handwrriten-hindi-character-recognition
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!