title: What is the fastest way of edge detection?
body: <p>I am thinking of implement a image processing based solution for industrial problem.</p>
  
  <p>The image is consists of a Red rectangle. Inside that I will see a matrix of circles. The requirement is to count the number of circles under following constraints. (Real application : Count the number of bottles in a bottle casing. Any missing bottles???)</p>
  
  <blockquote>
    <ol>
    <li>The time taken for the operation should be very low.</li>
    <li>I need to detect the red rectangle as well. My objective is to count the
    items in package and there are no
    mechanism (sensors) to trigger the
    camera. So camera will need to capture
    the photos continuously but the
    program should have a way to discard
    the unnecessary images.</li>
    <li>Processing should be realtime.</li>
    <li>There may be a "noise" in image capturing. You may see ovals instead of circles.</li>
    </ol>
  </blockquote>
  
  <p>My questions are as follows,</p>
  
  <blockquote>
    <ol>
    <li>What is the best edge detection algorithm that matches with the given
    scenario?</li>
    <li>Are there any other mechanisms that I can use other than the edge
    detection?</li>
    <li>Is there a big impact between the language I use and the performance of
    the system?</li>
    </ol>
  </blockquote>