[go: up one dir, main page]

CN105200938B - A Vision-Based Anti-Collision System for Lane Brake Lever - Google Patents

A Vision-Based Anti-Collision System for Lane Brake Lever Download PDF

Info

Publication number
CN105200938B
CN105200938B CN201510534043.2A CN201510534043A CN105200938B CN 105200938 B CN105200938 B CN 105200938B CN 201510534043 A CN201510534043 A CN 201510534043A CN 105200938 B CN105200938 B CN 105200938B
Authority
CN
China
Prior art keywords
image
hash
barrier
processing module
fingerprint
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510534043.2A
Other languages
Chinese (zh)
Other versions
CN105200938A (en
Inventor
覃力更
徐韶华
李小勇
陈志�
陈静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangxi Jiaoke Group Co Ltd
Original Assignee
Guangxi Transportation Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangxi Transportation Research Institute filed Critical Guangxi Transportation Research Institute
Priority to CN201510534043.2A priority Critical patent/CN105200938B/en
Publication of CN105200938A publication Critical patent/CN105200938A/en
Application granted granted Critical
Publication of CN105200938B publication Critical patent/CN105200938B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

本发明涉及车道闸杆控制系统领域。一种基于视觉的车道闸杆防撞系统,包括道闸、处理模块、图像采集模块、存储器模块和上位机;基于图像采集模块采集目标区域的图像,处理模块通过哈希算法生成对应图像的哈希指纹,通过对哈希指纹比较判断开始时候的模板图像和即时图像,得到即时图像中是否有车,以确定道闸栏杆是否放下。本发明哈希算法对图像进行处理,具有鲁棒性好、实时性好、稳定性高、算法复杂度低和光照变化影响小的优点;能够有效判断车道只目标区域有车无车情况,有效防止闸杆对车辆碰撞。

The invention relates to the field of lane brake lever control systems. A vision-based lane gate anti-collision system, including a barrier gate, a processing module, an image acquisition module, a memory module, and a host computer; the image acquisition module collects images of target areas, and the processing module generates a hash of the corresponding image through a hash algorithm. The Greek fingerprint, by comparing the hash fingerprint to judge the template image and the real-time image at the beginning, to obtain whether there is a car in the real-time image, to determine whether the barrier of the barrier is down. The hash algorithm of the present invention processes images, and has the advantages of good robustness, good real-time performance, high stability, low algorithm complexity, and little influence of light changes; Prevent the brake lever from colliding with the vehicle.

Description

一种基于视觉的车道闸杆防撞系统A Vision-Based Anti-Collision System for Lane Brake Lever

技术领域technical field

本发明涉及车道闸杆控制系统领域,特别是一种基于视觉的车道闸杆防撞系统。The invention relates to the field of lane brake lever control systems, in particular to a vision-based lane brake lever anti-collision system.

背景技术Background technique

高速公路收费站是智能交通系统的重要应用领域,为了使汽车与道路的功能智能化,提高运输效率,保障交通安全,缓解交通拥挤,减少环境污染,实时、准确、高效的防砸系统显得尤为重要。由于不同车辆的底盘高度不同、金属含量也不同,传统的地感应线圈的灵敏度范围难以确定,致使车辆还未通过就落杆或车辆通过后不落杆等故障。此外,地感应线圈在大型车辆的辗压下会产生形变,甚至会造成不可复原的损坏,从而导致感应线圈的稳定性下降。Expressway toll stations are an important application field of intelligent transportation systems. In order to make the functions of cars and roads intelligent, improve transportation efficiency, ensure traffic safety, alleviate traffic congestion, and reduce environmental pollution, real-time, accurate, and efficient anti-smashing systems are particularly important. important. Due to the different chassis heights and metal contents of different vehicles, it is difficult to determine the sensitivity range of the traditional ground induction coil, resulting in failures such as the pole falling before the vehicle passes or the pole not falling after the vehicle passes. In addition, the ground induction coil will be deformed under the rolling of a large vehicle, and even cause irreversible damage, resulting in a decrease in the stability of the induction coil.

发明内容Contents of the invention

本发明的发明目的是:针对上述技术问题,提供一种基于视觉的车道闸杆防撞系统,弥补地感应线圈存在的不足,提出了基于图像识别的防砸系统方案,本方案的稳定性高、实时性好、抗干扰能力强,具有很大的应用价值。The purpose of the invention is: to solve the above technical problems, provide a vision-based lane brake lever anti-collision system, make up for the shortcomings of the ground induction coil, and propose an anti-smashing system solution based on image recognition, which has high stability , good real-time performance, strong anti-interference ability, and has great application value.

本发明技术方案为:一种基于视觉的车道闸杆防撞系统,包括道闸、处理模块、图像采集模块、存储器模块和上位机;所述图像采集模块安装在道闸旁,并正对目标区域;所述处理模块根据图像采集模块采集到的图像信息进行分析,并控制道闸栏杆的状态;所述存储器模块内存储有模板图像,所述处理模块接收到车道上位机发出的道闸起杆信号时,控制存储器模块将图像采集模块采集到的图像信息更新为模板图像;处理模块对图像信息进行高斯滤波得到即时图像;所述处理模块通过哈希算法生成即时图像和模板图像的哈希指纹,哈希指纹为以相同次序组合而成的图像描述字符串;当即时图像与模板图像两者的哈希指纹汉明距离大于设定值时,道闸保持栏杆竖立;当两者汉明距离小于设定值时,道闸栏杆放下。The technical solution of the present invention is: a vision-based lane barrier anti-collision system, including a barrier gate, a processing module, an image acquisition module, a memory module and a host computer; the image acquisition module is installed next to the barrier gate and faces the target area; the processing module analyzes the image information collected by the image acquisition module, and controls the state of the barrier of the barrier; the memory module stores a template image, and the processing module receives the triggering of the barrier from the upper computer of the lane When the pole signal is used, the control memory module updates the image information collected by the image acquisition module into a template image; the processing module performs Gaussian filtering on the image information to obtain an instant image; the processing module generates the hash of the instant image and the template image through a hash algorithm Fingerprint, hash fingerprint is an image description string combined in the same order; when the Hamming distance of the hash fingerprint between the instant image and the template image is greater than the set value, the gate will keep the railing erect; When the distance is less than the set value, the barrier of the gate will be lowered.

本发明基于图像的处理分析方法,具体是图像采集模块采集目标区域的图像,处理模块通过哈希算法生成对应图像的哈希指纹,通过对哈希指纹比较判断开始时候的模板图像和即时图像,得到即时图像中是否有车,以确定道闸栏杆是否放下。The image-based processing and analysis method of the present invention, specifically, the image acquisition module collects the image of the target area, the processing module generates the hash fingerprint of the corresponding image through the hash algorithm, and judges the template image and the instant image at the beginning by comparing the hash fingerprint, Get instant images of vehicles to determine if barriers are down.

优选的,所述处理模块通过DCT哈希算法生成即时图像的哈希指纹和模板图像的哈希指纹,计算两者的汉明距离M;所述处理模块通过均值哈希算法生成即时图像的哈希指纹和模板图像的哈希指纹,计算两者的汉明距离N;当M和N均大于设定值时,道闸保持阀杆竖立;当M和N均小于设定值时,道闸阀杆放下。Preferably, the processing module generates the hash fingerprint of the instant image and the hash fingerprint of the template image through the DCT hash algorithm, and calculates the Hamming distance M between the two; the processing module generates the hash of the instant image through the mean value hash algorithm. The hash fingerprint of the fingerprint and the template image is calculated, and the Hamming distance N between the two is calculated; when M and N are both greater than the set value, the gate will keep the valve stem upright; when M and N are less than the set value, the gate valve will The rod is lowered.

这里通过两种哈希算法对图像进行同时分析,能够有效避免算法的不完备性,能够增强算法的抗干扰能力,进而提升算法的可靠性、稳定性。Here, two hash algorithms are used to analyze the image at the same time, which can effectively avoid the incompleteness of the algorithm, enhance the anti-interference ability of the algorithm, and then improve the reliability and stability of the algorithm.

优选的,所述处理模块通过DCT哈希算法生成即时图像的64位哈希指纹和模板图像的64位哈希指纹,计算两者的汉明距离M;所述处理模块通过均值哈希算法生成即时图像的64位哈希指纹和模板图像的64位哈希指纹,计算两者的汉明距离N;若M>10且N>20,道闸保持栏杆竖立;若M<5且N<10,道闸栏杆放下。Preferably, the processing module generates the 64-bit hash fingerprint of the instant image and the 64-bit hash fingerprint of the template image through the DCT hash algorithm, and calculates the Hamming distance M between the two; the processing module generates through the mean value hash algorithm Calculate the Hamming distance N between the 64-bit hash fingerprint of the real-time image and the 64-bit hash fingerprint of the template image; if M>10 and N>20, keep the railings upright; if M<5 and N<10 , The railing of the barrier gate was lowered.

优选的,所述哈希算法为DCT哈希算法,所述即时图像或模板图像的哈希指纹生成步骤为:Preferably, the hash algorithm is a DCT hash algorithm, and the hash fingerprint generation step of the instant image or template image is:

1)将图像缩小到32×32的尺寸,1) Reduce the image to a size of 32×32,

