1. An image processing apparatus comprising: at least one non-transitory memory device; at least one processor; an obtaining unit configured to obtain an image; a first setting unit configured to set, based on a position of a correction target pixel, a first area of the image, the first area consisting of a plurality of pixels on a line of interest that is set so as to pass through the correction target pixel; a second setting unit configured to set a plurality of second areas of the image, each second area consisting of a plurality of pixels existing on at least one reference lines that are set so as not to pass through the correction target pixel and are parallel with the line of interest; a correlation computing unit configured to compute amounts of correlation between the respective second areas and the first area; and a correction unit configured to compute a correction value for correcting a value of a pixel corresponding to the correction target pixel by using a value of a pixel on each of the at least one reference lines, the value being determined based on the amounts of correlation, and correct the value of the pixel corresponding to the correction target pixel by using the correction value, wherein the correction unit computes the correction value by using a value of a pixel on each of the at least one reference lines, the value is specified for each of the at least one reference lines based on one of the plurality of second areas in which a highest amount of correlation with the first area is obtained, among the plurality of second areas, and wherein the obtaining unit, the first setting unit, the second setting unit, the correlation unit, and the correction unit are implemented by the at least one processor executing at least one program recorded on the at least one non-transitory memo device.