Movatterモバイル変換


[0]ホーム

URL:


CN114637342B - Cloud deck control method and device, monitoring equipment and readable storage medium - Google Patents

Cloud deck control method and device, monitoring equipment and readable storage medium
Download PDF

Info

Publication number
CN114637342B
CN114637342BCN202210267790.4ACN202210267790ACN114637342BCN 114637342 BCN114637342 BCN 114637342BCN 202210267790 ACN202210267790 ACN 202210267790ACN 114637342 BCN114637342 BCN 114637342B
Authority
CN
China
Prior art keywords
pan
gimbal
tilt
rotation angle
coordinates
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.)
Active
Application number
CN202210267790.4A
Other languages
Chinese (zh)
Other versions
CN114637342A (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.)
Chongqing Unisinsight Technology Co Ltd
Original Assignee
Chongqing Unisinsight Technology Co Ltd
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 Chongqing Unisinsight Technology Co LtdfiledCriticalChongqing Unisinsight Technology Co Ltd
Priority to CN202210267790.4ApriorityCriticalpatent/CN114637342B/en
Publication of CN114637342ApublicationCriticalpatent/CN114637342A/en
Application grantedgrantedCritical
Publication of CN114637342BpublicationCriticalpatent/CN114637342B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明提供的云台控制方法、装置、监控设备及可读存储介质,包括:获得目标对象的坐标;根据目标对象的坐标,确定第一云台的第一旋转角度、第二云台的第二旋转角度;其中,第二云台安装于第一云台上,第一旋转角度和第二旋转角度分别用于指示第一云台和第二云台在相同旋转时间内完成旋转运动,以使目标对象位于旋转后的第二云台对应的球机的画面中心;控制第一云台从当前位置按照第一旋转角度进行旋转,并控制第二云台按照第二旋转角度进行旋转。第二云台可以在第一云台的带动下,快速到达与目标对象对准的位置,不仅提升的第二云台的旋转速度,还可以通过为第一云台和第二云台分配合适的旋转角度,使第二云台能对准目标,降低目标丢失风险。

The pan-tilt control method, device, monitoring equipment and readable storage medium provided by the present invention include: obtaining the coordinates of the target object; determining the first rotation angle of the first pan-tilt and the second rotation angle of the second pan-tilt according to the coordinates of the target object; wherein the second pan-tilt is installed on the first pan-tilt, and the first rotation angle and the second rotation angle are respectively used to indicate that the first pan-tilt and the second pan-tilt complete the rotation movement within the same rotation time, so that the target object is located at the center of the screen of the ball camera corresponding to the rotated second pan-tilt; controlling the first pan-tilt to rotate according to the first rotation angle from the current position, and controlling the second pan-tilt to rotate according to the second rotation angle. Driven by the first pan-tilt, the second pan-tilt can quickly reach the position aligned with the target object, which not only improves the rotation speed of the second pan-tilt, but also can allocate appropriate rotation angles to the first pan-tilt and the second pan-tilt, so that the second pan-tilt can be aligned with the target, thereby reducing the risk of target loss.

Description

Translated fromChinese
云台控制方法、装置、监控设备及可读存储介质PTZ control method, device, monitoring equipment and readable storage medium

技术领域Technical Field

本发明涉及监控技术领域,具体而言,涉及一种云台控制方法、装置、监控设备及可读存储介质。The present invention relates to the field of monitoring technology, and in particular to a pan/tilt control method, device, monitoring equipment and a readable storage medium.

背景技术Background Art

近年来随着科学技术的快速发展,对于目标对象的跟踪,应用越来越广泛。现有技术存在一种双云台协同跟踪的方法,该方法通过其中一个云台带动另一云台运动,提升云台的移动速度,可以适应移动速度快的目标跟踪。With the rapid development of science and technology in recent years, the tracking of target objects has been increasingly widely used. In the prior art, there is a method for dual-panel cooperative tracking, which increases the moving speed of the pan-tilt by driving the other pan-tilt through one pan-tilt, and can be adapted to the tracking of fast-moving targets.

然而,上述方法虽然提升的云台移动速度,但是没有考虑其中一个云台的运动对另一云台运动的影响,控制精度较低,可能出现无法对准目标,导致目标跟踪失败的问题。However, although the above method improves the gimbal movement speed, it does not consider the impact of the movement of one gimbal on the movement of another gimbal, and the control accuracy is low, which may cause the problem of being unable to aim at the target, resulting in target tracking failure.

因此,如何在提升云台移动速度的情况下,提升云台控制精度是需要解决的技术问题。Therefore, how to improve the control accuracy of the gimbal while increasing the gimbal movement speed is a technical problem that needs to be solved.

发明内容Summary of the invention

本发明的目的之一在于提供一种云台控制方法、装置、监控设备及可读存储介质,用以提升云台的控制精度,防止目标跟踪丢失。One of the purposes of the present invention is to provide a pan-tilt control method, device, monitoring equipment and readable storage medium to improve the control accuracy of the pan-tilt and prevent target tracking loss.

本发明的实施例可以这样实现:The embodiments of the present invention can be implemented as follows:

第一方面,本发明提供一种云台控制方法,所述方法包括:获得目标对象的坐标;根据所述目标对象的坐标,确定第一云台的第一旋转角度、第二云台的第二旋转角度;其中,所述第二云台安装于所述第一云台上,所述第一旋转角度和所述第二旋转角度分别用于指示所述第一云台和所述第二云台在相同旋转时间内完成旋转运动,以使所述目标对象位于旋转后的所述第二云台对应的球机的画面中心;控制所述第一云台从当前位置按照所述第一旋转角度进行旋转,并控制所述第二云台按照所述第二旋转角度进行旋转。In a first aspect, the present invention provides a pan-tilt control method, the method comprising: obtaining the coordinates of a target object; determining a first rotation angle of a first pan-tilt and a second rotation angle of a second pan-tilt according to the coordinates of the target object; wherein the second pan-tilt is installed on the first pan-tilt, and the first rotation angle and the second rotation angle are respectively used to indicate that the first pan-tilt and the second pan-tilt complete rotational movement within the same rotation time, so that the target object is located at the center of the screen of a ball camera corresponding to the rotated second pan-tilt; controlling the first pan-tilt to rotate from a current position according to the first rotation angle, and controlling the second pan-tilt to rotate according to the second rotation angle.

第二方面,本发明提供一种云台控制装置,包括:获取模块,用于获得目标对象的坐标;分析模块,用于根据所述目标对象的坐标,确定第一云台的第一旋转角度、第二云台的第二旋转角度;其中,所述第二云台安装于所述第一云台上,所述第一旋转角度和所述第二旋转角度分别用于指示所述第一云台和所述第二云台在相同旋转时间内完成旋转,以使所述目标对象位于旋转后的所述第二云台对应的球机的画面中心;控制模块,用于控制所述第一云台从当前位置按照所述第一旋转角度进行旋转,并控制所述第二云台按照所述第二旋转角度进行旋转。In a second aspect, the present invention provides a pan-tilt control device, comprising: an acquisition module for obtaining the coordinates of a target object; an analysis module for determining a first rotation angle of a first pan-tilt and a second rotation angle of a second pan-tilt according to the coordinates of the target object; wherein the second pan-tilt is installed on the first pan-tilt, and the first rotation angle and the second rotation angle are respectively used to indicate that the first pan-tilt and the second pan-tilt complete rotation within the same rotation time, so that the target object is located at the center of the screen of the ball camera corresponding to the second pan-tilt after rotation; a control module for controlling the first pan-tilt to rotate from a current position according to the first rotation angle, and controlling the second pan-tilt to rotate according to the second rotation angle.

第三方面,本发明提供一种摄像设备,包括处理器和存储器,所述存储器存储有能够被所述处理器执行的计算机程序,所述处理器可执行所述计算机程序以实现第一方面所述的方法。In a third aspect, the present invention provides an imaging device, comprising a processor and a memory, wherein the memory stores a computer program executable by the processor, and the processor can execute the computer program to implement the method described in the first aspect.

第四方面,本发明提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现第一方面所述的方法。In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in the first aspect.

本发明提供的一种云台控制方法、装置、监控设备及可读存储介质,方法包括:获得目标对象的坐标;根据所述目标对象的坐标,确定第一云台的第一旋转角度、第二云台的第二旋转角度;其中,所述第二云台安装于所述第一云台上,所述第一旋转角度和所述第二旋转角度分别用于指示所述第一云台和所述第二云台在相同旋转时间内完成旋转运动,以使所述目标对象位于旋转后的所述第二云台对应的球机的画面中心;控制所述第一云台从当前位置按照所述第一旋转角度进行旋转,并控制所述第二云台按照所述第二旋转角度进行旋转。面对移动速度特别快的目标,可能会丢失目标的情况,为了提升第二云台的跟踪速度,本发明实施例可以先确定第一云台和第二云台各自需要旋转的角度,这样一来,第二云台可以在第一云台的带动下,快速到达与目标对象对准的位置,不仅提升的第二云台的旋转速度,还可以通过为第一云台和第二云台分配合适的旋转角度,使得第二云台能够对准目标对象,降低目标对象丢失的风险。The present invention provides a pan/tilt control method, device, monitoring equipment and readable storage medium, the method comprising: obtaining the coordinates of the target object; determining the first rotation angle of the first pan/tilt and the second rotation angle of the second pan/tilt according to the coordinates of the target object; wherein the second pan/tilt is installed on the first pan/tilt, and the first rotation angle and the second rotation angle are respectively used to indicate that the first pan/tilt and the second pan/tilt complete the rotation movement within the same rotation time, so that the target object is located at the center of the screen of the ball camera corresponding to the second pan/tilt after rotation; controlling the first pan/tilt to rotate according to the first rotation angle from the current position, and controlling the second pan/tilt to rotate according to the second rotation angle. In the face of a target with a particularly fast moving speed, the target may be lost. In order to improve the tracking speed of the second pan/tilt, the embodiment of the present invention can first determine the angles that the first pan/tilt and the second pan/tilt need to rotate respectively. In this way, the second pan/tilt can be driven by the first pan/tilt to quickly reach the position aligned with the target object, not only improving the rotation speed of the second pan/tilt, but also allocating appropriate rotation angles to the first pan/tilt and the second pan/tilt so that the second pan/tilt can be aligned with the target object, reducing the risk of losing the target object.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

图1为本申请实施例适用的一种场景示意图;FIG1 is a schematic diagram of a scenario applicable to an embodiment of the present application;

图2为本申请实施例提供的监控设备的结构示意图;FIG2 is a schematic diagram of the structure of a monitoring device provided in an embodiment of the present application;