2)将缩小后的图像转化为灰度图像,2) convert the reduced image into a grayscale image,

3)将所述灰度图像进行DCT变换,并得到32×32的DCT系数矩阵,3) performing DCT transformation on the grayscale image, and obtaining a 32×32 DCT coefficient matrix,

4)保留所述DCT系数矩阵左上角的8×8矩阵,4) retaining the 8×8 matrix in the upper left corner of the DCT coefficient matrix,

5)计算步骤4)DCT系数矩阵内系数均值,5) calculation step 4) coefficient mean value in the DCT coefficient matrix,

6)将步骤4)中DCT矩阵内系数与平均值进行一一比较,若大于或等于平均值,记为1;若小于平均值,记为0;将比较结果按次序组合在一起,构成64位哈希指纹。6) Compare the coefficients in the DCT matrix in step 4) with the average value one by one, if it is greater than or equal to the average value, record it as 1; if it is less than the average value, record it as 0; combine the comparison results in order to form 64 Bit hash fingerprint.

这里DCT哈希算法或者叫DCT感知哈希算法可以快速辨别出两个图像之间的不同,具体是辨别“有车”图像、“无车”图像之间差异,从而辨别出图像中是否有车存在。Here, the DCT hash algorithm or the DCT perceptual hash algorithm can quickly identify the difference between two images, specifically the difference between the "car" image and the "no car" image, so as to identify whether there is a car in the image. exist.

