A template creation apparatus for creating hierarchical templates for object recognition used for template matching, the template creation apparatus comprising: a viewpoint position creation unit, which is a creation unit configured to create a plurality of approximate spherical shapes in which intervals between vertices of the approximate spherical shapes are substantially equal and each vertex is set as a viewpoint position, intervals between the viewpoint positions being different for each of the created approximate spherical shapes; an optimal viewpoint position creation unit configured to, if each of the viewpoint positions set in the approximate spherical shape in which the intervals are wider is set as a master viewpoint and each of the viewpoint positions set in the approximate spherical shape in which the intervals are narrower is set as a slave viewpoint, calculate a rotation angle at which the number of the slave viewpoints associated with the master viewpoints will be substantially equal and a maximum distance between the master viewpoint and the slave viewpoint associated with that master viewpoint will be a minimum with respect to an optimal viewpoint position, and, configured to, by performing processing to rotate each of the approximate spherical shapes by the calculated rotation angle, calculate the optimal viewpoint position corresponding to each of the viewpoint positions after the rotation; and a template creation unit configured to create, for each of the approximate spherical shapes, a plurality of templates corresponding to a target object viewed from each of the set viewpoint positions by using the approximate spherical shapes in which intervals between vertices are substantially equal and each vertex is set as a viewpoint position. a viewpoint position creation unit, which is a creation unit configured to create a plurality of approximate spherical shapes in which intervals between vertices of the approximate spherical shapes are substantially equal and each vertex is set as a viewpoint position, intervals between the viewpoint positions being different for each of the created approximate spherical shapes; an optimal viewpoint position creation unit configured to, if each of the viewpoint positions set in the approximate spherical shape in which the intervals are wider is set as a master viewpoint and each of the viewpoint positions set in the approximate spherical shape in which the intervals are narrower is set as a slave viewpoint, calculate a rotation angle at which the number of the slave viewpoints associated with the master viewpoints will be substantially equal and a maximum distance between the master viewpoint and the slave viewpoint associated with that master viewpoint will be a minimum with respect to an optimal viewpoint position, and, configured to, by performing processing to rotate each of the approximate spherical shapes by the calculated rotation angle, calculate the optimal viewpoint position corresponding to each of the viewpoint positions after the rotation; and a template creation unit configured to create, for each of the approximate spherical shapes, a plurality of templates corresponding to a target object viewed from each of the set viewpoint positions by using the approximate spherical shapes in which intervals between vertices are substantially equal and each vertex is set as a viewpoint position.