This application discloses a calibration method and apparatus for X-
ray inspection equipment based on navigation and attitude mapping, relating to the field of industrial X-
ray nondestructive testing technology. The method includes: determining the actual observation area of the current detection position based on the optimal offset values of the X-
ray source and
detector, and the z-direction positions of the X-ray source and
detector, and the x and y-direction translations of the detection position in the real-time
pose vector, combined with the effective width of the
detector (number of pixels) and the physical size of the pixels, and setting the current real-time
pose vector as the calibration
pose vector. Based on the projection relationship between the table coordinates and image coordinates, the image coordinates of the prediction point and
verification point, as well as the corresponding table coordinates, are acquired; the included angle deviation,
aspect ratio deviation, and affine inspection residual are calculated based on the acquired coordinates, and compared with corresponding thresholds to determine the
distortion situation and select a mapping model; a bidirectional mapping relationship is determined based on the mapping model, and the mapping relationship under rotation, translation, or tilt is corrected according to the real-time pose vector and the calibration pose vector.