TODO: complete the "convertToDepthImage" implementation.