- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I would like to do skeleton tracking but the number of joints returned is always 0.
My goal is to track the body skeleton from 4 meter and I would like to track when a person raise his hand.
Below is my code, did I do anything wrong? Thanks!
//Initialization
// Create the SenseManager instance
sm = PXCMSenseManager.CreateInstance();
// Enable the color stream
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR, ImageWidth, ImageHeight, 30);
// Enable person tracking
sm.EnablePersonTracking();
personModule = sm.QueryPersonTracking();
PXCMPersonTrackingConfiguration personConfig = personModule.QueryConfiguration();
personConfig.SetTrackedAngles(PXCMPersonTrackingConfiguration.TrackingAngles.TRACKING_ANGLES_FRONTAL);
// Skeleton
PXCMPersonTrackingConfiguration.SkeletonJointsConfiguration skeletonConfig = personConfig.QuerySkeletonJoints();
skeletonConfig.SetMaxTrackedPersons(1);
skeletonConfig.SetTrackingArea(PXCMPersonTrackingConfiguration.SkeletonJointsConfiguration.SkeletonMode.AREA_UPPER_BODY_ROUGH);
skeletonConfig.Enable();
//Update
PXCMPersonTrackingData.PersonJoints personJoint = trackedPerson.QuerySkeletonJoints();
int njoints = personJoint.QueryNumJoints();
myTrackedPerson.JointsDetected = njoints;
PXCMPersonTrackingData.PersonJoints.SkeletonPoint[] joints = new PXCMPersonTrackingData.PersonJoints.SkeletonPoint[njoints];
if (njoints > 0)
{
if (personJoint.QueryJoints(joints))
{
for (int i = 0; i < njoints; i++)
{
if (joints.confidenceImage > 80)
{
if (joints.jointType == PXCMPersonTrackingData.PersonJoints.JointType.JOINT_HEAD)
{
myTrackedPerson.HeadX = (int)joints.image.x;
myTrackedPerson.HeadY = (int)joints.image.y;
}
}
}
}
}
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Johannes:
I am using R200 and I am running on Windows 10.
Best Regards,
Wik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, is there anyone from Intel to help to review the issue? I would like to know if this feature is not matured yet or my code has some problem. Thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Wik,
I also want to detect some joints of a person. But the java library libpxcclr.java they provided doesn't have any member function EnablePersonTracking()for PXCMSenseManager class.
Can you please provide your library file to me?
Thanks,
-MohanG
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page