From: Mariya on 15 Apr 2010 19:33 Hello - my main question is given a feature centroid, how can I draw it in MATLAB? In more detail, I have an NxNx3 image (an rgb image) of which I take 4x4 blocks and compute a 6-dimensional feature vector for each block. I store these feature vectors in an Mx6 matrix on which I run kmeans function and obtain the centroids in a kx6 matrix, where k is the number of clusters and 6 is the number of features for each block. How can I draw these center clusters in my image in order to visualize if the algorithm is performing the way I wish it to perform? Or if anyone has any other way/suggestions on how I can visualize the centroids on my image, I'd greatly appreciate it. Thank you.
From: ImageAnalyst on 15 Apr 2010 21:16 Mariya How about using the plot() function? plot(centroidX, centroidY, 'r+'); Of course you put this in a loop and pull centroidX, centroidY out of your kx6 matrix for each iteration (block), thus you will plot k crosses over the image.
|
Pages: 1 Prev: average the elements of an array Next: plotting rectangle aroung moving objects |