1. A white balance compensation method, adapted to an electronic apparatus, the white balance compensation method comprising: obtaining a first specific color ratio and a second specific color ratio of a predetermined color in a predetermined color temperature; obtaining a first reference color ratio and a second reference color ratio of a reference color in the predetermined color temperature; capturing an image comprising a plurality of pixels, and obtaining an exposure index corresponding to the image, wherein each pixel has a first color ratio and a second color ratio; retrieving a plurality of specific pixels from the pixels when the exposure index corresponds to the predetermined color temperature; calculating a plurality of white balance compensation values of the image according to the specific pixels; obtaining an image color temperature of the image; updating the white balance compensation values according to the first reference color ratio and the second reference color ratio when the image color temperature corresponds to the predetermined color temperature; and performing a white balance operation to each of the pixels according to the updated white balance compensation values to generate a compensated image.