图3为本发明实施例提供的监控设备的控制系统的结构示意图;3 is a schematic diagram of the structure of a control system of a monitoring device provided in an embodiment of the present invention;

图4为本发明实施例提供的一种云台控制方法的示意性流程图;FIG4 is a schematic flow chart of a pan/tilt control method provided by an embodiment of the present invention;

图5为本发明实施例提供的步骤S402的一种可能的实现方式的示意性流程图;FIG5 is a schematic flow chart of a possible implementation of step S402 provided in an embodiment of the present invention;

图6为本发明实施例提供的步骤S402-2的一种实现方式的示意性流程图;FIG6 is a schematic flow chart of an implementation of step S402-2 provided in an embodiment of the present invention;

图7为本发明实施例提供的步骤S402-3的第一种实现方式的示意性流程图;FIG7 is a schematic flow chart of a first implementation of step S402-3 provided in an embodiment of the present invention;

图8A为本发明实施例提供的一种电机运动曲线的示意图;FIG8A is a schematic diagram of a motor motion curve provided by an embodiment of the present invention;

图8B为本发明实施例提供的另一种电机运动曲线的示意图;FIG8B is a schematic diagram of another motor motion curve provided by an embodiment of the present invention;

图9为本发明实施例提供的步骤S402-3的第二种实现方式的示意性流程图;FIG9 is a schematic flow chart of a second implementation of step S402-3 provided in an embodiment of the present invention;

图10为本发明实施例提供的另一种云台控制方法的示意性流程图;FIG10 is a schematic flow chart of another PTZ control method provided in an embodiment of the present invention;

图11为本发明实施例提供的步骤S405的一种实现方式的示意性流程图;FIG11 is a schematic flow chart of an implementation of step S405 provided in an embodiment of the present invention;

图12为本发明实施例提供的云台控制装置的功能模块图。FIG. 12 is a functional module diagram of a pan/tilt control device provided in an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

在本发明的描述中,需要说明的是,若出现术语“上”、“下”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,或者是该发明产品使用时惯常摆放的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear to indicate an orientation or position relationship, they are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship in which the product of the invention is usually placed when used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

此外,若出现术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.

需要说明的是,在不冲突的情况下,本发明的实施例中的特征可以相互结合。It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.

图1为本申请实施例适用的一种场景示意图。参照图1,该场景中包括监控设备100、目标对象200、监控区域300。其中,监控设备100可以具有一个云台或者多个云台,通过云台的旋转可以实现监控设备100对监控区域300全方位监控,在实际的场景中,监控设备100可以对监控区域300进行实时目标检测,当检测到有目标对象200进入监控区域,即可以触发对目标对象200的实时跟踪。FIG1 is a schematic diagram of a scenario applicable to an embodiment of the present application. Referring to FIG1 , the scenario includes a monitoring device 100, a target object 200, and a monitoring area 300. The monitoring device 100 may have one or more pan-tilt heads, and the rotation of the pan-tilt heads may enable the monitoring device 100 to monitor the monitoring area 300 in all directions. In an actual scenario, the monitoring device 100 may perform real-time target detection on the monitoring area 300, and when a target object 200 is detected to enter the monitoring area, real-time tracking of the target object 200 may be triggered.

目前,现有技术存在一种双云台协同跟踪的方法,该方法通过其中一个云台带动另一云台运动,可以提升云台的移动速度,适应移动速度快的目标跟踪。然而,上述方法虽然提升了云台移动速度,但是没有考虑其中一个云台的运动对另一云台运动的影响,控制精度较低,可能出现无法对准目标,导致目标跟踪失败的问题。At present, there is a dual-panel cooperative tracking method in the prior art. This method can improve the movement speed of the pan-tilts by driving the other pan-tilts to move, and adapt to the tracking of fast-moving targets. However, although the above method improves the movement speed of the pan-tilts, it does not consider the impact of the movement of one pan-tilt on the movement of the other pan-tilt, and the control accuracy is low, which may cause the problem of being unable to aim at the target, resulting in target tracking failure.

因此,为了在提升云台移动速度的情况下,提升云台控制精度,本发明实施例提供了一种监控设备以及云台控制方法。Therefore, in order to improve the control accuracy of the pan-tilt head while improving the movement speed of the pan-tilt head, an embodiment of the present invention provides a monitoring device and a pan-tilt head control method.

图2为本申请实施例提供的监控设备的结构示意图,参照图2所示,监控设备100可以包括第一摄像装置110、第二摄像装置120和第三摄像装置130。FIG2 is a schematic diagram of the structure of a monitoring device provided in an embodiment of the present application. Referring to FIG2 , the monitoring device 100 may include a first camera 110 , a second camera 120 , and a third camera 130 .

其中,第二摄像装置120以第一摄像装置110为底座,包含第一云台121,可以相对第一摄像装置110进行水平旋转,第一云台121上有一个可垂直旋转的动力机构,可控制机芯进行垂直旋转,由于该动力机构受限,垂直旋转的角度是受限;第三摄像装置130以第一云台121为底座,包含第二云台131。第二云台131可水平和垂直旋转,运动无限制。The second camera device 120 uses the first camera device 110 as a base, includes a first pan-tilt platform 121, and can rotate horizontally relative to the first camera device 110. The first pan-tilt platform 121 has a power mechanism that can rotate vertically, which can control the movement to rotate vertically. Since the power mechanism is limited, the vertical rotation angle is limited. The third camera device 130 uses the first pan-tilt platform 121 as a base, and includes a second pan-tilt platform 131. The second pan-tilt platform 131 can rotate horizontally and vertically, and the movement is unlimited.

可选地,第一摄像装置110可以但不限于是全景摄像头,以全景摄像头为例,第一摄像装置110可以由8个定焦镜头部分组成,每个镜头等距排列,角度为45°,镜头斜向下,用于从高空向下进行监控,镜头一般采用2.8mm、4mm或者6mm焦段,根据设备的实际应用场景,可选择不同款型的镜头;镜头采用F1.0大光圈镜头,图像传感器采用1/1.8”靶面的,可确保夜晚低照下,即使没有补光情况下仍然能够看得清楚,并且图像是彩色的;因为采用的是大光圈设计,全景无需补光,补光相关的结构以及硬件可节省掉。Optionally, the first camera device 110 can be but is not limited to a panoramic camera. Taking a panoramic camera as an example, the first camera device 110 can be composed of 8 fixed-focus lens parts, each lens is arranged equidistantly at an angle of 45°, and the lens is tilted downward for monitoring from a high altitude downward. The lens generally adopts a focal length of 2.8mm, 4mm or 6mm. Different types of lenses can be selected according to the actual application scenario of the equipment; the lens adopts an F1.0 large aperture lens, and the image sensor adopts a 1/1.8" target surface, which can ensure that it can still be seen clearly even without fill light in low light at night, and the image is in color; because a large aperture design is adopted, no fill light is required for the panorama, and the fill light-related structure and hardware can be saved.

可选地,第二摄像装置120可以是球机,由一个小变倍的机芯镜头组成,光学倍率可以在3-6倍之间,覆盖2.8mm到50mm焦段,该机芯镜头可以采用F1.3光圈镜头,图像传感器可以采用1/1.8”靶面,可以充分保证低照效果;补光可以采用混合补光,分别采用4个红外灯以及4个白光灯进行补光。第一云台121能够水平360°旋转,该旋转相对第一摄像装置110进行旋转,同时机芯镜头和补光模块组成的转动模块可垂直转动0°-30°。Optionally, the second camera device 120 can be a ball camera, which is composed of a small variable-magnification movement lens. The optical magnification can be between 3-6 times, covering a focal length of 2.8mm to 50mm. The movement lens can use an F1.3 aperture lens, and the image sensor can use a 1/1.8" target surface, which can fully ensure the low-light effect; the fill light can use mixed fill light, using 4 infrared lights and 4 white light lights for fill light. The first pan-tilt head 121 can rotate 360° horizontally, which rotates relative to the first camera device 110. At the same time, the rotation module composed of the movement lens and the fill light module can rotate vertically by 0°-30°.

可选地,第三摄像装置130可以由一个大变倍的机芯镜头组成,光学倍率可以在30倍以上,覆盖5mm到250mm焦段,该机芯镜头可以采用F1.6光圈镜头,图像传感器可以采用1/1.8”靶面,充分保证低照效果;补光可以采用激光红外补光,可以分别采用4个远距离红外灯、2个中距离红外灯以及2个近距离红外灯进行补光。第二云台131能够水平360°旋转,该旋转相对第二摄像装置12部分进行旋转,同时机芯镜头和补光模块组成的转动模块可垂直转动-10°-90°。Optionally, the third camera device 130 can be composed of a large zoom movement lens, the optical magnification can be more than 30 times, covering a focal length of 5mm to 250mm, the movement lens can use an F1.6 aperture lens, and the image sensor can use a 1/1.8" target surface to fully ensure the low-light effect; the fill light can use laser infrared fill light, and 4 long-range infrared lights, 2 medium-range infrared lights and 2 close-range infrared lights can be used for fill light. The second gimbal 131 can rotate 360° horizontally, and the rotation is rotated relative to the second camera device 12. At the same time, the rotation module composed of the movement lens and the fill light module can rotate vertically by -10°-90°.

可以理解的是,本申请实施例提供的监控设备100,与现有技术中的双云台监控设备不同的是,利用第一摄像装置110进行全景监控,可以扩大监控范围,检测的目标数量更多,其次,在进行目标跟踪的过程中,第二摄像装置120和第三摄像装置130均可以对目标进行跟踪,例如,在第二摄像装置120进行目标跟踪,其中第三摄像装置130可以不动,在第三摄像装置130进行目标跟踪过程中,第二摄像装置120不动;另外,在第三摄像装置130进行目标跟踪过程中,如果需要快速跟踪速度移动较快的目标,可以控制第二摄像装置120的第一云台121同时运动,在这个过程中,本发明实施例提供的云台控制方法可以保证第三摄像装置130准确对准目标。It can be understood that the monitoring device 100 provided in the embodiment of the present application is different from the dual pan-tilt monitoring device in the prior art in that the use of the first camera device 110 for panoramic monitoring can expand the monitoring range and detect more targets. Secondly, in the process of target tracking, the second camera device 120 and the third camera device 130 can both track the target. For example, when the second camera device 120 performs target tracking, the third camera device 130 can be stationary, and when the third camera device 130 performs target tracking, the second camera device 120 is stationary; in addition, when the third camera device 130 performs target tracking, if it is necessary to quickly track a target moving at a faster speed, the first pan-tilt 121 of the second camera device 120 can be controlled to move simultaneously. In this process, the pan-tilt control method provided in the embodiment of the present invention can ensure that the third camera device 130 is accurately aimed at the target.

