CN103927526A - A vehicle detection method based on Gaussian difference multi-scale edge fusion - Google Patents
A vehicle detection method based on Gaussian difference multi-scale edge fusion Download PDFInfo
- Publication number
- CN103927526A CN103927526A CN201410181851.0A CN201410181851A CN103927526A CN 103927526 A CN103927526 A CN 103927526A CN 201410181851 A CN201410181851 A CN 201410181851A CN 103927526 A CN103927526 A CN 103927526A
- Authority
- CN
- China
- Prior art keywords
- image
- gaussian
- edge
- scale
- difference
- 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.)
- Granted
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 45
- 230000004927 fusion Effects 0.000 title claims abstract description 21
- 238000000034 method Methods 0.000 claims abstract description 27
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 7
- 238000009499 grossing Methods 0.000 claims description 9
- 239000011800 void material Substances 0.000 claims 1
- 238000003708 edge detection Methods 0.000 abstract description 13
- 230000000877 morphologic effect Effects 0.000 abstract description 12
- 230000009466 transformation Effects 0.000 abstract description 4
- 238000004364 calculation method Methods 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000006073 displacement reaction Methods 0.000 description 2
- 238000007500 overflow downdraw method Methods 0.000 description 2
- 238000013341 scale-up Methods 0.000 description 2
- 241000282320 Panthera leo Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
Landscapes
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
Description
技术领域technical field
本发明属于视频检测领域,具体涉及一种基于高斯差分多尺度边缘融合的车辆检测方法。The invention belongs to the field of video detection, and in particular relates to a vehicle detection method based on Gaussian difference multi-scale edge fusion.
背景技术Background technique
运动目标检测是计算机视觉及图像模式识别的一项关键技术。基于视觉的车辆检测技术是智能交通图像处理的研究热点,在智能交通领域有着广泛的应用,如车辆辅助驾驶系统,交通参数统计系统等。Moving object detection is a key technology of computer vision and image pattern recognition. Vision-based vehicle detection technology is a research hotspot in intelligent transportation image processing, and has a wide range of applications in the field of intelligent transportation, such as vehicle assisted driving systems, traffic parameter statistics systems, etc.
基于计算机视觉的车辆检测方法大致可分为三类:基于模型,基于神经网络学习,基于特征的方法。基于模型的检测方法将检测到的候选车辆区域与计算机数据库中预先建立的车辆模型进行匹配从而检测车辆,但该方法的缺点在于完全依赖于对所有不同种类车辆进行几何建模,这是很难实现的。Vehicle detection methods based on computer vision can be roughly divided into three categories: model-based, neural network-based learning, and feature-based methods. The model-based detection method matches the detected candidate vehicle area with the pre-established vehicle model in the computer database to detect the vehicle, but the disadvantage of this method is that it completely relies on geometric modeling of all different types of vehicles, which is difficult. Achieved.
基于学习的的检测方法通过使用样本对神经网络进行训练,用训练好的网络进行车辆识别,该方法经常用于验证其他方法的检测结果。基于特征的方法通过检测车辆的局部特征如对称部件(车轮、头灯、尾灯等)、边缘和阴影等,从而定位车辆。该方法的优点在于使用车辆在大多数环境下都可辨别的特征来检测车辆,适用于雨雪天甚至夜间的车辆检测问题。通过检测车轮实现车辆检测的方法容易受到车辆行驶姿态、遮挡等问题的影响,而通过检测车灯的方法也被夜间场景中的路灯及城市灯光所干扰,影响检测结果。而基于边缘检测(包括车辆阴影检测)的车辆检测方法由于背景边缘(如车道线、栏杆、树木等)的存在导致检测结果的不准确,因此,如何最大限度地检测出车辆边缘同时抑制背影边缘,成为提高该方法检测准确率的关键问题。The learning-based detection method uses samples to train the neural network, and uses the trained network for vehicle recognition. This method is often used to verify the detection results of other methods. Feature-based methods localize vehicles by detecting their local features such as symmetrical parts (wheels, headlights, taillights, etc.), edges, and shadows. The advantage of this method is to detect vehicles using features that are distinguishable in most environments, and it is suitable for vehicle detection problems in rainy and snowy days or even at night. The method of detecting vehicles by detecting wheels is easily affected by vehicle driving posture, occlusion and other problems, and the method of detecting vehicle lights is also interfered by street lights and city lights in night scenes, affecting the detection results. The vehicle detection method based on edge detection (including vehicle shadow detection) is inaccurate due to the existence of background edges (such as lane lines, railings, trees, etc.), so how to maximize the detection of vehicle edges while suppressing the background edge , which becomes the key issue to improve the detection accuracy of this method.
发明内容Contents of the invention
本发明的目的在于克服现有技术中的问题,提供一种基于高斯差分多尺度边缘融合的车辆检测方法,该方法降低了算法复杂度,减少了计算量,得到较好的检测结果,有效地提高了检测效率。The purpose of the present invention is to overcome the problems in the prior art and provide a vehicle detection method based on multi-scale edge fusion of Gaussian difference, which reduces the complexity of the algorithm, reduces the amount of calculation, and obtains better detection results, effectively The detection efficiency is improved.
为了实现上述目的,本发明采取如下的技术解决方案予以实现:In order to achieve the above object, the present invention takes the following technical solutions to achieve:
步骤一,采集某路段交通视频,对视频中的一幅图像灰度化并进行高斯金字塔多尺度变换,利用四个相邻尺度参数的高斯核与图像进行卷积运算,得到四幅相邻尺度的高斯图像Gl,其中l表示四个相邻尺度,l=1,2,3,4;Step 1: collect a traffic video of a road section, grayscale an image in the video and perform Gaussian pyramid multi-scale transformation, use the Gaussian kernel of four adjacent scale parameters to perform convolution operation with the image, and obtain four adjacent scale images Gaussian image G l , where l represents four adjacent scales, l=1,2,3,4;
步骤二,对这四幅相邻尺度的高斯图像Gl进行相邻尺度图像差分运算,得到三幅相邻尺度的高斯差分图像Dl,三幅高斯差分图像的尺度分别为:σ,2×σ,2×2×σ;其中l=1,2,3,σ为平滑参数;Step 2: Perform adjacent-scale image difference operation on the four adjacent-scale Gaussian images G l to obtain three adjacent-scale Gaussian difference images D l , and the scales of the three Gaussian difference images are: σ, 2×σ ,2×2×σ; where l=1,2,3, σ is the smoothing parameter;
步骤三,对步骤二得到的三幅高斯差分图像Dl采用Sobel算子进行边缘检测,计算差分图像中每个像素点在水平、垂直两个方向上的梯度幅值,并设置阈值T1,保留梯度幅值大于T1的像素点,此像素点为边缘点并设其灰度值为255,否则设为0,得到对应三个相邻尺度的边缘检测二值图El,其中l=1,2,3;Step 3, use the Sobel operator to perform edge detection on the three Gaussian difference images D l obtained in step 2, calculate the gradient magnitude of each pixel in the difference image in the horizontal and vertical directions, and set the threshold T 1 , Keep the pixel point whose gradient amplitude is greater than T 1 , this pixel point is an edge point and its gray value is set to 255, otherwise it is set to 0, and the edge detection binary image E l corresponding to three adjacent scales is obtained, where l= 1,2,3;
步骤四,对对应三个不同尺度的三幅二值边缘图El进行多尺度边缘融合,其中,l=1,2,3,具体步骤为:Step 4, perform multi-scale edge fusion on three binary edge maps E l corresponding to three different scales, where l=1, 2, 3, the specific steps are:
(1)在四个相邻尺度l下搜索三幅相邻尺度的高斯差分图像Dl的边缘图像El中的每一个边缘像素,由于相邻尺度间的边缘位移不超过1,在尺度为l-1的差分高斯图像Dl-1的边缘图像中搜索相应的面积为3×3的区域,该区域中出现的所有边缘点均标记为边缘点,得到候选边缘图像;(1) Search for each edge pixel in the edge image E l of three adjacent scale Gaussian difference images D l at four adjacent scales l . Since the edge displacement between adjacent scales does not exceed 1, the scale is The differential Gaussian image D of l-1 searches for a corresponding area of 3×3 in the edge image of l-1 , and all edge points appearing in this area are marked as edge points to obtain candidate edge images;
(2)l=l-1;若l>1则跳转至步骤(1),否则执行步骤(3);(2) l=l-1; if l>1, jump to step (1), otherwise execute step (3);
(3)l=1时,边缘图像El则为融合后的边缘图像;(3) When l=1, the edge image E l is the edge image after fusion;
步骤五,对步骤四得到的融合后的边缘图像采用膨胀模板进行形态学处理,设定阈值T2,连接像素间距小于阈值T2的边缘点或线,得到连续边缘;再进行形态学闭运算,弥合边缘图像的孔洞和裂缝,得到进一步闭合的边缘图像;最后经过图像填充将闭合区域的内部空洞填充,形成完整的连通区域;Step 5: Perform morphological processing on the fused edge image obtained in step 4 using an expansion template, set a threshold T 2 , connect edge points or lines whose pixel spacing is smaller than the threshold T 2 , and obtain continuous edges; then perform morphological closing operation , to bridge the holes and cracks in the edge image to obtain a further closed edge image; finally, fill the internal holes in the closed area through image filling to form a complete connected area;
步骤六,对连通区域进行标记,计算每一个连通区域的面积,设置面积阈值T3,剔除面积小于面积阈值T3的连通域;根据连通域坐标确定各连通域的最小外接矩形的坐标,最后在原始灰度图像中显示出来,完成对车辆的检测。Step 6: Mark the connected regions, calculate the area of each connected region, set the area threshold T 3 , and eliminate the connected regions whose area is smaller than the area threshold T 3 ; determine the coordinates of the smallest circumscribed rectangle of each connected region according to the coordinates of the connected regions, and finally It is displayed in the original grayscale image to complete the detection of the vehicle.
所述步骤一中尺度由平滑参数σ和平滑参数k共同决定,k由参数s决定,并且k=2^(1/S),S+3=N,其中N为高斯金字塔每一层中的高斯图片数,取N=4,S=1,σ=0.5,k=2,则四个相邻尺度分别为σ,kσ,2kσ,3kσ。In said step one, the scale is jointly determined by the smoothing parameter σ and the smoothing parameter k, and k is determined by the parameter s, and k=2^(1/S), S+3=N, wherein N is the number in each layer of the Gaussian pyramid For the number of Gaussian pictures, N=4, S=1, σ=0.5, k=2, then the four adjacent scales are σ, kσ, 2kσ, 3kσ respectively.
所述步骤三中Sobel算子水平方向的模板为(-1,0,1;-2,0,2;-1,0,1),垂直方向模板为(-1,-2,-1;0,0,0;1,2,1),阈值T1由最大类间方差法获得。The template in the horizontal direction of the Sobel operator in the step 3 is (-1,0,1;-2,0,2;-1,0,1), and the template in the vertical direction is (-1,-2,-1; 0,0,0; 1,2,1), the threshold T 1 is obtained by the method of maximum between-class variance.
所述步骤五中膨胀模板尺寸为3×3,形态闭运算模板尺寸为8×8,T2取值范围为1~8,并且以像素为单位。In the fifth step, the size of the expansion template is 3×3, the size of the morphological closing operation template is 8×8, and the value range of T 2 is 1-8, and the unit is pixel.
所述步骤六中面积阈值的设置过程为:对标记的n个连通域的面积进行排序,将最大连通域面积的1/4作为面积阈值。The setting process of the area threshold in the step 6 is: sort the areas of the marked n connected domains, and use 1/4 of the area of the largest connected domain as the area threshold.
与现有技术相比,本发明具有的有益效果:本发明公开了一种基于高斯差分多尺度边缘融合的车辆检测方法,首先利用四个相邻尺度参数的高斯核与图像进行卷积运算,得到四幅相邻尺度的高斯图像。然后对这四个相邻尺度的高斯图像进行差分,得到三个相邻尺度的高斯差分图像并对其采用Sobel算子进行边缘检测。然后对检测得到的三幅不同尺度的边缘图像进行尺度向上搜索的边缘融合,得到尽可能多的车辆边缘信息同时去除大量背景边缘。再对融合的边缘图像进行膨胀、闭运算、孔洞填充等一系列形态学操作,得到代表车辆的连通域图像。最后根据连通域的位置信息在原图像中确定出车辆所在位置的外界矩形,实现车辆检测。本发明对非采样的多尺度图像进行处理,避免了图像插值运算造成的边缘信息缺失或出现伪边缘;采用多尺度边缘图像向上搜索融合的方法在得到更多边缘信息的同时抑制背景边缘。该方法降低了算法复杂度,减少了计算量,能有效提高车辆检测的效率,得到较好的检测结果。Compared with the prior art, the present invention has beneficial effects: the present invention discloses a vehicle detection method based on multi-scale edge fusion of Gaussian difference, firstly, the Gaussian kernel of four adjacent scale parameters is used to perform convolution operation with the image, Gaussian images of four adjacent scales are obtained. Then, the Gaussian images of four adjacent scales are differentiated to obtain Gaussian difference images of three adjacent scales, and the Sobel operator is used for edge detection. Then, the edge fusion of the three detected edge images with different scales is performed on the scale-up search to obtain as much vehicle edge information as possible while removing a large number of background edges. Then, a series of morphological operations such as expansion, closing operation, and hole filling are performed on the fused edge image to obtain a connected domain image representing the vehicle. Finally, according to the location information of the connected domain, the outer rectangle of the vehicle location is determined in the original image to realize vehicle detection. The invention processes non-sampled multi-scale images, avoiding the lack of edge information or false edges caused by image interpolation operations; the multi-scale edge image upward search and fusion method is used to obtain more edge information while suppressing background edges. This method reduces the complexity of the algorithm, reduces the amount of calculation, can effectively improve the efficiency of vehicle detection, and obtain better detection results.
附图说明Description of drawings
图1是待检测的灰度图像;Fig. 1 is the grayscale image to be detected;
图2~4是三个相邻尺度的高斯差分图像;Figures 2 to 4 are Gaussian difference images of three adjacent scales;
图5是Sobel算子模板;Figure 5 is the Sobel operator template;
图6是尺度1下的边缘检测结果;Figure 6 is the edge detection result under scale 1;
图7是融合后的边缘图像;Fig. 7 is the edge image after fusion;
图8为形态学闭操作得到的连通域图像;Fig. 8 is the connected domain image obtained by the morphological closing operation;
图9为经孔洞填充后得到的完整连通域图像;Figure 9 is a complete connected domain image obtained after hole filling;
图10为代表车辆的连通域图像;Figure 10 is a connected domain image representing a vehicle;
图11为雨天车辆检测结果。Figure 11 shows the vehicle detection results in rainy days.
图12为晴天车辆检测结果。Figure 12 shows the vehicle detection results on sunny days.
图13为高斯差分多尺度边缘融合的车辆检测算法过程示意图。Fig. 13 is a schematic diagram of the vehicle detection algorithm process of Gaussian difference multi-scale edge fusion.
具体实施方式Detailed ways
本发明给出一种基于高斯差分多尺度边缘融合的车辆检测方法,对一幅大小为W×H车辆图像在多尺度下进行边缘检测,经多尺度融合后的边缘位置信息来确定车辆位置,从而实现车辆检测。The present invention provides a vehicle detection method based on Gaussian difference multi-scale edge fusion, which performs edge detection on a vehicle image with a size of W×H in multiple scales, and determines the vehicle position through the edge position information after multi-scale fusion. In order to realize vehicle detection.
下面结合附图对本发明进行详细说明,参见图13,本发明的方法具体采用以下几个步骤实现:The present invention is described in detail below in conjunction with accompanying drawing, referring to Fig. 13, the method of the present invention adopts following several steps to realize specifically:
步骤一,采集某路段交通视频,在视频中采集一幅大小为517×363的车辆图像I,对其灰度化得到灰度图形,再进行高斯金字塔多尺度变换。利用相邻尺度参数的四个高斯核G与图像I进行卷积运算,得到四幅相邻尺度的非采样高斯图像Gl(l=1,2,3,4),其中l表示四个相邻尺度。Step 1: collect a traffic video of a road section, collect a vehicle image I with a size of 517×363 in the video, grayscale it to obtain a grayscale image, and then perform Gaussian pyramid multi-scale transformation. Using four Gaussian kernels G of adjacent scale parameters to perform convolution operation with image I, four unsampled Gaussian images G l (l=1,2,3,4) of adjacent scales are obtained, where l represents four adjacent scale.
尺度由平滑参数σ和平滑参数k共同决定,而平滑参数k由参数s决定。k=2^(1/S),S+3=N,其中N为高斯金字塔每一层中的高斯图片数(根据Lowe论文),本发明中取N=4,S=1,σ=0.5,k=2,取σ=0.5,S=1,k=2,四个相邻尺度分别为σ,kσ,2kσ,3kσ,即σ,2×σ,2×2×σ,3×2×σ。The scale is jointly determined by the smoothing parameter σ and the smoothing parameter k, and the smoothing parameter k is determined by the parameter s. k=2^(1/S), S+3=N, where N is the number of Gaussian pictures in each layer of the Gaussian pyramid (according to the Lowe paper), and N=4 in the present invention, S=1, σ=0.5 , k=2, take σ=0.5, S=1, k=2, the four adjacent scales are σ, kσ, 2kσ, 3kσ, namely σ, 2×σ, 2×2×σ, 3×2× σ.
步骤二,对这四幅未经下采样的大小相同,尺度不同的高斯图像Gl(l=1,2,3,4)进行相邻尺度图像差分运算,得到三幅相邻尺度的高斯差分图像Dl,其中,l=1,2,3和三幅高斯差分图像的尺度分别为:σ,2×σ,2×2×σ。Step 2: Perform adjacent-scale image difference operations on the four Gaussian images G l (l=1,2,3,4) of the same size and different scales that have not been down-sampled to obtain three adjacent-scale Gaussian difference images D l , where l=1, 2, 3 and the scales of the three Gaussian difference images are: σ, 2×σ, 2×2×σ, respectively.
步骤三,对步骤二得到的三幅高斯差分图像Dl分别采用Sobel算子进行边缘检测。Sobel算子通过计算差分图像中每个像素点在水平、垂直两个方向上的梯度幅值,采用最大类间方差(OTSU)法设置阈值T1,保留梯度幅值大于T1的像素点为边缘点并设置为1,否则置为0,得到对应三个不同尺度的边缘检测图El(l=1,2,3)。Step 3, use the Sobel operator to perform edge detection on the three Gaussian difference images D l obtained in step 2 respectively. The Sobel operator calculates the gradient magnitude of each pixel in the difference image in the horizontal and vertical directions, and uses the maximum between-class variance (OTSU) method to set the threshold T 1 , and retains the pixels whose gradient magnitude is greater than T 1 as The edge points are set to 1, otherwise they are set to 0, and three corresponding edge detection maps E l (l=1,2,3) of different scales are obtained.
Sobel算子水平方向的模板为(-1,0,1;-2,0,2;-1,0,1),垂直方向模板为(-1,-2,-1;0,0,0;1,2,1)。The horizontal template of the Sobel operator is (-1,0,1;-2,0,2;-1,0,1), and the vertical template is (-1,-2,-1;0,0,0 ;1,2,1).
步骤四,对三幅边缘检测图像El(l=1,2,3)进行多尺度边缘融合,步骤为:Step 4, perform multi-scale edge fusion on the three edge detection images E l (l=1, 2, 3), the steps are:
(1)在尺度l下搜索差分高斯图像Dl的边缘图像El中的每一个边缘像素,由于相邻尺度间的边缘位移不超过1,在尺度为l-1的差分高斯图像Dl-1的边缘图像中搜索相应的面积为3×3的区域,该区域中出现的所有边缘点均标记为边缘点,得到候选边缘图像;(1) Search for each edge pixel in the edge image E l of the differential Gaussian image D l at scale l. Since the edge displacement between adjacent scales does not exceed 1, in the differential Gaussian image D l- In the edge image of 1 , the corresponding area of 3×3 is searched, and all edge points appearing in this area are marked as edge points, and the candidate edge image is obtained;
(2)l=l-1;若l>1则跳转至步骤(1),否则执行步骤(3);(2) l=l-1; if l>1, jump to step (1), otherwise execute step (3);
(3)l=1时,边缘图像El即为融合后得到的边缘图像。(3) When l=1, the edge image E l is the edge image obtained after fusion.
步骤五,对步骤四得到的边缘图像采用膨胀模板进行形态学处理,称为线条扩充处理,连接像素间距小于阈值T2的边缘点或线,得到连续边缘。再进行形态学闭运算,弥合边缘图像的孔洞和裂缝,得到进一步闭合的边缘图像。最后经过图像填充将闭合区域的内部空洞填充起来,形成完整的连通区域。In step five, the edge image obtained in step four is subjected to morphological processing using an expansion template, which is called line expansion processing, and the edge points or lines whose pixel spacing is smaller than the threshold T 2 are connected to obtain continuous edges. Then, the morphological closing operation is performed to bridge the holes and cracks in the edge image to obtain a further closed edge image. Finally, the internal cavity of the closed area is filled by image filling to form a complete connected area.
其中,膨胀模板尺寸为3×3,形态闭运算模板尺寸为8×8,T2=1~8(以像素为单位)。Wherein, the size of the expansion template is 3×3, the size of the morphological closing operation template is 8×8, and T 2 =1˜8 (in pixels).
步骤六,对连通区域进行标记并计算每一个连通区域的面积,设置面积阈值T3,小于面积阈值T3的连通域视为背景区域而被剔除。根据连通域坐标确定各连通域的最小外接矩形的坐标,最后在原始灰度图像中显示出来,完成对车辆的检测。Step 6: mark the connected regions and calculate the area of each connected region, set the area threshold T 3 , and the connected regions smaller than the area threshold T 3 are regarded as background regions and eliminated. Determine the coordinates of the smallest circumscribed rectangle of each connected domain according to the coordinates of the connected domain, and finally display it in the original grayscale image to complete the detection of the vehicle.
其中,面积阈值T3的设置:对标记的N个连通域的面积进行排序,取最大连通域面积的1/4作为面积阈值。Among them, the setting of the area threshold T 3 : sort the areas of the marked N connected domains, and take 1/4 of the area of the largest connected domain as the area threshold.
以下给出本发明的具体实施例,需要说明的是本发明并不局限于以下具体实施例,凡是在本申请方案基础上做的同等变换均落入本发明的保护范围。Specific embodiments of the present invention are given below, and it should be noted that the present invention is not limited to the following specific embodiments, and all equivalent transformations done on the basis of the scheme of the present application all fall within the scope of protection of the present invention.
实施例:Example:
采集一幅大小为517×363雨天交通图像的灰度化得到灰度图,如图1所示,选取尺度参数σ=0.5,k=2,用尺度分别为σ,2×σ,2×2×σ,3×2×σ的四个高斯核分别与灰度图进行卷积运算,得到四个相邻尺度的非采样高斯模糊图像。Collect a rainy day traffic image with a size of 517×363 to grayscale to obtain a grayscale image, as shown in Figure 1, select the scale parameters σ=0.5, k=2, and use the scales as σ, 2×σ, 2×2 The four Gaussian kernels of ×σ, 3×2×σ are respectively convolved with the grayscale image to obtain non-sampled Gaussian blurred images of four adjacent scales.
对四个相邻尺度的未经下采样的大小相同而尺度不同的高斯模糊图像进行相邻尺度差分运算得到三幅相邻尺度的高斯差分图像,即尺度1与尺度2的高斯图像差分得到尺度为的高斯差分图,图尺度2与尺度3的高斯图像差分得到尺度为的差分图,尺度3与尺度4的高斯图像差分得到尺度为的差分图。高斯差分图如图2~4所示。The adjacent scale difference operation is performed on the Gaussian blur images of the same size but different scales that have not been downsampled in four adjacent scales to obtain three Gaussian difference images of adjacent scales, that is, the difference between the Gaussian images of scale 1 and scale 2 is obtained. The Gaussian difference map of scale 2 and scale 3 is the Gaussian difference map of scale , and the Gaussian image difference of scale 3 and scale 4 is the difference map of scale . The difference of Gaussian diagram is shown in Figures 2-4.
利用如图5所示的水平方向模板(-1,0,1;-2,0,2;-1,0,1),垂直方向模板(-1,-2,-1;0,0,0;1,2,1)的Sobel算子对三幅高斯差分图进行边缘检测,得到三幅相邻尺度的边缘检测图,尺度1的边缘图如图6所示。以尺度3边缘图中的每一个边缘点为中心,在尺度2的边缘图中对其3×3邻域进行搜索,保留邻域内的边缘点,至搜索结束,得到第一次融合后的边缘图。对此边缘图中的每一个边缘点,在尺度为1的边缘图中继续进行上述同样操作,得到最终的边缘融合图像,如图7所示。Using the horizontal direction template (-1,0,1;-2,0,2;-1,0,1) as shown in Figure 5, the vertical direction template (-1,-2,-1;0,0, 0; 1, 2, 1) Sobel operator performs edge detection on three Gaussian difference maps, and obtains three edge detection maps of adjacent scales. The edge map of scale 1 is shown in Figure 6. Take each edge point in the scale 3 edge map as the center, search its 3×3 neighborhood in the scale 2 edge map, keep the edge points in the neighborhood, and get the edge after the first fusion until the end of the search picture. For each edge point in the edge map, continue to perform the same operation above in the edge map with a scale of 1 to obtain the final edge fusion image, as shown in FIG. 7 .
取T2=3,对边缘融合图像以3×3模板进行形态学膨胀,再以8×8模板进行形态学闭运算,得到边缘闭合的连通域,如图8所示。对图8进行图像填充,弥合连通域中的孔洞,得到完整的连通域图像(如图9所示)。Take T 2 =3, perform morphological expansion on the edge fusion image with a 3×3 template, and then perform morphological closing operation with an 8×8 template to obtain a connected domain with closed edges, as shown in Figure 8 . Carry out image filling on Figure 8 to bridge the holes in the connected domain to obtain a complete connected domain image (as shown in Figure 9).
对图9进行连通域标记(标记结果为16),计算每一个连通域的面积并按从大到小顺序排序,以最大连通域面积的1/4为阈值(本例中为2300),剔除面积小于阈值的连通域,得到的连通域图像(如图10所示)视为车辆所在位置。在图1中相应位置画出连通域外接矩形,得到雨天车辆检测结果,如图11所示。图12为对另一场景(晴天)采用本发明处理得到的检测结果。Mark the connected domains in Figure 9 (the marking result is 16), calculate the area of each connected domain and sort them in descending order, take 1/4 of the largest connected domain area as the threshold (2300 in this example), and remove For connected domains whose area is smaller than the threshold, the obtained connected domain image (as shown in Figure 10) is regarded as the location of the vehicle. Draw the circumscribed rectangle of the connected domain at the corresponding position in Figure 1 to obtain the vehicle detection results in rainy weather, as shown in Figure 11. Fig. 12 is the detection result obtained by applying the present invention to another scene (sunny day).
从图11和12可以看出,按照上述方法进行车辆检测,实现了较好的检测结果。本实例表明,本发明的方案算法简单,减少了计算量,同时实现了较好的车辆检测。It can be seen from Figures 11 and 12 that the vehicle detection is carried out according to the above method, and a better detection result is achieved. This example shows that the scheme algorithm of the present invention is simple, reduces the amount of calculation, and realizes better vehicle detection at the same time.
本发明公开了一种基于高斯差分多尺度边缘融合的车辆检测方法,首先利用四个相邻尺度参数的高斯核与图像进行卷积运算,得到四幅相邻尺度的高斯图像。然后对这四个相邻尺度的高斯图像进行差分,得到三个相邻尺度的高斯差分图像并对其采用Sobel算子进行边缘检测。然后对检测得到的三幅相邻尺度的边缘图像进行尺度向上搜索的边缘融合,得到尽可能多的车辆边缘信息同时去除大量背景边缘。再对融合的边缘图像进行膨胀、闭运算、孔洞填充等一系列形态学操作,得到代表车辆的连通域图像。最后根据连通域的位置信息在原图像中确定出车辆所在位置的外界矩形,实现车辆检测。本发明对非采样的多尺度图像进行处理,避免了图像插值运算造成的边缘信息缺失或出现伪边缘;采用多尺度边缘图像向上搜索融合的方法在得到更多边缘信息的同时抑制背景边缘。该方法降低了算法复杂度,减少了计算量,能有效提高车辆检测的效率,得到较好的检测结果。The invention discloses a vehicle detection method based on multi-scale edge fusion of Gaussian difference. Firstly, Gaussian kernels of four adjacent scale parameters are used to perform convolution operation with images to obtain four Gaussian images of adjacent scales. Then, the Gaussian images of four adjacent scales are differentiated to obtain Gaussian difference images of three adjacent scales, and the Sobel operator is used for edge detection. Then, the detected edge images of three adjacent scales are merged by scale-up search to obtain as much vehicle edge information as possible while removing a large number of background edges. Then, a series of morphological operations such as expansion, closing operation, and hole filling are performed on the fused edge image to obtain a connected domain image representing the vehicle. Finally, according to the location information of the connected domain, the outer rectangle of the vehicle location is determined in the original image to realize vehicle detection. The invention processes non-sampled multi-scale images, avoiding the lack of edge information or false edges caused by image interpolation operations; the multi-scale edge image upward search and fusion method is used to obtain more edge information while suppressing background edges. This method reduces the complexity of the algorithm, reduces the amount of calculation, can effectively improve the efficiency of vehicle detection, and obtain better detection results.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410181851.0A CN103927526B (en) | 2014-04-30 | 2014-04-30 | Vehicle detection method based on Gaussian difference multi-scale edge fusion |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410181851.0A CN103927526B (en) | 2014-04-30 | 2014-04-30 | Vehicle detection method based on Gaussian difference multi-scale edge fusion |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103927526A true CN103927526A (en) | 2014-07-16 |
CN103927526B CN103927526B (en) | 2017-02-15 |
Family
ID=51145742
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410181851.0A Active CN103927526B (en) | 2014-04-30 | 2014-04-30 | Vehicle detection method based on Gaussian difference multi-scale edge fusion |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103927526B (en) |
Cited By (29)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104598906A (en) * | 2015-03-04 | 2015-05-06 | 西安工业大学 | External-profile detection method and device for vehicles |
CN105956532A (en) * | 2016-04-25 | 2016-09-21 | 大连理工大学 | A traffic scene classification method based on multi-scale convolutional neural network |
CN107240111A (en) * | 2017-06-14 | 2017-10-10 | 郑州天迈科技股份有限公司 | Edge connection segmentation passenger flow statistical method |
CN107492110A (en) * | 2017-07-31 | 2017-12-19 | 腾讯科技(深圳)有限公司 | A kind of method for detecting image edge, device and storage medium |
CN107730521A (en) * | 2017-04-29 | 2018-02-23 | 安徽慧视金瞳科技有限公司 | The quick determination method of roof edge in a kind of image |
CN108596931A (en) * | 2018-05-11 | 2018-09-28 | 浙江大学 | A kind of noise robustness hub edge detection algorithm based on Canny operators |
CN108629781A (en) * | 2018-04-24 | 2018-10-09 | 成都品果科技有限公司 | A kind of hair method for drafting |
CN108830169A (en) * | 2018-05-24 | 2018-11-16 | 中国农业大学 | The detection method and system of aerator working condition |
CN108957530A (en) * | 2018-05-23 | 2018-12-07 | 电子科技大学 | A kind of crack automatic testing method based on Acceleration Algorithm in Seismic Coherence Cube slice |
CN109242884A (en) * | 2018-08-14 | 2019-01-18 | 西安电子科技大学 | Remote sensing video target tracking method based on JCFNet network |
CN109389617A (en) * | 2018-08-27 | 2019-02-26 | 深圳大学 | A kind of motion estimate based on piece heterogeneous system and method for tracing and system |
CN109543487A (en) * | 2018-11-22 | 2019-03-29 | 福州图腾易讯信息技术有限公司 | A kind of automatic sensing triggering method and its system based on bar edges segmentation |
CN109559299A (en) * | 2018-11-19 | 2019-04-02 | 常州大学 | A kind of separation method of double fruit overlapping fruits |
CN109741406A (en) * | 2019-01-03 | 2019-05-10 | 广州广电银通金融电子科技有限公司 | A kind of body color recognition methods under monitoring scene |
CN109784322A (en) * | 2019-01-04 | 2019-05-21 | 平安科技(深圳)有限公司 | A kind of recognition methods of vin code, equipment and medium based on image procossing |
CN109886312A (en) * | 2019-01-28 | 2019-06-14 | 同济大学 | A bridge vehicle wheel detection method based on multi-layer feature fusion neural network model |
CN111324145A (en) * | 2020-02-28 | 2020-06-23 | 厦门理工学院 | Unmanned aerial vehicle autonomous landing method, device, equipment and storage medium |
CN111353446A (en) * | 2020-03-05 | 2020-06-30 | 广智微芯(扬州)有限公司 | Lane line detection method and system |
CN111626304A (en) * | 2020-05-20 | 2020-09-04 | 中国科学院新疆理化技术研究所 | Color feature extraction method based on machine vision and application thereof |
CN111915496A (en) * | 2019-05-08 | 2020-11-10 | 北京字节跳动网络技术有限公司 | Image processing method, device and storage medium |
CN112329677A (en) * | 2020-11-12 | 2021-02-05 | 北京环境特性研究所 | Remote sensing image river target detection method and device based on feature fusion |
CN112520524A (en) * | 2021-01-13 | 2021-03-19 | 大连理工大学 | Intelligent elevator control interaction device and control method based on gesture recognition technology |
CN112819843A (en) * | 2021-01-20 | 2021-05-18 | 上海大学 | Method and system for extracting power line at night |
CN113269800A (en) * | 2021-05-25 | 2021-08-17 | 华能海南发电股份有限公司澄迈光伏电站 | Infrared image segmentation method for solar photovoltaic module |
CN114494318A (en) * | 2022-02-17 | 2022-05-13 | 天津市眼科医院 | A method of corneal contour extraction based on Otsu algorithm based on corneal dynamic deformation video |
CN114972276A (en) * | 2022-06-05 | 2022-08-30 | 长沙烽铭智能科技有限公司 | Automatic driving distance judgment algorithm for vehicle |
CN115311320A (en) * | 2022-08-05 | 2022-11-08 | 中原动力智能机器人有限公司 | Robot control method and device based on escalator detection |
CN115775250A (en) * | 2023-02-13 | 2023-03-10 | 惠州威尔高电子有限公司 | Golden finger circuit board defect rapid detection system based on digital image analysis |
CN118628495A (en) * | 2024-08-13 | 2024-09-10 | 广州优箔良材科技有限公司 | Foil cutting abnormality monitoring method based on machine vision |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101520894A (en) * | 2009-02-18 | 2009-09-02 | 上海大学 | Method for extracting significant object based on region significance |
US20100266183A1 (en) * | 2007-12-10 | 2010-10-21 | Agfa Healthcare Nv | Method of Generating a Multiscale Contrast Enhanced IMage |
CN102289806A (en) * | 2011-06-21 | 2011-12-21 | 北京航空航天大学 | Method for measuring image definition by utilizing multi-scale morphological characteristics |
CN103714538A (en) * | 2013-12-20 | 2014-04-09 | 中联重科股份有限公司 | Road edge detection method and device and vehicle |
-
2014
- 2014-04-30 CN CN201410181851.0A patent/CN103927526B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100266183A1 (en) * | 2007-12-10 | 2010-10-21 | Agfa Healthcare Nv | Method of Generating a Multiscale Contrast Enhanced IMage |
CN101520894A (en) * | 2009-02-18 | 2009-09-02 | 上海大学 | Method for extracting significant object based on region significance |
CN102289806A (en) * | 2011-06-21 | 2011-12-21 | 北京航空航天大学 | Method for measuring image definition by utilizing multi-scale morphological characteristics |
CN103714538A (en) * | 2013-12-20 | 2014-04-09 | 中联重科股份有限公司 | Road edge detection method and device and vehicle |
Non-Patent Citations (1)
Title |
---|
刘立: "基于多尺度特征的图像匹配与目标定位研究", 《中国博士学位论文全文数据库 信息科技辑》 * |
Cited By (45)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104598906A (en) * | 2015-03-04 | 2015-05-06 | 西安工业大学 | External-profile detection method and device for vehicles |
CN104598906B (en) * | 2015-03-04 | 2017-08-22 | 西安工业大学 | Vehicle outline detection method and its device |
CN105956532A (en) * | 2016-04-25 | 2016-09-21 | 大连理工大学 | A traffic scene classification method based on multi-scale convolutional neural network |
CN105956532B (en) * | 2016-04-25 | 2019-05-21 | 大连理工大学 | A traffic scene classification method based on multi-scale convolutional neural network |
CN107730521A (en) * | 2017-04-29 | 2018-02-23 | 安徽慧视金瞳科技有限公司 | The quick determination method of roof edge in a kind of image |
CN107730521B (en) * | 2017-04-29 | 2020-11-03 | 安徽慧视金瞳科技有限公司 | Method for rapidly detecting ridge type edge in image |
CN107240111A (en) * | 2017-06-14 | 2017-10-10 | 郑州天迈科技股份有限公司 | Edge connection segmentation passenger flow statistical method |
CN107492110A (en) * | 2017-07-31 | 2017-12-19 | 腾讯科技(深圳)有限公司 | A kind of method for detecting image edge, device and storage medium |
CN108629781B (en) * | 2018-04-24 | 2022-04-22 | 成都品果科技有限公司 | Hair drawing method |
CN108629781A (en) * | 2018-04-24 | 2018-10-09 | 成都品果科技有限公司 | A kind of hair method for drafting |
CN108596931A (en) * | 2018-05-11 | 2018-09-28 | 浙江大学 | A kind of noise robustness hub edge detection algorithm based on Canny operators |
CN108957530A (en) * | 2018-05-23 | 2018-12-07 | 电子科技大学 | A kind of crack automatic testing method based on Acceleration Algorithm in Seismic Coherence Cube slice |
CN108957530B (en) * | 2018-05-23 | 2019-08-23 | 电子科技大学 | A kind of crack automatic testing method based on Acceleration Algorithm in Seismic Coherence Cube slice |
CN108830169A (en) * | 2018-05-24 | 2018-11-16 | 中国农业大学 | The detection method and system of aerator working condition |
CN108830169B (en) * | 2018-05-24 | 2020-10-09 | 中国农业大学 | Method and system for detecting working state of aerator |
CN109242884A (en) * | 2018-08-14 | 2019-01-18 | 西安电子科技大学 | Remote sensing video target tracking method based on JCFNet network |
CN109242884B (en) * | 2018-08-14 | 2020-11-20 | 西安电子科技大学 | Remote sensing video target tracking method based on JCFNet network |
CN109389617A (en) * | 2018-08-27 | 2019-02-26 | 深圳大学 | A kind of motion estimate based on piece heterogeneous system and method for tracing and system |
CN109559299B (en) * | 2018-11-19 | 2023-07-25 | 常州大学 | Method for separating double-fruit overlapped fruits |
CN109559299A (en) * | 2018-11-19 | 2019-04-02 | 常州大学 | A kind of separation method of double fruit overlapping fruits |
CN109543487B (en) * | 2018-11-22 | 2022-04-01 | 福州图腾易讯信息技术有限公司 | Automatic induction triggering method and system based on bar code edge segmentation |
CN109543487A (en) * | 2018-11-22 | 2019-03-29 | 福州图腾易讯信息技术有限公司 | A kind of automatic sensing triggering method and its system based on bar edges segmentation |
CN109741406A (en) * | 2019-01-03 | 2019-05-10 | 广州广电银通金融电子科技有限公司 | A kind of body color recognition methods under monitoring scene |
CN109784322A (en) * | 2019-01-04 | 2019-05-21 | 平安科技(深圳)有限公司 | A kind of recognition methods of vin code, equipment and medium based on image procossing |
CN109886312B (en) * | 2019-01-28 | 2023-06-06 | 同济大学 | A bridge vehicle wheel detection method based on multi-layer feature fusion neural network model |
CN109886312A (en) * | 2019-01-28 | 2019-06-14 | 同济大学 | A bridge vehicle wheel detection method based on multi-layer feature fusion neural network model |
CN111915496A (en) * | 2019-05-08 | 2020-11-10 | 北京字节跳动网络技术有限公司 | Image processing method, device and storage medium |
CN111915496B (en) * | 2019-05-08 | 2024-04-23 | 北京字节跳动网络技术有限公司 | Image processing method, device and storage medium |
CN111324145B (en) * | 2020-02-28 | 2022-08-16 | 厦门理工学院 | Unmanned aerial vehicle autonomous landing method, device, equipment and storage medium |
CN111324145A (en) * | 2020-02-28 | 2020-06-23 | 厦门理工学院 | Unmanned aerial vehicle autonomous landing method, device, equipment and storage medium |
CN111353446A (en) * | 2020-03-05 | 2020-06-30 | 广智微芯(扬州)有限公司 | Lane line detection method and system |
CN111626304B (en) * | 2020-05-20 | 2023-08-04 | 中国科学院新疆理化技术研究所 | Color feature extraction method based on machine vision and application thereof |
CN111626304A (en) * | 2020-05-20 | 2020-09-04 | 中国科学院新疆理化技术研究所 | Color feature extraction method based on machine vision and application thereof |
CN112329677A (en) * | 2020-11-12 | 2021-02-05 | 北京环境特性研究所 | Remote sensing image river target detection method and device based on feature fusion |
CN112329677B (en) * | 2020-11-12 | 2024-02-02 | 北京环境特性研究所 | Remote sensing image river channel target detection method and device based on feature fusion |
CN112520524A (en) * | 2021-01-13 | 2021-03-19 | 大连理工大学 | Intelligent elevator control interaction device and control method based on gesture recognition technology |
CN112819843A (en) * | 2021-01-20 | 2021-05-18 | 上海大学 | Method and system for extracting power line at night |
CN113269800A (en) * | 2021-05-25 | 2021-08-17 | 华能海南发电股份有限公司澄迈光伏电站 | Infrared image segmentation method for solar photovoltaic module |
CN114494318A (en) * | 2022-02-17 | 2022-05-13 | 天津市眼科医院 | A method of corneal contour extraction based on Otsu algorithm based on corneal dynamic deformation video |
CN114972276A (en) * | 2022-06-05 | 2022-08-30 | 长沙烽铭智能科技有限公司 | Automatic driving distance judgment algorithm for vehicle |
CN114972276B (en) * | 2022-06-05 | 2025-01-21 | 长沙烽铭智能科技有限公司 | An algorithm for determining distance of vehicle autonomous driving |
CN115311320A (en) * | 2022-08-05 | 2022-11-08 | 中原动力智能机器人有限公司 | Robot control method and device based on escalator detection |
CN115775250A (en) * | 2023-02-13 | 2023-03-10 | 惠州威尔高电子有限公司 | Golden finger circuit board defect rapid detection system based on digital image analysis |
CN118628495A (en) * | 2024-08-13 | 2024-09-10 | 广州优箔良材科技有限公司 | Foil cutting abnormality monitoring method based on machine vision |
CN118628495B (en) * | 2024-08-13 | 2024-11-05 | 广州优箔良材科技有限公司 | Method for monitoring abnormal cutting of foil based on machine vision |
Also Published As
Publication number | Publication date |
---|---|
CN103927526B (en) | 2017-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103927526B (en) | Vehicle detection method based on Gaussian difference multi-scale edge fusion | |
CN109784344B (en) | Image non-target filtering method for ground plane identification recognition | |
Son et al. | Real-time illumination invariant lane detection for lane departure warning system | |
CN105893949B (en) | A kind of method for detecting lane lines under complex road condition scene | |
Yan et al. | A method of lane edge detection based on Canny algorithm | |
CN104658011B (en) | A kind of intelligent transportation moving object detection tracking | |
CN102509098B (en) | A fisheye image vehicle recognition method | |
CN105488492B (en) | A color image preprocessing method, road recognition method and related device | |
CN110210451B (en) | A zebra crossing detection method | |
Gomez et al. | Traffic lights detection and state estimation using hidden markov models | |
CN109726717B (en) | A vehicle comprehensive information detection system | |
CN107895492A (en) | A kind of express highway intelligent analysis method based on conventional video | |
CN107230202A (en) | The automatic identifying method and system of pavement disease image | |
CN113516853B (en) | Multi-lane traffic flow detection method for complex monitoring scene | |
CN108615034A (en) | A kind of licence plate recognition method that template matches are combined with neural network algorithm | |
CN108280450A (en) | A kind of express highway pavement detection method based on lane line | |
Ying et al. | Robust lane marking detection using boundary-based inverse perspective mapping | |
CN103206957B (en) | The lane detection and tracking method of vehicular autonomous navigation | |
CN104700071B (en) | A kind of extracting method of panorama sketch road profile | |
CN106067003A (en) | Road vectors tag line extraction method in a kind of Vehicle-borne Laser Scanning point cloud | |
CN107895151A (en) | Method for detecting lane lines based on machine vision under a kind of high light conditions | |
CN106295528A (en) | A kind of vehicle checking method based on multi-part spatial relation GMM modeling | |
CN107045634A (en) | A kind of text positioning method based on maximum stable extremal region and stroke width | |
CN106407924A (en) | Binocular road identifying and detecting method based on pavement characteristics | |
CN107256633B (en) | Vehicle type classification method based on monocular camera three-dimensional estimation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |