1. A method for image processing, the method comprising: obtaining an input image including a shade component by capturing a document; estimating a shade component image, the shade component image representing the shade component of the input image, the shade component depending on an image capture environment in which the document has been captured; calculating at least one difference value between a pixel value of a target pixel in the input image and a pixel value in the shade component image at coordinates identical to those of the target pixel; and correcting the pixel value of the target pixel in the input image based on the pixel value in the shade component image and a correction rate to remove a shade component in the target pixel, the correction rate depending on the difference value associated with the target pixel in the input image, wherein as the difference value increases, the correction rate decreases.