Best way to classify polygons? (triangle, pentagon, hexagon etc.)
Hello,
I suppose this is a very easy problem but I am pretty new to computer vision and could not find a way:
Currently I am working on the problem of classifying different polygons such as triangle, pentagon, hexagon.After thresholding, and canny edge detection, polygons seem pretty clear, but I could not find a way to count how many edges they have, so that I could do the classification. I tried to use approxPolyDP and findContours, however could not figure out how to count edges. Also, I tried hough line transformation, but it finds too many lines, and could not make it work good even though I played with its parameters for some time.
Could you please give me some ideas? I would also really appreciate if you have any code examples for that.
PS: I attached some thresholded images, and using C++.
see https://www.pyimagesearch.com/2016/02...