A sixth aspect of the present invention is the image processing apparatus according to the fourth or fifth aspect, wherein the weighted area determining device divides the area other than the area of the principal object into a plurality of weighted areas according to a distance from a center of the principal object.