优选的,当即时图像与模板图像两者的哈希指纹汉明距离均大于10时,道闸保持栏杆竖立;当两者汉明距离小于均5时,道闸栏杆放下。Preferably, when the Hamming distances of the hash fingerprints of both the instant image and the template image are greater than 10, the barrier of the barrier is kept erect; when the Hamming distance between the two is less than 5, the barrier of the barrier is lowered.

优选的,所述哈希算法为均值哈希算法,所述即时图像或模板图像的哈希指纹生成步骤为:Preferably, the hash algorithm is a mean value hash algorithm, and the hash fingerprint generation step of the instant image or template image is:

1)将图像缩小到8×8的尺寸,总共64个像素;1) Reduce the image to a size of 8×8, a total of 64 pixels;

2)将8×8的图像转换成灰度图像,并转为64级灰度;2) Convert the 8×8 image into a grayscale image, and convert it into a 64-level grayscale;

3)计算步骤2)所有64个像素的灰度平均值;3) Calculation step 2) grayscale mean of all 64 pixels;

4)将若大于或等于平均值,记为1;若小于平均值,记为0;将比较结果按次序组合在一起,构成64位哈希指纹。4) If it is greater than or equal to the average value, record it as 1; if it is less than the average value, record it as 0; combine the comparison results in order to form a 64-bit hash fingerprint.

这里均值哈希算法或者叫均值感知哈希算法,算法简单快捷,可以快速辨别出相同背景下两个图像的不同,具体是是辨别“有车”图像、“无车”图像之间差异,从而辨别出图像中是否有车存在。Here, the mean value hashing algorithm or the mean value perceptual hashing algorithm is simple and fast, and can quickly distinguish the difference between two images under the same background, specifically, distinguishing the difference between the "car" image and the "no car" image, so that Identify whether there is a car in the image.

优选的,当即时图像与模板图像两者的哈希指纹汉明距离均大于20时,道闸保持栏杆竖立;当两者汉明距离均小于10时,道闸栏杆放下。Preferably, when the Hamming distances of the hash fingerprints of both the instant image and the template image are greater than 20, the barrier of the barrier remains erect; when the Hamming distances of both are less than 10, the barrier of the barrier is lowered.

优选的,所述图像采集模块包括依次连接的CCD图像传感器和SAA7113视频解码芯片;所述处理模块采用DM642芯片;所述SAA7113视频解码芯片连接DM642芯片的VP1接口,所述DM642芯片通过I2C总线连接控制SAA7113视频解码芯片。Preferably, the image acquisition module includes a sequentially connected CCD image sensor and a SAA7113 video decoding chip; the processing module adopts a DM642 chip; the SAA7113 video decoding chip is connected to the VP1 interface of the DM642 chip, and the DM642 chip is connected via I 2 C The bus connection controls the SAA7113 video decoder chip.

本发明有益效果是:The beneficial effects of the present invention are:

本发明通过哈希算法对图像进行处理,具有鲁棒性好、实时性好、稳定性高、算法复杂度低和光照变化影响小的优点;能够有效判断车道只目标区域有车无车情况,有效防止闸杆对车辆碰撞。The invention processes the image through the hash algorithm, which has the advantages of good robustness, good real-time performance, high stability, low algorithm complexity and little influence of illumination changes; it can effectively judge whether there are cars or no cars in the target area of the lane, Effectively prevent the brake lever from colliding with the vehicle.

本发明能够有效避免地感应线圈在道路感应应用中存在的缺陷,提供一种感应高效、准确和耐用的车道闸杆防撞系统。The invention can effectively avoid the defect of the ground induction coil in the application of road induction, and provides an anti-collision system of the lane brake bar with high induction efficiency, accuracy and durability.

