A risk of occurrence of detecting leakage of a foreign material is reduced. An image processing device (4) which performs an image processing on an image generated by X-rays transmitted through an inspection object (1) including the foreign material (13) has: a storage part (41) for storing a first pixel value corresponding to each of a plurality of pixels constituting the image; a pixel value calculation part (42) for calculating a second pixel value obtained on the basis of the first pixel value corresponding to each of the plurality of pixels; and a pixel value integration part (44) for integrating each second pixel value of a pixel group belonging to a specific continuous region.
展开▼