Click here to Skip to main content
15,884,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.
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
Posted

Both Java and .net have wrappers for OpenCV.

So the question is really which language you are more comfortable working in.
 
Share this answer
 
Comments
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    
5'ed!
Mehdi Gholam 30-Oct-11 15:50pm    
Thanks
Sergey Alexandrovich Kryukov 30-Oct-11 23:53pm    
Yes, I would recommend OpenCV, too. Do you have links to the wrappers? -- would be helpful. Anyway, a 5.
--SA
Take a look at:
http://en.wikipedia.org/wiki/Face_detection[^]

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

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

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900