Ask Your Question

How to find the thickness of the red color sealent in the image ????

asked 2018-06-21 02:29:58 -0600

Saikrishna Maddina gravatar image

updated 2018-06-21 04:07:29 -0600


I want to find the thickness of the red colored sealent in the image.

First I'm extracting the sealent portion by using findcontours by having minimum and maximum conotur area. And then check the Area,length and thickness of the sealent,i can find the area as well as length but i m not able to find the thickness of the sealent portion.

Please help me guys........below is the example image.

Thanks in Advance. C:\fakepath\sealent.jpg

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-06-21 04:18:45 -0600

kbarni gravatar image

updated 2018-06-21 04:29:41 -0600

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.

edit flag offensive delete link more


Okay Tq @kbarni....... I will use normal images like more uniform lightning images.

Saikrishna Maddina gravatar imageSaikrishna Maddina ( 2018-06-21 04:43:21 -0600 )edit

I'm not getting much results of sealent while using HSV,for this i'm converting into LAB from BGR and i'm getting good active pixels of sealent.

Saikrishna Maddina gravatar imageSaikrishna Maddina ( 2018-06-21 04:45:12 -0600 )edit

hope for more image

jsxyhelu gravatar imagejsxyhelu ( 2018-06-22 06:34:07 -0600 )edit

Question Tools

1 follower


Asked: 2018-06-21 02:29:58 -0600

Seen: 199 times

Last updated: Jun 21 '18