`Blur` & `Binarize`
-------------------
One way is to `Blur` and then `Binarize` with threshold **exactly** `0.5` (no need to adjust!):
MorphologicalTransform[Binarize[Blur[FillingTransform[Closing[img, 1]], 5], 0.5], "Remove"]
>[](https://i.sstatic.net/8vS9w.png)
(In some cases (but not in this case) applying `Blur` *twice* can give better results:
MorphologicalTransform[
Binarize[Blur[Blur[FillingTransform[Closing[img, 1]], 3], 4], .5], "Remove"]
)
If further smoothing is needed, one can apply this method separately to each component of the image using one of the methods from [this][1] thread:
i = Closing[img, 1];
cm = ComponentMeasurements[{MorphologicalComponents[i], ColorNegate@i}, {"MaskedImage",
"BoundingBox"}];
smoothComponent[img_, n_] :=
ImagePad[MorphologicalTransform[
Binarize[Blur[ImagePad[FillingTransform[ColorNegate@img], n], n], 0.5], "Remove"], -n];
smoothAllComponents[cm_, n_] := Module[{newComps, iW, iH},
newComps = smoothComponent[#, n] & /@ cm[[;; , 2, 1]];
{iW, iH} = ImageDimensions@i;
Image[Total[
Table[SparseArray[
Band[1 + Round@{iH - #[[2, 2]], #[[1, 1]]} &@cm[[i, 2, 2]]] ->
ImageData[newComps[[i]]], {iH, iW}], {i, Length[cm]}]]]];
Table[s[cm, n], {n, 20}]
>[](https://i.sstatic.net/AyJIC.png)
----------
`Dilation` & `Thinning`
-----------------------
cm = ComponentMeasurements[img, "Image"];
Table[ColorNegate@ImagePad[Thinning[Dilation[ImagePad[cm[[2, 2]], r], r]], -r], {r, 1,
4, .5}]
> [![output][2]][2]
[1]: https://mathematica.stackexchange.com/q/144395/280
[2]: https://i.sstatic.net/GmHVn.png