Items with no label
3335 Discussions

CreateActiveConfiguration();  doesn't work.

mniiz1
Beginner
1,313 Views

Hello all.

・camera :SR-300

・language : C#

・SDK :R3

I'm just getting started with my first RealSense project with SR-300 + C# and I'm trying to make simple program of hand detection.

Everytime I try to get a hand configration parameter by calling "CreateActiveConfiguration();" ,

however, null is returned as a result. the expected result is the HandConfiguration instance

I'm developing a C# project and The code is as shown below.

this error occuerd the point of ★★.

================================================================

================================================================

// initialize hand detection

private void InitializeHandTracking()

{

// getting hand detector

handAnalyzer = senseManager.QueryHand();

if ( handAnalyzer == null ) {

throw new Exception( "fail" );

}

// creating data of hand

handData = handAnalyzer.CreateOutput();

if ( handData == null ) {

throw new Exception( "fail" );

}

// setting a property if the camera is RealSense

var device = senseManager.QueryCaptureManager().QueryDevice();

PXCMCapture.DeviceInfo dinfo;

device.QueryDeviceInfo( out dinfo );

if ( dinfo.model == PXCMCapture.DeviceModel.DEVICE_MODEL_SR300 ) {

device.SetDepthConfidenceThreshold( 1 );

device.SetIVCAMFilterOption( 6 );

}

// ★★setting hand detection configrarion★★

var config = handAnalyzer.CreateActiveConfiguration();

config.EnableSegmentationImage( true );

config.ApplyChanges();

config.Update();

}

================================================================

================================================================

Does anyone have a suggestion what I'm doing wrong?

Thanks a lot

0 Kudos
7 Replies
MartyG
Honored Contributor III
214 Views

In the '2016 R3' SDK, the SDK was split into a range of different modules instead of everything being in a singe SDK package like it was in the previous '2016 R2' SDK. To get hand tracking functionality in R3, there are two stages:

1. Install the 'Essentials' core module.

2. Install the optional 'Full Hand Tracking and Gesture Recognition' module from the SDK download page.

https://software.intel.com/en-us/realsense-sdk-windows-eol Intel® RealSense™ SDK for Windows (Discontinued) | Intel® Software

May I ask please if you have installed the optional hand tracking module once the Essentials module was installed?

0 Kudos
mniiz1
Beginner
214 Views

Thank you for your reply.

Yes, I already installed "https://registrationcenter.intel.com/en/forms/?productid=2801 Full Hand Tracking and Gesture Recognition ", and "'Essentials' core module" .

Do I need other setting??

Thanks!

0 Kudos
MartyG
Honored Contributor III
214 Views

Based on analysis of other C# hand tracking scripts, it seems that the problem may be with defining the config variable as a var type of variable. A more common structure is to define it as a PXCMHandConfiguration type instead. For example:

PXCMHandConfiguration config = handAnalyzer.CreateActiveConfiguration();

0 Kudos
mniiz1
Beginner
214 Views

Thank you for your quick help.

I tried to replace variable type to PXCMHandConfiguration from var.

but no change.

is there any thing can I do?

0 Kudos
MartyG
Honored Contributor III
214 Views

A RealSense script in the old R2 and R3 SDKs should have this instruction at the very end of it.

sm.ReleaseFrame();

0 Kudos
mniiz1
Beginner
214 Views

Ah, yes I already put "ReleaseFrame()"

but no change

Thank you for your help.

0 Kudos
idata
Employee
214 Views

Hello realsenseUser001,

Thanks for your interest in the Intel® RealSense Technology.

The PXCMHandConfiguration type is from SDK R2 as seen here:

https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?doc_hand_initializing_and_configuring.html.

If you are using R3 of the SDK, then you should use HandConfiguration as described here:

https://software.intel.com/sites/landingpage/realsense/camera-sdk/v2016r3/documentation/html/index.html?doc_hand_initializing_and_configuring.html.

Refer to the hands viewer sample at C:\Program Files (x86)\Intel\RSSDK\sample\hand\HandsViewer.cs, for more information.

We hope you find this information helpful. If you need further assistance please do not hesitate to contact us again.

Best regards,

Josh B.

Intel Customer Support

0 Kudos
Reply