# How do you calculate depth using point cloud information?

Hello,

I am working with an Intel Realsense D435 camera to calculate the depth of an image. However, I am not clear on how to use the pointcloud topic (/camera/depth_registered/points). How do I extract the information and use this in a python code to print out the depth of an object in the image?

I am not understanding exactly what you mean by depth. First i though you wanted a depth image. after reading again seems like you want the depth of the points. If its like that, and supposing you want the depth refeered with the camera front frame, should be as easy as do the module of x,y,z values (for each point) into one? ( sqrt(pow(x,2)+pow(y,2)+pow(z,2))

Your question is little confusing as you have not mentioned what you already have, so I will explain the whole thing here.

Sorry for the confusion. The issue is that I am not entirely sure of how to use "sensor_msg/Image" to retrieve information of the camera to calculate the depth. How do you use this information?

Take a look here