The invention relates to a dual-energy X-
ray bone mineral density detection method based on a moving least square
algorithm, which comprises the following steps: acquiring detection data of a motif under high-energy and low-energy X-rays of a
photon counting
detector, and carrying out preprocessing including denoising; the
incident energy of the high-energy X-
ray and the low-energy X-
ray is obtained; calculating to obtain high and low energy attenuation values; performing grid division according to the thickness of the die body; after a weight function of a moving least square
algorithm is determined, dividing an influence domain
radius by taking a target node as a center in each grid, traversing each high-energy and low-energy attenuation value
data point in a
spatial domain, and setting a variable step length in the influence domain; obtaining a final fitting relationship by adopting a least square
algorithm, and obtaining a die body thickness-high and low energy attenuation value fitting curved surface; a
bone mineral density ROI area needing to be measured is determined, the corresponding motif thickness is obtained through calculation, and the product of the motif thickness and the motif density is the
bone mineral density value of the corresponding part. According to the method, the problems of fitting smoothness and localization are solved.