how to detect shape of polygons after canny edge detection

asked 2016-11-27 10:14:43 -0600

mhs_123 gravatar image

updated 2016-11-28 09:12:30 -0600

berak gravatar image

a.jpg after performing canny edge detection of my image(triangle) i have to make the program to identify what shape it is and type it out by detecting number of edges ,please help one more problem is that canny image consists of two concentric triangles ,since orignal image had a black thick border along the triangle please help!thank you

edit retag flag offensive close merge delete

Comments

Please insert an image example.

LBerger gravatar imageLBerger ( 2016-11-28 01:36:10 -0600 )edit
1

i have added now

mhs_123 gravatar imagemhs_123 ( 2016-11-28 08:13:17 -0600 )edit

i'm not that into the canny edge detection, but couldn't you adjust the threshold to minimize the black border?

Vintez gravatar imageVintez ( 2016-11-28 08:27:54 -0600 )edit
2

You can use approxPolyDP like in this post

LBerger gravatar imageLBerger ( 2016-11-28 08:46:55 -0600 )edit
1

I second what @LBerger is suggesting you. Try to search in the web with the following keywords: opencv shape recognition you will find plenty of examples/tuts and code ;-)

theodore gravatar imagetheodore ( 2016-11-28 10:59:27 -0600 )edit