Take the 2-minute tour ×
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It's 100% free, no registration required.

I am trying to find some method to detect people using only one camera 3 meters above the ground. This is a frame returned by camera:

enter image description here

UPDATE: Video test -> http://dl.dropbox.com/u/5576334/top_head_shadow.avi

In order to do that, first I understand that I have to perform a background-foreground segmentation. That is the easy part.

With the foreground mask, I am able to make simple operations such Hough transform to find circles, but this way only detects the 60% of heads, including many false positives.

I could use some other simple techniques like color segmentation, but I found that people heads are very different seen from above because of their hairstyle, color, amount of hair,...

Other option I have though about it is the possibility of using HOG Descriptors, or Haar-like features, but I would need an extensive database of people seen from above to train the models. I have not found anything like that.

I thought this would be a very recurrent problem, but I can not find very much about it in the literature or internet. Any help to resolve this task will be appreciated :-)

UPDATE: For more information, The goal is to implement some generic method to make pedestrian flow tracking. The first prototype will be tested in a Mall.

share|improve this question
1  
If you can post some videos, there is a chance that someone will write a prototype. Can you post please? –  Andrey Oct 30 '12 at 16:51
    
@Andrey, I uploaded a video test showing the problem. –  emepetres Nov 1 '12 at 10:15
    
@emepetres If you have resources to test this problem, maybe you also have resources to find a secondary camera? Combining views from two cameras (one top-view, and one frontal or from an angle) and using information from both sounds interesting and like a plausible approach to pedestrian flow tracking (depending on the accuracy you need) –  penelope Nov 1 '12 at 14:45
3  
this task is called "people counting" in literature. –  mrgloom Mar 6 '13 at 6:37
add comment

4 Answers 4

Are there any other objects that can move beside people? If there aren't, you can just find the blobs (connected components) in your foreground mask, and these are your people.

They can also "collide" one with another, creating one blob instead of two. In this case, you can do a motion tracking and resolve the ambiguity by using the fact that the trajectory and the speed is smooth.

If there are other objects (like dogs, cars), you should create a classifier that gets blob parameters like:

  • Blob statistics (size, solidity,etc..)
  • Color
  • Edge information
  • Speed (in case of tracking)

And returns the correct class (Human/No Human).

share|improve this answer
1  
I am looking for a robust method that can distinguish between human/non-human also. In that way, after thinking about your answer I think using blob parameters as you suggested, combined with some features tracking and some statistical information of the blob should be robust enough. –  emepetres Nov 1 '12 at 10:28
add comment

I have been in the "in order to use well tested methods I would need an extensive database of examples which I don't have" position in a very small company that "couldn't afford it". I regret very much that I didn't simply do whatever was necessary to get as much such data as possible. I think it would have made a world of difference to them in the end.

Any sort of real world vision detection has a million things you didn't think of until you tried it and it failed. It is an old problem many, many times more difficult than it appears. I would recommend sticking to newtons method of "standing on the shoulders of giants" (or, almost as good, on top of a large pile of dwarves). That is, use a method you already know works and is robust. All the stuff that sounds like it will be "good enough" instead will fail miserably.

State of the art in pedestrian detection last I knew was HOG which was originally tested in exactly that setting. You want tracking so you will need to play around in google scholar a bit to find that. Buy my main point is, I have been in a similar position and from that I would recommend you get your database, whatever you have to do, and use something you know works, which is already tested with a known failure rate, not something that just sounds good. The 40 year death march of computer vision algorithms which "sound like they will work" is not something you want to be part of.

P.S. Not trying to critisize computer vision. Its one of my favorite areas. But it's history suggests there are a thousand wrong steps to take and not very many right ones. Its better to follow someone who already found some of those right steps.

share|improve this answer
    
Maybe you are right, and I should spend some time making a good database to train and test a HOG descriptor. In that way, do you know which minimum size would have this database in order to make the training correctly? –  emepetres Nov 5 '12 at 8:41
    
I do not know. As wide a variety as possible. Also, HOG is a detector, it returns a "yes there is a person" or "no person" response for an image and nothing else. It says nothing about where the person is (location) or what pixels are the person (segmentation) or whether there are multiple people versus one person. I think some adaptations to HOG have been made (some patented) but the point is what you want is person tracking and HOG as it stands is about detection only, not even location. I've never done it but person tracking is a long standing topic. Check out papers on person tracking. –  John Robertson Nov 6 '12 at 16:23
    
@John Robertson HOG is not detector it's just descriptor and it's used with some classificator(SVM+HOG for example) and it can return location of object. –  mrgloom Mar 6 '13 at 6:50
    
@mrgloom You are right. It does return the location by doing a windowed search. That is only fast using a method patented by a large corporation though. I wasn't meaning to use the word detector in the technical sense here, just in the plain english sense that it is something that detects. It only provides location in a loose sense that within that window there is someone at roughly 80-90% of the scale of the window but without any identification of which parts of the window are might belong to the person. I am familiar with the descriptor/detector technical distinction. –  John Robertson Mar 6 '13 at 7:14
add comment

I think that you could get started by combining a few answers from here.

There's two different approaches mentioned in this answer, with the major difference that it's impossible for you to do face detection since you do not see faces. But the other approach is still applicable: decide weather something is a pedestrian or not based on it's actions (movements).

This would, as you predicted, suggest using some kind of foreground-background segmentation. A very fast googling found this recent article that looked pretty promising, but since I never did this personally, you or someone else might have better suggestions for specific algorithm to use in this step.

Now, the first answer I linked just gives a very general approach idea. This answer however could give you idea about your next steps: track the objects, and try to distinguish between them based on the speed or moving direction.

Finally, I never tackled the problem you had, so I'm probably not of much help, but maybe the answers I linked to can give you some general idea for where to start. It also surprised me that I could not find any previous works and articles when searching for an answer to your problem, but then, maybe you just need somebody to tell you the correct keywords to describe this problem.

share|improve this answer
    
Thank you for your answer. The article about foreground segmentation looks very interesting. As you and @Andrey suggested, I will follow the approach of blob analysis to determine the number of humans in each blob. –  emepetres Nov 1 '12 at 10:44
    
@emepetres It would be nice if you let us know about your results, and how successful was the approach once you try it out and test it –  penelope Nov 1 '12 at 14:44
add comment

I have some kind of task as described here, counting people. But my requirement is the camera should be facing people from left/right side, not over the head.

That being said, exploring possible solution for my case, I stumble upon an interesting method for your case (overhead detection). Those solutions use stereo camera so that you can handle blobs (people moving too close together) by seeing the depth (e.g. only see blobs on average people head level).

This product might give you better explanation: digiop. See the brochure for more technical explanation.

P.S. I am not representing the company, just pointing out a well documented solution

share|improve this answer
    
Thank you for sharing, It seems to be an interesting way to resolve the problem. –  emepetres May 15 '13 at 10:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.