- Home /
How to detecting and tracking each person among 3 people
I am wring for asking the how to tracking the specific person after detecting for the interactive floors projecting like the link below.
http://www.youtube.com/watch?v=uNRY6qX7qgA
We would like to express like a pond which the fishes are in it. When person comes into the scanning zone, some fishes are gathering around the person with gentle wave. Specially, If there are 4 people, the action invoke separately. So you might need the algorithm for calculating which fishes are closer to the person.
Kinect is set on the ceiling heading to floor like this. http://www.eyeclick.com/UserFiles/Image/eyestep.jpg
And I'm using C#, EmguCV.
I already found the blob using FindContours. These screen shots are showing how to detect and tracking people's head.
http://postfiles7.naver.net/20130613_38/tophanna87_1371131511454ypqkq_JPEG/1.JPG?type=w2
http://postfiles2.naver.net/20130613_177/tophanna87_13711315203740WXhh_JPEG/2.JPG?type=w2
But What I want to do now is give ID to each blob to distinguish who's who. I don't know how to set the ID. When the person has gone in depth map's area, the blob has to be released. When new person comes in to the area, the new blob ID has to be set.
People who has to give the ID is maximum 3 people. As a result, each game object has to follow to each person until the person is in the area. ( gameObject 1 - blob1, gameObject 2 - blob2, gameObject 3 - blob3)
void Update()
{
if (Kinect.pollDepth())
{
IntPtr image = this.SliceDepthImage(Kinect.depthImg, 640, 480, 1000, 2300);
Image<Bgra, Byte> openCVImg = new Image<Bgra, byte>(640, 480, 2560, image);
Image<Gray, byte> gray_image = openCVImg.Convert<Gray, byte>();
using (MemStorage stor = new MemStorage())
{
//Find contours with no holes try CV_RETR_EXTERNAL to find holes
Contour<System.Drawing.Point> contours = gray_image.FindContours(Emgu.CV.CvEnum.CHAIN_APPROX_METHOD.CV_CHAIN_APPROX_SIMPLE, Emgu.CV.CvEnum.RETR_TYPE.CV_RETR_EXTERNAL, stor);
for (int i = 0; contours != null; contours = contours.HNext) //array of contours
{
if ((contours.Area > Math.Pow(70, 2)))
{
MCvBox2D rectContour = contours.GetMinAreaRect();
openCVImg.Draw(rectContour, new Bgra(0x00, 0x00, 0xFF, 0xFF), 3);
//get contour's center point
PointF centerPos = new PointF(rectContour.center.X, rectContour.center.Y);
}
i++;
}
}
Please, help me.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
Emgu CV and Unity Issue 0 Answers
A node in a childnode? 1 Answer
C# How to Detect Edges of a Collider 0 Answers