The paper describes a way of measuring the distance toward a target object with using visual information provided by an active camera. The optical flow, which is one of the ways of image analysis in image processing, contributes to recognize the target status and is also available to estimate the distance toward the target. In our approach, at first, the moving direction of the active camera is estimated with using the optical flows. Next, since many of the generated flows include errors, the feasible flows without errors are selected, with referring the estimated moving direction on each flow. Finally, the target distance is estimated with using the selected feasible flows. The distance is obtained by the flows without any error, so that sufficiently correct results have been achieved in the physical experiments.