湖北师范大学学报(自然科学版)2024,Vol.44Issue(2) :65-71.DOI:10.3969/j.issn.2096-3149.2024.02.010

基于OpenCV-python监控视频车辆计数统计功能研究

Research on vehicle counting and statistics function in monitoring videos based on OpenCV-python

皮大能 杨一群 包明亮 袁廷臣
湖北师范大学学报(自然科学版)2024,Vol.44Issue(2) :65-71.DOI:10.3969/j.issn.2096-3149.2024.02.010

基于OpenCV-python监控视频车辆计数统计功能研究

Research on vehicle counting and statistics function in monitoring videos based on OpenCV-python

皮大能 1杨一群 1包明亮 1袁廷臣1
扫码查看

作者信息

  • 1. 湖北师范大学 电气工程与自动化学院,湖北 黄石 435002
  • 折叠

摘要

针对实时获取监控视频车流量的迫切需求,利用OpenCV-Python实现监控视频车辆计数统计功能.首先,通过背景减除法的前景提取算法来分割出图像中的车辆.然后,通过轮廓检测和形态学操作对车辆进行处理和过滤,以消除噪声和不必要的检测结果确保准确计数.最后,将该方案与 YOLOv5 模型和SORT算法相结合作对比.实验结果表明,两种方案都能够有效地实现车辆的计数,但传统图像处理没有深度学习精度高,且难以适应不同路段的道路场景,为此提出将传统图像处理与深度学习相结合的建议,为车辆计数提供更好的解决方案.

Abstract

In response to the pressing need for the acquisition of real-time traffic flow monitoring information in surveillance videos,this study explored a vehicle counting and statistical analysis function by using OpenCV-Python.Firstly,it employed a foreground extraction algorithm based on background subtraction to segment vehicles within the images.Then,it processed and filtered vehicles through contour detection and morphological operations to eliminate noise and unnecessary detection results so as to ensuring accurate counting.Finally,it conducted comparative study on this approach and the approach based on the combination of the YOLOv5 model and the SORT algorithm.Experimental results indicated that both approaches can effectively count vehicles.However,traditional image processing lacks high precision of deep learning and is difficult to adapt to different road scenarios.Therefore,it is recommended to combine traditional image processing with deep learning to provide a better solution for vehicle counting.

关键词

图像处理/OpenCV/视频监控系统/高斯滤波/腐蚀

Key words

image processing/OpenCV/video surveillance system/Gaussian filter/corrosion

引用本文复制引用

出版年

2024
湖北师范大学学报(自然科学版)
湖北师范学院

湖北师范大学学报(自然科学版)

影响因子:0.376
ISSN:2096-3149
参考文献量9
段落导航相关论文