antithing wrote

Hi... I need to do a similar thing, I have a vector of 2d pixel coordinates, and am trying to get the 3d coordinates for those pixels of the depth map. Did you have any luck solving this? Thanks!

I'm not sure if PCL exposes this conversion directly, but the equations are pretty simple given the camera calibration values (Cx, Cy, Fx, Fy):

inverse_focal_length = 1.f / Fx; // Fx ~= Fy
pt.z = depth_map[depth_idx] * 0.001f; // mm to meter conversion
pt.x = (pixel.x - Cx) * pt.z * inverse_focal_length;
pt.y = (pixel.y - Cy) * pt.z * inverse_focal_length;

Referenced code.

It gets more complicated if you need to account for lens distortion.