也就是说,为了能够第三摄像装置130(球机)快速对目标进行定位以及跟踪,可通过程序同时控制第一云台121和第二云台131进行旋转,两者同时联动旋转使得第二云台131可以在最短时间旋转到对准目标的位置。正常情况,第二云台131的极限旋转速度为ωmax,第一云台121的极限旋转速度为ωmax,通过第一云台121带动第二云台131旋转,从而使第二云台131获得更快的旋转速度,从而加速了定位时间,同时由于有更高的旋转速度,使得第二云台131持续跟踪快速移动的目标更加容易。That is to say, in order to enable the third camera device 130 (ball camera) to quickly locate and track the target, the first pan-tilt 121 and the second pan-tilt 131 can be controlled to rotate simultaneously through the program, and the two rotate in conjunction with each other so that the second pan-tilt 131 can rotate to the position aligned with the target in the shortest time. Under normal circumstances, the maximum rotation speed of the second pan-tilt 131 is ωmax, and the maximum rotation speed of the first pan-tilt 121 is ωmax. The second pan-tilt 131 is driven to rotate by the first pan-tilt 121, so that the second pan-tilt 131 can obtain a faster rotation speed, thereby accelerating the positioning time. At the same time, due to the higher rotation speed, it is easier for the second pan-tilt 131 to continuously track fast-moving targets.

图3为本发明实施例提供的监控设备的控制系统的结构示意图。如图3所示,包括第一摄像装置110的处理模块、第二摄像装置120的处理模块和第三摄像装置130的处理模块、网关模块。Fig. 3 is a schematic diagram of the structure of the control system of the monitoring device provided by the embodiment of the present invention. As shown in Fig. 3, it includes a processing module of the first camera device 110, a processing module of the second camera device 120, a processing module of the third camera device 130, and a gateway module.

可选地,第一摄像装置110的处理模块可以是DSP平台,用于负责360°全景图像的采集,同时针对全景图像做一些智能业务,比如人体检测、机动车检测、非机动车检测、人数统计、车辆统计等;同时全景DSP平台会根据业务情况和环型云台、球型云台进行数据交互,进而进行联动;Optionally, the processing module of the first camera device 110 may be a DSP platform, which is responsible for the acquisition of 360° panoramic images and performs some intelligent services for the panoramic images, such as human body detection, motor vehicle detection, non-motor vehicle detection, number counting, vehicle counting, etc.; at the same time, the panoramic DSP platform will interact with the ring-type pan-tilt head and the ball-type pan-tilt head for data according to the business situation, and then perform linkage;

为了实现跟踪抓拍,第一摄像装置110的处理模块可以对采集的全景图像进行智能分析,分析结果可以传输到第二摄像装置120的处理模块和第三摄像装置130的处理模块中,用于控制两个云台做对应的动作,传输的数据包括:目标坐标、跟踪联动方式、跟踪持续时间等;In order to achieve tracking and capturing, the processing module of the first camera device 110 can perform intelligent analysis on the collected panoramic images, and the analysis results can be transmitted to the processing modules of the second camera device 120 and the third camera device 130 to control the two pan-tilt heads to perform corresponding actions. The transmitted data includes: target coordinates, tracking linkage mode, tracking duration, etc.;

可选地,第二摄像装置120的处理模块可以是DSP平台,用于负责机芯图像的采集,同时针对图像做一些智能业务,比如人体检测、机动车检测、非机动车检测、周界等;同时第一云台DSP平台可以接收第一摄像装置110的处理模块发送过来的数据,通过解析数据获取指令进行联动操作;第一云台121中有垂直和水平电机控制模块,该模块可控制第一云台121的机芯进行垂直和水平旋转。Optionally, the processing module of the second camera device 120 can be a DSP platform, which is responsible for collecting the movement image and performing some intelligent services on the image, such as human body detection, motor vehicle detection, non-motor vehicle detection, perimeter, etc.; at the same time, the first gimbal DSP platform can receive data sent by the processing module of the first camera device 110, and perform linkage operations by parsing the data to obtain instructions; the first gimbal 121 has a vertical and horizontal motor control module, which can control the movement of the first gimbal 121 to rotate vertically and horizontally.

为了实现跟踪抓拍,第一摄像装置110的处理模块会将数据传输到第二摄像装置120的处理模块,以使处理模块控制第一云台121做对应的垂直和水平旋转动作,同时,第二摄像装置120的处理模块还可以接收第一摄像装置110的处理模块的指令,去控制业务关闭开启以及具体业务配置;同时第二摄像装置120的处理模块还可以将自身的状态信息会反馈到第一摄像装置110的处理模块中,比如第一云台121的旋转角度、速度、当前业务状态等。In order to achieve tracking and capturing, the processing module of the first camera device 110 will transmit data to the processing module of the second camera device 120, so that the processing module controls the first gimbal 121 to perform corresponding vertical and horizontal rotation movements. At the same time, the processing module of the second camera device 120 can also receive instructions from the processing module of the first camera device 110 to control the service shutdown and startup and specific service configuration; at the same time, the processing module of the second camera device 120 can also feed back its own status information to the processing module of the first camera device 110, such as the rotation angle, speed, current service status, etc. of the first gimbal 121.

可选地,第二摄像装置120的处理模块可以是DSP平台,用于负责机芯图像的采集,同时针对图像做一些智能业务,比如人脸抓拍、人体检测、机动车检测、非机动车检测、结构化属性分析等;同时第二云台131可以接收第一摄像装置110的处理模块以及第二摄像装置120的处理模块发送过来的数据,通过解析数据获取指令进行联动操作;第二云台131中有垂直和水平电机控制模块,该模块可控制第二云台131的机芯进行垂直和水平旋转。Optionally, the processing module of the second camera device 120 can be a DSP platform, which is responsible for collecting the movement image and performing some intelligent services on the image, such as face capture, human body detection, motor vehicle detection, non-motor vehicle detection, structured attribute analysis, etc.; at the same time, the second gimbal 131 can receive data sent by the processing module of the first camera device 110 and the processing module of the second camera device 120, and perform linkage operations by parsing the data to obtain instructions; the second gimbal 131 has vertical and horizontal motor control modules, which can control the movement of the second gimbal 131 to rotate vertically and horizontally.

为了实现跟踪抓拍,第一摄像装置110的处理模块会将数据传输到第三摄像装置130的处理模块,以使处理模块控制第二云台131做对应的垂直和水平旋转动作,同时,第三摄像装置130的处理模块还可以接收第一摄像装置110的处理模块的指令,去控制业务关闭开启以及具体业务配置;同时第三摄像装置130的处理模块还可以将自身的状态信息会反馈到第一摄像装置110的处理模块中,比如第二云台131的旋转角度、速度、当前业务状态等。In order to achieve tracking and capturing, the processing module of the first camera device 110 will transmit data to the processing module of the third camera device 130, so that the processing module controls the second gimbal 131 to perform corresponding vertical and horizontal rotation movements. At the same time, the processing module of the third camera device 130 can also receive instructions from the processing module of the first camera device 110 to control the service shutdown and startup and specific service configuration; at the same time, the processing module of the third camera device 130 can also feed back its own status information to the processing module of the first camera device 110, such as the rotation angle, speed, current service status, etc. of the second gimbal 131.

可选地,网关模块用于负责第二摄像装置120的处理模块、第二摄像装置120的处理模块和第三摄像装置130的处理模块之间的数据交互,同时也负责对外的网络接口。Optionally, the gateway module is responsible for data interaction between the processing modules of the second camera device 120 , the processing modules of the second camera device 120 and the processing modules of the third camera device 130 , and is also responsible for external network interfaces.

通过上述控制系统,可以实现同时控制第一云台121和第二云台131进行旋转,通过第一云台121带动第二云台131旋转,同时第二云台131相对第一云台121旋转,从而使第二云台131获得更快的旋转速度,从而加速了定位时间,同时由于有更高的旋转速度,使得球型云台持续跟踪快速移动的目标更加容易。Through the above control system, it is possible to simultaneously control the rotation of the first pan-tilt head 121 and the second pan-tilt head 131. The first pan-tilt head 121 drives the second pan-tilt head 131 to rotate, and the second pan-tilt head 131 rotates relative to the first pan-tilt head 121, so that the second pan-tilt head 131 can obtain a faster rotation speed, thereby speeding up the positioning time. At the same time, due to the higher rotation speed, it is easier for the spherical pan-tilt head to continuously track fast-moving targets.

图4为本发明实施例提供的一种云台控制方法的示意性流程图。该方法以监控设备100为执行主体进行说明,参照图4,该方法包括:FIG4 is a schematic flow chart of a pan/tilt control method provided by an embodiment of the present invention. The method is described with the monitoring device 100 as the execution subject. Referring to FIG4 , the method includes:

S401,获得目标对象的坐标。S401, obtaining the coordinates of the target object.

其中,目标对象可以是人、机动车辆、非机动车辆等。Among them, the target object can be a person, a motor vehicle, a non-motor vehicle, etc.

在获得目标对象的坐标中,可选地,可以通过采集的全景图像进行分类识别人、机动车辆、非机动车辆,对于触发报警或者进入监控范围内的人、机动车辆或者非机动车辆,均可以作为目标对象,对检测到目标对象进行特征提取、标识(ID)分配,用来区分不同对象,并根据每个分配了ID的目标对象的检测框的宽高,得到目标对象的坐标。In obtaining the coordinates of the target object, optionally, the collected panoramic image can be used to classify and identify people, motor vehicles, and non-motor vehicles. People, motor vehicles, or non-motor vehicles that trigger an alarm or enter the monitoring range can all be used as target objects. Feature extraction and identification (ID) assignment are performed on the detected target objects to distinguish different objects, and the coordinates of the target object are obtained based on the width and height of the detection box of each target object assigned an ID.

S402,根据目标对象的坐标,确定第一云台的第一旋转角度、第二云台的第二旋转角度。S402: Determine a first rotation angle of the first pan-tilt head and a second rotation angle of the second pan-tilt head according to the coordinates of the target object.

S403,控制第一云台从当前位置按照第一旋转角度进行旋转,并控制第二云台按照第二旋转角度进行旋转。S403, controlling the first pan-tilt platform to rotate from the current position according to a first rotation angle, and controlling the second pan-tilt platform to rotate according to a second rotation angle.

其中,第二云台安装于第一云台上,第一旋转角度和第二旋转角度分别用于指示第一云台和第二云台在相同旋转时间内完成旋转运动,以使目标对象位于旋转后的第二云台对应的球机的画面中心。Among them, the second pan-tilt head is installed on the first pan-tilt head, and the first rotation angle and the second rotation angle are respectively used to instruct the first pan-tilt head and the second pan-tilt head to complete the rotation movement within the same rotation time, so that the target object is located in the center of the screen of the ball camera corresponding to the rotated second pan-tilt head.

