How to cluster the intensities in a gray scale image?

조회 수: 1 (최근 30일)
Meshooo
Meshooo 2014년 5월 13일
답변: Sukuchha 2014년 5월 14일
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

답변 (1개)

Sukuchha
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.

Community Treasure Hunt

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

Start Hunting!

Translated by