Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ImageProcessing
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 30-Oct-11 8:49am
DiiR203
Rate this: bad
good
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.
  Permalink  
Comments
DiiR at 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 at 30-Oct-11 15:51pm
   
Consult your project advisers.
Espen Harlinn at 30-Oct-11 15:48pm
   
5'ed!
Mehdi Gholam at 30-Oct-11 15:50pm
   
Thanks
SAKryukov at 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
Mehdi Gholam at 31-Oct-11 0:33am
   
Well we can't do all the work :)
They are easy enough to find.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  
Comments
Mehdi Gholam at 30-Oct-11 15:51pm
   
5'ed
Espen Harlinn at 30-Oct-11 16:02pm
   
Thank you, Mehdi :)
SAKryukov at 30-Oct-11 23:51pm
   
Yes, this is a must-read. My 5. I would recommend OpenCV.
--SA
Amir Mahfoozi at 31-Oct-11 1:47am
   
+5
Espen Harlinn at 31-Oct-11 5:05am
   
Thank you, Amir!
Espen Harlinn at 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
0 OriginalGriff 390
1 Sergey Alexandrovich Kryukov 329
2 BillWoodruff 210
3 Afzaal Ahmad Zeeshan 204
4 CPallini 185
0 OriginalGriff 5,515
1 DamithSL 4,451
2 Maciej Los 3,902
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,175


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 30 Oct 2011
Copyright © CodeProject, 1999-2014
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