正如图2中的监控设备所示,如果利用第三摄像装置130单独对目标对象进行跟踪时,由于旋转速度的限制,面对移动速度特别快的目标,可能会丢失目标,因此,在这种场景中,为了提升第三摄像装置130的跟踪速度,本发明实施例可以先确定第一云台和第二云台各自需要旋转的角度,这样一来,第二云台可以在第一云台的带动下,快速到达与目标对象对准的位置,不仅提升的第二云台的旋转速度,还可以通过为第一云台和第二云台分配合适的旋转角度,使得第二云台能够对准目标对象,降低目标对象丢失的风险。As shown in the monitoring device in Figure 2, if the third camera device 130 is used alone to track the target object, due to the limitation of the rotation speed, the target may be lost when facing a target that moves particularly fast. Therefore, in this scenario, in order to improve the tracking speed of the third camera device 130, the embodiment of the present invention can first determine the angles that the first pan-tilt head and the second pan-tilt head need to rotate respectively. In this way, the second pan-tilt head can be driven by the first pan-tilt head to quickly reach the position aligned with the target object, which not only improves the rotation speed of the second pan-tilt head, but also can allocate appropriate rotation angles to the first pan-tilt head and the second pan-tilt head so that the second pan-tilt head can be aligned with the target object, thereby reducing the risk of losing the target object.

可以看出,上述云台控制方法可以适用于对移动速度较快的目标的跟踪场景中,假设目标对象移动速度较慢,则可以单独利用第一云台或者第二云台实现对目标对象的跟踪,在这种情况下,只需要确定第一云台的旋转角度,或者只确定第二云台的旋转角度,即可实现对移动速度慢的目标对象的跟踪。It can be seen that the above-mentioned gimbal control method can be applied to the tracking scenario of targets moving at a faster speed. Assuming that the target object moves at a slower speed, the first gimbal or the second gimbal can be used alone to track the target object. In this case, it is only necessary to determine the rotation angle of the first gimbal, or only determine the rotation angle of the second gimbal, to achieve tracking of the target object moving at a slower speed.

图5为本发明实施例提供的步骤S402的一种可能的实现方式的示意性流程图,该方法可以快速为第一云台和第二云台分配旋转角度,该方法包括:FIG5 is a schematic flow chart of a possible implementation of step S402 provided in an embodiment of the present invention. The method can quickly allocate a rotation angle to the first gimbal and the second gimbal. The method includes:

S402-1,获得球机的画面中心坐标。S402-1, obtain the center coordinates of the ball camera's screen.

其中,球机可以理解为图2中的第三摄像装置130,球机的画面中心坐标(Xmid,Ymid)可以根据球机采集的图像确定。The ball camera can be understood as the third camera device 130 in FIG. 2 , and the center coordinates (Xmid , Ymid ) of the screen of the ball camera can be determined according to the image captured by the ball camera.

S402-2,根据目标对象的坐标与画面中心坐标的相对位置信息、以及画面中心坐标与球机的镜头中心的相对位置信息,确定第二云台与目标对象之间的位置差量。S402-2, determining the position difference between the second pan/tilt head and the target object according to the relative position information between the coordinates of the target object and the coordinates of the center of the screen, and the relative position information between the coordinates of the center of the screen and the center of the lens of the ball camera.

其中,目标对象的坐标与画面中心坐标均是平面直角坐标系中的坐标,而第二云台处于空间坐标系中,需要将平面直角坐标系中的坐标映射对空间坐标系,以确定二云台与目标对象之间的位置差量。Among them, the coordinates of the target object and the center coordinates of the screen are both coordinates in the plane rectangular coordinate system, and the second gimbal is in the space coordinate system. It is necessary to map the coordinates in the plane rectangular coordinate system to the space coordinate system to determine the position difference between the second gimbal and the target object.

图6为本发明实施例提供的步骤S402-2的一种实现方式的示意性流程图,该方法可以快速确定第二云台和目标对象之间的位置差量,该方法包括:FIG6 is a schematic flow chart of an implementation of step S402-2 provided in an embodiment of the present invention. The method can quickly determine the position difference between the second gimbal and the target object. The method includes:

S402-2-1,以镜头中心为原点位置,建立空间坐标系。S402-2-1, establish a spatial coordinate system with the center of the lens as the origin.

S402-2-2,将目标对象的坐标、画面中心坐标分别映射到空间坐标系中,确定目标对象的坐标、画面中心坐标各自在空间坐标系中映射点;S402-2-2, mapping the coordinates of the target object and the coordinates of the center of the picture to the space coordinate system respectively, and determining the mapping points of the coordinates of the target object and the coordinates of the center of the picture in the space coordinate system;

S402-2-3,基于目标对象的坐标、画面中心坐标各自在空间坐标系中映射点,确定目标对象的坐标与画面中心坐标的相对位置信息、以及画面中心坐标与球机的镜头中心的相对位置信息;S402-2-3, based on the coordinates of the target object and the coordinates of the center of the picture respectively mapping points in the space coordinate system, determine the relative position information of the coordinates of the target object and the coordinates of the center of the picture, and the relative position information of the coordinates of the center of the picture and the center of the camera lens;

S402-2-4,根据球机在空间坐标系中的视场参数信息、以及目标对象的坐标与画面中心坐标的相对位置信息、画面中心坐标与球机的镜头中心的相对位置信息,得到第二云台与目标对象之间的位置差量。S402-2-4, obtain the position difference between the second pan-tilt head and the target object based on the field of view parameter information of the ball camera in the spatial coordinate system, the relative position information between the coordinates of the target object and the center coordinates of the screen, and the relative position information between the center coordinates of the screen and the lens center of the ball camera.

其中,以镜头中心为原点建立空间坐标系,已知画面中心坐标为(Xmid,Ymid),球机的水平半视场角H,垂直半视场角V,那么画面中心坐标与原点之间的连线向量其中,P、T分别表征画面中心在空间坐标系中的映射点的水平方向角度和垂直方向角度,目标对象的坐标(X,Y)与原点之间的连线向量其中,P′,T′分别表征目标对象在空间坐标系中的映射点的水平方向角度和垂直方向角度,那么当目标对象处于球机的画面中心时,第二云台的水平方向目标位置、垂直方向目标位置应该如下公式所示:The spatial coordinate system is established with the center of the lens as the origin. The coordinates of the center of the screen are known to be (Xmid , Ymid ), the horizontal half field of view angle of the ball camera is H, and the vertical half field of view angle is V. Then the line vector between the center coordinates of the screen and the origin is Among them, P and T represent the horizontal angle and vertical angle of the mapping point of the center of the picture in the spatial coordinate system respectively, and the line vector between the coordinates (X, Y) of the target object and the origin Among them, P′ and T′ represent the horizontal angle and vertical angle of the mapping point of the target object in the spatial coordinate system respectively. Then when the target object is in the center of the ball camera's screen, the horizontal target position and vertical target position of the second pan/tilt should be as shown in the following formula:

P′=P当前水平位置sP′=Pcurrent horizontal position + θs

其中,需要说明的是,本发明实施例中涉及的云台位置,均是指云台在空间坐标系中的角度,θs即为本发明实施例需要确定的位置差量。例如,假设确定了位置差量θs为30度,那么如果单独用第一云台或者第二云台做跟踪,那么只需要第一云台或者第二云台旋转30度对准目标即可,如果需要第一云台带动第二云台运动,那么本发明实施例可以根据提供的θs确定第一云台的第一旋转角度θr、第二云台的第二旋转角度θb,第一旋转角度和第二旋转角度之和为位置差量θsIt should be noted that the pan/tilt positions involved in the embodiments of the present invention all refer to the angles of the pan/tilts in the spatial coordinate system, andθs is the position difference that needs to be determined in the embodiments of the present invention. For example, assuming that the position differenceθs is determined to be 30 degrees, if the first pan/tilt or the second pan/tilt is used alone for tracking, it is only necessary to rotate the first pan/tilt or the second pan/tilt by 30 degrees to align with the target. If the first pan/tilt is required to drive the second pan/tilt to move, the embodiments of the present invention can determine the first rotation angleθr of the first pan/tilt and the second rotation angleθb of the second pan/tilt according to the providedθs , and the sum of the first rotation angle and the second rotation angle is the position differenceθs .

需要说明的是,步骤S402-2-1至步骤S402-2-4是以第二云台的镜头中心建立空间坐标系,以第二云台的视场角参数信息来确定位置差量,适用于需要第一云台带动第二云台进行跟踪的场景,那么如果第一云台需要单独做跟踪,则上述步骤S402-2-1至步骤S402-2-4则是以第一云台的镜头中心建立空间坐标系,以第一云台的视场角参数信息来确定位置差量,计算方式类似,此处不再赘述。It should be noted that steps S402-2-1 to S402-2-4 establish a spatial coordinate system based on the lens center of the second gimbal, and determine the position difference based on the field of view angle parameter information of the second gimbal. This is suitable for scenarios where the first gimbal needs to drive the second gimbal for tracking. If the first gimbal needs to be tracked separately, the above steps S402-2-1 to S402-2-4 establish a spatial coordinate system based on the lens center of the first gimbal, and determine the position difference based on the field of view angle parameter information of the first gimbal. The calculation method is similar and will not be repeated here.

下面来介绍如何根据位置差量θs确定第一旋转角度θr、第二云台的第二旋转角度θbThe following describes how to determine the first rotation angle θr and the second rotation angle θb of the second gimbal according to the position difference θs .

S402-3,根据位置差量,确定第一云台的第一旋转角度、第二云台的第二旋转角度。S402-3, determining a first rotation angle of the first gimbal and a second rotation angle of the second gimbal according to the position difference.

如图2所示的机械结构,第一云台的水平转动可以影响第二云台的水平转动,进行水平转动补偿,那么在加速度恒定的电机运动曲线中,假设第一云台的最大角速度为Vr,第二云台的最大角速度为Vb,第一云台需要运动的角度为θr,第二云台需要运动的角度θb,位置差量为θsIn the mechanical structure shown in FIG2 , the horizontal rotation of the first gimbal can affect the horizontal rotation of the second gimbal and perform horizontal rotation compensation. Then, in the motor motion curve with constant acceleration, assuming that the maximum angular velocity of the first gimbal is Vr , the maximum angular velocity of the second gimbal is Vb , the angle that the first gimbal needs to move is θr , the angle that the second gimbal needs to move is θb , and the position difference is θs .

