Hi, my image size is 192x192,i need to reduce it to 20x1.shall is use kmeans clustering?if so,how to write code for kmeans clustering to make the size to 20x1.

1 次查看(过去 30 天)
if i use kmeans(imagename,20).i am getting 192x1 result.what to do?plz help me sir
  2 个评论
Guillaume
Guillaume 2015-8-19
编辑:Guillaume 2015-8-19
You haven't given enough information for us to be able to help you.
Why do you need to reduce it to a line (which is what a 20x1 image would be)? What does your image represent? Why do you think k-means clustering is appropriate?
With a 192 x P matrix, k-means clustering will always return a 192 x 1 vector, regardless of the number of clusters. If you specify 20 clusters the values of this vector will range from 1 to 20. Why do you expect anything different? k-means clustering does not change the size of your data, it just partition it into clusters.
kaavya subramani
kaavya subramani 2015-8-20
U r right sir,k means clustering is not appropriate,i need to reduce 192x192(result of feature extraction from original frames) into reduced representation,as i am working in video,it consists of more than 2000 frames,so inorder extract feature vectors for all frames i need to reduce its information(192x192) so plz give me some tips

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2015-8-20
In order to use any of those effectively you need to know what makes sense to use. With such a small feature vector permitted, it is going to be important that your chosen features be able to detect the kinds of changes in your videos that you want to be able to detect. For example it might be the case that you do not care about the color of your scenes at all, but that you need to know the radius of the largest circle, together with the number of equilateral triangles, together with the average horizontal and vertical rates at which the plaid background is drawn. Or maybe you need to track which shell is which for The Shell Game. We really don't know what you need to know about your scenes, so we cannot recommend any particular Feature.

Community Treasure Hunt

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

Start Hunting!

Translated by