在2D图像中查找路径障碍 [英] Finding path obstacles in a 2D image

查看:110
本文介绍了在2D图像中查找路径障碍的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于在2D图像中查找障碍物,您会建议采用哪种方法?

what approach would you recommend for finding obstacles in a 2D image?

以下是我到目前为止提出的一些要点:

Here are some key points I came up with till now:

我怀疑我可以基于障碍数据库"搜索使用对象识别,因为我不知道障碍物是什么样子. 我认为如果路径与对象本身相差不大,颜色识别可能会出现问题.

I doubt I can use object recognition based on "database of obstacles" search, since I don't know what might the obstruction look like. I assume color recognition might be problematic if the path does not differ a lot from the object itself.

可能的话,再添加一台摄像机并计算3D图像(就像Kinect一样)是可以的,但是那样运行起来并不像我所要求的那样顺畅.

Possibly, adding one more camera and computing a 3D image (like a Kinect does) would work, but that would not run as smooth as I require.

说明问题;机器人可以在人行道的左侧或右侧行驶.在下图中,左侧是正确的选择:

To illustrate the problem; robot can ride either left or right side of the pavement. In the following picture, left side is the correct choice:

推荐答案

如果您知道路径的样子,则很大程度上是一个分类问题.在不同距离,照度等条件下获取一堆路径图像,并在每个图像中手动标记地面.使用此标记的数据来训练将每个像素分类为道路"或非道路"的分类器.根据道路的纹理,这可能很简单,只需对每个像素的RGB(或HSV)值进行分类,或者使用OpenCv的内置直方图反投影(即cv::CalcBackProjectPatch())即可.

If you know what the path looks like, this is largely a classification problem. Acquire a bunch of images of path at different distances, illumination, etc. and manually label the ground in each image. Use this labeled data to train a classifier that classifies each pixel as either "road" or "not road." Depending upon the texture of the road, this could be as simple as classifying each pixels' RGB (or HSV) values or using OpenCv's built-in histogram back-projection (i.e. cv::CalcBackProjectPatch()).

我建议从手动阈值开始,转向基于直方图的匹配,如果更简单的技术失败,则仅使用成熟的机器学习分类器(例如Naive Bayes分类器或SVM).对整个图像进行分类后,所有被标识为非道路"的像素都是障碍物.通过对道路而不是障碍物进行分类,我们完全避免建立对象数据库".

I suggest beginning with manual thresholds, moving to histogram-based matching, and only using a full-fledged machine learning classifier (such as a Naive Bayes Classifier or a SVM) if the simpler techniques fail. Once the entire image is classified, all pixels that are identified as "not road" are obstacles. By classifying the road instead of the obstacles, we completely avoided building a "database of objects".

在问题范围之外,最简单的解决方案是添加额外的传感器(在问题上投入更多的硬件!")并直接测量障碍物的三维位置.按照优先顺序:

Somewhat out of the scope of the question, the easiest solution is to add additional sensors ("throw more hardware at the problem!") and directly measure the three-dimensional position of obstacles. In order of preference:

  1. Microsoft Kinect :便宜,简单,有效.由于周围的红外光,它只能在室内使用.
  2. 扫描激光测距仪:非常准确,易于设置并且可以在外部工作.同样非常昂贵(取决于最大范围和采样率,大约为$ 1200-10,000).
  3. 立体声相机:不如Kinect,但可以在外部使用.如果您买不起预制的立体声摄像头(约$ 1800),则可以使用USB网络摄像头制作出像样的自定义立体声摄像头.
  1. Microsoft Kinect: Cheap, easy, and effective. Due to ambient IR light, it only works indoors.
  2. Scanning Laser Rangefinder: Extremely accurate, easy to setup, and works outside. Also very expensive (~$1200-10,000 depending upon maximum range and sample rate).
  3. Stereo Camera: Not as good as a Kinect, but it works outside. If you cannot afford a pre-made stereo camera (~$1800), you can make a decent custom stereo camera using USB webcams.

请注意,通过使用自定义硬件(Stereo On-Chip,STOC),专业立体视觉摄像机可以非常快速.在现代计算机上,基于软件的立体声效果也相当快(10-20 Hz).

Note that professional stereo vision cameras can be very fast by using custom hardware (Stereo On-Chip, STOC). Software-based stereo is also reasonably fast (10-20 Hz) on a modern computer.

这篇关于在2D图像中查找路径障碍的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