Classifying lines with opencv

c++, classification, image-processing, opencv

Solution

I see few possible measures to clasify:

Try approximate line with some approx eps then check how many segments approximate line, less segments the better line is. (This can make problems in most left case, when line contains from few segments)

Check bounding box size, less size better line

Check convexity defects.

Problem

I'm working on an image classification project, I've extracted curved lines from image using edge-detection, and need to classify them based on their curvature. For example in the image below there are 3 kinds of line, the left line has a good curvature, the middle one has a not-bad curvature, and the right line has a very-bad curvature. Thanks for your help

Original source