1 Reply Latest reply on May 10, 2017 1:45 PM by Intel Corporation

    What are the equivalent of pmdGet3DCoordinates, pmdGetFlags, and pmdGetAmplitudes from the PMD camera in Intel RealSense 3D camera SR300?

    MonaJalal

      I want my code to also support Intel RealSense 3D camera however I couldn't find the related functions in Intel RealSense 3D SDK.

      I want to create a depth map, amplitude map and also have xyzMap of the frames in the video from RealSense 3D.

       

      My end goal is to be able to write the following methods in C++ for Intel RealSense:

       

      /***
      Create xyzMap, zMap, ampMap, and flagMap from sensor input
      ***/
      void PMDCamera::update()
      {
      initilizeImages();

      fillInAmps();
      fillInZCoords();
      // Flags. Helps with denoising.

      unsigned *flags = new unsigned[ampMap.cols*ampMap.rows];
      int res = pmdGetFlags(hnd, flags, numPixels * sizeof(unsigned));
      flagMap.data = (uchar *)flags;

      pmdUpdate(hnd);
      delete(flags);

      }


      /***
      Reads the depth data from the sensor and fills in the matrix
      ***/
      void PMDCamera::fillInZCoords()
      {
      int res = pmdGet3DCoordinates(hnd, dists, 3 * numPixels * sizeof(float)); //store x,y,z coordinates dists (type: float*)
      //float * zCoords = new float[1]; //store z-Coordinates of dists in zCoords
      xyzMap = cv::Mat(xyzMap.size(), xyzMap.type(), dists);
      }

      /***
      Reads the amplitude data from the sensor and fills in the matrix
      ***/
      void PMDCamera::fillInAmps()
      {
      int res = pmdGetAmplitudes(hnd, amps, numPixels * sizeof(float));
      //float * dataPtr = amps;
      ampMap.data = (uchar *)amps;
      }