How to extract the words line by line?
1 view (last 30 days)
Show older comments
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?
0 Comments
Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!