Ask Your Question

Revision history [back]

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 (in code you can use abs(Ax+Bx)

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

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)

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

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) 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