> For example, this is how they calibrate the camera on the robotic arm of the Mars rover.
I'm pretty confident that all cameras used in space exploration missions have been thoroughly characterized on Earth labs before launch.
For example here is paper describing the calibration activities for Curiosity rover: https://agupubs.onlinelibrary.wiley.com/doi/10.1002/2016EA00...