Ask Your Question

Measuring edge thickness using OpenCV

asked 2014-02-11 08:11:40 -0500

ZHT gravatar image

updated 2014-02-13 03:14:31 -0500

berak gravatar image

I have a segmented network from an image and I would like to measure the thickness of the edges at different locations. As one method, I am trying to fit circles inside the edges boundaries and then measure their diameters. I am having difficulties fitting the circles inside the boundary. Could anyone point me in the right direction? Do you have other suggestions?

Thanks in advance.

Here is a sample image. I want to measure the thickness of the white parts.

image description

edit retag flag offensive close merge delete


Posting some sample image might be helpful for the viewers.

Haris gravatar imageHaris ( 2014-02-11 10:23:15 -0500 )edit

Here you go Haris

ZHT gravatar imageZHT ( 2014-02-12 05:13:55 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-02-13 02:07:52 -0500

CrazySiberianScientist gravatar image

updated 2014-02-13 02:12:11 -0500

You can try to use next algorithm: 1. Use FindContours to your image. 2. Divide contour to small segments (e.g. 5px). 3. Use equation of line and her perpendicular from analytical geometry: Ax+Bx=0 between segement and points from contour (in code you can use abs(Ax+Bx) < th (th some threshold e.g. 0.5,1.0...).

I use similar algorithm for calculating wire thickness from video, see screenshot . image description

edit flag offensive delete link more

Question Tools


Asked: 2014-02-11 08:11:40 -0500

Seen: 1,005 times

Last updated: Feb 13 '14