5 Replies Latest reply on Jan 25, 2017 12:37 AM by sheom

    SR300 / C++ - face scanning config returns pxcStatus::STATUS_FEATURE_UNSUPPORTED (?)

    tyhenry

      I'm using SDK 2016 R2, and trying to get the 3D scanning functionality working for a face scan using the SR300.

       

      I was under the impression that the SR300 supported 3D face scanning??  In fact, that's a major part of the reason we've purchased it.

      And I've tested the face scanning sample from https://github.com/GameTechDev/FaceMapping2 (using SDK 2016 R1) which works fine with my SR300...

       

      here's the relevant function (with section where I get STATUS_FEATURE_UNSUPPORTED in bold):

       

      bool RSScanner::enable(PXCSenseManager* smPtr) {

       

        mSenseMgr = smPtr;

        if (smPtr == NULL) return false;

       

        pxcStatus status;

        status = mSenseMgr->Enable3DScan();

        if (status < 0) // error

        {

        ofLogError("RSScanner") << "unable to initialize 3D scanning module, error status: " << status;

        return false;

        }

       

        mScanner = mSenseMgr->Query3DScan();

        if (mScanner == NULL) return false;

       

        // config scan parameters

        PXC3DScan::Configuration config;

       

        config.startScan = false;

        config.mode = PXC3DScan::ScanningMode::FACE;

        config.options = PXC3DScan::ReconstructionOption::TEXTURE; // generate texture jpg and UV map (as opposed to vertex colors)

        config.options = config.options | PXC3DScan::ReconstructionOption::LANDMARKS; // add landmarks data to model

        config.maxTriangles = 0; // 0 == no limit

        config.flopPreviewImage = false; // maybe make true? test it out

       

        status = mScanner->SetConfiguration(config);

        if (status < 0)

        {

        ofLogError("RSScanner") << "unable to set scan configuration, error status: " << status; /* THIS IS WHERE I GET ERROR CODE -1 == STATUS_FEATURE_UNSUPPORTED   */

        return false;

        }

       

        // mScanner->Subscribe(&mAlertHandler); // add this later for alert callback

        return true;

      }