In this paper, a novel distance measuring method to measure the height of a building is proposed. Traditionally, distance measuring using CCD is based on stereo parallax. This paper puts forward a method of measuring the width and height of a building regardless of the distance of the camera or the angle between optical axis and ground. By using two parallel laser spots, the distance from the camera to the building and the height, the width of the building, and the area of special region can be determined in a single photo session and with a single picture. Experiments show that even highly non-orthogonal pictures taken from a short distance can be used to determine the height of a building. The result will not be affected by the angle between the camera's optical axis, the ground and the measured surface.