Troy McClure
Troy McClure

Reputation: 399

Human full body detection: contour rather than rectangle

I have to implement a contour detection of full human body (from feet to head, in several poses such as raising hands etc.) using opencv. I managed to compile and run code I found here https://gist.github.com/yoggy/1470956, but it only draws a rectangle around the body, and not the exact contour. Can one help me with identifying and displaying the contour itself?

Thanks!!

Upvotes: 8

Views: 17157

Answers (3)

j2abro
j2abro

Reputation: 753

One approach that might work is background subtraction:

http://docs.opencv.org/3.1.0/db/d5c/tutorial_py_bg_subtraction.html

This would work for video but perhaps also for single images in a scenario where you were in a controlled (fixed camera) environment where you had an image of the pose and also and image of the background, with no one present.

Upvotes: 5

SolessChong
SolessChong

Reputation: 3407

I'm afraid the answer to this question is:

There's no algorithm that can do this perfectly.

Computer vision has not developed to that extent yet. Take a look at recent papers in CVPR, PAMI, and you will find that most algorithms are "rectangle", or more specifically, bounding-box based, in terms of human labeling and algorithmic detecting.

It is true that you can find the contours within the bounding-box. However the computer just doesn't know which contour belongs to the specified object.

I suggest you search for "human pose estimation" for further information.

Upvotes: 6

GilLevi
GilLevi

Reputation: 2137

You can use the function findCountors within the returned bounding box:

http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/find_contours/find_contours.html

Upvotes: 2

Related Questions