I have 512 * 512 grey scale image.I want to use fcm. But I can not get the fuzzy clusered array after using the code below.As given image is S * N then the fuzzy clustered matrix must be S * N.S means number of features,N means number of dataset.But I got onlt 2 * 1 matrix. Can anyone help me?
import skfuzzy as fuzz
image=np.array(image)
original_image=image
original_image=original_image.reshape(-1)
cntr, u, u0, d, jm, p, fpc =fuzz.cluster.cmeans(original_image,2,2,0.005,100)
print(original_image)
[[0]
[0]
[0]
...
[0]
[0]
[0]]
print(u)
[[0.54561414]
[0.45438586]]