附图说明Description of drawings

图1是本发明功能模块示意图;Fig. 1 is a schematic diagram of functional modules of the present invention;

图2是本发明工作流程示意图;Fig. 2 is a schematic diagram of the workflow of the present invention;

图3是DCT系数矩阵;Fig. 3 is DCT coefficient matrix;

图4是哈希指纹示例1;Figure 4 is hash fingerprint example 1;

图5是哈希指纹示例2。Figure 5 is hash fingerprint example 2.

其中,1—图像采集模块、2—处理模块、3—存储器模块、4—上位机、5—道闸、6—电源。Among them, 1—image acquisition module, 2—processing module, 3—memory module, 4—host computer, 5—gate, 6—power supply.

具体实施方式detailed description

本发明公开了一种基于视觉的车道闸杆防撞系统,包括道闸、处理模块、图像采集模块、存储器模块和上位机;所述图像采集模块安装在道闸旁,并正对目标区域;所述处理模块根据图像采集模块采集到的图像信息进行分析,并控制道闸栏杆的状态;所述存储器模块内存储有模板图像,所述处理模块接收到车道上位机发出的道闸起杆信号时,控制存储器模块将图像采集模块采集到的图像信息更新为模板图像;处理模块对图像信息进行高斯滤波得到即时图像;所述处理模块通过哈希算法生成即时图像和模板图像的哈希指纹,哈希指纹为以相同次序组合而成的图像描述字符串;当即时图像与模板图像两者的哈希指纹汉明距离大于设定值时,道闸保持栏杆竖立;当两者汉明距离小于设定值时,道闸栏杆放下。The invention discloses a vision-based lane barrier anti-collision system, which includes a barrier, a processing module, an image acquisition module, a memory module and a host computer; the image acquisition module is installed beside the barrier and faces the target area; The processing module analyzes the image information collected by the image acquisition module, and controls the state of the barrier of the barrier; the memory module stores a template image, and the processing module receives the signal of the barrier from the upper computer of the driveway , the control memory module updates the image information collected by the image acquisition module into a template image; the processing module performs Gaussian filtering on the image information to obtain an instant image; the processing module generates hash fingerprints of the instant image and the template image through a hash algorithm, The hash fingerprint is an image description string combined in the same order; when the Hamming distance of the hash fingerprint between the instant image and the template image is greater than the set value, the gate will keep the railing up; when the Hamming distance between the two is less than When the value is set, the barrier of the barrier gate is lowered.

这里通过哈希算法对图像进行处理,通过图像之间的差异,快速、有效辨别出图像中是否有车存在,从而控制道闸栏杆状态,避免道闸栏杆砸碰车辆。具体是图像采集模块采集目标区域的图像,处理模块通过哈希算法生成对应图像的哈希指纹,通过对哈希指纹比较判断开始时候的模板图像和即时图像,得到即时图像中是否有车,以确定道闸阀杆是否放下。本发明较现有的防砸系统减少了感应线圈的应用,结构更加稳定和紧凑,系统在应用上的效率、准确性、稳定性都比现有防砸系统有着显著的提高。Here, the image is processed through the hash algorithm, and through the difference between the images, it can quickly and effectively identify whether there is a car in the image, so as to control the state of the barrier of the barrier and prevent the barrier from hitting the vehicle. Specifically, the image acquisition module collects the image of the target area, the processing module generates the hash fingerprint of the corresponding image through the hash algorithm, and judges the template image and the instant image at the beginning by comparing the hash fingerprint to obtain whether there is a car in the instant image. Determine if the gate valve stem is lowered. Compared with the existing anti-smashing system, the application of the induction coil is reduced, the structure is more stable and compact, and the application efficiency, accuracy and stability of the system are significantly improved compared with the existing anti-smashing system.

以下结合附图对本发明实施进行说明。The implementation of the present invention will be described below in conjunction with the accompanying drawings.

如图1所示,为本发明功能模块示意图,包括图像采集模块1、处理模块2、存储器模块3、上位机4、道闸5和电源6。As shown in FIG. 1 , it is a schematic diagram of functional modules of the present invention, including an image acquisition module 1 , a processing module 2 , a memory module 3 , a host computer 4 , a gate 5 and a power supply 6 .

图像采集模块1,用于采集目标区域的图像信息,目标区域具体是行车方向上位于栏杆前方的车道区域。图像采集模块1包括CCD图像传感器和SAA7113视频解码芯片;SAA7113将CCD采集到的数据信号解码成标准的“VPO”数字信号并输出到处理模块2,相当于一种“A/D”器件。其中,处理模块2还通过I2C两线式串行总线连接控制SAA7113视频解码芯片。The image collection module 1 is configured to collect image information of a target area, specifically, the target area is the lane area located in front of the railing in the driving direction. The image acquisition module 1 includes a CCD image sensor and a SAA7113 video decoding chip; the SAA7113 decodes the data signal collected by the CCD into a standard "VPO" digital signal and outputs it to the processing module 2, which is equivalent to an "A/D" device. Wherein, the processing module 2 is also connected to control the SAA7113 video decoding chip through an I 2 C two-wire serial bus.