在考虑第一云台和第二云台加减速区间的时候,一种实现方式如图7所示,图7为本发明实施例提供的步骤S402-3的第一种实现方式的示意性流程图,该方法可以迅速根据位置差量、为第一云台和第二云台分配合适的角度,以保证第二云台旋转后可以对准目标对象,该方法包括:When considering the acceleration and deceleration intervals of the first gimbal and the second gimbal, an implementation method is shown in FIG. 7 , which is a schematic flow chart of a first implementation method of step S402-3 provided in an embodiment of the present invention. The method can quickly allocate appropriate angles to the first gimbal and the second gimbal according to the position difference to ensure that the second gimbal can be aligned with the target object after rotation. The method includes:

S402-3-1a,获得第一云台和第二云台各自对应的最大角速度信息;S402-3-1a, obtaining the maximum angular velocity information corresponding to the first gimbal and the second gimbal respectively;

S402-3-2a,根据第一云台和第二云台各自对应的最大角速度信息,确定第一云台和第二云台在相同旋转时间内的速度差距信息;S402-3-2a, determining the speed difference information between the first gimbal and the second gimbal in the same rotation time according to the maximum angular velocity information corresponding to each of the first gimbal and the second gimbal;

S402-3-3a,根据速度差距信息对应的角度分配模型,确定第一云台的第一旋转角度、第二云台的第二旋转角度。S402-3-3a, determining a first rotation angle of the first gimbal and a second rotation angle of the second gimbal according to an angle allocation model corresponding to the speed difference information.

其中,为了保证第二云台可以快速准确到的目标位置,第一云台和第二云台可以同时开始加速运动,并在相同时间减速停止运动,那么根据加速度恒定的电机加速度曲线可以得到:位置差量θs满足如下关系式:In order to ensure that the second gimbal can quickly and accurately reach the target position, the first gimbal and the second gimbal can start accelerating at the same time and decelerate and stop at the same time. Then, according to the motor acceleration curve with constant acceleration, it can be obtained that the position differenceθs satisfies the following relationship:

其中,as为第一云台和第二云台的加速度。Wherein, as is the acceleration of the first gimbal and the second gimbal.

上述关系式的解析图可以参见图8A和图8B所示,图8A为本发明实施例提供的一种电机运动曲线的示意图,图8B为本发明实施例提供的另一种电机运动曲线的示意图,图8A和图8B反映的是:假设第一云台和第二云台的加速度相同且恒定,那么在已知位置差量θs的情况下,第一云台和第二云台需要在相同的旋转时间内完成加速和减速,从而保证第二云台可以对准目标,但是由于第一云台和第二云台的速度差异,导致第一云台和第二云台需要在相同的旋转时间内存在速度差距,例如,在加速和减速区间内,由于第一云台和第二云台的最大速度差异,两个云台可能都能加速到最大速度再减速、或者只有一个云台能加速到最大速度、或者两个云台都无法加速到最大速度,这种速度差距导致第一云台和第二云台各自分配的旋转角度不同。The analytical diagrams of the above relationship can be seen in Figures 8A and 8B, where Figure 8A is a schematic diagram of a motor motion curve provided in an embodiment of the present invention, and Figure 8B is a schematic diagram of another motor motion curve provided in an embodiment of the present invention. Figures 8A and 8B reflect that: assuming that the accelerations of the first gimbal and the second gimbal are the same and constant, then in the case of a known position differenceθs , the first gimbal and the second gimbal need to complete acceleration and deceleration within the same rotation time, thereby ensuring that the second gimbal can be aligned with the target, but due to the speed difference between the first gimbal and the second gimbal, the first gimbal and the second gimbal need to have a speed difference within the same rotation time. For example, within the acceleration and deceleration interval, due to the maximum speed difference between the first gimbal and the second gimbal, the two gimbals may both accelerate to the maximum speed and then decelerate, or only one gimbal may accelerate to the maximum speed, or both gimbals cannot accelerate to the maximum speed. This speed difference results in different rotation angles allocated to the first gimbal and the second gimbal.

根据上述不同速度差距信息,可以得到每种速度差距信息对应的角度分配模型如下所示:According to the above different speed difference information, the angle distribution model corresponding to each speed difference information can be obtained as follows:

θb=θsr θbsr

例如,当则表明第一云台和第二云台在加减速区间内均未达到最大速度,那么此时将位置差量均分,即即可保证第一云台快速带动第二云台运动,对准目标对象,再例如,表明第一云台和第二云台在加减速区间内均达到最大速度,那么此时对应的速度分配模型为:θb=θsrFor example, when This indicates that the first gimbal and the second gimbal have not reached the maximum speed in the acceleration and deceleration range. In this case, the position difference is evenly divided, that is, This ensures that the first gimbal quickly drives the second gimbal to move and aim at the target object. For example, This indicates that both the first gimbal and the second gimbal reach their maximum speeds within the acceleration and deceleration range. The corresponding speed distribution model is: θbsr .

通过方式得到第一旋转角度、第二旋转角度之后,则可以获得第一云台、第二云台各自要旋转到的水平目标位置为:After obtaining the first rotation angle and the second rotation angle by the method, the horizontal target positions to which the first pan-tilt head and the second pan-tilt head are to be rotated can be obtained as follows:

P′第一云台=P第一云台当前水平位置rP′first PTZPcurrent horizontal position of the first PTZr

P′第二云台=P第二云台当前水平位置bP′second PTZPcurrent horizontal position of second PTZb

在不考虑第一云台和第二云台加减速区间的时候,另一种实现方式可以如图9所示,图9为本发明实施例提供的步骤S402-3的第二种实现方式的示意性流程图,该方法可以包括:When the acceleration and deceleration intervals of the first gimbal and the second gimbal are not considered, another implementation manner may be as shown in FIG. 9 , which is a schematic flow chart of a second implementation manner of step S402-3 provided in an embodiment of the present invention. The method may include:

S402-3-1b,获得第一云台和第二云台各自对应的最大角速度信息;S402-3-1b, obtaining the maximum angular velocity information corresponding to the first gimbal and the second gimbal respectively;

S402-3-2b,根据第一云台和第二云台各自对应的最大角速度信息,对位置差量进行角度分配,得到第一云台的第一旋转角度、第二云台的第二旋转角度。S402-3-2b, according to the maximum angular velocity information corresponding to the first gimbal and the second gimbal respectively, the position difference is allocated by angle to obtain a first rotation angle of the first gimbal and a second rotation angle of the second gimbal.

由于第二云台加减速区间位移较少,因此可以不考虑加减速区间,则根据位置差量进行角度分配的方式可以是:Since the second gimbal has less displacement in the acceleration and deceleration interval, the acceleration and deceleration interval can be ignored. Then the angle allocation method based on the position difference can be:

通过方式得到第一旋转角度、第二旋转角度之后,则可以获得第一云台、第二云台各自要旋转到的水平目标位置为:After obtaining the first rotation angle and the second rotation angle by the method, the horizontal target positions to which the first pan-tilt head and the second pan-tilt head are to be rotated can be obtained as follows:

在本申请实施例中,控制第二云台运行到目标位置处,还可以根据目标的目标框宽、高大小来进行实时倍率缩放处理,目标大小合适,然后触发自动聚焦,最终使目标清晰。In the embodiment of the present application, the second gimbal is controlled to move to the target position, and real-time magnification scaling processing can be performed according to the target frame width and height of the target. When the target size is appropriate, automatic focusing is triggered to finally make the target clear.

图10为本发明实施例提供的另一种云台控制方法的示意性流程图,该方法可以确定云台跟踪目标的速度,防止目标跟踪失败,该方法包括:FIG10 is a schematic flow chart of another pan/tilt control method provided by an embodiment of the present invention. The method can determine the speed at which the pan/tilt tracks a target to prevent target tracking failure. The method includes:

S404,确定第一云台的当前位置变化量、目标对象在第一云台对应的画面中的最大位移增量;或者,确定第二云台的当前位置变化量、以及目标对象在球机的画面中的最大位移增量;S404, determining the current position change of the first pan/tilt and the maximum displacement increment of the target object in the picture corresponding to the first pan/tilt; or determining the current position change of the second pan/tilt and the maximum displacement increment of the target object in the picture of the ball camera;

其中,确定第一云台和第二云台的跟踪速度的方式类似,下面以第二云台为例进行说明。The manner of determining the tracking speed of the first pan-tilt and the second pan-tilt is similar, and the following description will be made taking the second pan-tilt as an example.

在确定第二云台的当前位移增量中,可选地,可以根据第二云台当前位置和拍摄上一帧图像时的历史位置来确定,这里将水平方向位置和垂直方向位置分开来说明。In determining the current displacement increment of the second gimbal, optionally, it can be determined according to the current position of the second gimbal and the historical position when the last frame of image was captured, and the horizontal position and the vertical position are explained separately here.

假设第一云台的当前位置为(P′,T′),历史位置为(P′k-1,T′k-1),那么水平方向位置变化量可以表示为:DeltaPan=P′-P′k-1,垂直方向位置变化量可以表示为:DeltaTilt=T′-T′k-1Assuming that the current position of the first gimbal is (P′, T′) and the historical position is (P′k-1 , T′k-1 ), the horizontal position change can be expressed as: DeltaPan=P′-P′k-1 , and the vertical position change can be expressed as: DeltaTilt=T′-T′k-1 .

水平方向最大位移增量DeltaMaxPan可以目标由中心移动到右上角或者左下角时,对应的目标空间位置增量。垂直方向最大位移增量DeltaMaxTilt类似。The maximum horizontal displacement increment DeltaMaxPan can be the target space position increment corresponding to the target moving from the center to the upper right corner or the lower left corner. The maximum vertical displacement increment DeltaMaxTilt is similar.

S405,根据第一云台的当前位置变化量与最大位移增量之间的相对差量信息,确定第一云台的跟踪速度;或者,根据第二云台的当前位置变化量与最大位移增量之间的相对差量信息,确定第二云台的跟踪速度。S405, determining the tracking speed of the first gimbal according to the relative difference information between the current position change of the first gimbal and the maximum displacement increment; or determining the tracking speed of the second gimbal according to the relative difference information between the current position change of the second gimbal and the maximum displacement increment.

考虑到在不同倍率下云台适合的不同跟踪最大速度不一,大倍率下,云台运行速度会越小,因此,本发明实施例给出一种确定跟踪速度的实施方式。Considering that the maximum tracking speeds suitable for the pan/tilt at different magnifications are different, the pan/tilt running speed will be lower at a larger magnification. Therefore, an implementation method for determining the tracking speed is provided in an embodiment of the present invention.

