Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

i wanna Apply a Kmeans clusering Algorithm on an image data base using matlab. i know the coding but i dono if my idea is right or not:
first of all all images are grouped in to k cluster .
for this i'll have 'ai' for each cluster where the first cluster will be a1 ,the second will be a2 and so on.(i will be a counter and with strcat i will create a1,a2,...) these 'ai's are arrays.
and the input values of them are the name of images and the first element of each array i.e ai(1) is the centroid. then i do k_means for these 'ai's where in the second step each element of array(except for the first element which is centroid) will check its Euclidean distance with all centroids and according to this the new group will be constructed and then there would be k_means iteration. is it a correct idea?

share|improve this question
sorry but its unclear what you are saying here; do you want to cluster a "representation" of images into clusters? by representation i mean the pixel values, or some other numerical summaries extracted from them. – user1669710 5 hours ago
matlab kmeans function mathworks.com/help/stats/kmeans.html, K means description en.wikipedia.org/wiki/K-means_clustering – ondav 5 hours ago
i've got a data set of images. i want to group them in to k cluster by k-means according to theirs Euclidean distance . and i dono if my idea is good or not.(they are frames of a video) – deansam 4 hours ago

1 Answer

First, you could use cells to ease coding :

Cluster = cell(3,1);
Cluster{1} = [9 2 3];
Cluster{2} = [];
Cluster{3} = [4 8];

If you're using centroids, you'll have to make sure your images are the same size, or to extract features for all them.

share|improve this answer
i really need sth like this cell,i didn't aware of it,thanks. all of them are of the same size – deansam 4 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.