1. An image processing apparatus that inpaints an inpainting target region in an image to be displayed, the image processing apparatus comprises: a display unit configured to display the image constituted by a predetermined number of pixels; and a control unit, the control unit executed by a processor of the imaging processing apparatus and configured to control the display unit, the control unit being configured to: determine a removal patch including a removal region that is the inpainting target region and a first non-removal region that is a region that does not include the removal region in the image to be displayed on the display unit; replace pixel values of pixels included in the removal region with pixel values of pixels outside the removal patch; calculate a shortest distance from the removal region for each of the pixels included in the first non-removal region; blend pixel values of the pixels included in at least a portion of the first non-removal region with the pixel values of the pixels outside the removal patch based on the calculated distance to obtain blended pixel values; and replace the pixel values of the pixels included in the at least a portion of the first non-removal region with the blended pixel values.