1. An image processing apparatus comprising: an inputting unit constructed to input a plurality of pieces of image data obtained by capturing a same object from a plurality of different viewpoints; an aligning unit constructed to perform aligning processing of a plurality of images represented by the plurality of pieces of image data; an average image generating unit constructed to generate average image data representing an average image formed by pixels whose pixel values are obtained by averaging pixel values of pixels which are included in the plurality of images and aligned successfully by the aligning unit; a noise obtaining unit constructed to obtain noise data which represents noise of at least one of the plurality of images by using pixel values of successfully aligned pixels of an image included in the images used for generating the average image and pixels values of pixels in the average image; and a noise reducing unit constructed to reduce a noise of at least one of the plurality of images by using the noise data.