An X-ray image processing method, including obtaining a first X-ray image of an object including a plurality of materials including a first material and a second material; obtaining a first partial image generated by imaging the first material and a second partial image generated by imaging the first material overlapping the second material from the first X-ray image; obtaining first information related to a stereoscopic structure of the first material, based on the first partial image included in the first X-ray image; and obtaining second information about the second material based on the first information and the second partial image.