The invention discloses a method for intelligently measuring distances of moving vehicles in front of vehicles. The method comprises the following steps of: S1, acquiring a front road
video image, andcarrying out preprocessing such as image clipping, image graying, image
filtration and image binarization on the image; S2, strengthening road
image edge information by adoption of a Canny
edge operator; S3, detecting a lane line by adoption of a Hough transformation method; S4, segmenting a vehicle bottom shadow, establishing a rectangular frame of a possible vehicle, namely, a
region of interest (RIO), and carrying out accurate detection on the vehicle; S5, establishing a
visual projection model, and calculating a pixel coordinate value of a midpoint on the bottom edge of the image and a pixel coordinate value of a midpoint at the bottom edge of the RIO; S6, establishing a demarcation template to demarcate parameters in a camera; S7, establishing a
geometric distance measurement model;and S8, obtaining road plane coordinate
system coordinates of the midpoint at the bottom edge of the image and the midpoint at the bottom edge of the RIO, and combining the demarcation result of parameters in the camera to calculate a distance between the vehicle and the front vehicle according to a distance calculation formula.