Click here to Skip to main content
15,881,898 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i need to write a code for counting the number of people found at a particular place (Meetings, social gathering).
i have to upload the picture and the system should count the number of people present at that time.
how can i proceed?
i am using opencv with python.
i have thought of converting the image to grayscale (reducing color info)
then apply thresholding.
detect oval shapes..but how to really go about this?
thnx
Posted

How approximate must it be? Instead of counting each head, just determine the area filled (the actual dimensions) and then calculate the density of heads of a sample area. This could be more accurate for pictures that are not bird's eye view and go out to the horizon. It could also count heads for areas that are blocked but assumed to be filled with people (like shadows, tents, etc).
 
Share this answer
 
v2
Comments
DiiR 6-Oct-11 13:11pm    
the picture will be taken from a distance but not from bird's eye view..but then if a person is carrying a round thing it could be counted as a head(if i go for shape)
it will just give an estimation. but if a person is standing in front of another one, the person found at the back will not be counted. if i make an estimation of the size of a human being and compare to circular objects?
wizardzz 6-Oct-11 13:13pm    
Well, obviously, I think stuff like balloons will always throw off your count, unless you have access to thermal images. If you are trying to count each individual head, then people will block people, but if you can estimate the density via sample, or variety of samples, you'll be more accurate.
Bert Mitton 6-Oct-11 13:44pm    
Wizardzz, does it matter how dense the people in the image are? :)
wizardzz 6-Oct-11 14:11pm    
Unfortunately dense people count just as much as the rest, in elections or otherwise.
You can use kinect for no of person found in a room ready made sdk
one of the example usertracker.net
 
Share this answer
 

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