Patent attributes
Trimming is automatically performed on an image by inferring a person and a background in which the photographer of the image has interest. Facial images FP1 and FP2 are detected in a whole image P, and the vertical direction of the whole image P is judged based the facial images FP1 and FP2. Further, processing is performed using the information about the vertical direction to discriminate whether the composition of the whole image P is portrait-mode composition or landscape-mode composition. If it is judged that the facial image FP1 is positioned on the lower side of the whole image, and if a composition discrimination unit discriminates that the composition of the whole image P is landscape-mode composition, trimming is automatically performed using a trimming frame TG10 that has portrait-mode composition.