But with a high res sensor, even flex in the PCB will invalidate the calibration. Only takes a few microns for a pixel to be in the wrong place.
And these days, you can get an LLM to stitch those functions together
but if you want to calibrate, try printing out a board https://calib.io/pages/camera-calibration-pattern-generator