A fourth aspect of the present invention is the image processing apparatus according to the first aspect, wherein the weighted area determining device divides a weighted area into an area of the principal object and an area other than the area of the principal object.