Analyse gap between small objects in image
I need to determine the gap between two tiny objects. This has to be done from an image. I am using python3 and opencv for this. There are different kinds of objects. Cylinders and spirals.
The analysis of the cylinders works so far:
The blue line is a substitute for the object "edge". With its help the gap between those objects can be determined. The result looks like this:
(Red curve is the gap in pixel, left axis)
Now to my problem. I want to do the same for spiral objects: (Ignore the blue lines)
I am using these functions to improve the images before searching for contours:
skimage.transform.rescale()
scipy.ndimage.gaussian_filter()
scipy.ndimage.gaussian_filter()
I tried to play around with blurr and alpha, but with no good result.
What is a gap between two images? May be you can use distance transform to define a gap