1. An image recognition apparatus comprising: an image obtainment unit configured to obtain an image; a region setting unit configured to set at least one local region in the image; a feature extraction unit configured to extract feature patterns from the local region; a determination unit configured to determine, in correspondence with a type of a local region in an image obtained in advance, bins corresponding to patterns with a higher frequency of appearance than a threshold, out of a plurality of patterns forming feature patterns extracted from the local region; a setting unit configured to set, out of a plurality of bins corresponding to the plurality of patterns, bins that have been determined in accordance with the type of the local region as histogram bins used in generating a histogram; a generation unit configured to generate a histogram corresponding to the extracted feature patterns using the set histogram bins; and a recognition unit configured to perform image recognition using the generated histogram.