图11为本发明实施例提供的步骤S405的一种实现方式的示意性流程图,该方法可以根据不同云台的光学参数信息来确定跟踪速度,该方法包括:FIG. 11 is a schematic flow chart of an implementation of step S405 provided in an embodiment of the present invention. The method can determine the tracking speed according to the optical parameter information of different pan/tilts. The method includes:

S405-1,获得第二云台的当前光学参数信息和最大跟踪速度;S405-1, obtaining current optical parameter information and maximum tracking speed of the second gimbal;

S405-2,根据当前光学参数信息和最大跟踪速度确定第二云台的速度变化量;S405-2, determining a speed change of the second pan/tilt head according to the current optical parameter information and the maximum tracking speed;

S405-3,根据相对差量信息以及第二云台的速度变化量,确定第二云台的跟踪速度。S405-3, determining the tracking speed of the second pan/tilt according to the relative difference information and the speed change of the second pan/tilt.

下面继续以第二云台为例对确定跟踪速度进行说明,第一云台类似。例如,假设第二云台的水平跟踪最大速度为MaxPeedPan,垂直跟踪最大速度为MaxPeedTilt,实时获取的第二云台的倍率为Ration,根据上述获得的DeltaPan、DeltaTilt,那么第二云台在水平方向上的跟踪速度、垂直方向上的跟踪速度分别可以表示为:Next, we will continue to use the second gimbal as an example to explain how to determine the tracking speed. The first gimbal is similar. For example, assuming that the maximum horizontal tracking speed of the second gimbal is MaxPeedPan, the maximum vertical tracking speed is MaxPeedTilt, and the magnification of the second gimbal acquired in real time is Ration, based on the DeltaPan and DeltaTilt obtained above, the tracking speed of the second gimbal in the horizontal direction and the tracking speed in the vertical direction can be expressed as:

SpeedPan=DeltaPan*(MaxPeedPan/Ration)/DeltaMaxPanSpeedPan=DeltaPan*(MaxPeedPan/Ration)/DeltaMaxPan

SpeedTilt=DeltaTilt*(MaxPeedTilt/Ration)/DeltaMaxTiltSpeedTilt=DeltaTilt*(MaxPeedTilt/Ration)/DeltaMaxTilt

S406,控制第二云台按照跟踪速度移动,或者,控制第二云台按照跟踪速度移动。S406, controlling the second pan-tilt platform to move at the tracking speed, or controlling the second pan-tilt platform to move at the tracking speed.

通过上述方式,若第一云台或者第二云台单独做跟踪,则可以单独确定第一云台或者第二云台的跟踪速度,防止目标跟踪失败。Through the above method, if the first gimbal or the second gimbal performs tracking independently, the tracking speed of the first gimbal or the second gimbal can be determined independently to prevent target tracking failure.

在确定第二云台或者第一云台水平方向需要移动的位置、速度信息后,可以将位置信息和速度信息同时透传给第一云台或第二云台的底层驱动两个水平方向同时加减速控制水平方向到达目标位置,与此同时将垂直方向需要移动的位置透传给球形云台,运行到垂直方向的目标位置处。After determining the position and speed information that the second gimbal or the first gimbal needs to move in the horizontal direction, the position information and speed information can be simultaneously transmitted to the underlying drive of the first gimbal or the second gimbal to simultaneously accelerate and decelerate in the two horizontal directions to control the horizontal direction to reach the target position. At the same time, the position that needs to be moved in the vertical direction is transmitted to the spherical gimbal to run to the target position in the vertical direction.

基于相同的发明构思,本发明实施例还提供了一种云台控制装置,请参见图12,图12为本发明实施例提供的云台控制装置的功能模块图,包括:Based on the same inventive concept, an embodiment of the present invention further provides a pan-tilt control device. Please refer to FIG. 12 , which is a functional module diagram of the pan-tilt control device provided by an embodiment of the present invention, including:

获取模块510,用于获得目标对象的坐标;An acquisition module 510 is used to obtain the coordinates of a target object;

分析模块520,用于根据目标对象的坐标,确定第一云台的第一旋转角度、第二云台的第二旋转角度;An analysis module 520, configured to determine a first rotation angle of the first pan-tilt head and a second rotation angle of the second pan-tilt head according to the coordinates of the target object;

其中,第二云台安装于第一云台上,第一旋转角度和第二旋转角度分别用于指示第一云台和第二云台在相同旋转时间内完成旋转,以使目标对象位于旋转后的第二云台对应的球机的画面中心;The second pan-tilt head is installed on the first pan-tilt head, and the first rotation angle and the second rotation angle are respectively used to instruct the first pan-tilt head and the second pan-tilt head to complete rotation within the same rotation time, so that the target object is located at the center of the screen of the ball camera corresponding to the rotated second pan-tilt head;

控制模块530,用于控制第一云台从当前位置按照第一旋转角度进行旋转,并控制第二云台按照第二旋转角度进行旋转。The control module 530 is used to control the first pan-tilt platform to rotate from a current position according to a first rotation angle, and control the second pan-tilt platform to rotate according to a second rotation angle.

在可选地实施方式中,分析模块520,具体用于:获得所述球机的画面中心坐标;根据所述目标对象的坐标与所述画面中心坐标的相对位置信息、以及所述画面中心坐标与所述球机的镜头中心的相对位置信息,确定所述第二云台与所述目标对象之间的位置差量;根据所述位置差量,确定所述第一云台的第一旋转角度、第二云台的第二旋转角度。In an optional implementation, the analysis module 520 is specifically used to: obtain the center coordinates of the screen of the ball camera; determine the position difference between the second pan-tilt head and the target object based on the relative position information between the coordinates of the target object and the center coordinates of the screen, and the relative position information between the center coordinates of the screen and the lens center of the ball camera; determine the first rotation angle of the first pan-tilt head and the second rotation angle of the second pan-tilt head based on the position difference.

在可选地实施方式中,分析模块520,具体用于:获得所述第一云台和所述第二云台各自对应的最大角速度信息;根据所述第一云台和所述第二云台各自对应的最大角速度信息,确定所述第一云台和所述第二云台在所述相同旋转时间内的速度差距信息;根据所述速度差距信息对应的角度分配模型,确定所述第一云台的第一旋转角度、第二云台的第二旋转角度。In an optional embodiment, the analysis module 520 is specifically used to: obtain the maximum angular velocity information corresponding to each of the first gimbal and the second gimbal; determine the speed difference information of the first gimbal and the second gimbal within the same rotation time based on the maximum angular velocity information corresponding to each of the first gimbal and the second gimbal; determine the first rotation angle of the first gimbal and the second rotation angle of the second gimbal based on an angle allocation model corresponding to the speed difference information.

在可选地实施方式中,分析模块520,具体用于:以所述镜头中心为原点位置,建立空间坐标系;将所述目标对象的坐标、所述画面中心坐标分别映射到所述空间坐标系中,确定所述目标对象的坐标、所述画面中心坐标各自在所述空间坐标系中映射点;基于所述目标对象的坐标、所述画面中心坐标各自在所述空间坐标系中映射点,确定所述目标对象的坐标与所述画面中心坐标的相对位置信息、以及所述画面中心坐标与所述球机的镜头中心的相对位置信息;根据所述球机在所述空间坐标系中的视场参数信息、以及所述目标对象的坐标与所述画面中心坐标的相对位置信息、所述画面中心坐标与所述球机的镜头中心的相对位置信息,得到所述第二云台与所述目标对象之间的位置差量。In an optional implementation, the analysis module 520 is specifically used to: establish a spatial coordinate system with the lens center as the origin; map the coordinates of the target object and the coordinates of the center of the picture to the spatial coordinate system respectively, and determine the mapping points of the coordinates of the target object and the coordinates of the center of the picture in the spatial coordinate system; determine the relative position information of the coordinates of the target object and the coordinates of the center of the picture, as well as the relative position information of the coordinates of the center of the picture and the center of the lens of the ball camera based on the mapping points of the coordinates of the target object and the coordinates of the center of the picture in the spatial coordinate system; obtain the position difference between the second pan-tilt head and the target object according to the field of view parameter information of the ball camera in the spatial coordinate system, the relative position information of the coordinates of the target object and the coordinates of the center of the picture, as well as the relative position information of the coordinates of the center of the picture and the center of the lens of the ball camera.

在可选地实施方式中,分析模块520,具体用于:获得所述第一云台和所述第二云台各自对应的最大角速度信息;根据所述第一云台和所述第二云台各自对应的最大角速度信息,对所述位置差量进行角度分配,得到所述第一云台的第一旋转角度、第二云台的第二旋转角度。In an optional implementation, the analysis module 520 is specifically used to: obtain the maximum angular velocity information corresponding to the first gimbal and the second gimbal respectively; according to the maximum angular velocity information corresponding to the first gimbal and the second gimbal respectively, perform angle allocation on the position difference to obtain a first rotation angle of the first gimbal and a second rotation angle of the second gimbal.

在可选地实施方式中,分析模块520,还用于确定所述第一云台的当前位置变化量、所述目标对象在所述第一云台对应的画面中的最大位移增量;或者,确定第二云台的当前位置变化量、以及所述目标对象在所述球机的画面中的最大位移增量;根据所述第一云台的当前位置变化量与所述最大位移增量之间的相对差量信息,确定所述第一云台的跟踪速度;或者,根据所述第二云台的当前位置变化量与所述最大位移增量之间的相对差量信息,确定所述第二云台的跟踪速度;控制模块530,还用于控制所述第二云台按照所述跟踪速度移动,或者,控制所述第二云台按照所述跟踪速度移动。In an optional embodiment, the analysis module 520 is also used to determine the current position change of the first pan-tilt head and the maximum displacement increment of the target object in the picture corresponding to the first pan-tilt head; or, to determine the current position change of the second pan-tilt head and the maximum displacement increment of the target object in the picture of the ball camera; to determine the tracking speed of the first pan-tilt head based on the relative difference information between the current position change of the first pan-tilt head and the maximum displacement increment; or, to determine the tracking speed of the second pan-tilt head based on the relative difference information between the current position change of the second pan-tilt head and the maximum displacement increment; the control module 530 is also used to control the second pan-tilt head to move at the tracking speed, or, to control the second pan-tilt head to move at the tracking speed.

在可选地实施方式中,分析模块520,具体用于获得所述第二云台的当前光学参数信息和最大跟踪速度;根据所述当前光学参数信息和所述最大跟踪速度确定所述第二云台的速度变化量;根据所述相对差量信息以及所述第二云台的速度变化量,确定所述第二云台的跟踪速度。In an optional implementation, the analysis module 520 is specifically used to obtain current optical parameter information and a maximum tracking speed of the second gimbal; determine a speed change of the second gimbal based on the current optical parameter information and the maximum tracking speed; and determine a tracking speed of the second gimbal based on the relative difference information and the speed change of the second gimbal.

