Doped elements in alloys significantly impact their performance.Conventional methods usually sputter the surface material of the sample,or their performance is limited to the surface of alloys owing to their poor pene-tration ability.The X-ray K-edge subtraction (KES)method exhibits great potential for the nondestructive in situ detection of element contents in alloys.However,the signal of doped elements usually deteriorates because of the strong absorption of the principal component and scattering of crystal grains.This in turn prevents the extensive application of X-ray KES imaging to alloys.In this study,methods were developed to calibrate the lin-earity between the grayscale of the KES image and element content.The methods were aimed at the sensitive analysis of elements in alloys.Furthermore,experiments with phantoms and alloys demonstrated that,after elaborate calibration,X-ray KES imaging is capable of nondestruc-tive and sensitive analysis of doped elements in alloys.