Convert pointcloud 3d point to image pixel
Hello there. I have a rosbag that contains a camera footage topic (sensor_msgs/Image) of a room and a laserscan topic of the same room. I also have a program that converts this laserscan to a pointcloud. What I'm trying to do, is write a program that gets as input a point in the pointcloud (x,y,z values) and finds the pixel coordinates of this point in the camera image (it's more important to me to find the horizontal coordinate though (width pixel) ). The specs of the camera are known, and so are the angle_min, angle_max, angle_increment, range_min, range_max of the laserscan. I'm a bit lost as to how I calculate this. Can anyone help me? Thanks in advance.