[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN110718068B - A method for estimating the installation angle of a road surveillance camera - Google Patents

A method for estimating the installation angle of a road surveillance camera Download PDF

Info

Publication number
CN110718068B
CN110718068B CN201910931121.0A CN201910931121A CN110718068B CN 110718068 B CN110718068 B CN 110718068B CN 201910931121 A CN201910931121 A CN 201910931121A CN 110718068 B CN110718068 B CN 110718068B
Authority
CN
China
Prior art keywords
camera
image
installation angle
straight line
angle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201910931121.0A
Other languages
Chinese (zh)
Other versions
CN110718068A (en
Inventor
王建辉
钟胜
颜露新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN201910931121.0A priority Critical patent/CN110718068B/en
Publication of CN110718068A publication Critical patent/CN110718068A/en
Application granted granted Critical
Publication of CN110718068B publication Critical patent/CN110718068B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/017Detecting movement of traffic to be counted or controlled identifying vehicles
    • G08G1/0175Detecting movement of traffic to be counted or controlled identifying vehicles by photographing vehicles, e.g. when violating traffic rules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本发明公开了一种道路监控摄像机安装角度估计方法,属于道路监控领域。包括:对摄像机获取的图像,基于平行线进行水平消失点的检测;利用图像中水平消失点与摄像机安装角度之间的关系,获取道路监控摄像机安装角度。本发明结合道路监控场景的外部条件的先验知识和成像原理中的投影变换原理,利用消失点与摄像机安装角度的关系,再辅以在安防相机的安装过程中只有两个角度的自由度的特点,通过数学公式计算出关心的两个安装角度。从而在监控相机安装好之后,可以在不增加任何操作流程的基础上,自动计算出摄像机的安装角度。以间隔固定时间自动识别安装角度,以适应自然环境因素对摄像机安装角度的影响,达到自动标注的目的。

Figure 201910931121

The invention discloses a method for estimating the installation angle of a road monitoring camera, which belongs to the field of road monitoring. Including: detecting the horizontal vanishing point based on parallel lines on the image obtained by the camera; using the relationship between the horizontal vanishing point in the image and the installation angle of the camera to obtain the installation angle of the road surveillance camera. The invention combines the prior knowledge of the external conditions of the road monitoring scene and the projection transformation principle in the imaging principle, utilizes the relationship between the vanishing point and the installation angle of the camera, and is supplemented by the fact that there are only two degrees of freedom in the installation process of the security camera. Features, the two installation angles of interest are calculated through mathematical formulas. Therefore, after the surveillance camera is installed, the installation angle of the camera can be automatically calculated without adding any operation process. Automatically identify the installation angle at a fixed time interval to adapt to the influence of natural environment factors on the installation angle of the camera, and achieve the purpose of automatic labeling.

Figure 201910931121

Description

一种道路监控摄像机安装角度估计方法A method for estimating the installation angle of a road surveillance camera

技术领域technical field

本发明属于道路监控领域,更具体地,涉及一种道路监控摄像机安装角度估计方法。The invention belongs to the field of road monitoring, and more particularly, relates to a method for estimating the installation angle of a road monitoring camera.

背景技术Background technique

近年来,随着经济的快速发展,我国城乡机动车保有量迅速增加,与车辆相关的刑事和治安案件也逐年上升。在此情况下,有效利用先进的科技手段提高城乡道路交通管理水平,打击、预防涉车案件,镇慑犯罪分子,提高社会治安管理水平就成为各级公安交通管理部门的一项重要工作。在道路监控相机的很多功能都需要标定相机的外参数,如相机安装的高度、相机安装的俯仰角、偏航角和滚动角等参数,而在相机部署的过程中,安装角度测量比较困难,而且在道路监控中,摄像机的安装角度还有可能被外界环境影响而改动,如风吹、杆子晃动等,导致前期测量的角度后面出现不准的情况。In recent years, with the rapid economic development, the number of motor vehicles in urban and rural areas in my country has increased rapidly, and criminal and public security cases related to vehicles have also increased year by year. Under this circumstance, it has become an important task for public security traffic management departments at all levels to effectively use advanced scientific and technological means to improve urban and rural road traffic management, combat and prevent vehicle-related cases, deter criminals, and improve social security management. Many functions of road surveillance cameras need to calibrate the external parameters of the camera, such as the height of the camera installation, the pitch angle, yaw angle and roll angle of the camera installation, etc. In the process of camera deployment, it is difficult to measure the installation angle. Moreover, in road monitoring, the installation angle of the camera may also be changed by the influence of the external environment, such as wind blowing, pole shaking, etc., resulting in inaccuracies behind the angle measured in the previous stage.

目前,摄像机安装角度的测量一般有以下几种测量方式:1.通过水平仪等角度测量工具进行测量;2.通过在相机内安装陀螺仪等设备进行测量;3.通过摄像机中手动寻找参照物,然后通过变换关系计算出摄像机安装角度。At present, the measurement of the camera installation angle generally has the following measurement methods: 1. Measure by angle measuring tools such as level; 2. Measure by installing gyroscope and other equipment in the camera; 3. Manually find the reference object in the camera, Then the camera installation angle is calculated through the transformation relationship.

然而,第一种方法是通过测量工具测量的角度,工程实施非常困难,而且一次测量后无法做到自动更新。第二种方法,带有陀螺仪等安防监控相机非常少,难以大面积铺开使用,而且增加一个设备意味着增加成本、降低系统稳定性。第三种方法需要摄像机视场角中有明确的参照物,而大部分相机中不一定具备。而且也只能在安装的时候进行一次标定,安防监控摄像机常年工作在室外场景,风吹、高温变形等都可能导致摄像机的安装角度发生变化,而该方法无法自动识别安装角度以适应这些应用场景。However, the first method is to measure the angle through a measuring tool, which is very difficult to implement and cannot be automatically updated after one measurement. In the second method, there are very few security surveillance cameras such as gyroscopes, so it is difficult to spread them out in a large area, and adding one more device means increasing costs and reducing system stability. The third method requires a clear reference object in the camera's field of view, which is not necessarily available in most cameras. Moreover, it can only be calibrated once during installation. Security surveillance cameras work in outdoor scenes all year round. Wind blowing, high temperature deformation, etc. may cause the installation angle of the camera to change, and this method cannot automatically identify the installation angle to adapt to these application scenarios. .

发明内容SUMMARY OF THE INVENTION

针对现有技术测量角度方法成本高、无法自适应的缺点,本发明提供了一种道路监控摄像机安装角度估计方法,其目的在于在不需要人为干预的情况下自动标定相机的安装角度,为三维摄像机的距离测量、速度测量等提供自动提取的参数,以最低的成本自动实时的标定摄像机的安装角度。Aiming at the shortcomings of the prior art method of measuring the angle of high cost and inability to adapt, the present invention provides a method for estimating the installation angle of a road monitoring camera, the purpose of which is to automatically calibrate the installation angle of the camera without human intervention. The distance measurement and speed measurement of the camera provide automatically extracted parameters to automatically calibrate the installation angle of the camera in real time at the lowest cost.

为实现上述目的,按照本发明的第一方面,提供了一种道路监控摄像机安装角度估计方法,该方法包括以下步骤:In order to achieve the above object, according to the first aspect of the present invention, a method for estimating the installation angle of a road monitoring camera is provided, and the method includes the following steps:

S1.对摄像机获取的图像,基于平行线进行水平消失点的检测;S1. For the image acquired by the camera, detect the horizontal vanishing point based on parallel lines;

S2.利用图像中水平消失点与摄像机安装角度之间的关系,获取道路监控摄像机安装角度。S2. Use the relationship between the horizontal vanishing point in the image and the installation angle of the camera to obtain the installation angle of the road surveillance camera.

具体地,步骤S1包括以下子步骤:Specifically, step S1 includes the following sub-steps:

S11.检测增强后的图像中的直线段;S11. Detect straight line segments in the enhanced image;

S12.将水平线段从检测到的直线段集合中剔除;S12. remove the horizontal line segment from the detected line segment set;

S13.利用剩余直线段两两求交叉点,获得直线段的交点区域;S13. Use the remaining straight line segments to find the intersection points two by two, and obtain the intersection point area of the straight line segments;

S14.获得交点区域的中心点,并将中心点作为图像的水平消失点;S14. Obtain the center point of the intersection area, and use the center point as the horizontal vanishing point of the image;

S15.利用图像的宽、高和图像中心信息,对消失点进行归一化运算,获得归一化消失点。S15. Using the width, height and image center information of the image, normalize the vanishing point to obtain the normalized vanishing point.

具体地,步骤S1包括以下子步骤:Specifically, step S1 includes the following sub-steps:

S111.从输入图像中获取Y通道,基于Y通道进行车道线增强;S111. Obtain the Y channel from the input image, and perform lane line enhancement based on the Y channel;

S112.使用LSD算法,检测增强后的图像中的直线段。S112. Use the LSD algorithm to detect straight line segments in the enhanced image.

具体地,所述基于Y通道进行车道线增强如下:Specifically, the lane line enhancement based on the Y channel is as follows:

E(x,y)=2P(x,y)-P(x-N,y)-P(x+N,y)E(x,y)=2P(x,y)-P(x-N,y)-P(x+N,y)

其中,E(x,y)表示车道线增强后横坐标为x、纵坐标为y的像素,P(x,y)表示车道线增强前Y通道中横坐标为x、纵坐标为y的像素,车道线在图像中的宽度为2*N。Among them, E(x,y) represents the pixel whose abscissa is x and ordinate is y after lane line enhancement, and P(x,y) represents the pixel whose abscissa is x and ordinate is y in Y channel before lane line enhancement , the width of the lane line in the image is 2*N.

具体地,步骤S12中,通过直线段与水平的夹角判断该直线段是否为水平方向的直线:如果直线段与图像水平方向夹角的绝对值小于α,则认为该直线段是水平线段,阈值α取值范围为[10°,30°]。Specifically, in step S12, whether the straight line segment is a horizontal line is judged by the included angle between the straight line segment and the horizontal: if the absolute value of the included angle between the straight line segment and the horizontal direction of the image is less than α, the straight line segment is considered to be a horizontal line segment, The value range of the threshold α is [10°, 30°].

具体地,步骤S14中,利用MeanShift算法获得交点区域的中心点。Specifically, in step S14, the MeanShift algorithm is used to obtain the center point of the intersection area.

具体地,所述利用图像中水平消失点与摄像机安装角度之间的关系,获取道路监控摄像机安装角度,具体如下:Specifically, the use of the relationship between the horizontal vanishing point in the image and the installation angle of the camera to obtain the installation angle of the road surveillance camera is as follows:

Figure GDA0002544876170000031
Figure GDA0002544876170000031

其中,Φ表示偏航角,

Figure GDA0002544876170000032
表示俯仰角,Ψ表示滚动角,vpx和vpy分别表示图像中的水平消失点在归一化图像中的位置。where Φ represents the yaw angle,
Figure GDA0002544876170000032
represents the pitch angle, Ψ represents the roll angle, and vpx and vpy represent the position of the horizontal vanishing point in the image in the normalized image, respectively.

具体地,对摄像机获取的图像流,以间隔固定时间重复步骤S1~S2,实现道路监控摄像机安装角度的自动识别。Specifically, for the image stream obtained by the camera, steps S1 to S2 are repeated at regular intervals to realize automatic identification of the installation angle of the road monitoring camera.

为实现上述目的,按照本发明的第二方面,提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面所述的道路监控摄像机安装角度估计方法。In order to achieve the above object, according to a second aspect of the present invention, a computer-readable storage medium is provided, and a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the first aspect is implemented The method for estimating the installation angle of the road monitoring camera.

总体而言,通过本发明所构思的以上技术方案,能够取得以下有益效果:In general, through the above technical solutions conceived by the present invention, the following beneficial effects can be achieved:

本发明结合道路监控场景的外部条件的先验知识和成像原理中的投影变换原理,利用消失点与摄像机安装角度的关系,再辅以在安防相机的安装过程中自有两个角度的自由度(即相机的滚动角为0)的特点,通过数学公式计算出关心的两个安装角度。从而在监控相机安装好之后,可以在不增加任何操作流程的基础上,自动计算出摄像机的安装角度,已经安装过的安防监控摄像机同样适用。由于该方法是自动计算安装角度的,因此可以间隔固定时间自动识别安装角度,以适应自然环境因素对摄像机安装角度的影响,达到自动标注的目的。The invention combines the prior knowledge of the external conditions of the road monitoring scene and the projection transformation principle in the imaging principle, uses the relationship between the vanishing point and the installation angle of the camera, and supplements it with two degrees of freedom in the installation process of the security camera. (that is, the roll angle of the camera is 0), and the two installation angles of interest are calculated by mathematical formulas. Therefore, after the monitoring camera is installed, the installation angle of the camera can be automatically calculated without adding any operation process, and the installed security monitoring camera is also applicable. Since the method automatically calculates the installation angle, it can automatically identify the installation angle at a fixed time interval to adapt to the influence of natural environment factors on the installation angle of the camera, and achieve the purpose of automatic labeling.

附图说明Description of drawings

图1为本发明实施例提供的一种道路监控摄像机安装角度估计方法流程图;1 is a flowchart of a method for estimating an installation angle of a road surveillance camera according to an embodiment of the present invention;

图2为本发明实施例提供的图像中的消失点示意图;2 is a schematic diagram of a vanishing point in an image provided by an embodiment of the present invention;

图3为本发明实施例提供的消失点检测流程图。FIG. 3 is a flowchart of vanishing point detection provided by an embodiment of the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。此外,下面所描述的本发明各个实施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as there is no conflict with each other.

本发明结合道路监控场景的外部条件的先验知识,结合成像原理中的投影变换原理,提出一种道路监控摄像机的安装角度自动识别的算法,可以在不需要人为干预的情况下自动标定相机的安装角度,为三维摄像机的距离测量、速度测量等提供自动提取的参数。The invention combines the prior knowledge of the external conditions of the road monitoring scene and the projection transformation principle in the imaging principle, and proposes an algorithm for automatic identification of the installation angle of the road monitoring camera, which can automatically calibrate the camera without human intervention. The installation angle provides automatically extracted parameters for the distance measurement and speed measurement of the 3D camera.

如图1所示,本发明提供一种道路监控摄像机安装角度估计方法,该方法包括以下步骤:As shown in FIG. 1 , the present invention provides a method for estimating the installation angle of a road surveillance camera, which includes the following steps:

步骤S1.对摄像机获取的图像,基于平行线进行水平消失点的检测。Step S1. For the image acquired by the camera, detect the horizontal vanishing point based on parallel lines.

本方法应用于道路安防监控摄像机,主要以枪机、球机等没有滚动角的相机为主。图像中的消失点指物理世界的平行线在图像中的交叉点如图2所示,因此,检测图像中的消失点需要图像中存在平行线,而在道路监控中有非常多的平行线,如道路交通标示线、道路边缘、栅栏等等,都可以作为检测消失点的原材料。This method is applied to road security surveillance cameras, mainly cameras without roll angles, such as bolts and ball cameras. The vanishing point in the image refers to the intersection of the parallel lines of the physical world in the image as shown in Figure 2. Therefore, the detection of the vanishing point in the image requires the existence of parallel lines in the image, and there are many parallel lines in road monitoring. Such as road traffic signs, road edges, fences, etc., can be used as raw materials for detecting vanishing points.

如图3所示,步骤S1包括以下子步骤:As shown in Figure 3, step S1 includes the following sub-steps:

步骤S11.检测增强后的图像中的直线段。Step S11. Detect straight line segments in the enhanced image.

S111.从输入图像中获取Y通道,使用车道线增强。S111. Obtain the Y channel from the input image and use lane line enhancement.

利用道路监控的固有特性,在图像中检测道路监控图像中增强道路标识,从而方便从其中提取出直线段。Using the inherent characteristics of road monitoring, the road signs are enhanced in the road monitoring images to facilitate the extraction of straight line segments from them.

所有车道线在Y通道中的灰度值都比路面背景像素的灰度值更高,而且车道线都是呈现条带状的,而且车道线的宽度相对固定。因此,基于该特性,本发明采用以下方法增强车道线:The gray value of all lane lines in the Y channel is higher than the gray value of the background pixels of the road surface, and the lane lines are all strip-shaped, and the width of the lane lines is relatively fixed. Therefore, based on this characteristic, the present invention adopts the following method to enhance the lane line:

假定车道线在图像中的宽度为2*N,用P(x,y)表示车道线增强前Y通道中横坐标为x、纵坐标为y的像素,E(x,y)表示车道线增强后横坐标为x、纵坐标为y的像素,则E(x,y)=2P(x,y)-P(x-N,y)-P(x+N,y)。通过该方法增强后,车道线部分在图像中将得到凸显。Assuming that the width of the lane line in the image is 2*N, use P(x,y) to represent the pixel whose abscissa is x and the ordinate is y in the Y channel before lane line enhancement, and E(x,y) represents the lane line enhancement After the pixel whose abscissa is x and its ordinate is y, then E(x,y)=2P(x,y)-P(x-N,y)-P(x+N,y). After being enhanced by this method, the part of the lane line will be highlighted in the image.

S112.使用LSD(Line_Segment_Detector,直线段检测)算法,检测增强后的图像中的直线段。S112. Use an LSD (Line_Segment_Detector, straight line segment detection) algorithm to detect straight line segments in the enhanced image.

道路监控场景中有非常多的平行线可以利用,使用计算机视觉知识,可以自动的提取出平行线。There are a lot of parallel lines available in the road monitoring scene. Using computer vision knowledge, the parallel lines can be automatically extracted.

本发明优选LSD算法检测增强后的图像中检测直线段,其检测出来的直线更精确,更适合于有虚实相间的车道线。The present invention preferably detects the straight line segment in the enhanced image by the LSD algorithm, and the straight line detected by the LSD algorithm is more accurate, and is more suitable for lane lines with alternate virtual and real.

步骤S12.将水平线段从检测到的直线段集合中剔除。Step S12. Remove the horizontal line segment from the detected line segment set.

因为需要寻找消失点,因此需要剔除水平或近似水平方向的直线段的影响。通过直线段与水平的夹角判断该直线段是否为水平方向的直线。将水平线段从检测到的直线段剔除,从而利用道路交通的标识的平行线特性,获取物理世界的平行线在图像中的交叉点(即消失点)。Because of the need to find the vanishing point, it is necessary to eliminate the influence of straight line segments in the horizontal or near-horizontal direction. Whether the straight line segment is a straight line in the horizontal direction is judged by the included angle between the straight line segment and the horizontal. The horizontal line segment is removed from the detected straight line segment, so that the intersection point (ie, the vanishing point) of the parallel lines of the physical world in the image is obtained by using the parallel line characteristic of road traffic signs.

如果直线段与图像水平方向夹角的绝对值小于15°则认为是水平线段;如果直线段与垂直方向夹角的绝对值小于15°,则判定为垂直线段。If the absolute value of the angle between the straight line segment and the horizontal direction of the image is less than 15°, it is considered as a horizontal line segment; if the absolute value of the angle between the straight line segment and the vertical direction is less than 15°, it is determined as a vertical line segment.

步骤S13.利用剩余直线段两两求交叉点,获得直线段的交点区域。Step S13. Use the remaining straight line segments to find the intersection points two by two, and obtain the intersection point area of the straight line segments.

步骤S14.获得交点区域的中心点,并将中心点作为图像的水平消失点。Step S14. Obtain the center point of the intersection area, and use the center point as the horizontal vanishing point of the image.

利用物理世界的平行线可以估计出图像中的消失点。The vanishing point in the image can be estimated using the parallel lines of the physical world.

本发明优选MeanShift算法获得交点区域的中心点,其获取的中心点准确度更高,受初始化的影响比较小,受噪声的干扰小。In the present invention, the MeanShift algorithm is preferred to obtain the center point of the intersection area, and the obtained center point has higher accuracy, is less affected by initialization, and is less disturbed by noise.

步骤S15.利用图像的宽、高和图像中心信息,对消失点进行归一化运算,获得归一化消失点。Step S15. Use the width, height and image center information of the image to perform a normalization operation on the vanishing point to obtain a normalized vanishing point.

步骤S2.利用图像中水平消失点与摄像机安装角度之间的关系,获取道路监控摄像机安装角度。Step S2. Obtain the installation angle of the road surveillance camera by using the relationship between the horizontal vanishing point in the image and the installation angle of the camera.

利用成像原理中的消失点与相机角度的关系,在假设相机滚动角为0的情况下获取,可以将无限多解的方程变为具有可行解的方程,从而获得相机安装的角度。Using the relationship between the vanishing point and the camera angle in the imaging principle, and assuming that the camera roll angle is 0, the equation with infinite solutions can be transformed into an equation with feasible solutions, so as to obtain the angle of the camera installation.

利用成像原理中,图像中水平消失点与摄像机安装角度之间的关系,如下式所示:Using the imaging principle, the relationship between the horizontal vanishing point in the image and the installation angle of the camera is shown in the following formula:

Figure GDA0002544876170000071
Figure GDA0002544876170000071

其中,Φ表示偏航角,

Figure GDA0002544876170000072
表示俯仰角,Ψ表示滚动角,一般道路监控的相机支架只有两个角度的自由度,即俯仰角、偏航角两个角度,因此只要将相机装正,就能保证相机的滚动角为0°,将该已知条件代入上面的公式,可以得到如下的公式:where Φ represents the yaw angle,
Figure GDA0002544876170000072
Indicates the pitch angle, and Ψ indicates the roll angle. Generally, the camera bracket for road monitoring has only two degrees of freedom, namely the pitch angle and the yaw angle. Therefore, as long as the camera is installed upright, the roll angle of the camera can be guaranteed to be 0. °, substitute this known condition into the above formula, you can get the following formula:

Figure GDA0002544876170000081
Figure GDA0002544876170000081

其中,vpx和vpy分别表示图像中的水平消失点在归一化图像中的位置,该方程中只有两个未知数、可以形成两个方程,因此该方程有解,解该方程可以得到:Among them, vpx and vpy respectively represent the position of the horizontal vanishing point in the image in the normalized image. There are only two unknowns in this equation, and two equations can be formed, so the equation has a solution, and the equation can be obtained by solving the equation:

Figure GDA0002544876170000082
Figure GDA0002544876170000082

Figure GDA0002544876170000083
Figure GDA0002544876170000083

通过上述方程可以知道,只需要定位出图像中的水平消失点的归一化位置,就可以获得相机的三维安装角度。相机的三维安装角度可以表示为:It can be known from the above equation that the three-dimensional installation angle of the camera can be obtained only by locating the normalized position of the horizontal vanishing point in the image. The three-dimensional installation angle of the camera can be expressed as:

Figure GDA0002544876170000084
Figure GDA0002544876170000084

本领域的技术人员容易理解,以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。Those skilled in the art can easily understand that the above are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention, etc., All should be included within the protection scope of the present invention.

Claims (8)

1.一种道路监控摄像机安装角度估计方法,其特征在于,该方法包括以下步骤:1. a road monitoring camera installation angle estimation method, is characterized in that, the method comprises the following steps: S1.对摄像机获取的图像,基于平行线进行水平消失点的检测;S1. For the image acquired by the camera, detect the horizontal vanishing point based on parallel lines; S2.利用图像中水平消失点与摄像机安装角度之间的关系,获取道路监控摄像机安装角度,具体如下:S2. Use the relationship between the horizontal vanishing point in the image and the installation angle of the camera to obtain the installation angle of the road surveillance camera, as follows:
Figure FDA0002544876160000011
Figure FDA0002544876160000011
其中,Φ表示偏航角,Θ表示俯仰角,Ψ表示滚动角,vpx和vpy分别表示图像中的水平消失点在归一化图像中的位置。where Φ represents the yaw angle, Θ represents the pitch angle, Ψ represents the roll angle, and vpx and vpy represent the position of the horizontal vanishing point in the image in the normalized image, respectively.
2.如权利要求1所述的方法,其特征在于,步骤S1包括以下子步骤:2. The method of claim 1, wherein step S1 comprises the following substeps: S11.检测增强后的图像中的直线段;S11. Detect straight line segments in the enhanced image; S12.将水平线段从检测到的直线段集合中剔除;S12. remove the horizontal line segment from the detected line segment set; S13.利用剩余直线段两两求交叉点,获得直线段的交点区域;S13. Use the remaining straight line segments to find the intersection points two by two, and obtain the intersection point area of the straight line segments; S14.获得交点区域的中心点,并将中心点作为图像的水平消失点;S14. Obtain the center point of the intersection area, and use the center point as the horizontal vanishing point of the image; S15.利用图像的宽、高和图像中心信息,对消失点进行归一化运算,获得归一化消失点。S15. Use the width, height and image center information of the image to perform a normalization operation on the vanishing point to obtain a normalized vanishing point. 3.如权利要求2所述的方法,其特征在于,步骤S1包括以下子步骤:3. The method of claim 2, wherein step S1 comprises the following substeps: S111.从输入图像中获取Y通道,基于Y通道进行车道线增强;S111. Obtain the Y channel from the input image, and perform lane line enhancement based on the Y channel; S112.使用LSD算法,检测增强后的图像中的直线段。S112. Use the LSD algorithm to detect straight line segments in the enhanced image. 4.如权利要求3所述的方法,其特征在于,所述基于Y通道进行车道线增强如下:4. The method of claim 3, wherein the lane line enhancement based on the Y channel is as follows: E(x,y)=2P(x,y)-P(x-N,y)-P(x+N,y)E(x,y)=2P(x,y)-P(x-N,y)-P(x+N,y) 其中,E(x,y)表示车道线增强后横坐标为x、纵坐标为y的像素,P(x,y)表示车道线增强前Y通道中横坐标为x、纵坐标为y的像素,车道线在图像中的宽度为2*N。Among them, E(x,y) represents the pixel whose abscissa is x and ordinate is y after lane line enhancement, and P(x,y) represents the pixel whose abscissa is x and ordinate is y in Y channel before lane line enhancement , the width of the lane line in the image is 2*N. 5.如权利要求2所述的方法,其特征在于,步骤S12中,通过直线段与水平的夹角判断该直线段是否为水平方向的直线:如果直线段与图像水平方向夹角的绝对值小于α,则认为该直线段是水平线段,阈值α取值范围为[10°,30°]。5. The method according to claim 2, wherein in step S12, it is judged whether the straight line segment is a straight line in the horizontal direction by the included angle between the straight line segment and the horizontal direction: if the absolute value of the included angle between the straight line segment and the horizontal direction of the image If it is less than α, the straight line segment is considered to be a horizontal line segment, and the value range of the threshold α is [10°, 30°]. 6.如权利要求2所述的方法,其特征在于,步骤S14中,利用MeanShift算法获得交点区域的中心点。6 . The method of claim 2 , wherein, in step S14 , the MeanShift algorithm is used to obtain the center point of the intersection area. 7 . 7.如权利要求1所述的方法,其特征在于,对摄像机获取的图像流,以间隔固定时间重复步骤S1~S2,实现道路监控摄像机安装角度的自动识别。7 . The method of claim 1 , wherein steps S1 to S2 are repeated at regular intervals for the image stream obtained by the camera to realize automatic identification of the installation angle of the road surveillance camera. 8 . 8.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述的道路监控摄像机安装角度估计方法。8. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the road according to any one of claims 1 to 7 is implemented Surveillance camera installation angle estimation method.
CN201910931121.0A 2019-09-27 2019-09-27 A method for estimating the installation angle of a road surveillance camera Expired - Fee Related CN110718068B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910931121.0A CN110718068B (en) 2019-09-27 2019-09-27 A method for estimating the installation angle of a road surveillance camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910931121.0A CN110718068B (en) 2019-09-27 2019-09-27 A method for estimating the installation angle of a road surveillance camera

Publications (2)

Publication Number Publication Date
CN110718068A CN110718068A (en) 2020-01-21
CN110718068B true CN110718068B (en) 2020-12-08

Family

ID=69212068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910931121.0A Expired - Fee Related CN110718068B (en) 2019-09-27 2019-09-27 A method for estimating the installation angle of a road surveillance camera

Country Status (1)

Country Link
CN (1) CN110718068B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112017249B (en) * 2020-08-18 2025-01-28 广东正扬传感科技股份有限公司 Method and device for obtaining roll angle and correcting installation angle of vehicle-mounted camera
CN113206994B (en) * 2021-03-30 2023-03-28 华为技术有限公司 Camera automatic engineering survey method and device, electronic equipment, chip and storage medium
CN113706630B (en) * 2021-08-26 2024-02-06 西安电子科技大学 Method for calibrating pitch angle of camera based on group of horizontal parallel lines

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106462968A (en) * 2014-05-14 2017-02-22 大众汽车有限公司 Method and apparatus for calibrating a camera system in a motor vehicle
CN106558080A (en) * 2016-11-14 2017-04-05 天津津航技术物理研究所 Join on-line proving system and method outside a kind of monocular camera
CN109948552A (en) * 2019-03-20 2019-06-28 四川大学 A method of lane line detection in complex traffic environment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105453131B (en) * 2012-04-27 2019-04-12 奥多比公司 The adjust automatically of image
CN102831426B (en) * 2012-08-30 2014-11-05 杭州电子科技大学 Road environment self-adaptive straight-lane detection method
CN107133985B (en) * 2017-04-20 2020-05-12 常州智行科技有限公司 Automatic calibration method for vehicle-mounted camera based on lane line vanishing point
CN107492123B (en) * 2017-07-07 2020-01-14 长安大学 Road monitoring camera self-calibration method using road surface information
CN109961483B (en) * 2017-12-22 2022-03-18 比亚迪股份有限公司 Calibration method and system for automobile and monocular camera
CN109345593B (en) * 2018-09-04 2022-04-26 海信集团有限公司 Camera posture detection method and device
CN109685855B (en) * 2018-12-05 2022-10-14 长安大学 A camera calibration optimization method under the road cloud monitoring platform

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106462968A (en) * 2014-05-14 2017-02-22 大众汽车有限公司 Method and apparatus for calibrating a camera system in a motor vehicle
CN106558080A (en) * 2016-11-14 2017-04-05 天津津航技术物理研究所 Join on-line proving system and method outside a kind of monocular camera
CN109948552A (en) * 2019-03-20 2019-06-28 四川大学 A method of lane line detection in complex traffic environment

Also Published As

Publication number Publication date
CN110718068A (en) 2020-01-21

Similar Documents

Publication Publication Date Title
US11854272B2 (en) Hazard detection from a camera in a scene with moving shadows
CN102867414B (en) Vehicle queue length measurement method based on PTZ (Pan/Tilt/Zoom) camera fast calibration
US9292750B2 (en) Method and apparatus for detecting traffic monitoring video
CN110718068B (en) A method for estimating the installation angle of a road surveillance camera
WO2016106950A1 (en) Zonal underground structure detection method based on sun illumination and shade compensation
JP2007234019A (en) Vehicle image area specifying device and method for it
CN111723801B (en) Method and system for detecting and correcting target in fisheye camera picture
Lin et al. Lane departure and front collision warning using a single camera
CN104729485A (en) Visual positioning method based on vehicle-mounted panorama image and streetscape matching
CN105374049B (en) Multi-corner point tracking method and device based on sparse optical flow method
CN110929676A (en) A real-time detection method for illegal U-turn based on deep learning
CN105141887A (en) Submarine cable area video alarming method based on thermal imaging
CN102483881B (en) Pedestrian-crossing marking detecting method and pedestrian-crossing marking detecting device
WO2018149539A1 (en) A method and apparatus for estimating a range of a moving object
CN111047908A (en) Detection device and method for cross-line vehicle and video monitoring equipment
KR101381580B1 (en) Method and system for detecting position of vehicle in image of influenced various illumination environment
Petrovai et al. A stereovision based approach for detecting and tracking lane and forward obstacles on mobile devices
CN108021849B (en) Pedestrian early warning method and device
CN108230356A (en) A kind of motor vehicles tracking based on perspective correction
CN116682268A (en) Portable urban road vehicle violation inspection system and method based on machine vision
KR20210044127A (en) Visual range measurement and alarm system based on video analysis and method thereof
CN114719873A (en) Low-cost fine map automatic generation method and device and readable medium
CN111612812A (en) Target detection method, detection device and electronic device
Laureshyn et al. Automated video analysis as a tool for analysing road user behaviour
CN115880643B (en) A method and device for monitoring social distance based on target detection algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201208

CF01 Termination of patent right due to non-payment of annual fee