Distribution data is generated by a distribution data generation portion 1802, a second range is specified by a specifying portion 1803, the second range is mapped to a first range by a mapping portion 1804, and third image data is generated by performing binarization based on a threshold value regulated in the first range r1 by components 1805 to 1812, accordingly, binarization can be suitably performed even in the case where distribution data d1 of pixel values differs for each subject h. (Fig. 3)