How to read depth_registered image in callback ?
Hello,
I am trying to read depth_registered/image_rect image in my callback function as following
cv_bridge::CvImagePtr cv_ptr;
try
{
cv_ptr = cv_bridge::toCvCopy(msg, enc::TYPE_32FC1);
depthImage = cv_ptr->image.clone();
}
I know the image consists of float values in meter. But what I get is really white-black image.
I need to get the depth of a pixel to find 3D position. Can you help me how to read depth or how to find 3d location from pixel directly ?
Thanks.