CN115442531A - Method for determining direction of camera and camera direction determining device - Google Patents
Method for determining direction of camera and camera direction determining device Download PDFInfo
- Publication number
- CN115442531A CN115442531A CN202211082794.1A CN202211082794A CN115442531A CN 115442531 A CN115442531 A CN 115442531A CN 202211082794 A CN202211082794 A CN 202211082794A CN 115442531 A CN115442531 A CN 115442531A
- Authority
- CN
- China
- Prior art keywords
- camera
- determining
- offset
- angle
- reference object
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 26
- 238000009434 installation Methods 0.000 claims description 13
- 230000000007 visual effect Effects 0.000 claims 1
- 238000005259 measurement Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 238000012544 monitoring process Methods 0.000 description 3
- 230000007547 defect Effects 0.000 description 1
- 229910052751 metal Inorganic materials 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 150000002739 metals Chemical class 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Studio Devices (AREA)
Abstract
本发明提供一种确定摄像头方向的方法,确定摄像头的拍摄范围,在拍摄范围内选取参照对象,获取摄像头和参照对象的经纬度或坐标;控制摄像头旋转,直至参照对象在摄像头的取景框内水平居中,然后确定摄像头在旋转过程中的旋转角度;根据摄像头和参照对象的经纬度或坐标、以及预设的地理参考方向确定摄像头的偏移参考角度;根据偏移参考角度以及旋转角度确定摄像头的偏移量;根据偏移量以及旋转角度确定摄像头的地理方向。本发明无需增加额外的硬件,即可精确的确定摄像头方向,在降低成本的同时,也可避免因地磁干扰等其他因素所造成的测量误差。
The invention provides a method for determining the direction of the camera, which includes determining the shooting range of the camera, selecting a reference object within the shooting range, and obtaining the latitude and longitude or coordinates of the camera and the reference object; controlling the rotation of the camera until the reference object is horizontally centered in the viewfinder frame of the camera , and then determine the rotation angle of the camera during the rotation process; determine the offset reference angle of the camera according to the latitude and longitude or coordinates of the camera and the reference object, and the preset geographic reference direction; determine the offset of the camera according to the offset reference angle and the rotation angle Quantity; determine the geographical direction of the camera according to the offset and rotation angle. The invention can accurately determine the direction of the camera without adding additional hardware, and can avoid measurement errors caused by other factors such as geomagnetic interference while reducing costs.
Description
技术领域technical field
本申请涉及定位技术领域,具体涉及一种用于确定摄像头方向的方法以及摄像头方向确定装置。The present application relates to the technical field of positioning, and in particular to a method for determining the direction of a camera and a device for determining the direction of the camera.
背景技术Background technique
随着安防监控产业的发展,人们对监控目标的定位精准度有着更高的要求。现有的确定摄像头方向的方法通常有两种:在安装时指定或测量并记录摄像头方向,再将摄像头的角度换算成地理方向;增加电子罗盘等传感器,识别摄像头方向。With the development of the security monitoring industry, people have higher requirements for the positioning accuracy of monitoring targets. There are usually two existing methods for determining the direction of the camera: specify or measure and record the direction of the camera during installation, and then convert the angle of the camera into a geographic direction; add sensors such as an electronic compass to identify the direction of the camera.
然而,在安装时指定或测量并记录摄像头方向的方法,需要消耗时间调整和测量,会增加安装的工作量,且精度较低。另一方面,增加电子罗盘等传感器,识别摄像头方向的方法,需要增加额外的硬件,增加成本。且电子罗盘需要校准,而校准的方法通常需要沿不同的方向移动传感器,对摄像头等体积、重量较大的固定式设备来说很难做到。此外,电子罗盘的精度也容易受温度影响。上述两种方法都依靠磁场确定地理方向,而磁场很容易受到如金属、电流等不确定因素的干扰。However, the method of specifying or measuring and recording the direction of the camera during installation requires time-consuming adjustment and measurement, increases the workload of installation, and has low accuracy. On the other hand, adding sensors such as an electronic compass to identify the direction of the camera requires additional hardware and increases costs. Moreover, the electronic compass needs to be calibrated, and the calibration method usually needs to move the sensor in different directions, which is difficult for fixed devices such as cameras with large volume and weight. In addition, the accuracy of the electronic compass is also easily affected by temperature. Both of the above methods rely on magnetic fields to determine geographic directions, and magnetic fields are easily disturbed by uncertain factors such as metals and electric currents.
发明内容Contents of the invention
有鉴于此,本发明提供一种用于确定摄像头方向的方法以及摄像头方向确定装置,用于解决现有确定摄像头方向的方法所存在的缺陷。In view of this, the present invention provides a method for determining the direction of the camera and a device for determining the direction of the camera, which are used to solve the defects in the existing methods for determining the direction of the camera.
为实现上述目的,本申请采用了如下技术方案:In order to achieve the above object, the application adopts the following technical solutions:
确定摄像头的拍摄范围,在所述拍摄范围内选取参照对象,获取所述摄像头和所述参照对象的经纬度或坐标;Determine the shooting range of the camera, select a reference object within the shooting range, and obtain the latitude and longitude or coordinates of the camera and the reference object;
控制所述摄像头旋转,直至所述参照对象在所述摄像头的取景框内水平居中,然后确定所述摄像头在旋转过程中的旋转角度;controlling the rotation of the camera until the reference object is horizontally centered within the viewfinder frame of the camera, and then determining the rotation angle of the camera during rotation;
根据所述摄像头和所述参照对象的经纬度或坐标、以及预设的地理参考方向确定所述摄像头的偏移参考角度;determining the offset reference angle of the camera according to the latitude and longitude or coordinates of the camera and the reference object, and a preset geographic reference direction;
根据所述偏移参考角度以及所述旋转角度确定所述摄像头的偏移量;determining the offset of the camera according to the offset reference angle and the rotation angle;
根据所述偏移量以及所述旋转角度确定所述摄像头的地理方向。Determine the geographic direction of the camera according to the offset and the rotation angle.
在一实施方式中,所述偏移参考角度为所述摄像头和所述参照对象的连线与所述地理参考方向所形成的夹角。In an embodiment, the offset reference angle is an angle formed by a line connecting the camera and the reference object and the geographic reference direction.
在一实施方式中,所述旋转角度为所述摄像头的当前拍摄方向与所述摄像头和所述参照对象的连线所形成的夹角。In one embodiment, the rotation angle is an angle formed by the current shooting direction of the camera and a line connecting the camera and the reference object.
在一实施方式中,所述根据所述偏移参考角度以及所述旋转角度确定所述摄像头的偏移量,包括:In one embodiment, the determining the offset of the camera according to the offset reference angle and the rotation angle includes:
将所述旋转角度转换到与所述偏移参考角度处于同一坐标系中;converting the rotation angle to be in the same coordinate system as the offset reference angle;
将所述偏移参考角度与所述旋转角度在同一坐标系中的差值作为所述偏移量。The difference between the offset reference angle and the rotation angle in the same coordinate system is used as the offset.
在一实施方式中,所述根据所述偏移量以及所述旋转角度确定所述摄像头的地理方向,包括:In one embodiment, the determining the geographic direction of the camera according to the offset and the rotation angle includes:
再次控制所述摄像头旋转,直至目标对象在所述摄像头的取景框内水平居中,然后确定所述摄像头在旋转过程中的旋转角度;Controlling the rotation of the camera again until the target object is horizontally centered in the viewfinder frame of the camera, and then determining the rotation angle of the camera during rotation;
将所述偏移量与所述旋转角度之和作为所述摄像头的地理方向。The sum of the offset and the rotation angle is used as the geographic direction of the camera.
在一实施方式中,所述确定摄像头的拍摄范围,包括:In one embodiment, the determining the shooting range of the camera includes:
根据摄像头的安装高度与倾角确定第一半径,根据所述第一半径确定第一面积;determining a first radius according to the installation height and inclination of the camera, and determining a first area according to the first radius;
根据摄像头的安装高度、倾角与垂直视角确定第二半径,根据所述第二半径确定第二面积;determining a second radius according to the installation height, inclination and vertical viewing angle of the camera, and determining a second area according to the second radius;
将所述第二面积与所述第一面积之差作为所述拍摄范围。The difference between the second area and the first area is used as the shooting range.
在一实施方式中,所述方法还包括:In one embodiment, the method also includes:
将所述摄像头设置在第一灯杆上;setting the camera on the first light pole;
将所述拍摄范围内的第二灯杆作为所述参照对象。The second light pole within the shooting range is used as the reference object.
在一实施方式中,所述方法还包括:In one embodiment, the method also includes:
将所述摄像头设置在第一灯杆上;setting the camera on the first light pole;
将所述拍摄范围内的第二灯杆上设置灯具作为所述参照对象;The lamps installed on the second light pole within the shooting range are used as the reference object;
控制所述灯具闪烁。Control the light fixture to flicker.
一种摄像头方向确定装置,包括:A device for determining the direction of a camera, comprising:
拍摄参数确定模块,用于确定摄像头的拍摄范围,在所述拍摄范围内选取参照对象,获取所述摄像头和所述参照对象的经纬度或坐标;The shooting parameter determination module is used to determine the shooting range of the camera, select a reference object within the shooting range, and obtain the latitude and longitude or coordinates of the camera and the reference object;
旋转控制模块,用于控制所述摄像头旋转,直至所述参照对象在所述摄像头的取景框内水平居中,然后确定所述摄像头在旋转过程中的旋转角度;A rotation control module, configured to control the rotation of the camera until the reference object is horizontally centered in the viewfinder frame of the camera, and then determine the rotation angle of the camera during rotation;
参考角度确定模块,用于根据所述摄像头和所述参照对象的经纬度或坐标、以及预设的地理参考方向确定所述摄像头的偏移参考角度;A reference angle determination module, configured to determine the offset reference angle of the camera according to the latitude and longitude or coordinates of the camera and the reference object, and a preset geographic reference direction;
偏移量确定模块,用于根据所述偏移参考角度以及所述旋转角度确定所述摄像头的偏移量;An offset determining module, configured to determine the offset of the camera according to the offset reference angle and the rotation angle;
方向确定模块,用于根据所述偏移量以及所述旋转角度确定所述摄像头的地理方向。A direction determining module, configured to determine the geographical direction of the camera according to the offset and the rotation angle.
在一实施方式中,所述的摄像头方向确定装置还包括第一灯杆和第二灯杆,所述第一灯杆用于装设所述摄像头,所述第二灯杆设置在所述拍摄范围内,用于充当所述参照对象或者装设所述参照对象。In one embodiment, the device for determining the direction of the camera further includes a first light pole and a second light pole, the first light pole is used for installing the camera, and the second light pole is arranged on the Within the scope, it is used to serve as the reference object or install the reference object.
本发明无需增加额外的硬件,即可精确的确定摄像头方向,在降低成本的同时,也可避免因地磁干扰等其他因素所造成的测量误差。The invention can accurately determine the direction of the camera without adding additional hardware, and can avoid measurement errors caused by other factors such as geomagnetic interference while reducing costs.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, so It should be regarded as a limitation on the scope, and those skilled in the art can also obtain other related drawings based on these drawings without creative work.
图1为本申请一实施例提供的确定摄像头方向的流程示意图;FIG. 1 is a schematic flow diagram of determining the direction of a camera provided by an embodiment of the present application;
图2为本申请一实施例提供的确定摄像头地理方向的示意图;FIG. 2 is a schematic diagram of determining the geographic direction of a camera provided by an embodiment of the present application;
图3为本申请一实施例提供的确定摄像头拍摄范围的示意图;FIG. 3 is a schematic diagram of determining the shooting range of a camera provided by an embodiment of the present application;
图4为本申请另一实施例提供的确定摄像头拍摄范围的示意图。FIG. 4 is a schematic diagram of determining a shooting range of a camera provided by another embodiment of the present application.
具体实施方式detailed description
下面将结合附图,对本发明的特定实施例进行详细描述。显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明的描述,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。Specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Apparently, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the description of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
在本发明的描述中,除非另有明确的规定和限定,术语“设置”、“安装”、“连接”等应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连。对于本领域的普通技术人员而言,可以具体情况理解上述术语的具体含义。In the description of the present invention, unless otherwise specified and limited, the terms "installation", "installation", "connection" and so on should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integrated Ground connection; it can be mechanical connection or electrical connection; it can be direct connection or indirect connection through an intermediary. Those of ordinary skill in the art can understand the specific meanings of the above terms in specific situations.
术语“上”、“下”、“左”、“右”、“前”、“后”、“顶”、“底”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,或者是该发明产品使用时惯常摆放的方位或位置关系,仅是为了便于描述和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。The orientation or positional relationship indicated by the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer" etc. is based on the attached The orientation or positional relationship shown in the figure, or the conventional orientation or positional relationship of the invention product in use, is only for the convenience of description and simplification of the description, not to indicate or imply that the referred device or element must have a specific orientation , constructed and operated in a particular orientation and therefore should not be construed as limiting the invention.
而且,术语“第一”、“第二”、“第三”等仅仅是为了区别属性类似的元件,而不是指示或暗示相对的重要性或者特定的顺序。Also, the terms "first", "second", "third", etc. are only used to distinguish elements of similar nature, and do not indicate or imply relative importance or a specific order.
此外,术语“包括”、“包含”或者其任何其他变体,意在涵盖非排他性的包含,除了包含所列的那些要素,而且还可包含没有明确列出的其他要素。Furthermore, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion of elements other than those listed and also other elements not expressly listed.
请参考图1,一种确定摄像头方向的方法包括以下步骤:Please refer to Figure 1, a method for determining the direction of a camera includes the following steps:
S100,确定摄像头的拍摄范围,在拍摄范围内选取参照对象,获取摄像头和参照对象的经纬度或坐标。S100. Determine the shooting range of the camera, select a reference object within the shooting range, and obtain the latitude and longitude or coordinates of the camera and the reference object.
具体的,选取的参照对象可以是在拍摄范围内的任意静止的物体,例如树干、楼房上的户外空调机、路牌等。摄像头的经纬度或坐标为安装时就已经确定的参数。参照对象确认之后,可通过后台网络对参照对象的经纬度或坐标进行获取。摄像头(CAMERA或WEBCAM)又称为电脑相机、电脑眼、电子眼等,是一种视频输入设备,被广泛的运用于视频会议、远程医疗及实时监控等方面。在光学仪器中,以光学仪器的镜头为顶点,以被测目标的物像可通过镜头的最大范围的两条边缘构成的夹角,称为视场角。视场角的大小决定了光学仪器的视野范围,视场角越大,视野就越大,光学倍率就越小。通俗地说,目标物体超过这个角就不会被收在镜头里。Specifically, the selected reference object may be any stationary object within the shooting range, such as a tree trunk, an outdoor air conditioner on a building, a street sign, and the like. The latitude and longitude or coordinates of the camera are parameters that have been determined during installation. After the reference object is confirmed, the longitude, latitude or coordinates of the reference object can be obtained through the background network. Camera (CAMERA or WEBCAM), also known as computer camera, computer eye, electronic eye, etc., is a video input device that is widely used in video conferencing, telemedicine and real-time monitoring. In optical instruments, the angle formed by the lens of the optical instrument as the vertex and the two edges of the maximum range where the object image of the measured object can pass through the lens is called the field of view. The size of the field of view determines the field of view of the optical instrument. The larger the field of view, the larger the field of view and the smaller the optical magnification. In layman's terms, if the target object exceeds this angle, it will not be collected in the lens.
S110,控制摄像头旋转,直至参照对象在摄像头的取景框内水平居中,然后确定摄像头在旋转过程中的旋转角度。S110. Control the rotation of the camera until the reference object is horizontally centered in the frame of the camera, and then determine the rotation angle of the camera during the rotation.
具体的,通过如4G/5G等互联网的方式实现摄像头与后台的远程互联。工作人员可以在后台远程的对摄像头的工况、拍摄的内容等信息进行实时监控,并能够控制摄像头往任意方向进行旋转。摄像头的视场角还包括水平视场角和垂直视场角,在本发明中,拍摄范围仅与摄像头的垂直视场角相关,后台仅需对摄像头进行水平方向上旋转。参照对象在摄像头的取景框内水平居中,等同于参照对象在摄像头的垂直视场角方向居中。摄像头的旋转角度为摄像头当前取景框居中的方向与摄像头旋转至参照对象的方向所形成的夹角。该方式无需对摄像头进行垂直方向上的旋转,简化了获取摄像头地理方向的步骤。Specifically, the remote interconnection between the camera and the background is realized through the Internet such as 4G/5G. The staff can remotely monitor the working condition of the camera, the content of the shooting and other information in real time in the background, and can control the camera to rotate in any direction. The viewing angle of the camera also includes a horizontal viewing angle and a vertical viewing angle. In the present invention, the shooting range is only related to the vertical viewing angle of the camera, and the background only needs to rotate the camera horizontally. The reference object is centered horizontally within the camera’s viewfinder frame, which is equivalent to the reference object being centered in the vertical field of view direction of the camera. The rotation angle of the camera is the angle formed by the direction in which the camera's current viewfinder is centered and the direction in which the camera rotates to the reference object. This method does not need to rotate the camera in the vertical direction, which simplifies the steps of obtaining the geographic direction of the camera.
S120,根据摄像头和参照对象的经纬度或坐标、以及预设的地理参考方向确定摄像头的偏移参考角度。S120. Determine an offset reference angle of the camera according to the latitude and longitude or coordinates of the camera and the reference object, and a preset geographic reference direction.
具体的,根据步骤S100中所获取得到的摄像头和参照对象的经纬度或坐标,将摄像头和参照对象以点的方式在二维坐标系上布设,以摄像头的位置为原点,预设的地理参考方向为极轴,可以获得摄像头与参照对象在二维坐标系上的位置关系图。其中,预设的地理参考方向可以人为的规定,例如可以为正北、正南、正东或正西。将摄像头的坐标点和参照对象的坐标点连成一条线段,该线段与极轴所形成的夹角即为偏移参考角度。Specifically, according to the latitude and longitude or coordinates of the camera and the reference object obtained in step S100, the camera and the reference object are arranged in the form of points on the two-dimensional coordinate system, with the position of the camera as the origin, and the preset geographic reference direction is the polar axis, and the position relationship diagram between the camera and the reference object on the two-dimensional coordinate system can be obtained. Wherein, the preset geographic reference direction can be artificially specified, for example, it can be true north, true south, true east or true west. Connect the coordinate point of the camera and the coordinate point of the reference object into a line segment, and the angle formed between the line segment and the polar axis is the offset reference angle.
S130,根据偏移参考角度以及旋转角度确定摄像头的偏移量。S130. Determine the offset of the camera according to the offset reference angle and the rotation angle.
具体的,偏移量为一个固定值,通过获取一次偏移量,即可在后续摄像头的使用过程中可准确的获取当前的地理方向。其中,将步骤S110所获取的旋转角度放在步骤S120所获取的偏移参考角度的二维坐标系中,将偏移参考角度与旋转角度的角度差作为摄像头的偏移量。Specifically, the offset is a fixed value, and by acquiring the offset once, the current geographic direction can be accurately acquired during subsequent use of the camera. Wherein, the rotation angle acquired in step S110 is placed in the two-dimensional coordinate system of the offset reference angle acquired in step S120, and the angle difference between the offset reference angle and the rotation angle is used as the offset of the camera.
S140,根据偏移量以及旋转角度确定摄像头的地理方向。S140. Determine the geographic direction of the camera according to the offset and the rotation angle.
具体的,摄像头在实际的使用过程中,可以根据其自身的旋转角度以及由步骤S130所获取的偏移量确定摄像头的地理方向。Specifically, during actual use of the camera, the geographic direction of the camera may be determined according to its own rotation angle and the offset acquired in step S130.
请参考图2,在本实施例中,偏移参考角度为摄像头和参照对象的连线与地理参考方向所形成的夹角。建立一个二维的坐标系,以摄像头的位置O为原点,正北方向作为预设的地理参考方向,沿正北方向N做一条射线,将该射线作为二维坐标系中的极轴ON。摄像头的初始朝向方向为A1,参照对象的位置为B。摄像头和参照对象的连线为OB,偏移参考角度为摄像头和参照对象的连线为OB与ON所形成的角度α1。Please refer to FIG. 2 , in this embodiment, the offset reference angle is the angle formed by the line connecting the camera and the reference object and the geographic reference direction. Establish a two-dimensional coordinate system, take the camera position O as the origin, and the true north direction as the preset geographic reference direction, make a ray along the true north direction N, and use this ray as the polar axis ON in the two-dimensional coordinate system. The initial orientation of the camera is A1, and the position of the reference object is B. The line connecting the camera and the reference object is OB, and the offset reference angle is the angle α1 formed by the line connecting the camera and the reference object being OB and ON.
在本实施例中,旋转角度为摄像头的当前拍摄方向与摄像头和参照对象的连线所形成的夹角。其中,旋转角度为OA1与OB所形成的夹角α2。In this embodiment, the rotation angle is the angle formed by the current shooting direction of the camera and the line connecting the camera and the reference object. Wherein, the rotation angle is the angle α2 formed by OA1 and OB.
在本实施例中,根据偏移参考角度以及旋转角度确定摄像头的偏移量,包括:将旋转角度转换到与偏移参考角度处于同一坐标系中。其中,为了更精确地确定摄像头旋转时的角度,将摄像头的旋转角度的区间划定在0000~3600,通过将测量获得的旋转角度除于10以使得旋转角度转换到与偏移参考角度处于同一坐标系中。例如,测量获得的摄像头的旋转角度为0101、1036、0033,那么分别将其转换成与偏移参考角度处于同一坐标系中后得到旋转角度分别为10.1°、103.6°、3.3°。In this embodiment, determining the offset of the camera according to the offset reference angle and the rotation angle includes: converting the rotation angle to be in the same coordinate system as the offset reference angle. Among them, in order to more accurately determine the angle when the camera rotates, the range of the rotation angle of the camera is defined as 0000-3600, and the rotation angle obtained by the measurement is divided by 10 so that the rotation angle is converted to the same value as the offset reference angle. in the coordinate system. For example, the measured rotation angles of the camera are 0101, 1036, and 0033, and then converted to the same coordinate system as the offset reference angle to obtain the rotation angles of 10.1°, 103.6°, and 3.3°, respectively.
将偏移参考角度与旋转角度在同一坐标系中的差值作为偏移量。其中,α2为转换后的旋转角度。将角度α1与α2做减法,得到的差值作为摄像头的偏移量,即在本实施例中β为摄像头的偏移量,也可称为偏移角。Take the difference between the offset reference angle and the rotation angle in the same coordinate system as the offset. Among them, α2 is the converted rotation angle. Subtract the angles α1 and α2, and the difference obtained is used as the offset of the camera, that is, in this embodiment, β is the offset of the camera, which can also be called an offset angle.
在本实施例中,根据偏移量以及旋转角度确定摄像头的地理方向,包括:In this embodiment, the geographic direction of the camera is determined according to the offset and rotation angle, including:
再次控制摄像头旋转,直至目标对象在摄像头的取景框内水平居中,然后确定摄像头在旋转过程中的旋转角度。其中,假定摄像头的方向从A1旋转至A2,旋转角度经过转换后为α3。Control the rotation of the camera again until the target object is horizontally centered in the viewfinder frame of the camera, and then determine the rotation angle of the camera during rotation. Wherein, it is assumed that the direction of the camera is rotated from A1 to A2, and the rotation angle is converted to α3.
将偏移量与旋转角度之和作为摄像头的地理方向。其中,摄像头的地理方向为偏移量β与旋转角度α3的和,即∠A2ON。例如,偏移量β为15°,摄像头的旋转角度α3为270°,那么摄像头相对预设的地理参考方向所形成的角度为270°+15°=285°,即此时摄像头的地理方向为西北方向285°。The sum of the offset and the rotation angle is used as the geographic direction of the camera. Wherein, the geographic direction of the camera is the sum of the offset β and the rotation angle α3, that is, ∠A2ON. For example, if the offset β is 15°, and the rotation angle α3 of the camera is 270°, then the angle formed by the camera relative to the preset geographic reference direction is 270°+15°=285°, that is, the geographic direction of the camera at this time is 285° northwest.
请参考图3,在一种实施例中,确定摄像头的拍摄范围,包括:Please refer to FIG. 3. In one embodiment, determining the shooting range of the camera includes:
根据摄像头的安装高度H与倾角θ1确定第一半径r1,根据第一半径r1确定第一面积。其中,倾角θ1为摄像头的镜头与安装高度H所形成的角度。第一半径r1为倾角θ1在水平地面上所形成的距离,根据第一半径r1可以获得第一面积为Πr1。The first radius r1 is determined according to the installation height H and the inclination angle θ1 of the camera, and the first area is determined according to the first radius r1. Wherein, the inclination angle θ1 is the angle formed by the lens of the camera and the installation height H. The first radius r1 is the distance formed by the inclination angle θ1 on the horizontal ground, and the first area can be obtained according to the first radius r1 as Πr1.
根据摄像头的安装高度H、倾角θ1与垂直视角θ2确定第二半径r2,根据第二半径r2确定第二面积。其中,垂直视角θ2为摄像头出厂自带的垂直视场角的角度大小。第二半径r2为倾角θ1与垂直视角θ2的角度之和,并在水平地面上所形成的距离,根据第二半径r2可以获得第二面积为Πr2。The second radius r2 is determined according to the installation height H of the camera, the inclination angle θ1 and the vertical viewing angle θ2, and the second area is determined according to the second radius r2. Among them, the vertical viewing angle θ2 is the angular size of the vertical viewing angle of the camera factory. The second radius r2 is the sum of the inclination angle θ1 and the vertical viewing angle θ2, and the distance formed on the horizontal ground. According to the second radius r2, the second area can be obtained as Πr2.
将第二面积与第一面积之差作为拍摄范围。在一种实施例中,摄像头的拍摄范围即为圆环形区域(Πr2-Πr1),参照对象可以是在该圆环形区域内的任意静止的物体。The difference between the second area and the first area is taken as the shooting range. In one embodiment, the shooting range of the camera is a ring-shaped area (Πr2-Πr1), and the reference object may be any stationary object within the ring-shaped area.
请参考图4,在本实施例中,将摄像头设置在第一灯杆上,将拍摄范围内的第二灯杆作为参照对象。其中,此时摄像头的倾角θ1较大,摄像头的拍摄范围以垂直视角θ2为准。第二灯杆为垂直视角θ2范围内的与第一灯杆相邻的另一灯杆。Please refer to FIG. 4 , in this embodiment, the camera is set on the first light pole, and the second light pole within the shooting range is used as a reference object. Wherein, at this time, the inclination angle θ1 of the camera is relatively large, and the shooting range of the camera is based on the vertical viewing angle θ2. The second light pole is another light pole adjacent to the first light pole within the range of the vertical viewing angle θ2.
在本实施例中,将拍摄范围内的第二灯杆上设置灯具K作为参照对象,并通过后台控制灯具K闪烁。其中,由于所有灯杆在安装设置时的经纬度或坐标为已知量,因此在选择参照对象时以摄像头拍摄范围内的第二灯杆作为参照对象为相对优选。另一方面,由于第二灯杆的高度限制,因此在本实施方式中,将参照对象进一步地限定为第二灯杆上的固定的灯具K。当实际测量为夜晚环境时,可以通过后台控制灯具K闪烁,以使得摄像头能够更精准地捕捉到该参照对象,从而获得更精准地地理方向。In this embodiment, the lamp K is set on the second lamp post within the shooting range as a reference object, and the lamp K is controlled to flash through the background. Among them, since the latitude and longitude or coordinates of all light poles are known when they are installed, it is relatively preferable to use the second light pole within the shooting range of the camera as the reference object when selecting the reference object. On the other hand, due to the height limitation of the second light pole, in this embodiment, the reference object is further limited to the fixed lamp K on the second light pole. When the actual measurement is a night environment, the lamp K can be controlled to flicker through the background, so that the camera can more accurately capture the reference object, thereby obtaining a more accurate geographic direction.
本发明还提供了一种摄像头方向确定装置,包括用于确定摄像头的拍摄范围,在拍摄范围内选取参照对象,并获取摄像头和参照对象的经纬度或坐标的拍摄参数确定模块、用于控制摄像头旋转,直至参照对象在摄像头的取景框内水平居中,然后确定摄像头在旋转过程中的旋转角度的旋转控制模块、用于根据摄像头和参照对象的经纬度或坐标、以及预设的地理参考方向确定摄像头的偏移参考角度的参考角度确定模块、用于根据偏移参考角度以及旋转角度确定摄像头的偏移量的偏移量确定模块以及用于根据偏移量以及旋转角度确定摄像头的地理方向的方向确定模块。The present invention also provides a device for determining the direction of the camera, including a shooting parameter determination module for determining the shooting range of the camera, selecting a reference object within the shooting range, and obtaining the latitude and longitude or coordinates of the camera and the reference object, and controlling the rotation of the camera. , until the reference object is horizontally centered in the viewfinder frame of the camera, and then determine the rotation angle of the camera during rotation. A reference angle determination module for the offset reference angle, an offset determination module for determining the offset of the camera according to the offset reference angle and the rotation angle, and a direction determination for determining the geographic direction of the camera according to the offset and the rotation angle module.
在本实施方式中,摄像头方向确定装置还包括第一灯杆和第二灯杆,第一灯杆用于装设所述摄像头,第二灯杆设置在拍摄范围内,用于充当参照对象或者装设参照对象。其中,关于第一灯杆与第二灯杆的应用实施例请参考上文所述。In this embodiment, the device for determining the direction of the camera further includes a first light pole and a second light pole, the first light pole is used to install the camera, and the second light pole is set within the shooting range to serve as a reference object or Set up the reference object. For the application examples of the first light pole and the second light pole, please refer to the above description.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所附的权利要求为准。The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present invention. All should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the appended claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211082794.1A CN115442531A (en) | 2022-09-05 | 2022-09-05 | Method for determining direction of camera and camera direction determining device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211082794.1A CN115442531A (en) | 2022-09-05 | 2022-09-05 | Method for determining direction of camera and camera direction determining device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115442531A true CN115442531A (en) | 2022-12-06 |
Family
ID=84246572
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211082794.1A Pending CN115442531A (en) | 2022-09-05 | 2022-09-05 | Method for determining direction of camera and camera direction determining device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115442531A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1999018732A1 (en) * | 1997-10-06 | 1999-04-15 | Ciampa John A | Digital-image mapping |
US20130182098A1 (en) * | 2012-01-13 | 2013-07-18 | Multi-Shot, Llc | Downhole Digital Survey Camera |
CN109782786A (en) * | 2019-02-12 | 2019-05-21 | 上海戴世智能科技有限公司 | A kind of localization method and unmanned plane based on image procossing |
CN109963147A (en) * | 2017-12-22 | 2019-07-02 | 比亚迪股份有限公司 | Setting angle detection method, device and the vehicle of camera |
US20210073573A1 (en) * | 2018-11-15 | 2021-03-11 | Shanghai Advanced Avionics Co., Ltd. | Ship identity recognition method based on fusion of ais data and video data |
CN113012047A (en) * | 2021-03-26 | 2021-06-22 | 广州市赋安电子科技有限公司 | Dynamic camera coordinate mapping establishing method and device and readable storage medium |
-
2022
- 2022-09-05 CN CN202211082794.1A patent/CN115442531A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1999018732A1 (en) * | 1997-10-06 | 1999-04-15 | Ciampa John A | Digital-image mapping |
US20130182098A1 (en) * | 2012-01-13 | 2013-07-18 | Multi-Shot, Llc | Downhole Digital Survey Camera |
CN109963147A (en) * | 2017-12-22 | 2019-07-02 | 比亚迪股份有限公司 | Setting angle detection method, device and the vehicle of camera |
US20210073573A1 (en) * | 2018-11-15 | 2021-03-11 | Shanghai Advanced Avionics Co., Ltd. | Ship identity recognition method based on fusion of ais data and video data |
CN109782786A (en) * | 2019-02-12 | 2019-05-21 | 上海戴世智能科技有限公司 | A kind of localization method and unmanned plane based on image procossing |
CN113012047A (en) * | 2021-03-26 | 2021-06-22 | 广州市赋安电子科技有限公司 | Dynamic camera coordinate mapping establishing method and device and readable storage medium |
Non-Patent Citations (1)
Title |
---|
黄群东;杨芳;赵键;: "姿态对地指向不断变化成像时的偏流角分析", 宇航学报, no. 10 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9025033B2 (en) | Surveillance camera and method for calibrating the survelliance camera using a calibration tool | |
US8792005B2 (en) | Method and system for automatically determining the camera field of view in a camera network | |
CN111461994A (en) | Method for obtaining coordinate transformation matrix and positioning target in monitoring picture | |
CN108709542B (en) | Coordinate transformation-based rapid measurement method, system and device | |
US20100061593A1 (en) | Extrapolation system for solar access determination | |
CN104320587A (en) | Method for automatically obtaining shooting range of outdoor pan-tilt camera | |
US20130113897A1 (en) | Process and arrangement for determining the position of a measuring point in geometrical space | |
CN110246177A (en) | A Vision-Based Automatic Wave Measurement Method | |
WO2013136399A1 (en) | Information provision system, information provision device, photographing device, and computer program | |
CN104063863B (en) | Downward-looking binocular vision system and image processing method for river channel monitoring | |
US20220157051A1 (en) | Solar photovoltaic measurement, and related methods and computer-readable media | |
CN109269525A (en) | A kind of space probe takes off or landing mission optical measuring system and method | |
JP2018527575A (en) | Device and method for finding a measurement point using an image capture device | |
CN112985259B (en) | Target positioning method and system based on multi-view vision | |
CN109636850B (en) | Visible light positioning method for indoor smart lights | |
CN116228888B (en) | Conversion method and system for geographic coordinates and PTZ camera coordinates | |
CN105611242A (en) | PTZ (Pan/Tilt/Zoom) camera monitoring geographic orientation calibration method | |
CN111108683A (en) | Method for testing compatibility | |
CN108225563A (en) | Wild environment sky polarization modeling alignment measuring device | |
KR20210144003A (en) | Apparatus and method for measuring dip of power line using drone | |
CN115442531A (en) | Method for determining direction of camera and camera direction determining device | |
WO2025001656A1 (en) | Onsite calibration-free roadside unit pre-calibration method and onsite calibration-free roadside unit | |
CN112230257A (en) | Positioning monitoring method based on PTZ camera | |
CN216523687U (en) | High-rise building shakes real-time supervision device based on vision fuses with sensor | |
CN114543680B (en) | On-site monitoring and distance measuring method for overhead transmission line channel construction vehicle |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20221206 |
|
RJ01 | Rejection of invention patent application after publication |