An image generation device configured to generate a virtual defective-product image in which a virtual foreign-matter image representing a virtual foreign matter is synthesized with a non-defective-product image based on an electromagnetic wave transmitted through an article to be inspected containing no actual foreign matter, the image generation device comprising: an image acquiring unit configured to acquire a set of a first non-defective-product image and a second non-defective-product image for the same article to be inspected, the first non-defective-product image being the non-defective-product image based on an electromagnetic wave in a first energy band, the second non-defective-product image being the non-defective-product image based on an electromagnetic wave in a second energy band different from the first energy band; a first processing unit configured to change a pixel value of a first target pixel that is at least one pixel forming the first non-defective-product image, and thereby generate a first virtual defective-product image that is the virtual defective-product image; and a second processing unit configured to change a pixel value of a second target pixel that corresponds to the first target pixel and is at least one pixel forming the second non-defective-product image, and thereby generate a second virtual defective-product image that is the virtual defective-product image, wherein the first processing unit is further configured to change the pixel value of the first target pixel by first processing based on an absorptivity of the actual foreign matter for each electromagnetic wave, and the second processing unit is further configured to change the pixel value of the second target pixel by second processing, which is processing different from the first processing, based on the absorptivity; characterized in that the first processing unit and second processing unit are further configured to: if the actual foreign matter having an absorptivity higher than that of the article to be inspected is to be virtually synthesized, decrease the pixel value of a pixel corresponding to the shape of a virtual foreign matter to be synthesized with the first non-defective-product image and the second non-defective-product image, respectively; and if the actual foreign matter having an absorptivity lower than that of the article to be inspected is to be virtually synthesized, increase the pixel value of a pixel corresponding to the shape of the virtual foreign matter to be synthesized with the first non-defective-product image and the second non-defective-product image, respectively. an image acquiring unit configured to acquire a set of a first non-defective-product image and a second non-defective-product image for the same article to be inspected, the first non-defective-product image being the non-defective-product image based on an electromagnetic wave in a first energy band, the second non-defective-product image being the non-defective-product image based on an electromagnetic wave in a second energy band different from the first energy band; a first processing unit configured to change a pixel value of a first target pixel that is at least one pixel forming the first non-defective-product image, and thereby generate a first virtual defective-product image that is the virtual defective-product image; and a second processing unit configured to change a pixel value of a second target pixel that corresponds to the first target pixel and is at least one pixel forming the second non-defective-product image, and thereby generate a second virtual defective-product image that is the virtual defective-product image, wherein the first processing unit is further configured to change the pixel value of the first target pixel by first processing based on an absorptivity of the actual foreign matter for each electromagnetic wave, and the second processing unit is further configured to change the pixel value of the second target pixel by second processing, which is processing different from the first processing, based on the absorptivity; characterized in that the first processing unit and second processing unit are further configured to: if the actual foreign matter having an absorptivity higher than that of the article to be inspected is to be virtually synthesized, decrease the pixel value of a pixel corresponding to the shape of a virtual foreign matter to be synthesized with the first non-defective-product image and the second non-defective-product image, respectively; and if the actual foreign matter having an absorptivity lower than that of the article to be inspected is to be virtually synthesized, increase the pixel value of a pixel corresponding to the shape of the virtual foreign matter to be synthesized with the first non-defective-product image and the second non-defective-product image, respectively. if the actual foreign matter having an absorptivity higher than that of the article to be inspected is to be virtually synthesized, decrease the pixel value of a pixel corresponding to the shape of a virtual foreign matter to be synthesized with the first non-defective-product image and the second non-defective-product image, respectively; and if the actual foreign matter having an absorptivity lower than that of the article to be inspected is to be virtually synthesized, increase the pixel value of a pixel corresponding to the shape of the virtual foreign matter to be synthesized with the first non-defective-product image and the second non-defective-product image, respectively.