3 Replies Latest reply on Apr 18, 2017 2:28 PM by Intel Corporation

    Conflict in sample RF_ScenePerception while using QueryVertices()


      There came the read access conflict when I tried to use projection->QueryVertices() to get vertices from depth data in sample RF_ScenePerception(C++ R200).

      Part of code(bold font added by myself):


      void ScenePerceptionApp::Process()


        while (!m_bTerminateProcessing)


        PXCCapture::Sample *pSample = NULL;

        float cameraPose[12] = { 0 };

        if (!m_pScenePerceptionController->ProcessNextFrame(pSample, cameraPose, m_trackingAccuracy, m_fCurrentSceneQuality))


        m_processingCallQuit = true;





        PXCProjection *projection = m_pScenePerceptionController->QueryProjection();

        PXCPoint3DF32 *vertices = new PXCPoint3DF32[m_iDepthWidth * m_iDepthHeight];

        projection->QueryVertices(pSample->depth, vertices);






      It seems that QueryProjection() returned a null pointer while there is another *projection being used? What is the correct way to get vertices in this C++ sample?