1. A method in an electronic device of processing a representation of a reference pattern, said method comprising: capturing an image of the reference pattern, which includes regions of different intensities that meet to form edges; performing a filtering operation on the captured image to obtain a sharpened image; determining that a plurality of pixel values of the sharpened image are overshoot pixel values; distinguishing at least two categories among the plurality of overshoot pixel values; and updating a parameter in the electronic device based on the overshoot pixel values.