Using a scaler that has a simple geometrical property and adding some restrictions on the movement of the camera, the interior parameters of the camera K,spin matrix R, translational vector T,and direction vector E could be solved successively. The distance was easily measured only by using two images at the different positions on the rail and substituting the known parameters into the distance measuring equation proposed here. This new method overcame the shortcomings of the tradition ways. It need not complex movement of the camera and decrease the difficulty of setting the standard calibration. This method could be used in the field of geological exploration, water conservancy construction, mine exploitation, city planning and large scale equipment manufacturing.