1. A method for performing edge detection in an image captured by an optical navigation sensor with auto shutter adaptation, the optical navigation sensor having a plurality of sensor columns, comprising: plotting average pixel values per sensor column on a graph; determining an overall average pixel value of the captured image according to the average pixel values and using the overall average pixel value as a threshold value; using the threshold value to set a weighted location in a first half of the captured image defined by a first half of the plurality of sensor columns; and using the set weighted location to perform edge detection in the captured image.