Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

First, binarize the image. Convert to HSV, and use the inRange function.

You can get the area by counting the active pixels.

Then, do a distance transform and a skeleton on the binary image.

The number of active pixels in the skeleton image will give you the length of the sealant.

You can get the thickness in every point by checking the value of the distance transform in the active pixels of the skeleton image.

For the mean thickness, just divide the area with the length.

I would go with a simpler solution.

First, binarize the image. Convert to HSV, and use the inRange function.

You can get the area by counting the active pixels.

Then, do a distance transform and a skeleton on the binary image.

The number of active pixels in the skeleton image will give you the length of the sealant.

You can get the thickness in every point by checking the value of the distance transform in the active pixels of the skeleton image.

For the mean thickness, just divide the area with the length.

Note: the flash you used is too bright, so there might be errors in the binarization. Eliminate them with a closing morphological operation. Anyway, try to get a more uniform lightning, it will simplify your task.