Analyse gap between small objects in image

asked 2019-01-16 06:34:08 -0600

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.

edit retag flag offensive close merge delete

Comments

What is a gap between two images? May be you can use distance transform to define a gap

LBerger gravatar imageLBerger ( 2019-01-16 09:03:47 -0600 )edit