How to apply morphological operations like clearing border and removing small objects using matlab for color image? : I have a color image obtained after using k-means cluster and I want to apply morphological operations like cleaning border,filling holes and remove small object using matlab but  thsese operation works only on  grayscale or binar image in matlab!
Any suggestions please!


[enter image description here][1]


  [1]: https://i.stack.imgur.com/ID4mF.jpg