1. An image processing apparatus comprising: an image acquiring unit configured to acquire a first image, which is an image including an eye of a person; an image generating unit configured to generate a second image, which is a binary image representing an edge of the first image; a classifying unit configured to classify, on the basis of presence or absence of the edge, pixels included in the second image; and a pupil-region generating unit configured to generate a pupil region, which is a region corresponding to a pupil of the person in the first image, on the basis of a result of the classification, wherein the classifying unit comprises: a first classifying unit configured to classify, among the pixels included in the second image, the pixels not corresponding to the edge into a first pixel type and the pixels corresponding to the edge into a second pixel type; and a second classifying unit configured to reclassify, when the pixels not corresponding to the edge are present separately in a plurality of blocks and when there is a block having an area which is smaller than a first threshold, the pixels included in the block into the second pixel type, wherein the pupil-region generating unit generates the pupil region on the basis of a distribution of the pixels classified into the first pixel type.