Ask Your Question

Revision history [back]

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:

image description

image description

image description

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)

image description

Now to my problem. I want to do the same for spiral objects: (Ignore the blue lines)

image description

image description

image description

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.