title: Headcount in opencv
body: <p>i am new to opencv. i have to implement a headcount. 
  my idea is:</p>
  
  <ol>
  <li>Identification of circular objects
  <ul>
  <li>We will start by edge detection to find border line of each shape.
  sort through the image matrix pixel by pixel
  for each pixel, analyze each of the 8 pixels surrounding it
  record the value of the darkest pixel, and the lightest pixel
  if (darkest_pixel_value - lightest_pixel_value) > threshold) 
  then rewrite that pixel as 1; 
  else rewrite that pixel as 0;</li>
  <li>Now we detect shapes
  count the number of continuous edges
  a sharp change in line direction signifies a different line 
  do this by determining the average vector between adjacent pixels
  if one line, then its a circle
  by measure angles between lines more information can be deduced (rhomboid, equilateral   triangle, etc.)</li>
  </ul></li>
  <li>Face detection
  <ul>
  <li>This part includes two common approaches based on features and color. The basic idea of the algorithm is to find objects resembling an eye, then on the basis of geometric face characteristics try to join two the objects into an eye pair.
  Steps: 
  <ol>
  <li>Unimportant colors are eliminated from the image and insignificant colors are replaced with white color.</li>
  <li>The image is then converted to grayscale.</li>
  <li>The image is filtered with a median filter (unimportant white regions are blurred)</li>
  <li>White regions are segmented using a Region growth algorithm.</li>
  <li>Hough transform is applied to find circles</li>
  <li>For each region the best possible circle is found</li>
  <li>Using geometric face characteristics the pair of eyes is found</li>
  </ol></li>
  </ul></li>
  </ol>
  
  <p>is this the right way to proceed or is there an easier way?
  i want to count the number (estimate) of people found in a crowd (meetings, gatherings)
  can you help me with the codes please?
  Thank you</p>