1. An image processing apparatus comprising: a processor that executes a process including: dividing an image of a subject into a plurality of blocks; acquiring, for each block, a distance to an area on the subject corresponding to the block from a reference position based on a three-dimensional shape data of the subject; calculating, for each block, a weight according to the distance; correcting, for each block, size information of a subject area that is projected in the block based on the weight; and calculating a statistical amount of the subject based on the each size information corrected for each block.