Based on the design of detection-figure tracking-target bi-directional counting design of a people flow counting system based on Open CV libraries to realize the accurate detection of human figures and counting statistics of bi-directional people flow.