How to cluster the intensities in a gray scale image?
1 次查看(过去 30 天)
显示 更早的评论
Dear all,
I have the following 8 bit gray image that contains 5 intensity levels .
Level-1 (black) = 159567 pixels
Level-2 = 68245 pixels
Level-3 = 33807 pixels
Level-4 = 10736 pixels
Level-5 (white) = 5736 pixels
However, the image I get is not always perfect and it looks something like what I show below.
Now, I want to know the number of pixels in each gray level in the noisy image (5 levels). Any idea how to find that?
I think I need a method that at first cluster the noisy image into 5 gray levels, and then find the number of pixels in each level (cluster).
K-means could be a good way to do that, but it always gives different result, so is there a better method than k-means? or is there a way to make k-means provide a correct and fixed answer?
Any idea will be appreciated.
Meshoo
0 个评论
回答(1 个)
Sukuchha
2014-5-14
you can use, median filtering first and provide the resultant image to K-means. You would have use k-means X-times for reducing the effect of random generation of cluster centres.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!