1. An image processing apparatus comprising: a processor; and a memory storing computer readable instructions that, when executed by the processor, implement: a distance information calculator that is configured to calculate distance information corresponding to a distance to an imaging object at each of portions in an image; a feature data calculator that is configured to calculate feature data at each of the portions in the image; a feature data distribution calculator that is configured to calculate a distribution of the feature data in each of regions that are classified according to the distance information in the image; a reliability determining unit that is configured to determine a reliability of the distribution of the feature data in each of the regions; and a discrimination criterion generator that is configured to generate, for each of the regions, a discrimination criterion for discriminating a specific region in the image based on a determination result of the reliability and the distribution of the feature data in each of the regions; wherein: the reliability determining unit is configured to determine the reliability of the distribution of the feature data in each of the regions by comparing a characteristic or representative value of the distribution of the feature data in each of the regions with reference values with a predetermined range set in advance or determine the reliability of the distribution of the feature data in each of the regions based on a continuity of characteristics or representative values of the distributions of the feature data by applying a model, in which the relationship of the characteristics or representative values of the distribution of the feature data among hierarchies corresponding to the regions that are obtained by classifying the distance information via quantizing the distance information is approximated, to the distributions of the feature data, thereby determining the continuity of the distributions of the feature data between the regions; and the discrimination criterion generator is configured to generate, for a region in which the reliability of the distribution of the feature data is determined to be lower than a predetermined threshold by the reliability determining unit, a discrimination criterion by using a distribution of feature data in a region in which the reliability of the distribution of the feature data is determined to be higher than the predetermined threshold by the reliability determining unit.