I have a binary image of a line, like this one:
What I'd like to do is to dilate the line, but only towards the 'inside' of the line. That is, to add white pixels towards the center of the image, using DiskMatrix[]
or any other kernel of a given radius/size. I've been trying to find ways to do this for a bit but I have no idea where/how to begin.
Thanks!
WatershedComponents[img]//Colorize//Binarize
$\endgroup$Dilation
as usual and use that as a mask to clip off anything outside, e.g.Dilation[woof, 50]*mask
will give you a nice result ifwoof
is the OG image andmask
is what comes out of that $\endgroup$