non rectilinear features next the system synthesizes a directional gradient filter step 402 specifically in one embodiment of the present invention the directional gradient filter is synthesized using the database image in another embodiment of the present invention the directional gradient filter is synthesized based on user input note that the directional gradient filter can be used to attenuate edgels that do not conform to the directional gradients of feature edges in the database image the system then computes a raw database gradient image and a raw scanned gradient image using the database image and the scanned image respectively steps 404 and 454 specifically the system first converts the database image and the scanned image into a set of database directional gradient images and a set of scanned directional gradient images respectively the system then computes the raw database gradient image and the raw scanned gradient image using the set of database directional gradient images and the set of scanned directional gradient images respectively next the system filters edgel orientations in the raw database gradient image and raw scanned gradient image by applying the gradient directional filter steps 406 and 456 this step results in a database gradient image and a scanned gradient image the system then computes database projection vectors from the database gradient image and scanned projection vectors from the scanned gradient image by taking orthogonal projections along a set of.