Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.image.processing > #4512
| Newsgroups | sci.image.processing |
|---|---|
| Date | 2020-08-02 11:04 -0700 |
| Message-ID | <8d4e48df-4a86-41a8-a53c-e27f5a318905o@googlegroups.com> (permalink) |
| Subject | image segmentation using K-means |
| From | Hisoka 2015 <ghalem.kamel15@gmail.com> |
Hello,
I want to do segmentation of iris (graylevel) using K-means algorithm.Here my code:
ab=imread('iris.tiff')
ab = double(ab);
nrows = size(ab,1);
ncols = size(ab,2);
ab = reshape(ab,nrows*ncols,1);
nColors=2
%repeat the clustering 3 times to avoid local minima
[cluster_idx, cluster_center] = kmeans(ab,nColors,'distance','sqEuclidean', 'Replicates', 3);
pixel_labels = reshape(cluster_idx,nrows,ncols);
pixel_labels=pixel_labels-1
the obtained segmentation image : pixel_labels gives diferrent value in each compilation of code..Can someone help me to resolve this issue?
Back to sci.image.processing | Previous | Next | Find similar | Unroll thread
image segmentation using K-means Hisoka 2015 <ghalem.kamel15@gmail.com> - 2020-08-02 11:04 -0700
csiph-web