This is a python code using opencv which is used to detect the shape like triangle , rectangle , pentagon , hexagon and circle
this code is written by focusing on a color image which is also given in the file . if you have other image then you can use "len" function to predict the side of object the tell according to that .