1. An image processing apparatus comprising: a calculating unit that calculates, for each of a plurality of color separation images, a gradient direction of an edge gradient and an edge intensity at each position on the basis of a color captured image, the plurality of color separation images resulting from separation of the color captured image into a plurality of color components, the color captured image including an image of a subject captured with an imaging apparatus; an edge-position detecting unit that detects edge positions in each of the plurality of color separation images, on the basis of the gradient directions of the edge gradients and the edge intensities calculated by the calculating unit; an identifying unit that identifies, for each position, the gradient direction of the edge gradient and the edge intensity at the position in a color separation image among the plurality of color separation images that includes the largest edge intensity at the position; and a subject-region detecting unit that detects a subject region on the basis of the edge positions detected by the edge-position detecting unit and the gradient directions of the edge gradients and the edge intensities identified by the identifying unit, the subject region being a portion of the color captured image that corresponds to the image of the subject.