Head and Shoulder Detection (looking from above)

This is my first post since I cannot find a suitable answer for my research.

I want to use openCV to detect the Head-shoulder pattern that will be used in some project.

The camera settings are in the ceiling right down to be used in applications, for example, for counting people, etc.

I want my camera to detect / recognize the head and shoulder from above, and not the usual face recognition in which the frontal or rear.

Does anyone know how to do this? Please share me some tips or simple source code for this.

+4
source share
2 answers

Obviously, they used a kind of Time-of-Flight (ToF) Camera instead of an intuition-based device. I assume that your particular camera is of the latter type, so I do not see a practical approach to the task.

If you had a ToF camera image segmentation, it would be close to trivial (for example, a threshold value). After that, you could just look for the shapes and gradients (floating in distance and gradients) that are characteristic of the head and shoulders, and you would.

My suggestion is to go and get a ToF camera and play with standard CV algorithms. Also look at Kinect , which is also a distance measuring device and can also be used for this task (although not based on ToF, but structured light , as far as I know).

+1
source

I am afraid that this solution is not so simple to describe in a few lines of code. I think you can start with the code for the face detection example in openCV, but to find people from above, you need a different classifier. You need to find such a classifier (I'm sure you can find it somewhere, or you can ask the guy who posted the video that you mentioned), and if you do not get it, you need to train such a classifier yourself.

An alternative would be to subtract from the link the background image, the current foreground frame, the result is objects passing on the screen, however you cannot distinguish between people and other objects.

0
source

Source: https://habr.com/ru/post/1440720/


All Articles