Distance measurement for moving object using image processing is one of the important research areas in robotics and computer vision. In the current paper, an improved method is proposed to compute the distance of the moving object using a monocular camera and based on the feature extraction method. First, the specific object is tracked by a camera and then the distance from the object to the camera is measured using a computationally efficient algorithm that is implemented in MATLAB/ SIMULINK environment. Experimental results show that this method is fast, efficient, and accurate and can be used for real-time robotic applications.