Hello FabianN,
I'm not sure that there is an efficient way to do that.
What comes to my mind is a slow approach, which would send the ray through each pixel of the image and camera center, intersect it with the surface, get the altitude value of the intersection point and put it to the newly created single band floating point raster of the same resolution as the original image.