《Real time Detection of Lane Markers in Urban Streets》阅读笔记

目录

摘要

简介

实现

生成IPM

过滤和筛选

直线检测

曲线拟合

后处理

实验

结论

2008年的一篇基于传统图像处理方法的车道线检测算法。

摘要

        作者提出一种针对街道场景的快速稳定的车道线检测算法,其处理流程为产生IPM图像——使用定制化的高斯核过滤——使用Ransac方法拟合贝塞尔曲线参数——后处理。算法能够每秒处理50帧图像,各种场景下的车道线都能检出,且相比以前的方法效果表现还不错。

简介

        自动驾驶演进的一个目的就是降低车祸发生率,其中车道线检测是一项自20世纪80年代就备受关注的技术。使用的技术包括基于单目/双目,形态学操作,概率分组,B-snakes等。但这些算法大都针对高速公路,相比之下街道场景挑战更大,包括车辆、破碎的车道线、背景阴影、更弯曲的/奇怪的/相交的车道线、行人、光照环境等的影响,如下图所示。

        本文提出一种快速鲁棒的检测街道场景中车道线的方法,其流程为使用IPM方法生成鸟瞰图——使用定制化的高斯滤波器检测竖线——二值化——霍夫变换提取直线——基于Ransac在原图中拟合曲线。

        文章创新点如下:1)速度快,在Intel Core2 2.4GHz机器上使用640x480的图像运行帧率达到50Hz;2)不限制检测的直线数量;3)提出一种新的基于Ransac的曲线拟合方法;4)通过手动标注数据和建立自动评分方法来评估算法的实际效果。

实现

生成IPM

        作者选择了先生成鸟瞰图,然后在鸟瞰图中做检测。这样做有两点优势:1)原图中由于透视投影的影响导致车道线并不互相平行,但是在鸟瞰图中会接近平行;2)可以生成指定大小的感兴趣区域的鸟瞰图,减小处理图像的尺寸。

        其处理流程中需要用到相机的内外参,这里作者未考虑外参中roll和相机的畸变影响。 利用相机的成像模型可以建立鸟瞰图与原图之间像素的映射关系,再通过插值计算即可生成鸟瞰图,如下图所示。

过滤和筛选

        IPM图像中车道线基本上竖直分布,且车道线相比两侧在水平方向上亮度更高;基于这个作者设计了一个沿x方向的滤波器,类似于高斯+sobel的组合,专门用于水平方向边缘的检测;同时假定图像中边缘的宽度像素值已知,来指定滤波器中的sigma值来控制模板的分布,是个技巧点。其kernel形状如下图左侧所示,中间是施加kernel后的运算结果,右侧是经过阈值化后的效果

        上一步得到的阈值化图像中存在噪声,需要降低其影响。作者将图像像素值由大到小排列,选出前2.5%作为可能的边缘点进行后续计算,其余的像素点全部舍弃。

直线检测

        首先将上述结果图像作为输入,假设车道线大致竖直分布;统计图像列方向上的像素值累积和并得到直方图,然后使用高斯滤波处理;得到直方图的局部极大值点,使用其相邻的两个点应用抛物线插值计算得到更精确的位置,作为直线的水平方向的初始坐标,如下图所示。

        然后在上述坐标的附近应用一个矩形框,认为矩形框内的像素属于同一条直线,使用RANSAC方法拟合直线,如下图所示。

曲线拟合

        上述直线拟合还只认为是初步结果,由于实际场景中车道线有可能是弯曲的,需要继续执行曲线拟合操作。作者这里选取了三阶贝塞尔曲线,有4个控制点,分为起始点、终止点和两个控制形状的点,其方程和示意图如下所示。

        作者基于RANSAC的思想实现曲线拟合,计算流程如下图所示。

1)getRandomSample():输入图为直线检测的结果图,从直线拟合后得到的直线附近区域内选点,点的像素值越高被选中的概率越大

2)fitSpline():得到一些点之后,可通过最小二乘法求解得到贝塞尔曲线的四个控制点坐标,进而得到贝塞尔曲线方程

3)computeSplineScore():这里作者没有使用计算每个点到拟合的贝塞尔曲线的距离和作为评价指标,因为其计算量太大;而是提出新的评价标准,包括拟合曲线时使用的点的像素和(像素值越高越有可能属于车道线),曲线的长度(越长越好),曲线的角度(使用控制点的两个夹角计算,越接近竖直越好)。

        拟合输出效果如下图所示。

后处理

        为了获得更好的曲线拟合结果,作者提出如下操作,同时应用于鸟瞰图和原图中。

1)获得更好的边缘点

        对上一步拟合得到的曲线做离散化得到一系列点,然后计算这些点的法线方向,沿着该方向寻找附近的像素值更大的点作为更新后的点,重新拟合曲线

2)扩展曲线长度

        沿着1)得到的曲线的头尾部的方向尝试寻找符合像素值沿着其法向量为极值的点补充进来,来扩展曲线长度

