1. A model generation method for execution by a model generation apparatus, the model generation method comprising:inputting a three-dimensional shape model of a target object including (1) plane geometric features and (2) line geometric features;
setting a plurality of positions and orientations of a viewpoint, the viewpoint being used to observe the three-dimensional shape model of the target object, and sequentially selecting one of the plurality of positions and orientations of the viewpoint;
calculating, for the selected one of the plurality of positions and orientations of the viewpoint set in the setting and for the plane geometric features and the line geometric features, respectively, a degree of change of a relationship between image features of an image to be observed at the viewpoint and each of the plane geometric features and the line geometric features of the three-dimensional shape model when the selected position and orientation of the viewpoint or a position and orientation of the target object is changed; and
generating a hierarchical cluster of plane geometric features and a hierarchical cluster of line geometric features, separately, for the selected one of the plurality of positions and orientations of the viewpoint, by setting each of the plane geometric features and each of the line geometric features as an initial cluster in a lowest layer, and sequentially merging a pair of clusters in a current layer to generate a cluster in a higher layer based on similarity of the degree of change of the relationship calculated for the pair of clusters.