The invention relates to the field of
digital image processing, in particular to a method for detecting a vehicle queuing length at a
road crossing. The method for detecting the vehicle queuing length at the
road crossing comprises the following steps: S1, in the state of a
red light, a binary foreground
vehicle detection image and a
motion detection image are obtained according to a current frame image; S2, the number of high value points P1 and P2 of the foreground
vehicle detection image and the
motion detection image is figured out by utilizing a sliding window; S3, the P1 and P2 are compared with a
vehicle detection threshold value and a
motion detection threshold value respectively to judge whether a static vehicle exits in the sliding window, if the static vehicle exits in the sliding window, the sliding window is moved backward from a stop line to the
tail of a vehicle
queue, the image space length of the vehicle
queue is calculated, and an S4 is executed, and the S4 is executed if no static vehicle exits in the sliding window; S4, the
road crossing is detected whether to be in the state of the
red light or not, if the detected result is yes, a next frame image is obtained and the S1 is executed, otherwise, the image space length of the vehicle
queue in the S3 is converted into the actual vehicle length, and the detection of the current state of the
red light is stopped. The method for detecting the vehicle queuing length at the road crossing can accurately detect the length of the vehicle queue at the road crossing.