1. An image processing apparatus forming a composite image from two photographed images, the image processing apparatus comprising: an image/depth acquiring section that acquires corresponding pixel pairs between the two images, and depth information and a matching score of every corresponding pixel pair; a weight information calculating section that determines weights for individual pixels in a predetermined region including a corresponding pixel pair as a pixel of interest on the basis of the depth information and the matching score of every corresponding pixel pair; and a pixel-value superimposing section that applies the weight to every corresponding pixel pair in the predetermined region for smoothing, replaces the pixel value of the pixel of interest in the predetermined region with the value determined through the smoothing, and superimposes the two images for every pixel, in at least one of the two images.