处理模块2,用于对图像信号的分析,并连接控制道闸5栏杆状态。处理模块2采用TI公司C6000系列DSP中DM642(全名TMS320DM642),DM642核心是C6416型高性能数字信号处理器,具有极强的处理性能,高度的灵活性和可编程性,同时外围集成了非常完整的音频、视频和网络通信等设备及接口,能够满足本系统中对视频/图像处理,及完成对相关设备连接控制。The processing module 2 is used to analyze the image signal, and is connected to control the state of the railing of the barrier gate 5. Processing module 2 adopts DM642 (full name TMS320DM642) in TI's C6000 series DSP. The core of DM642 is C6416 high-performance digital signal processor, which has strong processing performance, high flexibility and programmability, and at the same time integrates very Complete audio, video and network communication equipment and interfaces can meet the video/image processing in this system and complete the connection control of related equipment.

存储器模块3,具体是外围存储器模块,通过外部总线与DM642的EMIF接口连接。存储器模块3包括SDRAM同步动态随机存储器和FLASH固态存储器。The memory module 3, specifically the peripheral memory module, is connected to the EMIF interface of the DM642 through an external bus. The memory module 3 includes SDRAM synchronous dynamic random access memory and FLASH solid state memory.

上位机4包括打开本地图片、IP地址设置、接收图像、选择目标区域、发送区域坐标、保存图像等功能。The upper computer 4 includes functions such as opening local pictures, setting IP addresses, receiving images, selecting target areas, sending area coordinates, and saving images.

道闸5,用于道路上限制机动车行驶的通道出入口管理设置。DM642连接控制道闸5栏杆,具体是连接控制栏杆的电机,完成道闸5栏杆状态控制。Barrier gate 5 is used for channel entrance and exit management settings for restricting motor vehicles on the road. DM642 is connected to control the 5 railings of the barrier, specifically the motor connected to the control railing, to complete the state control of the 5 railings of the barrier.

电源6,为系统提供电力供应,具体可以使用独立的电源系统。The power supply 6 provides power supply for the system, specifically an independent power supply system can be used.

如图2所示,为本发明工作流程示意图。具体工作步骤如下:As shown in Figure 2, it is a schematic diagram of the workflow of the present invention. The specific working steps are as follows:

1.系统初始化,包括存储模块中模板图像初始化。1. System initialization, including template image initialization in the storage module.

2.处理模块监测上位机是否对发出道闸起杆信号。若发出,进行下一步;若没发出,继续监测。2. The processing module monitors whether the upper computer sends a signal to open the gate. If issued, go to the next step; if not, continue monitoring.

3.处理模块接收图像采集模块发送的图像信息,并将该图像信息更新为存储模块中模板图像,模板图像锁定。3. The processing module receives the image information sent by the image acquisition module, and updates the image information to the template image in the storage module, and the template image is locked.

4.对图像信息进行高斯滤波,得到即时图像。4. Gaussian filtering is performed on the image information to obtain an instant image.

5.处理模块对即时图像进行处理分析,具体基于哈希算法处理,包括DCT(感知)哈希算法和均值(感知)哈希算法。5. The processing module processes and analyzes the instant image, specifically based on the hash algorithm, including the DCT (perceptual) hash algorithm and the mean (perceptual) hash algorithm.

其中,DCT哈希算法流程包括:Among them, the DCT hash algorithm process includes:

1)缩小尺寸:将即时图像缩小到32×32的尺寸,简化了DCT的计算。1) Size reduction: The instant image is reduced to a size of 32×32, which simplifies the calculation of DCT.

2)简化色彩:将缩小的即时图像转化成灰度图像,进一步简化计算量。2) Simplify color: convert the reduced real-time image into a grayscale image, further simplifying the amount of calculation.

3)计算DCT:计算图片的DCT变换:F(u,v)=CT·f·C,得到32×32的DCT系数矩阵:3) Calculating DCT: Calculate the DCT transformation of the picture: F(u,v)=C T f C to obtain a 32×32 DCT coefficient matrix:

4)缩小DCT:据3)的DCT变换公式F(u,v)=CT·f·C可得大小为32×32的DCT系数矩阵,并保留DCT系数矩阵左上角的8×8矩阵,这部分呈现了图片中的最低频率;如图3所示。4) Reduce DCT: According to the DCT transformation formula F(u, v)=C T f C of 3), the DCT coefficient matrix with a size of 32×32 can be obtained, and the 8×8 matrix in the upper left corner of the DCT coefficient matrix is reserved, This part presents the lowest frequencies in the picture; see Figure 3.

