3D position and attitude can be estimated in a short calculation time based on 2D projection image of an object such as an artificial joint bone or a living tissue bone when a part of the contour of the object in the 2D projection image cannot be discriminated due to a deficient part of the contour or noise. An X-ray image processing method of estimating position and attitude of a measuring object by comparing the measuring object on an X-ray projection image with a parent database storing data of a plurality of candidate objects is provided. The 3D shape of the candidate object is known, and the parent database stores an element-contour group of a plurality of candidate objects projected on 2D plane from various angles. An element-contour corresponding to the contour of said measuring object and a candidate object corresponding to the measuring object are estimated by comparing coefficient of open curve Fourier descriptors of contour of the measuring object with coefficient of open curve Fourier descriptors of each element-contour of the element-contour group, and position and attitude of the measuring object are calculated based on the element-contour corresponding to the contour of the measuring object and the candidate object corresponding to the measuring object.