6 Replies Latest reply on Apr 4, 2018 1:50 AM by zain_bashir

    Change tracking bounds of SR300

    zain_bashir

      Hi,

       

      I have been trying to change the dimensions of the tracking frustum of the SR300 depth stream in some hand tracking application. When I call call the setTrackingBounds(float a, float b, float c, float d) function with some values it returns error number 105 which means values are out of range.
      When I query for frustum dimensions I always get these values: 0.2, 0.6, 0.106, 0.072.

       

      Could anyone here help me on how to change these dimensions or what is the right range of values? I have tried many values

        • 1. Re: Change tracking bounds of SR300
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hello zain_bashir,

          Thanks for your interest in the Intel® Real Sense Technology.

          For future references, your ticket number is ***********. Please keep this number handy in case you are asked for it.

          We are going to further investigate on your inquiry. 

          We will reply back to you as soon as we have any updates.

          Thank you for your patience and understanding.

          Best regards.
             
          Josh B.
          Intel Customer Support
           

          • 2. Re: Change tracking bounds of SR300
            Intel Corporation
            This message was posted on behalf of Intel Corporation

            Hello zain_bashir,

            We are working on your inquiry and we were to not able to reproduce your issue.
             
            In order to further assist you, we need to know your source code to identify how you are using the function.
             
            -By trying to reproduce your issue we noticed the following:
             
            You need to use config->ApplyChanges(); after setting the tracking bounds.
             
            We used this code in HandsViewer.cpp of SDK R2 and it did not error out:
             
                   In function void SimplePipeline, line 797:
             
            PXCHandConfiguration* config = NULL;
                    pxcF32 nearDis = 100;
                    pxcF32 farDis = 200;
                    pxcF32 nearWidth = 50;
                    pxcF32 nearHeight = 50;
             
            Line 840:
            if(handAnalyzer)
                        {
                            outputData = handAnalyzer->CreateOutput();
                            config = handAnalyzer->CreateActiveConfiguration();    
                            config->EnableNormalizedJoints(showNormalizedSkeleton);
                            config->SetTrackingBounds(nearDis, farDis, nearWidth, nearHeight);
             
            Line 859:
                        config->ApplyChanges();
                        pxcF32 nearDistance = 0;
                        pxcF32 farDistance = 0;
                        pxcF32 widthDistance = 0;
                        pxcF32 heightDistance = 0;
                        config->QueryTrackingBounds(nearDistance, farDistance, widthDistance, heightDistance);
             
            The returned values nearDistance, farDistance, widthDistance, and heightDistance match the values used in the SetTrackingBounds function.
             
            We will be looking forward for your reply.
             
            Best regards,
             
            Josh B.
            Intel Customer Support

            • 3. Re: Change tracking bounds of SR300
              zain_bashir

              Hi,

               

              Thank you for getting back to me.

               

              First of all, I am using the following header files

               

              #include "RealSense/SenseManager.h"

              #include "RealSense/Capture.h"

              #include "RealSense/Image.h"

              #include "RealSense/Session.h"

              #include "RealSense/Hand/HandModule.h"

              #include "RealSense/Hand/HandData.h"

              #include "RealSense/Hand/HandConfiguration.h"

               

              and not pxcsensemanger or pxccapturemanger

               

              Then I am using the code as follows:

               

              In the header file of my class I make the declarations:

               

              SenseManager *sm = 0x0;

              Capture::Device *device  = 0x0;

              CaptureManager *cm = 0x0;

              HandModule *hand = 0x0;

              HandData* handData = 0x0;

              HandConfiguration* handConfig = 0x0;

               

              Then in the cpp file I write:

                                       sm = SenseManager::CreateInstance();

                                       hand = HandModule::Activate(sm);

                   // Create the hand data instance. handData will allow to access hand tracking data.

                      handData = hand->CreateOutput();
                      //Hand configuration instance to enable gesture handling
                      handConfig = hand->CreateActiveConfiguration();   
                      handConfig->SetTrackingMode(TrackingModeType::TRACKING_MODE_FULL_HAND);
                      handConfig->EnableGesture(L"fist");
                      handConfig->EnableGesture(L"spreadfingers");
                      handConfig->SubscribeGesture(this);
                      handConfig->EnableAllAlerts();
                      handConfig->SubscribeAlert(this);
                      handConfig->EnableStabilizer(true);
                      Status sts = handConfig->SetTrackingBounds(100,200,50,50); // I tried using many different values here
                      handConfig->ApplyChanges();

               

               

              Now after executing the above piece of code when I check the status 'sts' it returns error 105 => Values not in Range

              When I query tracking bounds it returns me the same values I wrote in my earlier post.

               

              All the rest seems to be working fine; gestures, alerts and hand data.. Everything else seems to be going fine

              • 4. Re: Change tracking bounds of SR300
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                Hello zain_bashir,
                 
                Thank you for your reply.
                 
                We are going to be working on reviewing the information you shared with us.
                 
                We will reply back to you as soon as we have any updates.
                 
                Thank you for your patience and understanding on this matter.
                 
                Best regards.
                   
                Josh B.
                Intel Customer Support

                 

                • 5. Re: Change tracking bounds of SR300
                  Intel Corporation
                  This message was posted on behalf of Intel Corporation

                  Hello zain_bashir,
                   
                  We were able to reproduce the issue you reported in our lab and it seems to be caused by a bug in the Windows RealSense SDK R3.
                   
                  Unfortunately, this SDK is EOL and is no longer supported so this bug will not be fixed. 
                   
                  We tried it with SDK R2 and we were able to set and query the tracking bounds successfully.
                   
                  We recommend you to switch to the previous SDK if this functionality is essential for your project.
                   
                  I hope you find this information helpful.
                   
                  Please, let us know if further assistance is required or if we can close this case.
                   
                  Thank you for your patience and understanding on this matter.
                   
                  Best regards.
                     
                  Josh B.
                  Intel Customer Support.

                  • 6. Re: Change tracking bounds of SR300
                    zain_bashir

                    Hi,
                    Thank you for letting me know about this bug.

                     

                    I will see if I can manage to change the SDK I am using.

                     

                    If you say that this will not be fixed then yes you can close the case.

                     

                    Thank you again for your response.