This invention provides an
image processing apparatus capable of suppressing the variation in density and contrast of a long-length image that is a joint image obtained by joining a plurality of X-
ray images. An
image processing apparatus (6) comprises: an image memory (62) for storing the data of a plurality of X-
ray images (20, 21, 22) partially overlapping with one another; a density / contrast correcting unit (64) for
evening up the densities and contrasts of the plurality of X-
ray images; and a long-length image obtaining unit (65) for joining all of the X-ray images (20, 21', 22") as evened up in density and contrast by the density / contrast correcting unit (64), thereby obtaining a long-length X-ray image corresponding to a long-length image-captured area of an examined body (M). The density / contrast correcting unit (64) comprises: a first table creating unit (642) for obtaining, based on image information of the overlapping portions (20a, 21a, 21b, 22a) of two adjacent ones (20, 21; or 21, 22) of the plurality of X-ray images, a gray scale conversion table (AB, BC) with which the densities and contrasts of the two X-ray images (20, 21; or 21, 22) can be evened up; a second table creating unit (643) for obtaining, based on the gray scale conversion table (AB, BC), a second gray scale conversion table (BA, CB) with which the densities and contrasts of a reference X-ray image (20) and other remaining X-ray images (21, 22) selected from the plurality of X-ray images (20-22) can be evened up; and an
evening unit (644) for
evening up the densities and contrasts of the remaining X-ray images (21, 22) on basis of the second gray scale conversion table (BA, CB).