Arrhythmia is a marked symptom of many cardiovascular diseases. The accurate and in time detection of heart rate can greatly reduce its harm to people. However, it is still a challenge to automatedly and remotely measure the heart rate in daily life, because the environment factor of the measurement changes variously, such as the changing light intensity, the movement of people, and the uncertain distance from sensor to people. In this study, we accurately measured the heart rate of people at the distance of 4.8 meters under different intensity of light just by using a surveillance camera. After a short color video (20 sec) of a person's hand was captured by this camera, a method based on Fast Fourier Transform Algorithm (FFT) is proposed to extract the blood volume pulse wave to calculate the heart rate. By comparing the real heart rate with the results measured by electrocardiography (ECG), the accuracy of heart rate measurement using the method proposed in this study is 98.65% within 4.0 meters, and the accuracy can reach 90% within 5.6 meters. Our experiments also demonstrated that this method can accurately obtain the heart rate even when the intensity of light is below 32 LUX ( office environment 300-500 LUX). The strong environmental suitability makes this method can be applied to many occasions, such as community clinic, old peoples' home, classroom, and other public space.