Note that your image
is actually inconsistent!
Any white squares surrounded by 3 blacks in a corner are in one case left sharp, and in another being rounded.
Also white squares are being treated as differently to black squares!
Finally the results show two different radii of circular archs. A half line thickness, and a full line thickness! That will not be so easily to reproduce!
I think this may be a case of specific 'patterns' of 'pixels' being tiled with a specific shaped tile image. And that is a much more involved process, which may be harder to implement generally. It would be possible, but you need to figure out exactly what 3x3 pattern produces what tile. That is 2^9 or 512 patterns, though that may be quartered with rotations, and halved with mirrors down to 2^6 or 64 unique patterns!
If a diamond neighbour hood is used that reduces to 16 unique patterns. But that does not appear to be the case. For example see the white square surrounded by black on all but one corner!
One pattern missing in the example image is a diagonal line of white squares surrounded by black.
ASIDE: this is actually closely related to other examples I have dealt with. My Kernel2Image script
http://www.imagemagick.org/Usage/scripts/kernel2image
And examples in
http://www.imagemagick.org/Usage/morpho ... rnel2image
Also related to a current 'project' of mine, the expansion of bitmaps of 3-D 'voxels' shapes, into diagrams for building (in the sandbox building game "minecraft")