This paper presents a distance measurement method based on pixel number variation of images for digital cameras by referencing to two arbitrarily designated points in image frames. Based on an established relationship between the displacement of the camera movement along the photographing direction and the difference in pixel counts between reference points in the images, distance from an object can be calculated via the proposed method. To integrate the measuring functions into digital cameras, circuit design implementing the proposed measuring system in selecting reference points, measuring distance, and displaying measurement results on CCD panel of the digital camera is proposed in this paper. In comparison to pattern recognition or image analysis methods, the proposed measuring approach is simple and straightforward for practical implementation into digital cameras. Experiment results have demonstrated that the proposed method is capable of yielding satisfactory measurement results in a very responsive way.