An image processing device (1, 22, 23) that executes an image processing on an original image incorporating a metal piece obtained by the radiation imaging of a subject having an implanted metal piece inside comprises: a binarization means that generates a binarization image (P2a) incorporating a rough metal piece incorporated into said original image by binarization of said original image based on a threshold value; an inversion means that generates an inversion-binarization image (P2b) incorporating a rough image of regions other than the metal piece incorporated into said original image by executing the inversion processing relative to said binarization image, (P2a), an edge extraction processing means that generates an edge extraction image, wherein the boundary indicating the position near the center of the intermediate region between the region exposed more to radiation and the region exposed less thereto relative to said original image is extracted by the edge extraction processing on said original image; an image synthesis means that generates a first synthetic image (P4a), wherein an image on said binarization image (P2a) is divided near the center region of said intermediate region by superimposing said binarization image (P2a) and said edge extraction image, and generates a second synthetic image (P4b), wherein an image on said inversion-binarization image (P2b) is divided near the center region of said intermediate region by superimposing said inversion-binarization image (P2b) and said edge extraction image; a profile trimming means that generates a profile trimming metal map (P5a), wherein said intermediate region is trimmed from the image on the first synthetic image (P4a) by trimming the image along the profile of the image on the first synthetic image (P4a), using a predetermined width for the intermediate region, and generates a profile trimming non-metal map (P5b), wherein said intermediate region is trimmed from the image of the second synthetic image (P4b) by trimming the profile of the image on the second synthetic image (P4b); and a graph cut means that generates an extraction image, wherein the image of the metal piece incorporated into said original image is extracted by executing a graph cut processing that assigns pixels belonging to the intermediate region to either the metal piece or the non-metal region based on the profile trimming metal map (P5a), the profile trimming non-metal map (P5b) and a filter processing image generated by trimming the noise on the original image. a binarization means that generates a binarization image (P2a) incorporating a rough metal piece incorporated into said original image by binarization of said original image based on a threshold value; an inversion means that generates an inversion-binarization image (P2b) incorporating a rough image of regions other than the metal piece incorporated into said original image by executing the inversion processing relative to said binarization image, (P2a), an edge extraction processing means that generates an edge extraction image, wherein the boundary indicating the position near the center of the intermediate region between the region exposed more to radiation and the region exposed less thereto relative to said original image is extracted by the edge extraction processing on said original image; an image synthesis means that generates a first synthetic image (P4a), wherein an image on said binarization image (P2a) is divided near the center region of said intermediate region by superimposing said binarization image (P2a) and said edge extraction image, and generates a second synthetic image (P4b), wherein an image on said inversion-binarization image (P2b) is divided near the center region of said intermediate region by superimposing said inversion-binarization image (P2b) and said edge extraction image; a profile trimming means that generates a profile trimming metal map (P5a), wherein said intermediate region is trimmed from the image on the first synthetic image (P4a) by trimming the image along the profile of the image on the first synthetic image (P4a), using a predetermined width for the intermediate region, and generates a profile trimming non-metal map (P5b), wherein said intermediate region is trimmed from the image of the second synthetic image (P4b) by trimming the profile of the image on the second synthetic image (P4b); and a graph cut means that generates an extraction image, wherein the image of the metal piece incorporated into said original image is extracted by executing a graph cut processing that assigns pixels belonging to the intermediate region to either the metal piece or the non-metal region based on the profile trimming metal map (P5a), the profile trimming non-metal map (P5b) and a filter processing image generated by trimming the noise on the original image.