You can use the functions from ImageMorphology and here especially the area_opening function
https://juliaimages.org/ImageMorphology.jl/stable/reference/#ImageMorphology.area_opening
You can use the functions from ImageMorphology and here especially the area_opening function
https://juliaimages.org/ImageMorphology.jl/stable/reference/#ImageMorphology.area_opening