11 Replies Latest reply on Jan 25, 2017 1:19 PM by Intel Corporation

    real time blob tracking with sr300


      dear sir i want to write a simple code  for real time blob tracking of objects . i write one of code from help of intel documentation but they automatically close after run .. please check it for me if there any mistake .thank you so much  













      int wmain(int argc, WCHAR* argv[])


        PXCSenseManager*sm = PXCSenseManager::CreateInstance();

        //enable blob modul


        //get intacne of pxcblobmodule

        //PXCBlobModule*blobmodule = 0;

        PXCBlobModule* blobmodule = sm->QueryBlob();





        PXCBlobConfiguration*blobconfig = blobmodule->CreateActiveConfiguration();




        // Create an output.

        PXCBlobData* blobData = blobmodule->CreateOutput();



        // Streaming

        while (sm->AcquireFrame(true) >= PXC_STATUS_NO_ERROR) {

        // Get extracted blobs

        blobData->Update(); // update to the current blob data

        // Iterate over blobs from right to left

        pxcI32  iBlobsNum = blobData->QueryNumberOfBlobs();



        for (int i = 0; i < iBlobsNum; i++) {

        PXCBlobData::IBlob * pBlob = NULL;

        blobData->QueryBlob(i, PXCBlobData::SEGMENTATION_IMAGE_DEPTH,

        PXCBlobData::ACCESS_ORDER_RIGHT_TO_LEFT, pBlob);

        // handle extracted blob data

        pxcI32 nContours = pBlob->QueryNumberOfContours();




        // Next frame



        // Clean Up


        return 1 ;