Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Image segmentation using k means

Asked by M@lik Ali on 9 Jul 2012

Hi All I have a feature vector of an image now i want to segment the image using k-means clustering algo. can any one provide me the code..

4 Comments

M@lik Ali on 9 Jul 2012

Sorry there is no answer....

Walter Roberson on 9 Jul 2012

There is, however, remarks about what it means when your Question is tagged with "doit4me".

mahesh on 3 Aug 2012

hi wat feature did u extract from the image??

M@lik Ali

Products

No products are associated with this question.

1 Answer

Answer by Image Analyst on 9 Jul 2012

Here's an example for you:

Color-Based Segmentation Using K-Means Clustering

http://www.mathworks.com/products/demos/image/color_seg_k/ipexhistology.html

8 Comments

M@lik Ali on 12 Jul 2012

version 7.10 win 32

Walter Roberson on 12 Jul 2012

At the command line, please command

which -all kmeans

and tell us the result.

M@lik Ali on 12 Jul 2012

Ohuh thanks, there ware two function with same name now its working, but now it return me the feature vector like matrix size is 8X6

0.1000 1.0428 0.6896 0.0012 0.0014 0.0001 0.1000 1.0428 0.6896 0.2068 0.1074 0.0305 0.1000 1.0428 0.6896 0.0232 0.0644 0.0025 0.0710 0.7404 0.4896 0.0359 0.0356 0.0031 0.1302 1.3572 0.8975 0.0057 0.0029 0.0002 0 0 0 0.0027 0.0063 0.0004 0.1302 1.3572 0.8975 0.1287 0.1909 0.0496 0.1151 1.2000 0.7935 0.3897 0.3009 0.1020

So is it segmented image if yes then how many regions it have and how i can color the different regions actually the feature vector i give input to the kmeans was LUV components..

Image Analyst

Contact us