..Hi everyone..
I'm trying to think of an approach to classify (or, perhaps initially, cluster) a group of non-connected line segments (as shown in the two images below) into one of three classes: rectangle, triangle, and circle.
My initial solution was creating an R-tree structure and performing an analysis of the geometric relations (e.g. which lines are perpendicular, parallel, collinear, etc) between neighbouring lines, and then generating the final result based on these geometric relations.
However, since the objects (e.g. the triangles, rectangles, etc) are overlapping, and the line segments are incomplete and with non-matching lengths, the geometric approach mentioned above is not working effectively (it has many false positives and false negatives).
Therefore, I'm beginning to think that a machine learning approach might be more robust and more straightforward to implement.
However, I'm not sure what approach to take. How do you suggest I tackle this problem? Which classification (or clustering?) approach would be the simplest to implement? The priority is simplicity/speed rather than detection accuracy.
Thank you for your help.