本发明实施例还提供一种监控设备100的另一种结构,监控设备100包括处理器、存储器、总线、第一云台121、第二云台131。处理器、存储器和第一云台121、第二云台131通过总线连接。The embodiment of the present invention further provides another structure of a monitoring device 100, the monitoring device 100 includes a processor, a memory, a bus, a first pan-tilt station 121, and a second pan-tilt station 131. The processor, the memory, the first pan-tilt station 121, and the second pan-tilt station 131 are connected via a bus.

处理器用于执行存储器中存储的可执行模块,例如计算机程序。处理器可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,本实施例提供的机芯校准方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。The processor is used to execute executable modules stored in the memory, such as computer programs. The processor can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the movement calibration method provided in this embodiment can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software.

上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(Digital SignalProcessor,简称DSP)、专用集成电路(Application SpecificIntegrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

存储器可能包含高速随机存取存储器(RAM:Random Access Memory),也可能还包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。The memory may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.

存储器用于存储程序,例如本实施例提供的云台控制装置500对应的程序。本实施例提供的云台控制装置500包括至少一个可以软件或固件(firmware)的形式存储于存储器中或固化在监控设备100的操作系统(operating system,OS)中的软件功能模块。处理器在接收到执行指令后,执行程序以实现本发明实施例提供的机芯校准方法。The memory is used to store programs, such as the program corresponding to the pan-tilt control device 500 provided in this embodiment. The pan-tilt control device 500 provided in this embodiment includes at least one software function module that can be stored in the memory in the form of software or firmware or fixed in the operating system (OS) of the monitoring device 100. After receiving the execution instruction, the processor executes the program to implement the movement calibration method provided in the embodiment of the present invention.

总线可以是ISA(Industry Standard Architecture)总线、PCI(PeripheralComponent Interconnect)总线或EISA(Extended Industry StandardArchitecture)总线等。The bus may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc.

本发明实施例还提供一种可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如前述实施方式中任一项的云台控制方法。该计算机可读存储介质可以是,但不限于,U盘、移动硬盘、ROM、RAM、PROM、EPROM、EEPROM、磁碟或者光盘等各种可以存储程序代码的介质。The embodiment of the present invention further provides a readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, a PTZ control method as described in any one of the above embodiments is implemented. The computer readable storage medium can be, but is not limited to, a U disk, a mobile hard disk, a ROM, a RAM, a PROM, an EPROM, an EEPROM, a magnetic disk, or an optical disk, and other media that can store program codes.

应该理解到,在本发明所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本发明的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。It should be understood that the device and method disclosed in the present invention can also be implemented in other ways. The device embodiments described above are only schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a module, a program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and/or flowchart, and the combination of boxes in the block diagram and/or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

另外,在本发明各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes. It should be noted that in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

以上仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention. It should be noted that similar numbers and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

Claims (8)

Translated fromChinese
1.一种云台控制方法,其特征在于,所述方法包括:1. A pan/tilt control method, characterized in that the method comprises:获得目标对象的坐标;Get the coordinates of the target object;根据所述目标对象的坐标,确定第一云台的第一旋转角度、第二云台的第二旋转角度;包括:Determining a first rotation angle of a first pan/tilt head and a second rotation angle of a second pan/tilt head according to the coordinates of the target object; comprising:在考虑所述第一云台和所述第二云台加减速区间的情况下,获得所述第一云台和所述第二云台各自对应的最大角速度信息;根据所述第一云台和所述第二云台各自对应的最大角速度信息,确定所述第一云台和所述第二云台在相同旋转时间内的速度差距信息;根据所述速度差距信息对应的角度分配模型,确定所述第一云台的第一旋转角度、第二云台的第二旋转角度;其中,每种速度差距信息对应的角度分配模型如下所示:Under the condition that the acceleration and deceleration intervals of the first gimbal and the second gimbal are taken into consideration, the maximum angular velocity information corresponding to each of the first gimbal and the second gimbal is obtained; according to the maximum angular velocity information corresponding to each of the first gimbal and the second gimbal, the speed difference information of the first gimbal and the second gimbal in the same rotation time is determined; according to the angle allocation model corresponding to the speed difference information, the first rotation angle of the first gimbal and the second rotation angle of the second gimbal are determined; wherein the angle allocation model corresponding to each speed difference information is as follows:在不考虑所述第一云台和所述第二云台加减速区间的情况下,获得所述第一云台和所述第二云台各自对应的最大角速度根据所述第一云台和所述第二云台各自对应的最大角速度,对位置差量进行角度分配,得到所述第一云台的第一旋转角度、第二云台的第二旋转角度;根据所述位置差量进行角度分配的方式是:Without considering the acceleration and deceleration intervals of the first gimbal and the second gimbal, the maximum angular velocities corresponding to the first gimbal and the second gimbal are obtained. According to the maximum angular velocities corresponding to the first gimbal and the second gimbal, the position difference is angle-allocated to obtain a first rotation angle of the first gimbal and a second rotation angle of the second gimbal. The manner of angle allocation according to the position difference is:其中,as为第一云台和第二云台的加速度;所述第一云台的最大角速度信息为Vr,所述第二云台的最大角速度信息为Vb,所述第一旋转角度为θr,所述第二旋转角度为θb;θs为所述位置差量;Wherein, as is the acceleration of the first gimbal and the second gimbal; the maximum angular velocity information of the first gimbal is Vr , the maximum angular velocity information of the second gimbal is Vb , the first rotation angle is θr , the second rotation angle is θb ; θs is the position difference;所述第二云台安装于所述第一云台上,所述第一旋转角度和所述第二旋转角度分别用于指示所述第一云台和所述第二云台在相同旋转时间内完成旋转运动,以使所述目标对象位于旋转后的所述第二云台对应的球机的画面中心;The second pan-tilt head is mounted on the first pan-tilt head, and the first rotation angle and the second rotation angle are respectively used to instruct the first pan-tilt head and the second pan-tilt head to complete rotational motion within the same rotation time, so that the target object is located at the center of the screen of the ball camera corresponding to the second pan-tilt head after rotation;控制所述第一云台从当前位置按照所述第一旋转角度进行旋转,并控制所述第二云台按照所述第二旋转角度进行旋转。The first pan-tilt platform is controlled to rotate according to the first rotation angle from a current position, and the second pan-tilt platform is controlled to rotate according to the second rotation angle.2.根据权利要求1所述的云台控制方法,其特征在于,根据所述目标对象的坐标,确定第一云台的第一旋转角度、第二云台的第二旋转角度,2. The pan/tilt control method according to claim 1, characterized in that a first rotation angle of the first pan/tilt and a second rotation angle of the second pan/tilt are determined according to the coordinates of the target object,获得所述球机的画面中心坐标;Obtaining the center coordinates of the screen of the ball camera;根据所述目标对象的坐标与所述画面中心坐标的相对位置信息、以及所述画面中心坐标与所述球机的镜头中心的相对位置信息,确定所述第二云台与所述目标对象之间的位置差量;Determine the position difference between the second pan/tilt head and the target object according to the relative position information between the coordinates of the target object and the center coordinates of the picture, and the relative position information between the center coordinates of the picture and the lens center of the ball camera;根据所述位置差量,确定所述第一云台的第一旋转角度、第二云台的第二旋转角度。A first rotation angle of the first gimbal and a second rotation angle of the second gimbal are determined according to the position difference.3.根据权利要求2所述的云台控制方法,其特征在于,根据所述目标对象的坐标与所述画面中心坐标的相对位置信息、以及所述画面中心坐标与所述球机的镜头中心的相对位置信息,确定所述第二云台与所述目标对象之间的位置差量,包括:3. The pan/tilt control method according to claim 2, characterized in that the position difference between the second pan/tilt and the target object is determined according to the relative position information between the coordinates of the target object and the coordinates of the center of the screen, and the relative position information between the coordinates of the center of the screen and the lens center of the ball camera, comprising:以所述镜头中心为原点位置,建立空间坐标系;Establishing a spatial coordinate system with the center of the lens as the origin;将所述目标对象的坐标、所述画面中心坐标分别映射到所述空间坐标系中,确定所述目标对象的坐标、所述画面中心坐标各自在所述空间坐标系中映射点;Mapping the coordinates of the target object and the coordinates of the center of the picture to the space coordinate system respectively, and determining the mapping points of the coordinates of the target object and the coordinates of the center of the picture in the space coordinate system;基于所述目标对象的坐标、所述画面中心坐标各自在所述空间坐标系中映射点,确定所述目标对象的坐标与所述画面中心坐标的相对位置信息、以及所述画面中心坐标与所述球机的镜头中心的相对位置信息;Based on the coordinates of the target object and the coordinates of the center of the picture respectively mapping points in the space coordinate system, determine the relative position information of the coordinates of the target object and the coordinates of the center of the picture, and the relative position information of the coordinates of the center of the picture and the center of the lens of the ball camera;根据所述球机在所述空间坐标系中的视场参数信息、以及所述目标对象的坐标与所述画面中心坐标的相对位置信息、所述画面中心坐标与所述球机的镜头中心的相对位置信息,得到所述第二云台与所述目标对象之间的位置差量。The position difference between the second pan/tilt head and the target object is obtained according to the field of view parameter information of the ball camera in the spatial coordinate system, the relative position information of the coordinates of the target object and the center coordinates of the screen, and the relative position information of the center coordinates of the screen and the lens center of the ball camera.4.根据权利要求1所述的云台控制方法,其特征在于,所述方法还包括:4. The PTZ control method according to claim 1, further comprising:确定所述第一云台的当前位置变化量、所述目标对象在所述第一云台对应的画面中的最大位移增量;或者,确定第二云台的当前位置变化量、以及所述目标对象在所述球机的画面中的最大位移增量;Determine the current position change of the first pan-tilt head and the maximum displacement increment of the target object in the picture corresponding to the first pan-tilt head; or determine the current position change of the second pan-tilt head and the maximum displacement increment of the target object in the picture of the ball camera;根据所述第一云台的当前位置变化量与所述最大位移增量之间的相对差量信息,确定所述第一云台的跟踪速度;或者,根据所述第二云台的当前位置变化量与所述最大位移增量之间的相对差量信息,确定所述第二云台的跟踪速度;Determine the tracking speed of the first gimbal according to the relative difference information between the current position change of the first gimbal and the maximum displacement increment; or determine the tracking speed of the second gimbal according to the relative difference information between the current position change of the second gimbal and the maximum displacement increment;控制所述第二云台按照所述跟踪速度移动,或者,控制所述第二云台按照所述跟踪速度移动。Control the second pan-tilt platform to move at the tracking speed, or control the second pan-tilt platform to move at the tracking speed.5.根据权利要求4所述的云台控制方法,其特征在于,根据所述第二云台的当前位置变化量与所述最大位移增量之间的相对差量信息,确定所述第二云台的跟踪速度;5. The pan-tilt control method according to claim 4, characterized in that the tracking speed of the second pan-tilt is determined according to the relative difference information between the current position change of the second pan-tilt and the maximum displacement increment;获得所述第二云台的当前光学参数信息和最大跟踪速度;Obtaining current optical parameter information and maximum tracking speed of the second pan/tilt;根据所述当前光学参数信息和所述最大跟踪速度确定所述第二云台的速度变化量;Determine a speed change of the second pan/tilt head according to the current optical parameter information and the maximum tracking speed;根据所述相对差量信息以及所述第二云台的速度变化量,确定所述第二云台的跟踪速度。The tracking speed of the second pan-tilt platform is determined according to the relative difference information and the speed change of the second pan-tilt platform.6.一种云台控制装置,其特征在于,包括:6. A pan/tilt control device, comprising:获取模块,用于获得目标对象的坐标;An acquisition module is used to obtain the coordinates of the target object;分析模块,用于根据所述目标对象的坐标,确定第一云台的第一旋转角度、第二云台的第二旋转角度,包括:An analysis module, used to determine a first rotation angle of the first pan-tilt head and a second rotation angle of the second pan-tilt head according to the coordinates of the target object, comprising:在考虑所述第一云台和所述第二云台加减速区间的情况下,获得所述第一云台和所述第二云台各自对应的最大角速度信息;根据所述第一云台和所述第二云台各自对应的最大角速度信息,确定所述第一云台和所述第二云台在相同旋转时间内的速度差距信息;根据所述速度差距信息对应的角度分配模型,确定所述第一云台的第一旋转角度、第二云台的第二旋转角度;其中,每种速度差距信息对应的角度分配模型如下所示:Under the condition that the acceleration and deceleration intervals of the first gimbal and the second gimbal are taken into consideration, the maximum angular velocity information corresponding to each of the first gimbal and the second gimbal is obtained; according to the maximum angular velocity information corresponding to each of the first gimbal and the second gimbal, the speed difference information of the first gimbal and the second gimbal in the same rotation time is determined; according to the angle allocation model corresponding to the speed difference information, the first rotation angle of the first gimbal and the second rotation angle of the second gimbal are determined; wherein the angle allocation model corresponding to each speed difference information is as follows:在不考虑所述第一云台和所述第二云台加减速区间的情况下,获得所述第一云台和所述第二云台各自对应的最大角速度根据所述第一云台和所述第二云台各自对应的最大角速度,对位置差量进行角度分配,得到所述第一云台的第一旋转角度、第二云台的第二旋转角度;根据所述位置差量进行角度分配的方式是:Without considering the acceleration and deceleration intervals of the first gimbal and the second gimbal, the maximum angular velocities corresponding to the first gimbal and the second gimbal are obtained. According to the maximum angular velocities corresponding to the first gimbal and the second gimbal, the position difference is angle-allocated to obtain a first rotation angle of the first gimbal and a second rotation angle of the second gimbal. The manner of angle allocation according to the position difference is:其中,as为第一云台和第二云台的加速度;所述第一云台的最大角速度信息为Vr,所述第二云台的最大角速度信息为Vb,所述第一旋转角度为θr,所述第二旋转角度为θb;θs为所述位置差量;Wherein, as is the acceleration of the first gimbal and the second gimbal; the maximum angular velocity information of the first gimbal is Vr , the maximum angular velocity information of the second gimbal is Vb , the first rotation angle is θr , the second rotation angle is θb ; θs is the position difference;所述第二云台安装于所述第一云台上,所述第一旋转角度和所述第二旋转角度分别用于指示所述第一云台和所述第二云台在相同旋转时间内完成旋转运动,以使所述目标对象位于旋转后的所述第二云台对应的球机的画面中心;The second pan-tilt head is mounted on the first pan-tilt head, and the first rotation angle and the second rotation angle are respectively used to instruct the first pan-tilt head and the second pan-tilt head to complete rotational motion within the same rotation time, so that the target object is located at the center of the screen of the ball camera corresponding to the second pan-tilt head after rotation;其中,所述第二云台安装于所述第一云台上,所述第一旋转角度和所述第二旋转角度分别用于指示所述第一云台和所述第二云台在相同旋转时间内完成旋转,以使所述目标对象位于旋转后的所述第二云台对应的球机的画面中心;The second pan-tilt head is mounted on the first pan-tilt head, and the first rotation angle and the second rotation angle are respectively used to instruct the first pan-tilt head and the second pan-tilt head to complete rotation within the same rotation time, so that the target object is located at the center of the screen of the ball camera corresponding to the second pan-tilt head after rotation;控制模块,用于控制所述第一云台从当前位置按照所述第一旋转角度进行旋转,并控制所述第二云台按照所述第二旋转角度进行旋转。The control module is used to control the first pan-tilt head to rotate according to the first rotation angle from a current position, and to control the second pan-tilt head to rotate according to the second rotation angle.7.一种监控设备,其特征在于,至少包括处理器和存储器,所述存储器存储有能够被所述处理器执行的计算机程序,所述处理器可执行所述计算机程序以实现权利要求1-5任一项所述的方法。7. A monitoring device, characterized in that it comprises at least a processor and a memory, wherein the memory stores a computer program that can be executed by the processor, and the processor can execute the computer program to implement the method described in any one of claims 1 to 5.8.一种可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-5任一项所述的方法。8. A readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
CN202210267790.4A2022-03-172022-03-17Cloud deck control method and device, monitoring equipment and readable storage mediumActiveCN114637342B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210267790.4ACN114637342B (en)2022-03-172022-03-17Cloud deck control method and device, monitoring equipment and readable storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210267790.4ACN114637342B (en)2022-03-172022-03-17Cloud deck control method and device, monitoring equipment and readable storage medium

Publications (2)

Publication NumberPublication Date
CN114637342A CN114637342A (en)2022-06-17
CN114637342Btrue CN114637342B (en)2024-11-01

Family

ID=81950575

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210267790.4AActiveCN114637342B (en)2022-03-172022-03-17Cloud deck control method and device, monitoring equipment and readable storage medium

Country Status (1)

CountryLink
CN (1)CN114637342B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115396590B (en)*2022-07-052024-09-06浙江大华技术股份有限公司Gun-ball linkage equipment control method and device, terminal equipment and storage medium
CN115802163B (en)*2022-11-042025-04-04浙江大华技术股份有限公司 A multi-eye pan-tilt camera

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110609576A (en)*2019-09-262019-12-24浙江大华技术股份有限公司Cloud deck control method, device and system, control equipment and storage medium
CN111385474A (en)*2020-03-092020-07-07浙江大华技术股份有限公司Target object tracking method and device, storage medium and electronic device
CN112616019A (en)*2020-12-162021-04-06重庆紫光华山智安科技有限公司Target tracking method and device, holder and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102143324A (en)*2011-04-072011-08-03天津市亚安科技电子有限公司Method for automatically and smoothly tracking target by cradle head
CN104159016B (en)*2013-05-132017-10-27浙江大华技术股份有限公司Cloud platform control system, method and device
US9558911B2 (en)*2014-08-012017-01-31Carl Zeiss Microscopy GmbhMethod for analyzing and/or processing an object as well as a particle beam device for carrying out the method
CN108632569B (en)*2017-03-202020-09-29华为技术有限公司Video monitoring method and device based on gun and ball linkage
CN107310740B (en)*2017-06-082021-04-27深圳市哈博森科技有限公司Cloud platform camera and unmanned aerial vehicle
CN108361513B (en)*2018-01-082024-10-25深圳市道通智能航空技术股份有限公司Tripod head system and control method thereof
WO2021016985A1 (en)*2019-08-012021-02-04深圳市大疆创新科技有限公司Gimbal control method, controller, gimbal, unmanned mobile platform, and storage medium
CN112702513B (en)*2020-12-232023-04-07广东科凯达智能机器人有限公司Double-optical-pan-tilt cooperative control method, device, equipment and storage medium
CN213754761U (en)*2020-12-232021-07-20浙江大华技术股份有限公司Panoramic monitoring equipment and security protection monitored control system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110609576A (en)*2019-09-262019-12-24浙江大华技术股份有限公司Cloud deck control method, device and system, control equipment and storage medium
CN111385474A (en)*2020-03-092020-07-07浙江大华技术股份有限公司Target object tracking method and device, storage medium and electronic device
CN112616019A (en)*2020-12-162021-04-06重庆紫光华山智安科技有限公司Target tracking method and device, holder and storage medium

Also Published As

Publication numberPublication date
CN114637342A (en)2022-06-17

Similar Documents

PublicationPublication DateTitle
US10303185B2 (en)Multi-camera system and method of use
US20210133996A1 (en)Techniques for motion-based automatic image capture
EP3627821B1 (en)Focusing method and apparatus for realizing clear human face, and computer device
CN114637342B (en)Cloud deck control method and device, monitoring equipment and readable storage medium
CN113838125B (en)Target position determining method, device, electronic equipment and storage medium
US20200068126A1 (en)Shelf-Viewing Camera With Multiple Focus Depths
WO2019113966A1 (en)Obstacle avoidance method and device, and unmanned aerial vehicle
JP2018084802A (en)Imaging device, imaging system, and distance information acquisition method
CN110622091A (en)Cloud deck control method, device and system, computer storage medium and unmanned aerial vehicle
JP6032034B2 (en) Object detection device
WO2017084262A1 (en)Method for monitoring moving target, and monitoring device, apparatus and system
CN110602376B (en)Snapshot method and device and camera
WO2021138856A1 (en)Camera control method, device, and computer readable storage medium
JP2022515508A (en) Vehicle control methods, related devices, and computer storage media
CN114495065A (en)Target object identification method and device
CN105100577A (en)Imaging processing method and device
WO2022257505A1 (en)Object tracking method and system, and device and storage medium
CN204906574U (en)Monitoring device and system thereof
CN108897345A (en)A kind of method and system of control unmanned vehicle camera rotation
CN112203066A (en)Target tracking dynamic projection method and dynamic projection equipment
CN113724338B (en)Method, system, equipment and storage medium for shooting mobile object based on table
CN115588042A (en)Motion detection method, device and equipment based on event camera and laser radar
CN113219972A (en)Method and device for accurately positioning AGV (automatic guided vehicle) and storage medium
US12309512B2 (en)Method, device, electronic device, and storage medium for generating depth image
JPH02151828A (en) Omnidirectional observation device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp