1. An information processing apparatus comprising: a calculation unit adapted to calculate a distribution of a difference in feature amount between a plurality of learning patterns each showing an orientation of a target; a determination unit adapted to determine, using a probability distribution obtained from the distribution of differences calculated by the calculation unit, a pixel that is in an input pattern and is to be referred to in order to discriminate an orientation of a target in the input pattern; and a discrimination unit adapted to perform discrimination for obtaining the orientation of the target in the input pattern by comparing a feature amount of the pixel determined by the determination unit and a threshold set in advance.