I have a UIImage like this:
The image represents a "circuit" (running track).
I need to detect the "circuit" (black pixels) and enlarge it (increase track width). Something like this:
I'm open to every suggestion / algorithm / other useful to get the expected result.
Thank you :)
Ok, as @CrisLuengo said, Dilation is the solution.
I worked on it and I got a good initial result.
An example:
I need to improve the algorithm to enlarge the size of the shape more and more.
In my case I convert the image from RGB to Grayscale (pixel values range [0-1]. Then I process it in the following way:
In the example the structuring element is the following:
0 0 1 0 0
0 1 1 1 0
1 1 1 1 1
0 1 1 1 0
0 0 1 0 0