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 setting unit configured to set, out of a plurality of bins corresponding to a plurality of patterns which can form the feature patterns, bins that have been predetermined in accordance with a 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.