1. An image processing apparatus comprising: a determination unit configured to determine, based on color filter array information of an image capturing device, a target pixel group and a reference pixel group in image data, the target pixel group including a target pixel, the reference pixel group including a reference pixel; and a generation unit configured to generate corrected image data by correcting a pixel value of each target pixel in the image, based on a similarity between pixel values of the target pixel group determined by the determination unit and pixel values of the reference pixel group determined by the determination unit.