How do you show each cluster separately after clustering input image by kmeans ?

Hi, I am using the clustering codes at
http://mlampros.github.io/2016/09/12/clusterR_package/

and obtaining clustered image by kmeans using;

clusteredImg = KMeans_rcpp(im3d, clusters = 3, num_init = 3, max_iters = 100, 
                      initializer = 'kmeans++', verbose = F)

getcenters = clusteredImg$centroids
getclusters = clusteredImg$clusters

new_im_init = getcenters[getclusters, ]

I would like to get show each cluster as saparate images, which have the same size with the input image.
For instance, my image is clustered into 3 clusters with the above code.
I want to show these clusters as 3 different images (each of these images should have the same size with the input image, which is 2 dimensional)

Could you please help me, how to do this

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.