A method and apparatus for processing an image are disclosed. For edge detection,
the zero crossing pixel location, n0, within the image is identified.
Then, a sub-pixel position offset, a, is determined. The offset is a relationship
between interpolated image and an interpolated kernel at the zero crossing pixel
location. Finally, the interpolated position for the edge location, t0,
is determined from the pixel location, n0, and the sub-pixel position
offset, a. For matching the detected edges of an object to edges of a model object,
translation [v1, v2] between a detected edge of an object
in the image and the corresponding edge of a model object is first determined.
Next, cross correlation between the detected edge and the corresponding model edge
is calculated. Then, translation error [e1, e2] is determined.
Finally, the translation is updated.