Abstract: An image processing apparatus includes an output value obtaining unit, a first interpolation unit, a second interpolation unit, an image generation unit, and a first edge detection unit. The output value obtaining unit obtains respective output values of a plurality of light-receiving elements from an image sensor including the plurality of light-receiving elements arranged two-dimensionally. The first interpolation unit uses a first interpolation algorithm to interpolate a pixel value. The second interpolation unit uses a second interpolation algorithm to interpolate a pixel value. The image generation unit generates an image based on a pixel value, which is interpolated by the first interpolation unit. The first edge detection unit detects an edge using a first edge detection algorithm based on a pixel value, which is interpolated by the second interpolation unit.