PROBLEM TO BE SOLVED: To provide an X-ray machine which can correct a density level difference in a background region of a portion other than a subject.SOLUTION: A density correction part 51D can correct a density level difference in a background region of a portion other than a subject by performing density correction in a subject region on the basis of a parameter (density correction coefficient &alpha) on a pixel value in the subject region, and performing density correction in a background region on the basis of a parameter (background density correction coefficient &bgr) on a pixel value in the background region. Moreover, in a case in which there is a shade difference between right and left due to grid irregularities, the density correction part 51D interpolates the parameter (background density correction coefficient &bgr) on the pixel value in the background region by dividing an X-ray image, thereby erasing the density level difference.