Duanxx的Design abroad California-LaneDetection概述

本文详细介绍了加州大学开源的车道检测软件包,包括软件的功能、实现方法、使用示例及提供的测试数据集。软件基于贝塞尔曲线拟合方法,实现了一套实时车道线检测系统,具有较高的识别速度。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

概述

1.1 软件包

California大学的LaneDetection是California大学的一个开源项目,其官方网址为:http://www.vision.caltech.edu/malaa/software/research/caltech-lane-detection/

         这里提供了一个Caltech-Lane-Detection-Software的软件包,这个软件包报刊了C/C++以及Matlab的源代码,其中C/C++的源代码是在Linux系统上基于Opencv做的LaneDetection,而Matlab代码主要用于LaneDetection的结果显示和验证。

这个识别系统基于贝塞尔曲线拟合的方法,实现了一个针对单一图像的实时车道线检测系统。它可以检测道路中所有的车道线,以及当前车道线上的车道标识。


这个识别系统可以以40-50Hz的识别速度来识别街道上所有的车道线。

这个系统的实现效果见下图1:


图1

 

1.2 Dataset

         California大学在提供这个车道线检测系统源码的同时,还提供了测试用的Dataset,其下载地址为:http://www.vision.caltech.edu/malaa/datasets/caltech-lanes/

        


 

用到的主要方法

1.        对图像进行了IPM(InversePerspective Mapping)处理,获得了图像的鸟瞰图。这个操作基于车道线在摄像头的视角内是平行线的假设,主要目的是获得车道上的平行线,即车道线。

2.        图像中像素坐标系和平面道路中的坐标系(地平面坐标系)的转换,这里主要做的是我们看到的三维空间里的像素和二维图像中的像素相互投影的过程。

3.        高斯卷积滤波

4.        RANSAC直线拟合

5.        RANSAC贝塞尔样条拟合

6.        hough直线、线段检测

7.        交叉点检测

8.        贝塞尔曲线光栅绘图

9.        Bresenham画线算法

 

后面文章会对上面提到的几条主要实现方法从原理和代码详细的分析。


# 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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值