title: Image edge/shape detection in OpenCV
body: <p>After converting a color image to black and white, I want to detect the shape of the image. 
  What are the best methods to detect the shape? I mean how can I detect it pixel wise or histogram wise? And how can I store each detected shape in a database if it's like histogram  </p>
  
  <p>eg:</p>
  
  <p><img src="https://i.stack.imgur.com/3f35h.jpg" alt="enter image description here"></p>
  
  <p>To detect above image shape what method is most accurate?</p>
  
  <p>And I saw same kind of method on the internet after convert image to binary they store same kind of graph information(below link) in here how we store information like that?</p>
  
  <p><img src="https://i.stack.imgur.com/S8NOI.jpg" alt="enter image description here"> </p>