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 obtained by transmitting x-rays through the article containing the foreign matter, or a synthesized transmission image generated by virtually synthesizing, on a conforming-article transmission image, a foreign-matter transmission image (PF, PF1) that is obtained by transmitting x-rays through the foreign matter, the conforming-article transmission image 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 obtained by transmitting x-rays through the article containing the foreign matter, or a synthesized transmission image generated by virtually synthesizing, on a conforming-article transmission image, a foreign-matter transmission image (PF, PF1) that is obtained by transmitting x-rays through the foreign matter, the conforming-article transmission image being an ray transmission image of the article containing no foreign matter; a transmission image obtained by transmitting x-rays through the article containing the foreign matter, or a synthesized transmission image generated by virtually synthesizing, on a conforming-article transmission image, a foreign-matter transmission image (PF, PF1) that is obtained by transmitting x-rays through the foreign matter, the conforming-article transmission image 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.