Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

Clustering problem with Kmeans

1 view (last 30 days)
ameen selami
ameen selami on 21 Mar 2013
hello every body .. i really need your help .. i cant understand why the following instructions are not processing using the (kmeans instruction).
x = imread('H:\Research\MRI Tumor\T1\zena\6.jpg'); figure; imshow(x)
cform = makecform('srgb2lab');
lab_x = applycform(x,cform); figure imshow(lab_x);
ab = double(lab_x(:,:,2:3)); nrows = size(ab,1); ncols = size(ab,2); ab = reshape(ab,nrows*ncols,2); figure imshow(ab);
nColors = 3; [cluster_idx cluster_center] = kmeans the error (ab,nColors,'distance','sqEuclidean','Replicates',3);
pixel_labels = reshape(cluster_idx,nrows,ncols); figure; imshow(pixel_labels,[]);
the error happence in the kmeans instruction and it says (empty cluster occurs) .. by the way the image is a brain MRI image with a JPG extension. thanks allot .. please help ASAP.

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!