5)计算平均值:计算DCT的均值,如:5) Calculate the average value: calculate the average value of DCT, such as:

6)生成哈希指纹:将8×8的DCT系数与均值进行比较,大于或等于平均值,记为1,小于均值,记为0;如图4所示。最后将比较结果按次序组合在一起,就构成了一个64位的哈希指纹。这里需要说明的是,即时图像和模板图像的哈希指纹需要相同的次序排列,如图4按照由上至下每行依次排列的的指纹是:6) Generate a hash fingerprint: compare the 8×8 DCT coefficients with the average value, if it is greater than or equal to the average value, it will be recorded as 1, and if it is less than the average value, it will be recorded as 0; as shown in Figure 4. Finally, the comparison results are combined in order to form a 64-bit hash fingerprint. What needs to be explained here is that the hash fingerprints of the instant image and the template image need to be arranged in the same order, as shown in Figure 4, the fingerprints arranged in sequence from top to bottom are:

1110000010011000100000100010000010000000000000001000100000100000。1110000010011000100000100010000010000000000000001000100000100000.

均值哈希算法流程包括:The average hash algorithm process includes:

1)缩小尺寸:将即时图像缩小到8×8的尺寸,总共64个像素。1) Downsizing: Downsizing the instant image to a size of 8×8 with a total of 64 pixels.

2)简化色彩:将8×8的即时图像转换成灰度图像,并转为64级灰度。2) Simplify color: convert the 8×8 instant image into a grayscale image, and convert it to 64 levels of grayscale.

3)计算平均值:计算所有64个像素的灰度平均值;例如:3) Calculate the average: calculate the gray average of all 64 pixels; for example:

4)比较像素的灰度:将每个像素的灰度与平均值进行比较,大于或等于平均值,记为1,小于平均值,记为0;如图5所示。4) Compare the grayscale of the pixel: compare the grayscale of each pixel with the average value, if it is greater than or equal to the average value, it will be recorded as 1, and if it is less than the average value, it will be recorded as 0; as shown in Figure 5.

5)生成哈希指纹:将4)的比较结果,按一定的次序组合在一起,就构成了一个64位的哈希指纹。如图5按照由上至下每行依次排列的的指纹是:5) Generate a hash fingerprint: combine the comparison results of 4) in a certain order to form a 64-bit hash fingerprint. As shown in Figure 5, the fingerprints arranged in sequence from top to bottom are:

1111111111111111110111111101101111000011110000111100001111100011。11111111111111111011111101101111000011110000111100001111100011.

6.将即时图像得到的哈希指纹和模板图像得到的哈希指纹进行对比,当DCT感知哈希指纹的汉明距离大于10,且均值感知哈希指纹的汉明距离大于20时,说明视频区域内存在车辆,此时控制闸杆保持竖直状态。6. Compare the hash fingerprint obtained from the real-time image with the hash fingerprint obtained from the template image. When the Hamming distance of the DCT-perceived hash fingerprint is greater than 10, and the Hamming distance of the average-perceived hash fingerprint is greater than 20, the video There are vehicles in the area, and the control lever remains vertical at this time.

7.处理模块接收图像采集模块发送的图像信息重复步骤4-6,直到DCT感知哈希指纹的汉明距离小于5,且均值感知哈希指纹的汉明距离小于10时,才控制闸杆下落。7. The processing module receives the image information sent by the image acquisition module and repeats steps 4-6 until the Hamming distance of the DCT-perceived hash fingerprint is less than 5, and the Hamming distance of the average-perceived hash fingerprint is less than 10, then the brake lever is controlled to fall .

本发明在系统组成上可以减少地感应线圈的应用,这样能够避免其在道路感应中存在的缺陷;同时,通过两种哈希算法对图像进行同时分析,能够保证算法的合理性,能够增强算法的抗干扰能力,进而提升算法和系统的可靠性、稳定性。The present invention can reduce the application of ground induction coils in system composition, thus avoiding its defects in road induction; at the same time, the image is analyzed simultaneously through two hash algorithms, which can ensure the rationality of the algorithm and enhance the algorithm The anti-interference ability of the system can improve the reliability and stability of the algorithm and system.

Claims (4)

