The invention provides automatic acquisition and recognition of complex visual shapes within images. During an acquisition phase, models are derived from interest points acquired from a target shape. The models are stored in and can be retrieved from a lookup table via high dimension indices. When an image is inputted, triplets of interest points in the image are used to compute local shape descriptors, which describe the geometry of local shapes in the image. In turn, triplets of local shape descriptors are used to compute high dimension indices. These indices are used for accessing the lookup table having the models. The models are used for the automatic recognition of target shapes.