After importing the image and reading the image in the software, we apply image processing algorithms on it.
If you ignore the brightness changes, how many colors do you see in the image? There are three colors: white, purple and pink. Note how easily you can distinguish these colors from each other. L * a * b * color space (also known as CIELAB or CIE L * a * b *) enables you to minimize these visual differences. The color space L * a * b * is derived from the values of tristimulus CIE XYZ. The space L * a * b * consists of a glow layer "L *", a color layer "a *" indicating that the color is along the red-green axis, and a color layer "b *" indicating where the color is located Takes. The blue-yellow axis contains all the color information in layers 'a *' and 'b *'. You can measure the difference between two colors using the Euclidean distance metric.
Clustering is a way to separate a group of objects. K-means clustering treats each object as a place in space. Finds partitions where objects within each cluster are as close together as possible and as far away as possible from objects in other clusters. K-means clustering requires you to specify the number of clusters to be divided and a distance metric to quantify the proximity of two objects to each other.
Because there is color information in the "a * b *" space, your objects are pixels with the values "a *" and "b *". Use kmeans to cluster objects into three clusters using the Euclidean distance metric.
Images were created that categorize the H&E image by color. Using pixel_labels, objects in hestain.png can be separated by color, resulting in three images.
Finally, the cores will be split into a separate image. Note that there are dark and light purple objects in several clusters. Using the "L *" layer in the L * a * b * color space, dark purple can be separated from light purple.