title: OpenCV Object Detection - Center Point
body: <p>Given an object on a plain white background, does anybody know if OpenCV provides functionality to easily detect an object from a captured frame?  </p>
  
  <p>I'm trying to locate the corner/center points of an object (rectangle).  The way I'm currently doing it, is by brute force (scanning the image for the object) and not accurate. I'm wondering if there is functionality under the hood that i'm not aware of.</p>
  
  <p><strong>Edit Details</strong>:
  The size about the same as a small soda can.  The camera is positioned above the object, to give it a 2D/Rectangle feel.  The orientation/angle from from the camera is random, which is calculated from the corner points.</p>
  
  <p>It's just a white background, with the object on it (black).  The quality of the shot is about what you'd expect to see from a Logitech webcam.</p>
  
  <p>Once I get the corner points, I calculate the center.  The center point is then converted to centimeters.</p>
  
  <p>It's refining just 'how' I get those 4 corners is what I'm trying to focus on.  You can see my brute force method with this image: <a href="https://i.stack.imgur.com/jUV9H.png" rel="nofollow noreferrer">Image</a></p>