1. An image processing apparatus comprising: a segmenting unit configured to segment an input image into a plurality of areas on the basis of a similarity of pixels; an acquiring unit configured to acquire sizes of the areas segmented by the segmenting unit; a selecting unit configured to select one of a plurality of discriminating methods of discriminating, with respect to adjacent areas among the plurality of areas, on the basis of a size of each of the adjacent areas acquired by the acquiring unit, whether or not the adjacent areas are connecting targets by using different kinds of features; an extracting unit configured to extract, from the adjacent areas, the feature of the kind which is used in the discriminating method selected by the selecting unit; a connecting unit configured to connect the adjacent areas determined as the connecting targets by the discriminating method selected by the selecting unit; and a classifying unit configured to classify a kind of area connected by the connecting unit.