1. An image processing apparatus comprising a processing unit, wherein the processing unit executes: a projection conversion coefficient acquisition process that acquires projection conversion coefficients that are coefficients for doing projection conversion on an image, the number of such coefficients being the same as the number of a plurality of reference points at differing positions in the image; a post-projection-conversion image acquisition process that does projection conversion on the image through the respective projection conversion coefficients of the same number as the number of the plurality of reference points, acquired by the projection conversion coefficient acquisition process, and acquires the same number of post-projection-conversion images from the image as the number of reference points; a weighted average process that finds a weighted average of the plurality of post-projection-conversion images using a plurality of weightings determined in accordance with distances from the plurality of reference points in the image; and a weighted average image acquisition process that acquires a weighted average image in which a weighted average of the plurality of post-projection-conversion images was made by the weighted average process.