1.一种基于视觉的车道闸杆防撞系统,包括道闸、处理模块、图像采集模块、存储器模块和上位机;所述图像采集模块安装在道闸旁,并正对目标区域;所述处理模块根据图像采集模块采集到的图像信息进行分析,并控制道闸栏杆的状态;其特征在于:所述存储器模块内存储有模板图像,所述处理模块接收到车道上位机发出的道闸起杆信号时,控制存储器模块将图像采集模块采集到的图像信息更新为模板图像;处理模块对图像信息进行高斯滤波得到即时图像;所述处理模块通过哈希算法分别生成即时图像和模板图像的哈希指纹,哈希指纹为以相同次序组合而成的图像描述字符串;当即时图像与模板图像两者的哈希指纹汉明距离大于设定值时,道闸保持栏杆竖立;当两者汉明距离小于设定值时,道闸栏杆放下;1. A vision-based driveway brake lever anti-collision system, comprising a barrier gate, a processing module, an image acquisition module, a memory module and a host computer; the image acquisition module is installed next to the barrier gate, and faces the target area; the The processing module analyzes the image information collected by the image acquisition module, and controls the state of the railing of the barrier; it is characterized in that: the memory module stores a template image, and the processing module receives the triggering of the barrier from the upper computer of the driveway. When the pole signal is used, the control memory module updates the image information collected by the image acquisition module into a template image; the processing module performs Gaussian filtering on the image information to obtain an instant image; Hash fingerprints, hash fingerprints are image description strings combined in the same order; when the Hamming distance between the hash fingerprints of the instant image and the template image is greater than the set value, the gate will keep the railing erect; When the clear distance is less than the set value, the barrier of the barrier will be lowered; 所述处理模块通过DCT哈希算法生成即时图像的64位哈希指纹和模板图像的64位哈希指纹,计算两者的汉明距离M;所述处理模块通过均值哈希算法生成即时图像的64位哈希指纹和模板图像的64位哈希指纹,计算两者的汉明距离N;若M>10且N>20,道闸保持栏杆竖立;若M<5且N<10,道闸栏杆放下。The processing module generates the 64-bit hash fingerprint of the instant image and the 64-bit hash fingerprint of the template image by the DCT hash algorithm, and calculates the Hamming distance M of the two; the processing module generates the instant image by the mean value hash algorithm Calculate the Hamming distance N between the 64-bit hash fingerprint and the 64-bit hash fingerprint of the template image; if M>10 and N>20, keep the railings upright; if M<5 and N<10, The railing is down. 2.根据权利要求1所述的一种基于视觉的车道闸杆防撞系统,其特征在于:所述DCT哈希算法的即时图像或模板图像的哈希指纹生成步骤为:2. A kind of vision-based lane brake lever anti-collision system according to claim 1, characterized in that: the hash fingerprint generation step of the instant image or template image of the DCT hash algorithm is: 1)将图像缩小到32×32的尺寸;1) Reduce the image to a size of 32×32; 2)将缩小后的图像转化为灰度图像;2) convert the reduced image into a grayscale image; 3)将所述灰度图像进行DCT变换,并得到32×32的DCT系数矩阵;3) performing DCT transformation on the grayscale image, and obtaining a 32×32 DCT coefficient matrix; 4)保留所述DCT系数矩阵左上角的8×8矩阵;4) Reserving the 8×8 matrix in the upper left corner of the DCT coefficient matrix; 5)计算步骤4)DCT系数矩阵内系数均值;5) calculation step 4) coefficient mean value in the DCT coefficient matrix; 6)将步骤4)中DCT矩阵内系数与均值进行一一比较,若大于或等于均值,记为1;若小于均值,记为0;将比较结果按次序组合在一起,构成64位哈希指纹。6) Compare the coefficients in the DCT matrix in step 4) with the mean value one by one, if it is greater than or equal to the mean value, record it as 1; if it is less than the mean value, record it as 0; combine the comparison results in order to form a 64-bit hash fingerprint. 3.根据权利要求1所述的一种基于视觉的车道闸杆防撞系统,其特征在于:所述均值哈希算法的即时图像或模板图像的哈希指纹生成步骤为:3. A kind of vision-based lane brake lever anti-collision system according to claim 1, characterized in that: the hash fingerprint generation step of the instant image or template image of the mean value hash algorithm is: 1)将图像缩小到8×8的尺寸,总共64个像素;1) Reduce the image to a size of 8×8, a total of 64 pixels; 2)将8×8的图像转换成灰度图像,并转为64级灰度;2) Convert the 8×8 image into a grayscale image, and convert it into a 64-level grayscale; 3)计算步骤2)所有64个像素的灰度平均值;3) Calculation step 2) grayscale average value of all 64 pixels; 4)将步骤2)中64级灰度和灰度平均值一一比较,若大于或等于平均值,记为1;若小于平均值,记为0;将比较结果按次序组合在一起,构成64位哈希指纹。4) Compare the 64-level grayscale in step 2) with the grayscale average value one by one. If it is greater than or equal to the average value, record it as 1; if it is less than the average value, record it as 0; combine the comparison results in order to form 64-bit hash fingerprint. 4.根据权利要求1所述的一种基于视觉的车道闸杆防撞系统,其特征在于:所述图像采集模块包括依次连接的CCD图像传感器和SAA7113视频解码芯片;所述处理模块采用DM642芯片;所述SAA7113视频解码芯片连接DM642芯片的VP1接口,所述DM642芯片通过I2C总线连接控制SAA7113视频解码芯片。4. A kind of vision-based lane brake bar collision avoidance system according to claim 1, characterized in that: the image acquisition module includes a CCD image sensor and a SAA7113 video decoding chip connected in sequence; the processing module adopts a DM642 chip ; The SAA7113 video decoding chip is connected to the VP1 interface of the DM642 chip, and the DM642 chip is connected to control the SAA7113 video decoding chip through an I2C bus.
CN201510534043.2A 2015-08-27 2015-08-27 A Vision-Based Anti-Collision System for Lane Brake Lever Active CN105200938B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510534043.2A CN105200938B (en) 2015-08-27 2015-08-27 A Vision-Based Anti-Collision System for Lane Brake Lever

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510534043.2A CN105200938B (en) 2015-08-27 2015-08-27 A Vision-Based Anti-Collision System for Lane Brake Lever

