A three-dimensional size of a foreign material is estimated. An image processing device has: a storage part for storing a first pixel value corresponding to each of the plurality of pixels; a pixel value calculating part for calculating a second pixel value of each pixel, which is a ratio with respect to a background value of a difference between each first pixel value and a background value in each pixel; and a pixel value integration part for integrating each second pixel value of a pixel group belonging to a specific continuous area.
展开▼