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
11 views (last 30 days)
Alessandro Masullo on 20 May 2016
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:
Which gives you the image attached.
The segmentation could be performed with findpeaks.