7 Replies Latest reply on Mar 14, 2018 12:08 PM by Intel Corporation

    CreateActiveConfiguration();  doesn't work.

    realsenseUser001

      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