The invention discloses a method and device for measuring the distance of vehicles in front, which relates to the technical field of vehicle electronic equipment. The method includes: the current single camera calibration to obtain the projection transformation matrix between image coordinates and physical coordinates of the image acquisition; the front of the vehicle in front of the vehicle; extracting the edge information obtained the edge of the rectangle; the first actual distance in front of the vehicle according to the edge information and default model according to the vehicle body; the edge information and the projection transformation matrix, the calculation of the actual distance in front of the vehicle second; calculate the distance from the vehicle ahead according to the first actual distance and the actual distance of second. Based on the imaging principle and the projection relation between the image coordinate system and the world coordinate system, a value close to the actual distance is obtained. The invention adopts the monocular camera, which has the advantages of low cost, compatible with different camera installation positions, shooting angles and different types of vehicles, and provides driver assistance for the driver to ensure the driving safety.
【技术实现步骤摘要】
一种测量前方车辆距离的方法和装置
本专利技术涉及车载电子技术,尤其涉及一种测量前方车辆距离的方法和装置。
技术介绍
基于单目前向摄像头的车辆测距是智能汽车驾驶中的前向防碰撞预警系统的关键技术之一,对于保持车距、车道变换以及前车碰撞预警都有着重要的作用。相对于激光雷达测距、双目视觉测距以及其他测距方法,基于单目摄像头的测距有着成本低廉以及信息丰富的优势。当前,基于单目摄像头的测距方法主要有:1、根据图像中的像素位置和实际距离之间的统计关系建模,来估算实际距离;该方法无法建立通用的模型,要针对不同车型进行调试;2、利用摄像头成像原理,以及近大远小的原理,对车辆进行建模,进而估算实际距离,但不能计算出确切的距离数据;3、利用道路特征和本车在车道中的位置来计算前车的距离,对于道路特征有较强的依赖性,不能通用推广。
技术实现思路
本专利技术的目的在于提出一种测量前方车辆距离的方法和装置,能够测量前方的车辆与本车的距离,为驾驶员提供参考。为达此目的,本专利技术采用以下技术方案:一方面,本专利技术提供一种测量前方车辆距离的方法,包括:对单目前向摄像头进行标定得到图像坐标与物理坐标之间的投影变换矩阵;通过单目前向摄像头获取车辆前方的图像;提取前方车辆的边缘信息,得到表示边缘的矩形;根据所述边缘信息和预设车体模型计算前方车辆的第一实际距离;根据所述边缘信息和所述投影变换矩阵,计算前方车辆的第二实际距离;根据所述第一实际距离和所述第二实际距离计算前方车辆距离。其中,对单目前向摄像头进行标定得到图像坐标与物理坐标之间的投影变换矩阵,包括:通过所述单目前向摄像头获取标定物的标定图像; ...
【技术保护点】
一种测量前方车辆距离的方法,其特征在于:对单目前向摄像头进行标定得到图像坐标与物理坐标之间的投影变换矩阵;通过单目前向摄像头获取车辆前方的图像;提取前方车辆的边缘信息,得到表示边缘的矩形;根据所述边缘信息和预设车体模型计算前方车辆的第一实际距离;根据所述边缘信息和所述投影变换矩阵,计算前方车辆的第二实际距离;根据所述第一实际距离和所述第二实际距离计算前方车辆距离。
【技术特征摘要】
1.一种测量前方车辆距离的方法,其特征在于:对单目前向摄像头进行标定得到图像坐标与物理坐标之间的投影变换矩阵;通过单目前向摄像头获取车辆前方的图像;提取前方车辆的边缘信息,得到表示边缘的矩形;根据所述边缘信息和预设车体模型计算前方车辆的第一实际距离;根据所述边缘信息和所述投影变换矩阵,计算前方车辆的第二实际距离;根据所述第一实际距离和所述第二实际距离计算前方车辆距离。2.根据权利要求1所述的方法,其特征在于,对单目前向摄像头进行标定得到图像坐标与物理坐标之间的投影变换矩阵,包括:通过所述单目前向摄像头获取标定物的标定图像;获取标定物的标定点的物理坐标和在标定图像上的图像坐标;计算图像坐标与物理坐标之间的投影变换矩阵。3.根据权利要求2所述的方法,其特征在于,根据所述边缘信息和所述投影变换矩阵,计算前方车辆的第二实际距离,包括:获得所述矩形的下边缘的平均坐标;根据所述投影变换矩阵计算所述平均坐标对应的实际坐标;从所述实际坐标中获取前方车辆的第二实际距离。4.根据权利要求3所述的方法,其特征在于,根据所述第一实际距离和所述第二实际距离计算前方车辆距离,包括:设置所述第一实际距离的第一权重和所述第二实际距离的第二权重;前方车辆距离=第一实际距离*第一权重+第二实际距离*第二权重。5.根据权利要求4所述的方法,其特征在于,设置所述第一实际距离的第一权重和所述第二实际距离的第二权重,包括:所述第一权重和所述第二权重的初始值均为0.5;根据所述第一实际距离和所述图像的上一帧的前方车辆距离,计算所述图像的当前帧的第一权重;第二权重=1-所述第一权重。6.根据权利要求1所述的方法,其特征在于,提取前方...
【专利技术属性】
技术研发人员:刘星,张伟,陈睐,
申请(专利权)人:清华大学苏州汽车研究院吴江,
类型:发明
国别省市:江苏,32
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。