3)结果校验

        重新检查新得到的曲线,不能太弯曲,且长度不能太小,在IPM中方向要基本保持竖直

重新检测后的效果如下图所示。

实验

        作者采集了一些街道场景的图像并手动标注了一些数据,将检测得到的曲线结果与标注的真实值进行比较,并定义了是否正确的评价标准,具体不再展开。

结论

        提出一种鲁棒、快速的基于传统图像处理的车道线检测算法,具体的:

1)在鸟瞰图中处理,使用定制化的高斯核滤波,之后进行直线拟合,并提出一种新的基于RANSAC方法的三阶贝塞尔曲线拟合方法,和后处理方法

2)不限制车道线检测数量,在PC端每秒最多可处理50张图像

3)通过实验表明算法的检测精度还不错

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
# Author: Mohamed Aly <malaa@caltech.edu> # Date: 10/7/2010 ============================================================================ REAL TIME LANE DETECTOR SOFTWARE ============================================================================ This package contains source code and dataset that implements the work in the paper [1]. ========= Contents ========= src/: contains the C/C++ source files |_ CameraInfo.conf: contains the camera calibration ifo |_ CameraInfoOpt.*: contain gengetopt files for parsing the camera info files |_ cmdline.*: contains gengetopt files for parsing command lines |_ InversePerspectiveMapping.*: code for obtainig the IPM of an image |_ LaneDetector.*: code for the bulk of the algorithm, including Hough Transforms, Spline fitting, Post processing, ... |_ Lanes.conf: the typical configuration file for lane detection |_ main.*: code for the main binary |_ Makefile: the Make file |_ mcv.*: contain utility functions |_ ranker.h: code for obtaining the median of a vector |_ run.sh: Shell script for running the detector on the four clips in Caltech Lanes Dataset matlab/: contains the Matlab source files |_ ccvCheckMergeSplines.m: checks if two splines are matching |_ ccvEvalBezSpline.m: returns points on a spline given its control points |_ ccvGetLaneDetectionStats.m: computes stats from detections and ground truth |_ ccvLabel.m: handles the ground truth labels |_ ccvReadLaneDetectionResultsFile.m: reads a detection file output from the binary file LaneDetector32/64 |_ Stats.m: computes stats for the detections on the Caltech Lanes Dataset and its ground truth labels ============== Prerequisites ============== 1. OpenCV 2.0 or higher http://sourceforge.net/projects/opencvlibrary/ 3. (Optional) Gengetopt http://www.gnu.org/software/gengetopt/ =========== Compiling =========== Unzip the archive somewhere, let's say ~/lane-detector: unzip lane-detector.zip -d ~/lane-detector cd ~/lane-detector/src make release This will generate LaneDetector32 or LaneDetector64 depending on your system. ====================== Caltech Lanes Dataset ====================== To view the lane detector in action, you can download the Caltech Lanes Dataset available at http://www.vision.caltech.edu/malaa/datasets/caltech-lanes =========== Running =========== To run the detector on the Caltech Lanes dataset, which might be in ~/caltech-lanes/ cd ~/lane-detector/ ln -s ~/caltech-lanes/ clips cd ~/lane-detector/src/ bash run.sh This will create the results files inside ~/caltech-lanes/*/list.txt_results.txt To view the statistics of the results, open Matlab and run the file: cd ~/lane-detector/matlab/ matlab& >>Stats ====================== Command line options ====================== LinePerceptor 1.0 Detects lanes in street images. Usage: LinePerceptor [OPTIONS]... [FILES]... -h, --help Print help and exit -V, --version Print version and exit Basic options: --lanes-conf=STRING Configuration file for lane detection (default=`Lanes.conf') --stoplines-conf=STRING Configuration file for stopline detection (default=`StopLines.conf') --no-stoplines Don't detect stop lines (default=on) --no-lanes Don't detect lanes (default=off) --camera-conf=STRING Configuration file for the camera paramters (default=`CameraInfo.conf') --list-file=STRING Text file containing a list of images one per line --list-path=STRING Path where the image files are located, this is just appended at the front of each line in --list-file (default=`') --image-file=STRING The path to an image Debugging options: --wait=INT Number of milliseconds to show the detected lanes. Put 0 for infinite i.e. waits for keypress. (default=`0') --show Show the detected lines (default=off) --step Step through each image (needs a keypress) or fall through (waits for --wait msecs) (default=off) --show-lane-numbers Show the lane numbers on the output image (default=off) --output-suffix=STRING Suffix of images and results (default=`_results') --save-images Export all images with detected lanes to the by appending --output-suffix + '.png' to each input image (default=off) --save-lanes Export all detected lanes to a text file by appending --output-suffix + '.txt' to --list-file (default=off) --debug Show debugging information and images (default=off) =========== References =========== [1] Mohamed Aly, Real time Detection of Lane Markers in Urban Streets, IEEE Intelligent Vehicles Symposium, Eindhoven, The Netherlands, June 2008.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Mega_Li

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值