CN102610104B - Onboard front vehicle detection method - Google Patents
Onboard front vehicle detection method Download PDFInfo
- Publication number
- CN102610104B CN102610104B CN201210069979.9A CN201210069979A CN102610104B CN 102610104 B CN102610104 B CN 102610104B CN 201210069979 A CN201210069979 A CN 201210069979A CN 102610104 B CN102610104 B CN 102610104B
- Authority
- CN
- China
- Prior art keywords
- image
- vehicle
- threshold value
- shadow region
- shadow
- 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.)
- Expired - Fee Related
Links
Landscapes
- Traffic Control Systems (AREA)
- Image Analysis (AREA)
Abstract
本发明公开了一种车载的前方车辆检测方法,包括以下步骤:1)通过摄像机得到连续的图像,并传至计算机中进行处理;2)在待检测的图像上设置特定检测区域R1,并利用车辆的底部阴影特征和车牌特征对前方车辆进行检测;3)利用车辆的车牌特征确定前方车辆的车牌。本发明可以在运动相机或静止相机上使用,而且计算量小,实时性好,对不同光强有一定的适应性,且识别率较高,能够满足一般应用要求。
The invention discloses a vehicle-mounted vehicle detection method in front, comprising the following steps: 1) obtaining continuous images through a camera, and transmitting them to a computer for processing; 2) setting a specific detection area R1 on the image to be detected, and using The vehicle's bottom shadow feature and license plate feature detect the vehicle in front; 3) use the license plate feature of the vehicle to determine the license plate of the vehicle in front. The invention can be used on a moving camera or a still camera, and has small calculation amount, good real-time performance, certain adaptability to different light intensities, high recognition rate, and can meet general application requirements.
Description
技术领域 technical field
本发明涉及一种车载的前方车辆检检测方法,属于图像处理在智能交通上的应用技术领域。 The invention relates to a vehicle-mounted vehicle detection method in front, and belongs to the technical field of application of image processing in intelligent transportation.
背景技术 Background technique
目前检测前方车辆的方法一般都是针对摄像头固定的情况下进行处理,且处理时由于要对整个图像像素进行处理,再加上预处理,提取特征,检测,识别的方法比较复杂,计算量很大,处理器负担比较大,一般处理器不能够在完成其他工作的同时仍然保证图像处理的速度。否则就需要比较高端的处理器,加大了图像处理的成本。 At present, the method of detecting the vehicle in front is generally processed when the camera is fixed, and the processing needs to process the entire image pixel, plus preprocessing, feature extraction, detection, and identification methods are more complicated, and the amount of calculation is very large. Large, the burden on the processor is relatively large, and the general processor cannot guarantee the speed of image processing while completing other tasks. Otherwise, a relatively high-end processor is required, which increases the cost of image processing.
发明内容 Contents of the invention
本发明所要解决的技术问题是提供一种前方车辆检测方法,可以在运动摄像头上使用,而且计算量小,能够满足现实使用中对实时性的要求。 The technical problem to be solved by the present invention is to provide a front vehicle detection method, which can be used on a motion camera, has a small amount of calculation, and can meet real-time requirements in actual use.
为解决上述技术问题,本发明所采用的技术方案是: In order to solve the problems of the technologies described above, the technical solution adopted in the present invention is:
一种车载的前方车辆检测方法,其特征在于,包括以下步骤: A vehicle-mounted vehicle detection method ahead, characterized in that, comprising the following steps:
1)通过摄像机得到连续的图像,并传至计算机中进行处理; 1) Obtain continuous images through the camera and send them to the computer for processing;
2)在待检测的图像上设置特定检测区域R1,并利用车辆的底部阴影特征和车牌特征对前方车辆进行检测; 2) Set a specific detection area R1 on the image to be detected, and use the bottom shadow feature and license plate feature of the vehicle to detect the vehicle in front;
3)利用车辆的车牌特征确定前方车辆的车牌。 3) Using the license plate features of the vehicle to determine the license plate of the vehicle in front.
前述的前方车辆检测方法,其特征在于:在所述步骤2)中,所述特定检测区域R1为图像的宽度在W/4到W*3/4,高度在图像的H/2到H,其中W和H为图像的宽和高。 The aforementioned vehicle detection method in front is characterized in that: in the step 2), the specific detection region R1 has an image width of W/4 to W*3/4 and a height of H/2 to H of the image, Where W and H are the width and height of the image.
前述的前方车辆检测方法,其特征在于:在对现场视频检测的过程中,通过对图像阴影像素的数值统计和分析,判别前方是否有车辆,当判别前方连续有车达到阈值的帧数时就认为确实前方有车。 The aforementioned vehicle detection method in front is characterized in that: in the process of on-site video detection, through the numerical statistics and analysis of shadow pixels in the image, it is judged whether there is a vehicle in front, and when it is judged that there are consecutive cars in front that reach the threshold frame number, We think that there is car ahead surely.
前述的前方车辆检测方法,其特征在于:图像阴影像素的数值统计和分析方法为,若像素R,G,B三通道的灰度值低于阈值,且三通道的灰度值与区域灰度均值的1/3的差大于阈值,则将该像素标记为白色作为前景;否则标记为黑色作为背景,并对处理后的图像做单次腐蚀膨胀处理,以获取离图像底边最近的阴影区域R2的形状及统计特征。 The aforementioned vehicle detection method in front is characterized in that: the numerical statistics and analysis method of image shadow pixels are as follows: if the gray values of the three channels of pixels R, G, and B are lower than the threshold, and the gray values of the three channels are consistent with the area gray values If the difference of 1/3 of the mean value is greater than the threshold, the pixel is marked as white as the foreground; otherwise, it is marked as black as the background, and a single erosion and expansion process is performed on the processed image to obtain the shadow area closest to the bottom edge of the image The shape and statistical characteristics of R2.
前述的前方车辆检测方法,其特征在于:在阴影区域R2的形状和统计特征中,形状特征是指阴影区域R2外接矩形的宽高及其在图像中的位置,统计特征是指白色像素占整个阴影区域R2外接矩形面积的百分比,当标记为白色的阴影像素点满足形状特征和统计特征,即宽度在阈值范围内,水平位置与图像的W/2的差得绝对值小于阈值,且白色像素百分比大于阈值,则暂时认为该阴影区域为车辆阴影区域,图像中有车,且车辆的位置处于摄像机的正前方。 The aforementioned vehicle detection method in front is characterized in that: in the shape and statistical features of the shadow region R2, the shape feature refers to the width and height of the rectangle circumscribing the shadow region R2 and its position in the image, and the statistical feature refers to the white pixels occupying the entire The percentage of the area of the circumscribed rectangle of the shaded area R2, when the shaded pixels marked as white meet the shape characteristics and statistical characteristics, that is, the width is within the threshold range, the absolute value of the difference between the horizontal position and the W/2 of the image is less than the threshold, and the white pixel If the percentage is greater than the threshold, the shadow area is considered temporarily as the shadow area of the vehicle, there is a car in the image, and the position of the vehicle is directly in front of the camera.
前述的前方车辆检测方法,其特征在于:当获取标记为白色阴影像素点满足条件,且有满足条件的图像的连续帧数等于阈值,则取一个位于阴影区域上方的矩形作为特征区域,宽度为阴影区域宽度,高度由摄像机放置的高度及图像的分辨率决定,在特征区域内求取原图像的灰度平均值,作为车辆的标识特征,并通过垂直边缘的水平投影大于一定阈值的连续行数是否大于设定值,以此判断是否存在车牌。 The aforementioned vehicle detection method in front is characterized in that: when the acquisition of marked white shadow pixels meets the conditions, and the number of consecutive frames of images satisfying the conditions is equal to the threshold, a rectangle located above the shadow area is taken as the feature area, and the width is The width and height of the shadow area are determined by the height of the camera and the resolution of the image. In the feature area, the gray average value of the original image is calculated as the identification feature of the vehicle, and the continuous lines greater than a certain threshold are projected through the horizontal projection of the vertical edge. Whether the number is greater than the set value, so as to judge whether there is a license plate.
前述的前方车辆检测方法,其特征在于:检测到车辆后对当前车辆的特征区域的标识特征与上一次计算得到的特征区域的标识特征进行比对,大于阈值则认为不是同一辆车,以降低误检率和重复抓拍率,提高识别出真正的非重复车辆的概率。 The foregoing vehicle detection method in front is characterized in that: after the vehicle is detected, the identification feature of the feature area of the current vehicle is compared with the identification feature of the feature area calculated last time. The false detection rate and repeated capture rate increase the probability of identifying real non-repeated vehicles.
本发明的有益效果是,可以在运动相机或静止相机上使用,而且计算量小,实时性好,对不同光强有一定的适应性,且识别率较高,能够满足一般应用要求。 The beneficial effect of the invention is that it can be used on a moving camera or a still camera, and has small calculation amount, good real-time performance, certain adaptability to different light intensities, high recognition rate, and can meet general application requirements.
附图说明 Description of drawings
图1为本发明所提供的视频检测前方车辆的流程图。 Fig. 1 is a flow chart of the video detection vehicle in front provided by the present invention.
具体实施方式 Detailed ways
下面结合附图和实施例对本发明进一步说明: Below in conjunction with accompanying drawing and embodiment the present invention is further described:
为了解决在视频检测中动摄像机平台识别率低,及识别的实时性,本发明提供了一种前方车辆检测的简便方法。下面结合附图进行详细说明: In order to solve the low recognition rate of the moving camera platform in video detection and the real-time performance of recognition, the present invention provides a simple method for detecting vehicles ahead. Describe in detail below in conjunction with accompanying drawing:
如图1所示,为本发明所提供的视频检测前方车辆的流程图: As shown in Figure 1, the flow chart of the video detection front vehicle provided by the present invention:
1、本发明所用的硬件为摄像机及DSP计算机,其中相机的分辨率为1360(W)*1024(H)。首先对图像部分区域二值化,选取图像的W/4到W*3/4部分及H/2到H部分作为图像处理的区域R1,在区域R1中通过判别图像每一像素三通道的灰度值与区域灰度均值的1/3的差大于阈值(15)且三通道的灰度值都小于阈值(80)来选取图像中的阴影像素,若满足则标记为白色,作为前景,其他不满足条件的像素标记为黑色,作为背景。 1. The hardware used in the present invention is a camera and a DSP computer, wherein the resolution of the camera is 1360(W)*1024(H). First, binarize part of the image area, select the W/4 to W*3/4 part of the image and the H/2 to H part as the image processing area R1, and in the area R1, the gray value of each pixel of the image is determined by three channels. If the difference between the intensity value and 1/3 of the regional gray value is greater than the threshold (15) and the gray values of the three channels are all less than the threshold (80) to select the shadow pixel in the image, if it is satisfied, it will be marked as white as the foreground, and the other Pixels that do not meet the condition are marked black, serving as the background.
2、对1中所述区域做腐蚀膨胀处理各一次,以消除在1中二值化后出现的部分杂点和空洞。 2. Corrosion and expansion are performed on the areas described in 1 once to eliminate some of the noise points and voids that appear after binarization in 1.
3、在区域内由下至上获取第一个阴影像素外接矩形R2满足阈值条件的阴影区域作为实际的阴影区域,且区域内的白色像素占整个区域的比例大于设定的阈值0.5,且该阴影区域的中心点与图片垂直中心线的距离小于阈值(40),满足则返回真,否则返回假。 3. Obtain from bottom to top the shadow area of the first shadow pixel circumscribed rectangle R2 that satisfies the threshold condition as the actual shadow area, and the proportion of white pixels in the area to the entire area is greater than the set threshold of 0.5, and the shadow If the distance between the center point of the area and the vertical centerline of the image is less than the threshold (40), it returns true, otherwise it returns false.
4、如果图像中的区域满足上述条件则认定前方有车,车辆的连续数目加一,否则连续数目清零,以防止误检测。 4. If the area in the image meets the above conditions, it is determined that there is a car ahead, and the continuous number of the vehicle is increased by one, otherwise the continuous number is cleared to prevent false detection.
5、经几帧的连续监测后,判断连续有车的帧数是否等于阈值(8),如果等于则执行步骤6,否则执行步骤8。 5. After several frames of continuous monitoring, judge whether the number of consecutive frames with cars is equal to the threshold (8), if so, go to step 6, otherwise go to step 8.
6、取步骤3中获取的外接矩形R2上方的和R2等宽且高度为0.2*H/H1的矩形区域R3作为车辆的特征区域,其中H为图像的垂直分辨率,H1为摄像机的安放高度,H1的单位为米。取R3内所有像素的三通道的加权灰度均值作为该帧图像的特征值。根据经验我们可知此区域一般存在车牌,且车牌的纹理较车辆的其他部分丰富,对R3进行SOBEL垂直边缘检测处理及对垂直边缘检测后的图像水平投影,判断投影大于阈值(60)的连续行数是否大于设定阈值(20),且其特征值是否与上次获取的特征值之差大于阈值(80)。若满足则认定为有车且与上一次抓拍非同一车辆,执行步骤7,否则,执行步骤8。 6. Take the rectangular area R3 above the circumscribed rectangle R2 obtained in step 3, which is equal in width to R2 and has a height of 0.2*H/H1, as the characteristic area of the vehicle, where H is the vertical resolution of the image, and H1 is the installation height of the camera , the unit of H1 is meter. Take the weighted gray mean value of the three channels of all pixels in R3 as the feature value of the frame image. According to experience, we know that there are generally license plates in this area, and the texture of the license plate is richer than other parts of the vehicle. Perform SOBEL vertical edge detection processing on R3 and horizontal projection of the image after vertical edge detection, and determine the continuous lines whose projection is greater than the threshold (60) Whether the number is greater than the set threshold (20), and whether the difference between its eigenvalue and the last obtained eigenvalue is greater than the threshold (80). If it is satisfied, it is determined that there is a car and it is not the same vehicle as the last snapshot, go to step 7, otherwise go to step 8.
7、保存当前帧的图像作为有车图像。 7. Save the image of the current frame as the image of the car.
8、读取下一帧图像并从步骤一开始执行。 8. Read the next frame of image and execute from step 1.
以上已以较佳实施例公开了本发明,然其并非用以限制本发明,凡采用等同替换或者等效变换方式所获得的技术方案,均落在本发明的保护范围之内。 The above has disclosed the present invention with preferred embodiments, but it is not intended to limit the present invention, and all technical solutions obtained by adopting equivalent replacement or equivalent transformation methods fall within the protection scope of the present invention.
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210069979.9A CN102610104B (en) | 2012-03-16 | 2012-03-16 | Onboard front vehicle detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210069979.9A CN102610104B (en) | 2012-03-16 | 2012-03-16 | Onboard front vehicle detection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102610104A CN102610104A (en) | 2012-07-25 |
CN102610104B true CN102610104B (en) | 2014-11-05 |
Family
ID=46527438
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210069979.9A Expired - Fee Related CN102610104B (en) | 2012-03-16 | 2012-03-16 | Onboard front vehicle detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102610104B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103942532B (en) * | 2014-03-14 | 2017-02-15 | 吉林大学 | Dead zone vehicle detecting method based on vehicle-mounted camera |
CN104732235B (en) * | 2015-03-19 | 2017-10-31 | 杭州电子科技大学 | A kind of vehicle checking method for eliminating the reflective interference of road at night time |
CN104866838B (en) * | 2015-06-02 | 2018-08-03 | 南京航空航天大学 | A kind of front vehicles automatic testing method of view-based access control model |
CN105260701B (en) * | 2015-09-14 | 2019-01-29 | 中电海康集团有限公司 | A kind of front vehicles detection method suitable under complex scene |
CN109447003A (en) * | 2018-10-31 | 2019-03-08 | 百度在线网络技术(北京)有限公司 | Vehicle checking method, device, equipment and medium |
CN109766780A (en) * | 2018-12-20 | 2019-05-17 | 武汉理工大学 | An online detection and tracking method for ship smoke emission based on deep learning |
CN110728843B (en) * | 2019-09-10 | 2021-08-31 | 浙江大华技术股份有限公司 | Vehicle snapshot method, vehicle snapshot device, and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101383094A (en) * | 2008-10-21 | 2009-03-11 | 上海高德威智能交通系统有限公司 | Video triggering method and device |
JP2009244985A (en) * | 2008-03-28 | 2009-10-22 | Toyota Central R&D Labs Inc | Driving support device and pedestrian detecting device |
CN101620788A (en) * | 2008-07-03 | 2010-01-06 | 威海克劳斯数码通讯有限公司 | Mobile AV and image recognition intellectualized system |
CN102074113A (en) * | 2010-09-17 | 2011-05-25 | 浙江大华技术股份有限公司 | License tag recognizing and vehicle speed measuring method based on videos |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101458814B (en) * | 2007-12-13 | 2012-02-01 | 东软集团股份有限公司 | Method and apparatus for separating objects interesting region from image |
-
2012
- 2012-03-16 CN CN201210069979.9A patent/CN102610104B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009244985A (en) * | 2008-03-28 | 2009-10-22 | Toyota Central R&D Labs Inc | Driving support device and pedestrian detecting device |
CN101620788A (en) * | 2008-07-03 | 2010-01-06 | 威海克劳斯数码通讯有限公司 | Mobile AV and image recognition intellectualized system |
CN101383094A (en) * | 2008-10-21 | 2009-03-11 | 上海高德威智能交通系统有限公司 | Video triggering method and device |
CN102074113A (en) * | 2010-09-17 | 2011-05-25 | 浙江大华技术股份有限公司 | License tag recognizing and vehicle speed measuring method based on videos |
Also Published As
Publication number | Publication date |
---|---|
CN102610104A (en) | 2012-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102610104B (en) | Onboard front vehicle detection method | |
CN106652465B (en) | Method and system for identifying abnormal driving behaviors on road | |
CN102496282B (en) | Traffic intersection signal light state identification method based on RGB color transformation | |
TWI409718B (en) | Method of locating license plate of moving vehicle | |
CN104008645B (en) | A lane prediction and early warning method suitable for urban roads | |
CN101893580B (en) | Digital image based detection method of surface flaw of steel rail | |
CN107808392B (en) | Automatic tracking and positioning method and system for security check vehicle in open scene | |
CN102663760B (en) | Location and segmentation method for windshield area of vehicle in images | |
CN107066986A (en) | A kind of lane line based on monocular vision and preceding object object detecting method | |
CN104036262B (en) | A kind of method and system of LPR car plates screening identification | |
CN104112370A (en) | Monitoring image based intelligent parking lot parking place identification method and system | |
Guo et al. | Image-based seat belt detection | |
CN113850872B (en) | A parking line detection method for service areas based on high-position video | |
CN103914701B (en) | A kind of vehicle detection at night method based on image | |
CN103136514B (en) | A kind of parking event detecting method based on bi-directional tracking | |
CN102768731A (en) | System and method for automatic positioning and recognition of targets based on high-definition video images | |
CN102231236A (en) | Method and device for counting vehicles | |
CN101826228A (en) | Detection method of bus passenger moving objects based on background estimation | |
CN105701844A (en) | Method for detecting obstacle or shadow on the basis of color characteristics | |
CN102768726A (en) | A Pedestrian Detection Method for Pedestrian Collision Prevention | |
CN106503640A (en) | A kind of detection method for taking bus zone | |
CN103049788B (en) | Based on space number for the treatment of object detection system and the method for computer vision | |
CN107516423B (en) | Video-based vehicle driving direction detection method | |
Premachandra et al. | Image based automatic road surface crack detection for achieving smooth driving on deformed roads | |
CN110443166A (en) | A kind of licence plate recognition method of haze weather |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
ASS | Succession or assignment of patent right |
Owner name: JIANGSU UNION OF SCIENCE AND TECHNOLOGY CO., LTD. Free format text: FORMER OWNER: NANJING UNIVERSITY OF AERONAUTICS AND ASTRONAUTICS Effective date: 20130508 |
|
C41 | Transfer of patent application or patent right or utility model | ||
COR | Change of bibliographic data |
Free format text: CORRECT: ADDRESS; FROM: 210016 NANJING, JIANGSU PROVINCE TO: 210019 NANJING, JIANGSU PROVINCE |
|
TA01 | Transfer of patent application right |
Effective date of registration: 20130508 Address after: 210019 Nanjing science and Technology Park, Jiangsu City, Jianye Province, No. 69 Metro science and technology building, building 01 Applicant after: JIANGSU UNION OF SCIENCE AND TECHNOLOGY CO.,LTD. Address before: Yudaojie Baixia District of Nanjing City, Jiangsu Province, No. 29 210016 Applicant before: Nanjing University of Aeronautics and Astronautics |
|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20141105 |