An inspection apparatus that is configured to perform image processing using an image processing algorithm selected in advance out of a plurality of image processing algorithms on a transmission image obtained by transmitting x-rays through an article, and is configured to inspect presence of a foreign matter contained in the article based on an image processing result, the inspection apparatus comprising: a storage unit configured to store the image processing algorithms, the image processing algorithms being algorithms for which a plurality of image processing filters are combined; an acquisition unit configured to acquire, as a reference transmission image, a transmission image (P11) obtained by transmitting x-rays through the article containing the foreign matter, or a synthesized transmission image (P13) generated by virtually synthesizing, on a conforming-article transmission image (PA1), a foreign-matter transmission image (PF, PF1) that is obtained by transmitting x-rays through the foreign matter, the conforming-article transmission image (PA1) being an ray transmission image of the article containing no foreign matter; an evaluation unit configured to evaluate detection accuracy of the foreign matter for each of the image processing algorithms based on evaluation images obtained by processing the reference transmission image with the image processing algorithms stored in the storage unit; and a setting unit configured to set at least one of the image processing algorithms as the image processing algorithm selected in advance based on evaluation in the evaluation unit. a storage unit configured to store the image processing algorithms, the image processing algorithms being algorithms for which a plurality of image processing filters are combined; an acquisition unit configured to acquire, as a reference transmission image, a transmission image (P11) obtained by transmitting x-rays through the article containing the foreign matter, or a synthesized transmission image (P13) generated by virtually synthesizing, on a conforming-article transmission image (PA1), a foreign-matter transmission image (PF, PF1) that is obtained by transmitting x-rays through the foreign matter, the conforming-article transmission image (PA1) being an ray transmission image of the article containing no foreign matter; a transmission image (P11) obtained by transmitting x-rays through the article containing the foreign matter, or a synthesized transmission image (P13) generated by virtually synthesizing, on a conforming-article transmission image (PA1), a foreign-matter transmission image (PF, PF1) that is obtained by transmitting x-rays through the foreign matter, the conforming-article transmission image (PA1) being an ray transmission image of the article containing no foreign matter; an evaluation unit configured to evaluate detection accuracy of the foreign matter for each of the image processing algorithms based on evaluation images obtained by processing the reference transmission image with the image processing algorithms stored in the storage unit; and a setting unit configured to set at least one of the image processing algorithms as the image processing algorithm selected in advance based on evaluation in the evaluation unit. <EOS>