Publications (2)

Publication Number Publication Date
CN105200938A CN105200938A (en) 2015-12-30
CN105200938B true CN105200938B (en) 2017-06-27

Family

ID=54948871

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510534043.2A Active CN105200938B (en) 2015-08-27 2015-08-27 A Vision-Based Anti-Collision System for Lane Brake Lever

Country Status (1)

Country Link
CN (1) CN105200938B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106403951A (en) * 2016-08-26 2017-02-15 观宇能源科技(上海)有限公司 Computer vision based positioning system and positioning method thereof
CN109636797B (en) * 2018-12-21 2022-08-05 国网福建省电力有限公司 Method for detecting deformation of non-contact flexible direct current converter valve module

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9111095B2 (en) * 2012-08-29 2015-08-18 The Johns Hopkins University Apparatus and method for identifying similarity via dynamic decimation of token sequence n-grams
CN103780899B (en) * 2012-10-25 2016-08-17 华为技术有限公司 A kind of detect the most disturbed method of video camera, device and video monitoring system
CN103336890A (en) * 2013-06-08 2013-10-02 东南大学 Method for quickly computing similarity of software
CN103343515B (en) * 2013-07-16 2016-03-09 东北石油大学 Anticollision intelligent barrier gate and Intelligent Recognition control method thereof
CN104866616B (en) * 2015-06-07 2019-01-22 中科院成都信息技术股份有限公司 Monitor video Target Searching Method

Also Published As

Publication number Publication date
CN105200938A (en) 2015-12-30

Similar Documents

Publication Publication Date Title
CN107665603B (en) Real-time detection method for judging parking space occupation
CN109191830B (en) Road congestion detection method based on video image processing
CN100557657C (en) A Vehicle Detection Method Based on Video Image Features
CN103500322B (en) Automatic lane line identification method based on low latitude Aerial Images
CN111009131B (en) High-order video intelligence parking system based on image recognition
CN110298300B (en) Method for detecting vehicle illegal line pressing
CN104616502B (en) Car license recognition and alignment system based on combination type bus or train route video network
CN106128115B (en) Fusion method for detecting road traffic information based on double cameras
CN102324183B (en) Method for detecting and shooting vehicle based on composite virtual coil
CN105225281B (en) A kind of vehicle checking method
CN110992693A (en) A multi-dimensional analysis method of traffic congestion degree based on deep learning
CN106128121B (en) Vehicle queue length fast algorithm of detecting based on Local Features Analysis
CN103714325A (en) Left object and lost object real-time detection method based on embedded system
CN101847206A (en) Pedestrian traffic statistical method and system based on traffic monitoring facilities
WO2021253245A1 (en) Method and device for identifying vehicle lane changing tendency
CN110490150B (en) A system and method for automatic review of illegal pictures based on vehicle retrieval
CN106679633A (en) Vehicle-mounted distance measuring system and vehicle-mounted distance measuring method
CN103164958B (en) Method and system for vehicle monitoring
CN106991821A (en) Vehicles peccancy hand-held mobile terminal data collecting system
CN110807771A (en) Defect detection method for road deceleration strip
CN112084928A (en) Road traffic accident detection method based on visual attention mechanism and ConvLSTM network
WO2022198897A1 (en) Management method and device for on-street parking
CN105966314B (en) Lane departure warning method based on double inexpensive cameras
CN105200938B (en) A Vision-Based Anti-Collision System for Lane Brake Lever
Wei et al. Street object detection/tracking for AI city traffic analysis

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: No.6, Gaoxin 2nd Road, XiXiangTang District, Nanning City, Guangxi Zhuang Autonomous Region

Patentee after: Guangxi Jiaoke Group Co.,Ltd.

Country or region after: China

Address before: No. 6 Gaoxin 2nd Road, High tech Zone, Guangxi Zhuang Autonomous Region

Patentee before: GUANGXI TRANSPORTATION Research Institute

Country or region before: China