Software Archive
Read-only legacy content
17061 Discussions

Fingerdata Foldness

Debabrata_B_
Beginner
1,011 Views

 

Hello,

I am newbie to Realsense . I just have started writing application one week back. I wanted to track the foldness of my index finger by a small program(as pasted below) . But unfortunately I am always getting zero.  As I as seen in definition of foldness it should range from 0 to 100. What I am missing here? Can anybody help please.

Regards,

Debabrata

void CFaceProcessor::processHand()
{
    PXCSenseManager  *psm = getSenseManager();
    psm->EnableStream(PXCCapture::STREAM_TYPE_DEPTH, 640, 480, 30);
    psm->EnableHand();
    PXCHandModule *handAnalyzer = NULL;
    while (!(handAnalyzer = psm->QueryHand())){
        std::cout << "wating...\n";
        Sleep(1);
    }
    if (psm->Init() < PXC_STATUS_NO_ERROR) {
        return;
    }
    PXCHandData* outputData = handAnalyzer->CreateOutput();
    PXCHandConfiguration* config = handAnalyzer->CreateActiveConfiguration();
    config->EnableNormalizedJoints(true);
    config->SetTrackingMode(PXCHandData::TRACKING_MODE_EXTREMITIES);
    config->EnableAllGestures();
    config->ApplyChanges();
    config->Update();
    pxcI32 foldnessOld = -1;
    while (psm->AcquireFrame(true) >= PXC_STATUS_NO_ERROR){
        outputData->Update();
        pxcU16 numOfHands = outputData->QueryNumberOfHands();
        PXCHandData::IHand* handData;
        for (int i = 0; i < numOfHands; i++){
            if (outputData->QueryHandData(PXCHandData::AccessOrderType::ACCESS_ORDER_BY_TIME, i, handData) 
                                                                                == PXC_STATUS_NO_ERROR)
            {
                for (int i = 0; i < numOfHands; i++){
                    PXCHandData::FingerData fingerData;
                    if (handData->QueryFingerData(PXCHandData::FingerType::FINGER_INDEX, fingerData) 
                                                                      == PXC_STATUS_NO_ERROR){
                        pxcI32 foldess = fingerData.foldedness;
                        if (foldnessOld != foldess){
                            std::cout << "foldness " << foldess << std::endl; /// Always printing zero 
                            foldnessOld = foldess;
                        }
                    }
                }
            }
        }
        psm->ReleaseFrame();
    }
    psm->Release();
}

0 Kudos
6 Replies
Colleen_C_Intel
Employee
1,011 Views

are you using R2 (v4.0) of the RSSDK?

0 Kudos
Debabrata_B_
Beginner
1,011 Views
I dont know how exactly it should be checked but in the directory C:\Program Files (x86)\Intel\RSSDK\runtime I can notice the binary installed is intel_rs_sdk_runtime_3.1.085181.exe . This binary I downloaded from this Intel site. If it is not the correct version then please let me know the link from where i can download the correct version. Debabrata
0 Kudos
Colleen_C_Intel
Employee
1,011 Views

https://software.intel.com/en-us/intel-realsense-sdk  has the 4.0 version. 

Did you download 3.1 recently?  or just didn't update with the new software available for just over a month now?

0 Kudos
Debabrata_B_
Beginner
1,011 Views

Yes! I downloaded very recently( 1 or 2 week(s) ago) . But at that time my System was windows 7 with core i3 processor. Looking at RealSense requirement , I Upgraded my system to windows 8 and core i5 one week back and used the same installer binary .

 
And Thanks a lot for you quick support. 
 
Regards,
Debabrata
0 Kudos
Debabrata_B_
Beginner
1,011 Views

Hello.

I updated with the new RealSense 4 as you have said. But unfortunately the result is same. Also 

outputData->QueryFiredGesturesNumber();  is returning zero for any gesture like indexfinger,thunb etc etc. Can you help me  by pointing out what I am doing wrong? 

0 Kudos
Colleen_C_Intel
Employee
1,011 Views

The extremeties are indeed edge points of the hand.  You can read about the extremity points at : https://software.intel.com/sites/landingpage/realsense/camera-sdk/2014gold/documentation/html/index.html?extremitytype_pxchanddata.html

and you can see the other options (and the comparative speeds) including finger and hand openness @
https://software.intel.com/sites/landingpage/realsense/camera-sdk/2014gold/documentation/html/manuals_hand_tracking.html

0 Kudos
Reply