8 Replies Latest reply on Mar 7, 2017 7:04 AM by MartyG

    QueryPersonTracking() returns null every time I call it

    YanivSheffer

      Hi all,

       

      I'm new here and searched for an answer to my problem I'm having and didn't found, hopefully somebody can help me with it.

      I'm trying to connect my RS200 RealSense cam to preform person tracking.

      I followed the API guide but every time I try to initiate an instance of PXCMPersonTrackingModule using QueryPersonTracking() function I get a null value.

      I'm using Intel.RealSense version 11.0 and using the 32bit .dll versions.

       

      Here is my code snippet:

      ...

      ...

      ...

           // Create the SenseManager instance

           PXCMSenseManager sm = PXCMSenseManager.CreateInstance();

       

       

           // Enable person tracking

           sm.EnablePersonTracking();

       

       

           // Get a module instance here (or inside the AcquireFrame/ReleaseFrame loop) for configuration

           PXCMPersonTrackingModule ptm = sm.QueryPersonTracking();

       

       

           // ptm is a PXCMPersonTrackingModule instance

           PXCMPersonTrackingConfiguration ptc = ptm.QueryConfiguration();

      ...

      ...

      ...

       

      ptm is null after the  QueryConfiguration() func every time I ran it.

      I read that this may happen if the module is busy.

       

      How can I tell if it's busy?

      Can I do anything else to set it to maybe an idle state and then call the QueryConfiguration() function?