Visibility is an important meteorological element which affects people's daily life in many fields, such as aviation, navigation and land transportation. An easy method to measure visibility was presented in this paper. Digital camera was adopted to get the images of a target which had a clear boundary between it and its background (such as the sky). Then the luminance ratio method was applied to obtain the visibility.To verify the feasibility of this method, image data were taken at 8:00, 11:00, 14:00 and 17:00 every day using a digital camera in Qingdao. The visibility values were compared with those announced by Qingdao Meteorological Bureau, and the deviations were acceptable. In view of the simplicity of this measurement method, it is promising in the future for application in real life.