1. A method for locating a center of a pupil, suitable for use with an electronic apparatus, comprising: obtaining a glint-free image comprising a pupil; generating a gradient magnitude graph and a gradient orientation graph based on the glint-free image; sifting a plurality of first pixels from the gradient magnitude graph, and finding a plurality of second pixels corresponding to the first pixels in the gradient orientation graph; taking a negative gradient orientation to each of the plurality of second pixels to generate a gradient emission graph comprising a plurality of emissions; and defining the center of the pupil in the glint-free image according to the plurality of emissions in the gradient emission graph.