1. A method executed by an optical navigation sensor to determine movements, comprising: receiving an image frame; determining by the optical navigation sensor whether a quality of said image frame meets a predetermined requirement by: determining whether a pixel is locally significantly different from its nearby pixels in a predetermined region; calculating the total number of pixels that are locally significantly different in said predetermined region; and determining whether said total number of said significantly different pixels in said region is larger than a critical number; and when said quality of said image frame meets the predetermined requirement, using said image frame to determine a movement; when said quality of said image frame does not meet the predetermined requirement, said image frame is not used to determine a movement, or said image frame is used to determine a movement, but the determined movement is not used for further processing.