You can use a calibration grid or fiducial markers with known dimensions. This target helps the system recognize reference points for alignment. You can place the target on the machine's work area where components are typically placed. It should be flat and securely positioned to avoid movement during calibration. Use the machine's software to capture images of the calibration target. Ensure the entire target is within the camera's field of view and in focus.
If by 'calibrate' you mean find optimum focus, one method is to image fine stripes or checkerboard and adjust the lens for maximum HF output. Blurring will remove fine edges so HF output will fall. You would have to either know what a good output was or adjust past the peak and back off slightly.