1. An image processing apparatus comprising: a processor that executes a process including: dividing an image of a subject into a plurality of blocks; measuring a distance from a reference position to the subject corresponding to each of the blocks; setting a weight of each of the blocks according to the distance; correcting information about a size of the subject that is projected in each of the blocks based on the weight; and calculating a statistical amount of the subject based on the corrected information about the size of the subject.