The invention discloses a visual detecting and counting method for the vehicle flow rate under a complex
road condition, belongs to the technical field of
machine vision, and solves the problems that a
visual detection method for counting the vehicle flow rate by counting the area of moving objects is extremely low in the counting accuracy and greatly influenced by the
image quality under complex roads in which vehicles, pedestrians and non-motor vehicles are mixed. The method comprises that initial information is set; video images are read in a cyclic way, and an MSRCR
algorithm is used to realize illumination
equalization and
color balance at the same time; an AdaptiveMedian
algorithm is used for background modeling, and a movement foreground is extracted; opening operation is carried out on the foreground, and bonded moving objects are separated while noises are removed; a contour is searched, the area is calculated, and the contour is filled if the area is lower than a threshold; vehicles in the foreground are identified by utilizing Haar characteristics and an
AdaBoost classifer; and vehicles in each frame of foreground are identified, and positions of the vehicles are recorded. Thus, the method is used to extract moving objects under the complex
road condition accurately, identify the vehicles specifically, and counting the vehicles in the real-time collection video.