Ask Your Question

human detection from still camera

asked 2015-10-19 17:01:17 -0500

lounice gravatar image

Dear all,

I need to detect human silhouettes in a sequence provided by video-surveillance camera. The first step of my algorithm is motion detection based on background subtraction. I am done with this and I obtain a binary mask containing the object of interest and some noise. I want to detect the object of interest (the human silhouette) and track it (the final objective is to detect falls). For this end, I need to detect the blobs from the binary mask and find the largest in area and access its pixels (in order to perform further analysis on its texture). Shall I use contours detection function of OpenCV or simpleBlobDetector. I have tried the latter but it seems that it only return key-points (the centers of each blob) and I can't get access to the blob pixels. Please, can you give me your opinion regarding this topic and the class SimpleBlobDetector ?

Thanks for your answers.

edit retag flag offensive close merge delete


Thanks Steven for your answer. This raises the question when shall we use SimpleBlobDetector over FindContours ?

lounice gravatar imagelounice ( 2015-10-20 06:13:36 -0500 )edit

Thanks Steven. What I actually want to achieve is to be able to deal with the detected contours as blobs in order to process the pixels (of the whole area inside the contour). Let's say for instance tha I want to track a person based on the colors of his/her clothes, I will need the pixels that are contained inside the contour. Do you have an idea on how to do that ?

lounice gravatar imagelounice ( 2015-10-27 10:06:25 -0500 )edit

Ok. I came to the same conclusion. Thanks a lot for your help.

lounice gravatar imagelounice ( 2015-10-28 15:40:52 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-10-20 04:36:05 -0500

updated 2015-10-29 03:05:10 -0500

FindContours is all you need. It gives you direct access to the area of the blobs, its center, its bounding box, ...

Hmm in the bottom line, SimpleBlobDetector uses FindContours or parts of it internally. So I think there is no way of actually seperating cases between them. If you simply need to color blobs, then go for SimpleBlobDetector, if you need extra info, then go for FindContours and supported analytic functionality on the result.

If you have a contour then you can use it as a mask on the original image and analyze the remaining pixels.

edit flag offensive delete link more


@lounice, I suggest you accept this combined answer? This way your topic looks solved!

StevenPuttemans gravatar imageStevenPuttemans ( 2015-10-29 03:05:37 -0500 )edit

Ok. Thanks.

lounice gravatar imagelounice ( 2015-11-02 10:32:27 -0500 )edit

Question Tools

1 follower


Asked: 2015-10-19 17:01:17 -0500

Seen: 304 times

Last updated: Oct 29 '15