1. A method, comprising: capturing a first test image without using a flash; capturing a second test image using the flash with a predetermined intensity; obtaining a difference image indicative of a difference between the second test image and the first test image, wherein the difference image comprises a plurality of difference image pixels, each difference image pixel having a pixel value; identifying a reference pixel among the difference image pixels, wherein the first test image comprises a first test pixel corresponding to the reference pixel, and the second test image comprises a second test pixel corresponding to the reference pixel; and computing illumination amount by the flash for subsequent image capturing based at least partly on pixel value of the first test pixel and pixel value of second test pixel.