人工环境中的车道检测

发布于 2024-10-04 00:11:02 字数 1596 浏览 2 评论 0原文

我正在编写一个可以在驾驶模拟器中检测车道的应用程序。环境比较简单,多是笔直的多车道道路,几乎没有任何弯度。目前,我可以使用(经典)霍夫变换成功检测线条,但问题是 HT 自然也会检测不是车道的线条。

我怎样才能更有选择性?我还没有绘制水平线,但仍然有一些线蠕动。理想情况下,我想检测车辆行驶的车道边界。以下是环境的典型图像

Environment

这是我的到目前为止我正在做的事情:

    1. Because the environment is more or less the same wherever I drive, I set the region of interest (RoI) to exclude the horizon and anything above it.
    2. Threshold the image (I'll explain my reason for threshold in a bit)
    3. Canny Edge Detection
    4. Apply a Hough Transform
    5. Draw the detected lines excluding those which have a gradient of 0.0 or nearly 0.0

成像阈值的原因如下。如果您查看上面链接的环境照片,您会看到一条与道路平行的灰色线。因为它是一条连续的线 - 与车道标记不同 - HT 最终会检测到它。我无法根据梯度排除它,因为它与车道标记具有相同的梯度。通过阈值处理,我可以删除它,因此只检测作为实际车道标记的线。

这是上述操作的结果

Hough Transform

我知道这个问题有很多解决方案,我已经阅读了无数关于这个问题的论文,但它们似乎都在处理比这复杂得多的环境和/或只是超出了我的想象。就其价值而言,就在一个多月前,我还没有计算机视觉方面的背景,所以所有这些对我来说都是非常新鲜的。

更新1:

我想用更好的术语来说,我正在寻找一种对车道进行建模的方法,以便不包括不适合模型的线条。不幸的是,我不知道从哪里开始模型。有什么建议吗?

就其价值而言,我已经成功地识别了车辆行驶的车道,并且可以排除不属于“活动”车道的额外线路。希望这张照片能够帮助

Screenshot

它并不完美,但我猜是这样。建模后,我的最终目标是生成车辆的航向/位置。但我只想首先获得相对稳健的车道检测。我希望有一种相对简单的技术可以帮助实现这一目标(不依赖于系统参数,例如视场焦距)。

I'm writing an app that can detect lanes in a driving simulator. The environment is relatively simple, its mostly straight multi-lane roads and almost no curvature at all. At the moment, I can successfully detect lines using the (classical) Hough Transform but the issue is that the HT naturally also detects lines that are not lanes.

How can I be more selective? I do not draw horizontal lines already, but still some lines creep in. Ideally, I would like to detect the lane boundaries that the vehicle is traveling in. The following is a typical image of the environment

Environment

Here is what I'm doing so far:

    1. Because the environment is more or less the same wherever I drive, I set the region of interest (RoI) to exclude the horizon and anything above it.
    2. Threshold the image (I'll explain my reason for threshold in a bit)
    3. Canny Edge Detection
    4. Apply a Hough Transform
    5. Draw the detected lines excluding those which have a gradient of 0.0 or nearly 0.0

The reason for threshold the imaging is as follows. If you take a look at the environment photograph linked above, you'll see a grayish line running parallel to the road. Because its a continuous line - unlike the lane markers - the HT ends up detecting it. I cannot exclude it based on gradient as it has the same gradient as the lane markers. With thresholding, i can remove that and therefore only detect lines that are the actual lane markers.

Here is the result of the above operations

Hough Transform

I understand that there are many solutions to this problem and I have read countless papers on this but they all seem to be handling environments vastly more complicated than this and/or are simply way over my head. For what its worth, just a little more than a month ago, I had no background in ComputerVision and so all of this is very very new to me.

UPDATE 1:

I guess to put this in better terms, I'm looking for a way to model the lanes so that lines that do not fit the model are not included. Unfortunately, I do not have a clue about where to begin with models. Any suggestions?

For what its worth, I have managed to identify the lanes that the vehicle is traveling within and can exclude the extra lines that are not part of the "active" lane, so to speak. Hopefully this photo will help

Screenshot

Its not perfect, but its something I guess. My ultimate goal, after modeling, is to generate a heading/position of the vehicle. But I just want to get, relatively, robust lane detection at first. I'm hoping there is a relatively simple technique that can help achieve this (something that does not depend on the system's parameters such as focal length of field of view).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

与往事干杯 2024-10-11 00:11:02

一种方法是使用您正在查看的场景的先验知识。您可以拥有一个具有隐藏状态的模型,其中包含或多或少的静态参数(例如摄像机高度、摄像机倾斜或车道宽度)和动态参数(例如摄像机偏航、摄像机在车道内的横向位移、道路曲率等)。可以在卡尔曼滤波器的框架中处理此类模型。这种模型的优点是能够容忍其他路面标记,例如方​​向箭头、斑马线等。祝你好运!

One way to go would be to use prior knowledge of the scene you are looking at. You could have a model with a hidden state, comprising more or less static parameters such as camera height, camera tilt or lane width, and dynamic parameters such as camera yaw, lateral displacement of the camera within the lane, road curvature, etc. You could handle such model in the frame of a Kalman filter. An advantage of such a model would be an ability to tolerate other road surface markings such as direction arrows, zebras and such. Good luck!

眼泪淡了忧伤 2024-10-11 00:11:02

也许您可以尝试仅在灰白色过渡处找到边缘上的线条,而不是整个图像中的所有边缘?

Perhaps you could try to find only lines on edges found at grey-white transitions rather than on all edges in the entire image?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文