Some of us may have already spotted that the next week’s featured image is the group photo made recently on the SOTM conference in Denver:
The first thing that came to my mind when I looked at it was that it would be quite interesting to know the exact number of people standing, sitting and even lying there. So I decided to find that out.
Counting faces manually is quite boring: it is easy to miss someone, calculate twice or even reach
nirvana FFFUUU effect after getting mixed up somewhere in the middle of this boring process.
Probably, the most straightforward way nowadays would be in feeding that image to Picasa or any other software with face recognition, but that would not give an accurate result because some people are almost completely hidden behind others. And, by the way, most probably there would be still a need to count people, not in a photo, but in the list of faces found.
So I decided to take another approach: manual recognition with automated counting. I copied the photo into a new flash document, created a red square symbol and placed it over faces in the image:
That was very easy and fast to do: I simply dragged and dropped instances of the symbol holding
After that I wrote just 5 lines of code (I used AS2 for simplicity):
In the first frame of the movie:
In the second frame:
And in the only frame of the red square symbol:
Finally I pressed
Ctrl+Enter and immediately saw the answer in the output window: 179. Update: As Peter Batty was on both sides of the photo, the real answer is 178 − so that’s how many people were there.
The entire process took just 4 minutes. If you want to double-check the result or use the same method for counting people somewhere else, here is the flash file:
SOTM11_denver_facecount.fla (20 MB, the photo itself is quite heavy)
Sorry to anyone who feels uncomfortable seeing a red square on their face.
Update 2: Also counted faces on the SOTM 2011 EU photo. 146 people are there.