Filtering binary objects with kmeans matlabbinary imageshapeskmeans Binarize image, fill holes, clear border and separate unwanted small objects with help of k-means algorithm