Posts

Showing posts with the label Recall

6.4.7 R6. Segmenting Images - Video 5 K-Means Clustering

Recall from our last video that it was impossible for us to use hierarchical clustering because of the high resolution of our image. So in this video, we will try to segment the MRI image using the k-means clustering algorithm. The first step in k-means clustering involves specifying the number of clusters, k. But how do we select k? Well, our clusters would ideally assign each point in the image to a tissue class. Or a particular substance, for instance, grey matter or white matter, and so on. And these substances are known to the medical community. So setting the number of clusters depends on exactly what you're trying to extract from the image. For the sake of our example, let's set the number of clusters here, k, to five. And since the k-means clustering algorithm starts by randomly assigning points to clusters, we should set the seed, so that we all obtain the same clusters. So let's type set.seed, and give it a value of 1. To run the k-means clustering a...