How to extract the words line by line?

2 views (last 30 days)
A B Shinde
A B Shinde on 27 May 2014
Edited: A B Shinde on 27 May 2014
Hello,
I tried to write the code for devanagari words extraction...
clc; clear all; close all;
I = imread('marathi_lines.jpg'); figure, imshow(I);
BW = im2bw(I, 0.6); BW = ~BW;
stats = regionprops(BW);
for index=1:length(stats) if stats(index).Area > 200 && stats(index).BoundingBox(3)*stats(index).BoundingBox(4) < 800000 x = ceil(stats(index).BoundingBox(1)); y = ceil(stats(index).BoundingBox(2));
widthX = floor(stats(index).BoundingBox(4)-1);
widthY = floor(stats(index).BoundingBox(3)-1);
subimage(index) = {BW(x:x+widthX,y:y+widthY,:)};
figure, imshow(subimage{index})
end
end
this code I had written...problem is with extracted words..I need to extract the words line by line...can anyone help me?

Answers (0)

Community Treasure Hunt

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

Start Hunting!