how to get horizontal projection of histogram of an binary image ?and based on that how to segment of each line in the image? please suggest me
4 ビュー (過去 30 日間)
表示 古いコメント
<<

>>
<<

>> this is my ZjSqKcW.jpg and on the bases of this image i want the horizontal projection of histogram like g.png and after the histogram i want the segmentation of each line.how to do please suggest
0 件のコメント
採用された回答
Alessandro Masullo
2016 年 5 月 20 日
Given your image im, you can binarize it with im2bw:
bw = 1-im2bw(image);
The horizontal histogram (I guess) is the sum of the object in the horizontal direction, which is
h = sum(bw,2)
You can then plot it with:
figure
plot(sum(bw,2),1:size(bw,1))
Which gives you the image attached.
The segmentation could be performed with findpeaks.
その他の回答 (0 件)
参考
カテゴリ
Find more on Annotations 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!