i need to perform a headcount given an image. my idea is:
1) Identification of circular objects
o 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;
o 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.)
2) Face detection
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:
1) Unimportant colors are eliminated from the image and insignificant colors are replaced with white color.
2) The image is then converted to grayscale.
3) The image is filtered with a median filter (unimportant white regions are blurred)
4) White regions are segmented using a Region growth algorithm.
5) Hough transform is applied to find circles
6) For each region the best possible circle is found
7) Using geometric face characteristics the pair of eyes is found
i must use opencv to implement this. with which language can i integrate opencv for this task? (e.g. java + opencv or vb.net +opencv) which one will be easier to implement considering interface issues as well?
Thanks