3 Replies Latest reply on Apr 6, 2017 9:13 AM by Intel Corporation

    Why do I get different depth images from the SDK and IVCAM?


      I tried to get depth image by using VS2012 and the SDK. I found that, the depth images is different between using SDK and IVCAM. How can I get the IVCAM like depth image with the SDK?  Actually I want to calculate out the point cloud without using "Queryvertices" function, this should be based on the depth image which can reflect the real depth information.

      In addition, how can I get the intrinsic matrix of a sr300 camera?many thanks.

      from the SDK,the camera is facing to a wall

      from IVCAM


      and how can I modify the code?


      #include "stdafx.h"

      #include <windows.h>

      #include <wchar.h>

      #include "pxcsensemanager.h"

      #include "util_render.h"  //SDK provided utility class used for rendering (packaged in libpxcutils.lib)


      void QueryFilterDevice(PXCCaptureManager *filterbydeviceinfo, int n)


          PXCSession::ImplDesc desc1 = {};

          desc1.group = PXCSession::IMPL_GROUP_SENSOR;

          desc1.subgroup = PXCSession::IMPL_SUBGROUP_VIDEO_CAPTURE;


          PXCSession *session = PXCSession::CreateInstance();

          PXCSession::ImplDesc desc2;

          session->QueryImpl(&desc1, 0, &desc2)<PXC_STATUS_NO_ERROR;

          wprintf_s(L"Module[%d]: %s\n", 0, desc2.friendlyName);


          PXCCapture *capture = 0;

          session->CreateImpl<PXCCapture>(&desc2, &capture);


          PXCCapture::DeviceInfo dinfo;

          capture->QueryDeviceInfo(n, &dinfo);





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


          // initialize the util render 

      //   UtilRender renderColor(L"Color");

          UtilRender renderDepth(L"Depth");


          // create the PXCSenseManager

          PXCSenseManager *psm = PXCSenseManager::CreateInstance();

          if (!psm) {

              wprintf_s(L"Unable to create the PXCSenseManager\n");

              return 1;



          PXCCaptureManager *cm = psm->QueryCaptureManager();



          // select the color stream of size 640x480 and depth stream of size 320x240

      //    psm->EnableStream(PXCCapture::STREAM_TYPE_COLOR, 640, 480);

          psm->EnableStream(PXCCapture::STREAM_TYPE_DEPTH, 640, 480,60);


          // initialize the PXCSenseManager

          if (psm->Init() != PXC_STATUS_NO_ERROR) return 2;


          PXCImage  *depthIm;//*colorIm,;

          for (int i = 0; /*i<MAX_FRAMES*/; i++) {


              // This function blocks until all streams are ready (depth and color)

              // if false streams will be unaligned

              if (psm->AcquireFrame(true)<PXC_STATUS_NO_ERROR) break;


              // retrieve all available image samples

              PXCCapture::Sample *sample = psm->QuerySample();


              // retrieve the image or frame by type from the sample

      //        colorIm = sample->color;

              depthIm = sample->depth;


              // render the frame

      //       renderColor.RenderFrame(colorIm);



              // release or unlock the current frame to fetch the next frame




          // close the last opened streams and release any session and processing module instances



          return 0;