Click here to Skip to main content
13,089,818 members (45,828 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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.
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 +opencv) which one will be easier to implement considering interface issues as well?
Posted 30-Oct-11 7:49am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Both Java and .net have wrappers for OpenCV.

So the question is really which language you are more comfortable working in.
DiiR 30-Oct-11 15:41pm
i gues .net
for the application mentioned, are the steps ok? i mean the way to proceed? or is there some easier way?
thnx :)
Mehdi Gholam 30-Oct-11 15:51pm
Consult your project advisers.
Espen Harlinn 30-Oct-11 15:48pm
Mehdi Gholam 30-Oct-11 15:50pm
SAKryukov 30-Oct-11 23:53pm
Yes, I would recommend OpenCV, too. Do you have links to the wrappers? -- would be helpful. Anyway, a 5.
Mehdi Gholam 31-Oct-11 0:33am
Well we can't do all the work :)
They are easy enough to find.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Take a look at:[^]

There are some papers at the bottom that should be of some help on how you can proceed with this.

Best regards
Espen Harlinn
Mehdi Gholam 30-Oct-11 15:51pm
Espen Harlinn 30-Oct-11 16:02pm
Thank you, Mehdi :)
SAKryukov 30-Oct-11 23:51pm
Yes, this is a must-read. My 5. I would recommend OpenCV.
Amir Mahfoozi 31-Oct-11 1:47am
Espen Harlinn 31-Oct-11 5:05am
Thank you, Amir!
Espen Harlinn 31-Oct-11 5:05am
Thank you, Sergey!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 30 Oct 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100