Items with no label
3335 Discussions

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

MJala
Novice
1,138 Views

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;

 

}
0 Kudos
1 Solution
idata
Employee
237 Views

Hello MonaJalal,

 

 

Thanks for reaching out!

 

 

As you may know, the SR300 and the PMD cameras use different hardware and a different SDK, therefore, it is to be expected that functions that are on the PMD SDK are not present on the RealSense SDK and vice versa.

 

 

That being said, it is also important to mention that it doesn't mean that one can't do something the other one can but the way to do it may be different. For example, for pmdGet3DCoordinates, I'd suggest you to read this section https://software.intel.com/sites/landingpage/realsense/camera-sdk/v2016r3/documentation/html/index.html?doc_essential_coordinate_systems.html of the R3 documentation, it explains how to map coordinates including depth coordinates which could be the equivalent of the PMD function.

 

 

I suggest you to read the SDK R3 documentation so you can learn more about RealSense's capabilities and so you can find the appropriate way to complete your project. The documentation can be found at https://software.intel.com/sites/landingpage/realsense/camera-sdk/v2016r3/documentation/html/index.html.

 

 

I hope this information helps you,

 

Pedro M.

View solution in original post

0 Kudos
1 Reply
idata
Employee
238 Views

Hello MonaJalal,

 

 

Thanks for reaching out!

 

 

As you may know, the SR300 and the PMD cameras use different hardware and a different SDK, therefore, it is to be expected that functions that are on the PMD SDK are not present on the RealSense SDK and vice versa.

 

 

That being said, it is also important to mention that it doesn't mean that one can't do something the other one can but the way to do it may be different. For example, for pmdGet3DCoordinates, I'd suggest you to read this section https://software.intel.com/sites/landingpage/realsense/camera-sdk/v2016r3/documentation/html/index.html?doc_essential_coordinate_systems.html of the R3 documentation, it explains how to map coordinates including depth coordinates which could be the equivalent of the PMD function.

 

 

I suggest you to read the SDK R3 documentation so you can learn more about RealSense's capabilities and so you can find the appropriate way to complete your project. The documentation can be found at https://software.intel.com/sites/landingpage/realsense/camera-sdk/v2016r3/documentation/html/index.html.

 

 

I hope this information helps you,

 

Pedro M.
0 Kudos
Reply