how to segment/crop words from a line in an image in matlab?

1 回表示 (過去 30 日間)
Meghashree G
Meghashree G 2016 年 1 月 12 日
回答済み: Akshay Raj 2020 年 1 月 8 日
Hello, Im trying to segment/crop words from the line in an image.(this line is obtained by segmenting line from paragraph)
How do i achieve this?Please help me with the code. Here is the input image.
Thank you in advance.

採用された回答

harjeet singh
harjeet singh 2016 年 1 月 13 日
use this code
clear all
close all
clc
img=imread('line2.png');
img1=bwareaopen(~img,100);
se=strel('disk',7);
img2=imdilate(img1,se);
[lab,num]=bwlabel(img2);
figure(1)
for i=1:num
[r,c]=find(lab==i);
img4=img(:,min(c):max(c));
subplot(4,4,i)
imshow(img4)
end
  1 件のコメント
Meghashree G
Meghashree G 2016 年 4 月 8 日
hello sir.. I tried your code for word segmentation for the attached image ..But its not working..Please tell me how to do it?
Thank you

サインインしてコメントする。

その他の回答 (2 件)

Image Analyst
Image Analyst 2016 年 1 月 13 日
I took your m-file there and fixed it. Your fixed code is attached.

Akshay  Raj
Akshay Raj 2020 年 1 月 8 日
i need to extarct word level in this image and need to store those segmented image in an folder .please hel me out to do thisdt1.jpg

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by