img // With[{r = 3}, (Closing[#, 10 r] &)@*(Opening[#1, 2 r] &)@*(GradientFilter[#, 6 r] &)] // Binarize // img # &
I am afraid that it will be very difficult to process similar images with the same set of filter parameters. So far the parameters are just a result of trial & error.
Robert