horizontal and vertical histogram of a given image.
Show older comments

This is an image showing the two occluding objects edges detected now i want to find the horizontal histogram of the given image and want to split it.Please anybody can help. 58X105 is imaged size
Answers (1)
Image Analyst
on 16 Sep 2017
What do you mean by horizontal histogram? A histogram is the frequency of occurrence vs. gray level? Do you actually mean profile, which is the sum of all gray levels as a function of distance? If so
horizontalProfile = sum(grayImage, 1); % Sum vertically to produce the horizontal profile.
verticalProfile = sum(grayImage, 2); % Sum horizontally to produce the vertical profile.
6 Comments
Haseeb Hassan
on 17 Sep 2017
Haseeb Hassan
on 17 Sep 2017
Haseeb Hassan
on 17 Sep 2017
Image Analyst
on 17 Sep 2017
I suggest you use something like watershed to break apart blobs that are known to be larger than expected.
Haseeb Hassan
on 19 Sep 2017
Image Analyst
on 19 Sep 2017
Why? If all you have are edges, for some reason, then fill them to create solid blobs, and then use watershed.
Categories
Find more on Histograms 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!