Gun and dome camera linkage calibration method and program product for gun and dome camera integrated camera

By using the PTZ camera in the integrated bullet and PTZ camera system to rotate to multiple positions within an adjustable angle range to capture images and determine the target rotation angle, the problem of low accuracy in the linkage between bullet and PTZ cameras is solved, achieving higher linkage precision.

CN119277206AActive Publication Date: 2025-01-07HANGZHOU EZVIZ SOFTWARE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411379085.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-07
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

In existing technologies, the conversion relationship between the camera's image coordinates and the PTZ camera's coordinates is prone to deviation after manual adjustment by the user, resulting in low accuracy of the linkage between the camera and the PTZ camera, especially when there is a lack of sensors to detect the deviation angle during manual adjustment of the camera lens.

Method used

By acquiring the current image from the bullet camera, controlling the PTZ camera to rotate to multiple positions according to its adjustable angle range, capturing images at the corresponding positions, and determining the target rotation angle of the PTZ camera based on the current image and multiple position images, the linkage calibration of the bullet and PTZ cameras is performed, avoiding the need to configure sensors at the bullet camera.

Benefits of technology

It improves the accuracy of the linkage between bullet and PTZ cameras, ensures "point-and-see" and the precision of tracking position, and enhances the linkage calibration effect of the integrated bullet and PTZ cameras.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119277206A_ABST
    Figure CN119277206A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a gun and dome camera linkage calibration method and a program product for a gun and dome camera, the method comprises the steps that the gun and dome camera comprises a gun camera and a dome camera, the gun camera is a camera with a manually adjustable angle, and the method comprises the steps of obtaining a current image shot by the gun camera; according to the adjustable angle range of the gun camera, respectively controlling the dome camera to rotate to a plurality of positions, and obtaining corresponding position images shot by the dome camera at the plurality of positions; determining a target rotation angle of the dome camera according to the current image and the plurality of position images; and according to the target rotation angle, linkage calibration of the gun camera and the dome camera is carried out, so that the linkage accuracy of the gun camera and the dome camera is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of computers, and more particularly to a gun-ball linkage calibration method and program product for a gun-ball integrated camera. Background Art

[0002] The gun-ball integrated camera can be composed of a gun camera and a ball camera. The gun camera can be used for fixed scene monitoring in a larger range, and can cover a wider area, such as roads, squares, parks and other large areas, to ensure the overall environment. The ball camera can be flexibly rotated to achieve precise focus and multi-angle monitoring of a specific area. The combination of the gun camera and the ball camera can realize multiple linkage functions such as gun-ball linkage tracking and "point and see".

[0003] For the gun-ball linkage tracking function, if a target object appears in the gun camera's screen, the gun-ball camera can obtain the image coordinates corresponding to the target object in the gun camera's screen, and convert the image coordinates into the pan-tilt coordinates of the ball camera based on the preset angle relationship between the gun camera and the ball camera. The ball camera rotates to the target position according to the pan-tilt coordinates and shoots the target object to achieve tracking of the target object.

[0004] At present, in order to better meet the actual shooting needs of users, the bolt camera is configured to be manually adjusted up and down within the adjustable angle range. After the user manually adjusts the angle of the bolt camera, the conversion relationship between the bolt camera screen image coordinates and the ball camera's pan / tilt coordinates will produce a certain deviation, which ultimately manifests as "pointing where to look" and tracking position deviation. Since there is no sensor to directly detect the deviation angle when the bolt camera lens is manually adjusted, it is impossible to directly know the position of the bolt camera after the user's adjustment, and it is also impossible to directly know the deviation of the coordinate conversion, resulting in low accuracy of the bolt camera and ball camera linkage. Summary of the invention

[0005] The embodiment of the present application provides a gun-ball linkage calibration method and program product for a gun-ball integrated camera, which is used to solve the problem that in the prior art, the gun camera is configured to be manually adjustable up and down within an adjustable angle range. After the user manually adjusts the angle of the gun camera, the conversion relationship between the image coordinates of the gun camera screen and the pan / tilt coordinates of the ball camera will have a certain deviation, which ultimately manifests as "point where you see" and tracking position deviation. Since there is no sensor to directly detect the deviation angle of the manual adjustment of the gun camera lens, it is impossible to directly know the position of the gun camera after the user's adjustment, and it is also impossible to directly know the deviation of the coordinate conversion, resulting in a low accuracy defect of the linkage between the gun camera and the ball camera.

[0006] In a first aspect, the present application provides a gun-ball linkage calibration method for a gun-ball integrated camera, wherein the gun-ball integrated camera comprises a gun camera and a ball camera, wherein the gun camera is a camera with manually adjustable angle, and the method comprises:

[0007] Obtaining the current image captured by the gun camera;

[0008] According to the adjustable angle range of the gun camera, the dome camera is controlled to rotate to multiple positions respectively, and corresponding position images taken by the dome camera at the multiple positions are obtained;

[0009] Determine the target rotation angle of the dome camera according to the current image and the plurality of position images;

[0010] According to the target rotation angle, the linkage calibration of the gun camera and the ball camera is performed.

[0011] In a possible implementation manner, determining the target rotation angle of the dome camera according to the current image and the plurality of position images includes:

[0012] Determining a central area of ​​the current image;

[0013] respectively determining a plurality of similarities between the central area and a plurality of position images;

[0014] Determine the position image with the highest similarity among the multiple similarities as the target image;

[0015] Determine a target position corresponding to the target image among the multiple positions;

[0016] According to the target position, the target rotation angle of the dome camera is determined.

[0017] In a possible implementation manner, determining the target rotation angle of the dome camera according to the target position includes:

[0018] Obtaining the initial position of the ball camera;

[0019] Determining a corresponding angular difference between the target position and the initial position;

[0020] The angle difference is determined as the target rotation angle of the dome camera.

[0021] In a possible implementation, for any location image, determining the similarity between the central area and the location image includes:

[0022] Determining regional features corresponding to the central area;

[0023] Determining image features corresponding to the position image;

[0024] Perform feature matching on the region feature and the image feature to determine a matching result;

[0025] The similarity between the central area and the position image is determined according to the matching result.

[0026] In a possible implementation, according to the adjustable angle range of the gun camera, the dome camera is controlled to rotate to multiple positions respectively, including:

[0027] Get the preset angle interval;

[0028] Determining the multiple adjustment angles according to the preset angle interval and the adjustable angle range;

[0029] The dome camera is controlled to rotate to a position corresponding to each adjustment angle.

[0030] In a possible implementation, determining the multiple adjustment angles according to the preset angle interval and the adjustable angle range includes:

[0031] Get the initial angle;

[0032] The multiple adjustment angles are determined according to the preset angle interval, the adjustable angle range and the initial angle, wherein the initial angle is the first adjustment angle, the adjustment angle is within the adjustable angle range, and the difference between every two adjacent adjustment angles is the preset angle interval.

[0033] In a possible implementation, performing linkage calibration of the gun camera and the ball camera according to the target rotation angle includes:

[0034] Acquire an angle relationship between the gun camera and the ball camera, where the angle relationship is a mapping relationship between a plurality of pixel coordinates of the gun camera and a plurality of initial pan / tilt angle coordinates of the ball camera;

[0035] According to the target rotation angle, calibrating the multiple initial gimbal angle coordinates to obtain multiple target gimbal angle coordinates;

[0036] According to the multiple pixel coordinates and the multiple target pan-tilt angle coordinates, the angle relationship between the gun camera and the dome camera is calibrated to achieve linkage calibration of the gun camera and the dome camera.

[0037] In a second aspect, the present application provides a gun-ball linkage calibration device for a gun-ball integrated camera, wherein the gun-ball integrated camera comprises a gun camera and a ball camera, wherein the gun camera is a camera with manually adjustable angle, and the device comprises:

[0038] An acquisition module, used to acquire the current image captured by the gun camera;

[0039] A control module, used to control the dome camera to rotate to multiple positions according to the adjustable angle range of the gun camera, and obtain corresponding position images taken by the dome camera at the multiple positions;

[0040] A determination module, used for determining a target rotation angle of the dome camera according to the current image and a plurality of position images;

[0041] The calibration module is used to perform linkage calibration of the gun camera and the ball camera according to the target rotation angle.

[0042] In a possible implementation manner, the determination module is specifically configured to:

[0043] Determining a central area of ​​the current image;

[0044] respectively determining a plurality of similarities between the central area and a plurality of position images;

[0045] Determine the position image with the highest similarity among the multiple similarities as the target image;

[0046] Determine a target position corresponding to the target image among the multiple positions;

[0047] According to the target position, the target rotation angle of the dome camera is determined.

[0048] In a possible implementation manner, the determination module is specifically configured to:

[0049] Obtaining the initial position of the ball camera;

[0050] Determining a corresponding angular difference between the target position and the initial position;

[0051] The angle difference is determined as the target rotation angle of the dome camera.

[0052] In a possible implementation, for any position image, the determination module is specifically used to:

[0053] Determining regional features corresponding to the central area;

[0054] Determining image features corresponding to the position image;

[0055] Perform feature matching on the region feature and the image feature to determine a matching result;

[0056] The similarity between the central area and the position image is determined according to the matching result.

[0057] In a possible implementation manner, the control module is specifically used to:

[0058] Get the preset angle interval;

[0059] Determining the multiple adjustment angles according to the preset angle interval and the adjustable angle range;

[0060] The dome camera is controlled to rotate to a position corresponding to each adjustment angle.

[0061] In a possible implementation manner, the control module is specifically used to:

[0062] Get the initial angle;

[0063] The multiple adjustment angles are determined according to the preset angle interval, the adjustable angle range and the initial angle, wherein the initial angle is the first adjustment angle, the adjustment angle is within the adjustable angle range, and the difference between every two adjacent adjustment angles is the preset angle interval.

[0064] In a possible implementation manner, the calibration module is specifically used for:

[0065] Acquire an angle relationship between the gun camera and the ball camera, where the angle relationship is a mapping relationship between a plurality of pixel coordinates of the gun camera and a plurality of initial pan / tilt angle coordinates of the ball camera;

[0066] According to the target rotation angle, calibrating the multiple initial gimbal angle coordinates to obtain multiple target gimbal angle coordinates;

[0067] According to the multiple pixel coordinates and the multiple target pan-tilt angle coordinates, the angle relationship between the gun camera and the dome camera is calibrated to achieve linkage calibration of the gun camera and the dome camera.

[0068] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0069] The memory stores computer-executable instructions;

[0070] The processor executes the computer-executable instructions stored in the memory to implement the method described in any one of the first aspects.

[0071] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.

[0072] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method as described in any one of the first aspects when executed by a computer.

[0073] The embodiment of the present application provides a gun-ball linkage calibration method and program product for a gun-ball integrated camera. By acquiring the current image captured by the gun camera, the ball camera is controlled to rotate to multiple positions according to the adjustable angle range of the gun camera, and the corresponding position images captured by the ball camera at multiple positions are acquired. According to the current image and the multiple position images, the target rotation angle of the ball camera is determined, and the linkage calibration of the gun camera and the ball camera is performed according to the target rotation angle. In this way, there is no need to configure a sensor at the gun camera to detect the rotation angle of the gun camera. The target rotation angle is determined according to the multiple position images captured by the ball camera rotating to multiple positions within the adjustable angle range and the current image captured by the gun camera. Since the target rotation angle of the ball camera is approximately the same as the rotation angle of the gun camera, calibration is performed according to the target rotation angle, thereby improving the accuracy of the linkage between the gun camera and the ball camera. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0075] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0076] Figure 2 A schematic diagram of another application scenario provided for an embodiment of the present application;

[0077] Figure 3 A flowchart of a gun-ball linkage calibration method provided in an embodiment of the present application;

[0078] Figure 4 A schematic diagram of a gun-ball integrated camera provided in an embodiment of the present application;

[0079] Figure 5 A schematic flow chart of another gun-ball linkage calibration method provided in an embodiment of the present application;

[0080] Figure 6 A schematic diagram of a bolt screen provided in an embodiment of the present application;

[0081] Figure 7 A schematic diagram of multiple location images provided in an embodiment of the present application;

[0082] Figure 8 A flowchart of another gun-ball linkage calibration method provided in an embodiment of the present application;

[0083] Fig. 9 A schematic diagram of the structure of a gun-ball linkage calibration device for a gun-ball integrated camera provided in an embodiment of the present application;

[0084] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0085] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0086] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0087] It should be noted that, although the terms "first", "second", etc. are used to describe various information in the embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. Optionally, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information.

[0088] It should be understood that the terms "comprises" and "includes" indicate the presence of the previously mentioned features, steps, operations, but do not exclude the presence, occurrence or addition of one or at least one other feature, step, operation. The terms "and / or" and the like used in this application may be interpreted as inclusive, or mean any one or any combination. Optionally, "A and / or B" means "any of the following: A; B; A and B". In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship.

[0089] The gun-ball integrated camera can be composed of a gun camera and a ball camera. The gun camera can be used for fixed scene monitoring in a larger range, and can cover a wider area, such as roads, squares, parks and other large areas, to ensure the overall environment. The ball camera can be flexibly rotated to achieve precise focus and multi-angle monitoring of a specific area. The combination of the gun camera and the ball camera can realize multiple linkage functions such as gun-ball linkage tracking and "point and see".

[0090] For the gun-ball linkage tracking function, if a target object appears in the gun camera's screen, the gun-ball camera can obtain the image coordinates corresponding to the target object in the gun camera's screen, and convert the image coordinates into the pan-tilt coordinates of the ball camera based on the preset angle relationship between the gun camera and the ball camera. The ball camera rotates to the target position according to the pan-tilt coordinates and shoots the target object to achieve tracking of the target object.

[0091] Next, combine Figure 1 , an example is given to illustrate the gun-ball linkage tracking function.

[0092] Figure 1 This is a schematic diagram of an application scenario provided by the embodiment of this application. Figure 1 , Figure 1 The gun-ball integrated camera 100 may include a ball camera 101 and a gun camera 102. The ball camera 101 may include a ball camera camera 1011. The gun camera 102 may include a gun camera camera 1021. The ball camera camera 1011 may capture a ball camera image 103. The gun camera 1021 may capture a gun camera image 104.

[0093] Assume that the ball camera image 103 originally captured by the ball camera 101 is a table, and the gun camera 102 detects a stranger in the gun camera image 104 .

[0094] The gun camera 102 can determine the pixel coordinates of the stranger and send the pixel coordinates to the gun-ball camera 100. The gun-ball camera 100 converts the pixel coordinates into the pan-tilt angle coordinates of the dome camera 1011 according to the preset angle relationship, and sends the pan-tilt angle coordinates to the dome camera 101. The dome camera 101 controls the dome camera 1011 to rotate to the target position according to the pan-tilt angle coordinates, so that the dome camera image 103 captured by the dome camera 1011 is a stranger, thereby realizing the gun-ball linkage tracking function.

[0095] Next, combine Figure 2 , an example is given to illustrate the gun-ball linkage tracking function.

[0096] Figure 2 Another application scenario diagram provided for the embodiment of the present application. Figure 2 , Figure 2The gun-ball integrated camera 100 may include a ball camera 101 and a gun camera 102. The ball camera 101 may include a ball camera camera 1011. The gun camera 102 may include a gun camera camera 1021. The ball camera camera 1011 may capture a ball camera image 103. The gun camera 1021 may capture a gun camera image 104.

[0097] Assume that the gun camera image 104 captured by the gun camera 102 includes object A and object B, and the central area corresponding to the ball camera image 104 originally captured by the ball camera 101 is object B.

[0098] When the user selects object A on the touch screen corresponding to the gun camera screen 104, the gun camera 102 can determine the pixel coordinates of object A and send the pixel coordinates to the gun-ball camera 100. The gun-ball camera 100 can convert the pixel coordinates into the pan-tilt angle coordinates of the dome camera 1011 according to the preset angle relationship, and send the pan-tilt angle coordinates to the dome camera 101. The dome camera 101 controls the dome camera 1011 to rotate to the target position according to the pan-tilt angle coordinates, so that the central area corresponding to the dome camera screen 103 photographed by the dome camera 1011 is object A, thereby realizing the "point and see" function.

[0099] In the related art, in order to better meet the actual shooting needs of users, the bolt camera is configured to be manually adjusted up and down within the adjustable angle range. After the user manually adjusts the angle of the bolt camera, the conversion relationship between the bolt camera screen image coordinates and the ball camera's pan / tilt coordinates will have a certain deviation, which ultimately manifests as "point where you see" and tracking position deviation. Since there is no sensor to directly detect the deviation angle of the manual adjustment of the bolt camera lens, it is impossible to directly know the position of the bolt camera after the user's adjustment, and it is also impossible to directly know the deviation of the coordinate conversion, resulting in low accuracy of the linkage between the bolt camera and the ball camera.

[0100] In order to solve the above technical problems, the embodiment of the present application provides a gun-ball linkage calibration method for a gun-ball integrated camera, which obtains the current image taken by the gun camera, controls the ball camera to rotate to multiple positions according to the adjustable angle range of the gun camera, and obtains the corresponding position images taken by the ball camera at multiple positions, determines the target rotation angle of the ball camera according to the current image and multiple position images, and performs linkage calibration of the gun camera and the ball camera according to the target rotation angle. In this way, there is no need to configure a sensor at the gun camera to detect the rotation angle of the gun camera, and the target rotation angle is determined according to the corresponding position images taken by the ball camera when it rotates to multiple positions within the adjustable angle range and the current image taken by the gun camera. Since the target rotation angle of the ball camera is approximately the same as the rotation angle of the gun camera, calibration is performed according to the target rotation angle, thereby improving the accuracy of the linkage between the gun camera and the ball camera.

[0101] The technical solution shown in the present application is described in detail below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be described repeatedly in different embodiments.

[0102] Figure 3 A flowchart of a gun-ball linkage calibration method provided in an embodiment of the present application. The execution subject of the embodiment of the present application can be a gun-ball integrated camera, which includes a gun camera and a ball camera. Figure 3 , the method comprising:

[0103] S301, obtaining the current image captured by the gun camera.

[0104] The current image may be an image captured by the gun camera after the user manually adjusts the gun camera.

[0105] The angle calibration control can be displayed through the terminal device, and in response to the user clicking the angle calibration control, an angle calibration instruction can be sent to the gun-ball camera through the terminal device. In response to the angle calibration instruction sent by the terminal device, the gun camera can be controlled to shoot and the current image taken by the gun camera can be obtained.

[0106] Among them, the terminal device can be a device bound to the gun-ball integrated camera, and the gun-ball integrated camera can be controlled by the terminal device.

[0107] The angle calibration instruction can be used to instruct the gun-ball integrated camera to perform angle calibration.

[0108] The angle calibration instruction can be that after the user manually adjusts the gun camera, he clicks the angle calibration control displayed on the corresponding interactive interface of the terminal device. The terminal device responds to the click operation of the angle calibration control and generates an instruction to instruct the gun-ball camera to perform angle calibration.

[0109] S302, according to the adjustable angle range of the gun camera, respectively control the ball camera to rotate to multiple positions, and obtain corresponding position images taken by the ball camera at multiple positions.

[0110] The adjustable angle range may be a preset angle range.

[0111] For example, the adjustable angle range is within 10° in the vertical direction.

[0112] The multiple positions may be positions to which the dome camera is rotated according to the multiple adjustment angles, the multiple positions correspond to the multiple adjustment angles respectively, and the multiple adjustment angles are all within the adjustable angle range.

[0113] The position image may be an image taken by a dome camera at respective viewing angles corresponding to multiple positions.

[0114] A plurality of adjustment angles can be determined according to the adjustable angle range, and the dome camera can be controlled to rotate to a plurality of positions according to the plurality of adjustment angles, and corresponding position images captured by the dome camera at the plurality of positions can be obtained.

[0115] S303: Determine the target rotation angle of the ball camera according to the current image and the multiple position images.

[0116] The rotation angle may be used to indicate the angle at which the dome camera is rotated compared to the initial position of the dome camera.

[0117] The target rotation angle of the ball camera can be approximately the same as the rotation angle of the gun camera.

[0118] Next, combine Figure 4 , further explaining the principle that the target rotation angle of the ball camera is approximately the same as the rotation angle of the gun camera.

[0119] Figure 4 This is a schematic diagram of a gun-ball integrated camera provided in an embodiment of the present application. Figure 4 , Figure 4 Can include a gun-ball camera.

[0120] In the gun-ball integrated camera, when the gun camera is in the initial position, the center point of the image captured by the gun camera is point A1. When the ball camera is in the initial position, the center point of the image captured by the ball camera is point A2. Since the distance between the two cameras is very small (within 10cm), when they are far away (more than 3m), A1 and A2 can be approximately considered to be the same point.

[0121] When the bolt camera rotates X°, the center point of the captured image is point B1, and when the ball camera rotates X°, the center point of the captured image is point B2. Since the distance between the two cameras is very small (within 10cm), when they are far away (more than 3m), B1 and B2 can be roughly considered to be the same point.

[0122] In this way, by controlling the ball camera to rotate to multiple positions to capture multiple position images, since the adjustment angle of the ball camera when capturing multiple position images is known, and then comparing the multiple position images with the current image, the target image with the highest similarity is determined (i.e., point B2 that is the same as point B1 in the current image is determined in the multiple position images), and based on the target image, the target rotation angle of the ball camera can be determined, and the target rotation angle of the ball camera is approximately the same as the rotation angle of the gun camera, and thus the rotation angle of the gun camera can be determined, thereby improving the accuracy of the linkage between the gun camera and the ball camera.

[0123] The target image with the highest similarity to the current image can be determined from multiple position images, and the target rotation angle of the ball camera can be determined according to the adjustment scheduling corresponding to the target image.

[0124] S304, performing linkage calibration of the gun camera and the ball camera according to the target rotation angle.

[0125] The linked calibration may be to calibrate the angle relationship between the gun camera and the ball camera. The angle relationship may be a mapping relationship between multiple pixel coordinates of the gun camera and multiple initial pan / tilt angle coordinates of the ball camera. The multiple pixel coordinates correspond one to one with the multiple initial pan / tilt angle coordinates.

[0126] The angle relationship between the gun camera and the ball camera can be obtained, and the angle relationship between the gun camera and the ball camera can be calibrated according to the target rotation angle.

[0127] Optionally, the linkage calibration of the gun camera and the dome camera can be performed in the following manner: obtain the angular relationship between the gun camera and the dome camera, the angular relationship being a mapping relationship between multiple pixel coordinates of the gun camera and multiple initial pan-tilt angle coordinates of the dome camera; calibrate the multiple initial pan-tilt angle coordinates according to the target rotation angle to obtain multiple target pan-tilt angle coordinates; calibrate the angular relationship between the gun camera and the dome camera according to the multiple pixel coordinates and the multiple target pan-tilt angle coordinates to achieve linkage calibration of the gun camera and the dome camera.

[0128] For example, assume that the angle relationship is: initial gimbal angle coordinate = f (pixel coordinate).

[0129] Among them, f (pixel coordinate) is the preset conversion algorithm.

[0130] The angle relationship after calibration is: target gimbal angle coordinate = f (pixel coordinate) + X°.

[0131] Where X is the target rotation angle.

[0132] The gun-ball linkage calibration method provided in this embodiment obtains the current image taken by the gun camera; controls the ball camera to rotate to multiple positions according to the adjustable angle range of the gun camera, and obtains the corresponding position images taken by the ball camera at multiple positions; determines the target rotation angle of the ball camera according to the current image and multiple position images; and performs linkage calibration of the gun camera and the ball camera according to the target rotation angle. In this way, there is no need to configure a sensor at the gun camera to detect the rotation angle of the gun camera. The target rotation angle is determined according to multiple position images taken by the ball camera rotating to multiple positions within the adjustable angle range and the current image taken by the gun camera. Since the target rotation angle of the ball camera is approximately the same as the rotation angle of the gun camera, calibration is performed according to the target rotation angle, thereby improving the accuracy of the linkage between the gun camera and the ball camera.

[0133] Next, combine Figure 5 , the process (S303) of determining the target rotation angle of the ball camera according to the current image and multiple position images is explained.

[0134] Figure 5 This is a flow chart of another gun-ball linkage calibration method provided in an embodiment of the present application. Figure 5 , the method is described in detail. The method comprises:

[0135] S501: Determine the central area of ​​the current image.

[0136] The central area may be an image area corresponding to a preset pixel range.

[0137] The pixel range of the center area is the same as the pixel range of the image captured by the gun camera.

[0138] A preset pixel range can be obtained, and the central area of ​​the current image can be determined according to the pixel range.

[0139] Next, combine Figure 6 , an example is given for the central area of ​​the current image.

[0140] Figure 6 This is a schematic diagram of a bolt screen provided in an embodiment of the present application. Figure 6 , Figure 6 It can include a first screen and a second screen.

[0141] Assume that a scene includes multiple objects such as A, B, C, D, E, and F.

[0142] Please refer to the first picture. The first picture can be the current image captured by the gun camera.

[0143] Please refer to the second picture. The second picture determines the central area of ​​the current image based on the first picture, wherein the central area can be indicated by the dotted area in the second picture.

[0144] S502: Determine multiple similarities between the central area and the multiple position images respectively.

[0145] The similarity can be used to indicate the similarity between the position image and the central area.

[0146] Next, combine Figure 7 , multiple location images are given as examples.

[0147] Figure 7 Schematic diagram of multiple location images provided in the embodiment of the present application. Figure 7 , Figure 7 This can include a central area and multiple location images.

[0148] A plurality of similarities between the plurality of position images and the central area may be determined in sequence.

[0149] A plurality of similarities between the central area and the plurality of location images may be determined through a preset algorithm.

[0150] Optionally, for any location image, the similarity between the central area and the location image can be determined in the following manner: determine the regional features corresponding to the central area; determine the image features corresponding to the location image; perform feature matching between the regional features and the image features to determine the matching results; and determine the similarity between the central area and the location image based on the matching results.

[0151] Among them, the regional features can be used to describe the features corresponding to the central area, the image features can be used to describe the features corresponding to the position image, and the matching results are used to indicate the similarity between the regional features and the image features.

[0152] S503: Determine the position image with the highest similarity among the multiple similarities as the target image.

[0153] The target image is the location image with the highest similarity.

[0154] For example, assuming that the second position image is the image with the highest similarity, the second position image is determined as the target image.

[0155] S504: Determine a target position corresponding to the target image among multiple positions.

[0156] The target position may be the position where the dome camera captures the target image.

[0157] Image information of the target image may be acquired, and a target position corresponding to the target image may be determined from among a plurality of positions according to the image information.

[0158] S505: Obtain the initial position of the ball camera.

[0159] The initial position of the ball camera may be a position when the ball camera is not rotated, or may be a preset position to which the ball camera is rotated.

[0160] The center point of the image captured by the initial position of the ball camera is the same as the center point of the image captured by the initial position of the gun camera.

[0161] The initial position of the ball camera can be obtained in the storage space.

[0162] S506: Determine the corresponding angle difference between the target position and the initial position.

[0163] A first angle corresponding to the target position may be determined, an initial angle corresponding to the initial position may be determined, and a difference between the first angle and the second angle may be determined as the angle difference.

[0164] S507: Determine the angle difference as the target rotation angle of the dome camera.

[0165] For example, if the angle difference is 2°, then the rotation angle of the dome camera is determined to be 2°.

[0166] The implementation content of each step in the embodiment of the present application can refer to the description of the corresponding steps or operations in the above method embodiment, and repeated content will not be repeated.

[0167] The present embodiment provides a method for calibrating the gun-ball linkage, which determines the central area of ​​the current image, determines the multiple similarities between the central area and multiple position images respectively, determines the position image with the highest similarity among the multiple similarities as the target image, determines the target position corresponding to the target image among the multiple positions, obtains the initial position of the ball camera, determines the angle difference corresponding to the target position and the initial position, and determines the angle difference as the target rotation angle of the gun camera. In this way, there is no need to configure a sensor at the gun camera to detect the rotation angle of the gun camera. By comparing multiple position images with the current image, the target rotation angle can be determined, and calibration is performed according to the target rotation angle, thereby improving the accuracy of the linkage between the gun camera and the ball camera.

[0168] Next, combine Figure 8 , the process (S302) of controlling the ball camera to rotate to multiple positions according to the adjustable angle range of the gun camera is explained.

[0169] Figure 8A flowchart of another gun-ball linkage calibration method provided in an embodiment of the present application. Based on the above embodiment, see Figure 8 , the method is described in detail. The method comprises:

[0170] S801. Obtain a preset angle interval.

[0171] The preset angle interval may be a pre-set angle interval.

[0172] For example, the preset angle interval is 2°.

[0173] The preset angle intervals can be retrieved from the storage space.

[0174] S802: Obtain an initial angle.

[0175] The initial angle may be an initial angle corresponding to the gun camera at the initial position.

[0176] The initial angle can be obtained from the storage space.

[0177] S803: Determine a plurality of adjustment angles according to a preset angle interval, an adjustable angle range and an initial angle.

[0178] The initial angle is the first adjustment angle, the adjustment angle is within the adjustable angle range, and the difference between every two adjacent adjustment angles is the preset angle interval.

[0179] The ratio of the adjustable angle range to the preset angle interval can be determined as the number of adjustments, and the first initial angle is obtained. The first initial angle is determined as the first adjustment angle, and the sum of the i-th adjustment angle and the preset angle interval is determined as the i+1-th adjustment angle; wherein i is 1, 2, ..., n in sequence, n is the number of adjustments, and the multiple adjustment angles include i+1 adjustment angles.

[0180] S804, respectively controlling the dome camera to rotate to a position corresponding to each adjustment angle.

[0181] For example, the multiple adjustment angles are 0°, 2°, 4°, 6°, 8°, and 10°.

[0182] Then control the dome camera to rotate to the corresponding positions of 0°, 2°, 4°, 6°, 8°, and 10° respectively.

[0183] The implementation content of each step in the embodiment of the present application can refer to the description of the corresponding steps or operations in the above method embodiment, and repeated content will not be repeated.

[0184] The gun-ball linkage calibration method provided in this embodiment obtains the initial angle by obtaining the preset angle interval, and determines multiple adjustment angles according to the preset angle interval, the adjustable angle range and the initial angle, wherein the initial angle is the first adjustment angle, the adjustment angle is within the adjustable angle range, and the difference between every two adjacent adjustment angles is the preset angle interval, and the ball camera is controlled to rotate to the position corresponding to each adjustment angle. In this way, there is no need to configure a sensor at the gun camera to detect the rotation angle of the gun camera. By controlling the ball camera to rotate to multiple positions corresponding to multiple adjustment angles to shoot multiple position images, the target rotation angle is determined, and calibration is performed according to the target rotation angle, thereby improving the accuracy of the linkage between the gun camera and the ball camera.

[0185] Fig. 9 This is a schematic diagram of the structure of a gun-ball linkage calibration device for a gun-ball integrated camera provided in an embodiment of the present application. Fig. 9 The gun-ball integrated camera includes a gun camera and a ball camera. The device 900 includes an acquisition module 901, a control module 902, a determination module 903 and a calibration module 904, wherein:

[0186] An acquisition module 901 is used to acquire the current image captured by the gun camera;

[0187] The control module 902 is used to control the dome camera to rotate to multiple positions according to the adjustable angle range of the gun camera, and obtain the corresponding position images taken by the dome camera at the multiple positions;

[0188] A determination module 903 is used to determine the target rotation angle of the dome camera according to the current image and the multiple position images;

[0189] The calibration module 904 is used to perform linkage calibration of the gun camera and the ball camera according to the target rotation angle.

[0190] In a possible implementation manner, the determination module 903 is specifically configured to:

[0191] Determining a central area of ​​the current image;

[0192] respectively determining a plurality of similarities between the central area and a plurality of position images;

[0193] Determine the position image with the highest similarity among the multiple similarities as the target image;

[0194] Determine a target position corresponding to the target image among the multiple positions;

[0195] According to the target position, the target rotation angle of the dome camera is determined.

[0196] In a possible implementation manner, the determination module 903 is specifically configured to:

[0197] Obtaining the initial position of the ball camera;

[0198] Determining a corresponding angular difference between the target position and the initial position;

[0199] The angle difference is determined as the target rotation angle of the dome camera.

[0200] In a possible implementation manner, for any position image, the determination module 903 is specifically configured to:

[0201] Determining regional features corresponding to the central area;

[0202] Determining image features corresponding to the position image;

[0203] Perform feature matching on the region feature and the image feature to determine a matching result;

[0204] The similarity between the central area and the position image is determined according to the matching result.

[0205] In a possible implementation, the control module 902 is specifically configured to:

[0206] Get the preset angle interval;

[0207] Determining the multiple adjustment angles according to the preset angle interval and the adjustable angle range;

[0208] The dome camera is controlled to rotate to a position corresponding to each adjustment angle.

[0209] In a possible implementation, the control module 902 is specifically configured to:

[0210] Get the initial angle;

[0211] The multiple adjustment angles are determined according to the preset angle interval, the adjustable angle range and the initial angle, wherein the initial angle is the first adjustment angle, the adjustment angle is within the adjustable angle range, and the difference between every two adjacent adjustment angles is the preset angle interval.

[0212] In a possible implementation, the calibration module 904 is specifically configured to:

[0213] Acquire an angle relationship between the gun camera and the ball camera, where the angle relationship is a mapping relationship between a plurality of pixel coordinates of the gun camera and a plurality of initial pan / tilt angle coordinates of the ball camera;

[0214] According to the target rotation angle, calibrating the multiple initial gimbal angle coordinates to obtain multiple target gimbal angle coordinates;

[0215] According to the multiple pixel coordinates and the multiple target pan-tilt angle coordinates, the angle relationship between the gun camera and the dome camera is calibrated to achieve linkage calibration of the gun camera and the dome camera.

[0216] Fig.10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.10 , the electronic device 1000 may include: a memory 1001 , a processor 1002 , and a transceiver 1003 .

[0217] The memory 1001 is used to store program instructions;

[0218] The processor 1002 is used to execute the program instructions stored in the memory, so as to enable the electronic device 1000 to execute the above method.

[0219] The transceiver 1003 may include: a transmitter and / or a receiver. The transmitter may also be referred to as a transmitter, a transmitter, a transmission port, a transmission interface, or the like, and the receiver may also be referred to as a receiver, a reception port, a reception interface, or the like. Exemplarily, the memory 1001, the processor 1002, and the transceiver 1003 are interconnected via a bus 1004.

[0220] The embodiment of the present application also provides a computer program product, which can be executed by a processor. When the computer program product is executed, the above method can be implemented.

[0221] The angle calibration device, electronic device, computer-readable storage medium and computer program product of the embodiments of the present application can execute the technical solution shown in the above-mentioned gun-ball linkage calibration method embodiment. The implementation principles and beneficial effects are similar and will not be repeated here.

[0222] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned memory (storage medium) includes: read-only memory (ROM), random access memory (RAM), flash memory, hard disk, solid state drive, magnetic tape, floppy disk, optical disc and any combination thereof.

[0223] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable angle calibration device to produce a machine, so that the instructions executed by the processing unit of the computer or other programmable angle calibration device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0224] These computer executable instructions may also be stored in a computer readable memory capable of directing a computer or other programmable angle calibration device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0225] These computer executable instructions may also be loaded onto a computer or other programmable angle calibration device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0226] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A gun-ball linkage calibration method for a gun-ball integrated camera, characterized in that: The gun-ball integrated camera comprises a gun camera and a ball camera, wherein the gun camera is a camera with manually adjustable angle, and the method comprises: Obtaining the current image captured by the gun camera; According to the adjustable angle range of the gun camera, the dome camera is controlled to rotate to multiple positions respectively, and corresponding position images taken by the dome camera at the multiple positions are obtained; Determine the target rotation angle of the dome camera according to the current image and the plurality of position images; According to the target rotation angle, the linkage calibration of the gun camera and the ball camera is performed.

2. The method according to claim 1, characterized in that Determining a target rotation angle of the dome camera according to the current image and the plurality of position images includes: Determining a central area of ​​the current image; respectively determining a plurality of similarities between the central area and a plurality of position images; Determine the position image with the highest similarity among the multiple similarities as the target image; Determine a target position corresponding to the target image among the multiple positions; According to the target position, the target rotation angle of the dome camera is determined.

3. The method according to claim 2, characterized in that Determining the target rotation angle of the ball camera according to the target position includes: Obtaining the initial position of the ball camera; Determining a corresponding angular difference between the target position and the initial position; The angle difference is determined as the target rotation angle of the dome camera.

4. The method according to claim 2 or 3, characterized in that: For any position image, determining the similarity between the central area and the position image includes: Determining regional features corresponding to the central area; Determining image features corresponding to the position image; Perform feature matching on the region feature and the image feature to determine a matching result; The similarity between the central area and the position image is determined according to the matching result.

5. The method according to any one of claims 1 to 3, characterized in that: According to the adjustable angle range of the gun camera, the ball camera is controlled to rotate to multiple positions, including: Get the preset angle interval; Determining the multiple adjustment angles according to the preset angle interval and the adjustable angle range; The dome camera is controlled to rotate to a position corresponding to each adjustment angle.

6. The method according to claim 5, characterized in that Determining the plurality of adjustment angles according to the preset angle interval and the adjustable angle range includes: Get the initial angle; The multiple adjustment angles are determined according to the preset angle interval, the adjustable angle range and the initial angle, wherein the initial angle is the first adjustment angle, the adjustment angle is within the adjustable angle range, and the difference between every two adjacent adjustment angles is the preset angle interval.

7. The method according to any one of claims 1 to 6, characterized in that: According to the target rotation angle, the linkage calibration of the gun camera and the ball camera is performed, including: Acquire an angle relationship between the gun camera and the ball camera, where the angle relationship is a mapping relationship between a plurality of pixel coordinates of the gun camera and a plurality of initial pan / tilt angle coordinates of the ball camera; According to the target rotation angle, calibrating the multiple initial gimbal angle coordinates to obtain multiple target gimbal angle coordinates; According to the multiple pixel coordinates and the multiple target pan-tilt angle coordinates, the angle relationship between the gun camera and the dome camera is calibrated to achieve linkage calibration of the gun camera and the dome camera.

8. A gun-ball linkage calibration device for a gun-ball integrated camera, characterized in that: The gun-ball integrated camera includes a gun camera and a ball camera, wherein the gun camera is a camera with manually adjustable angle, and the device includes: An acquisition module, used to acquire the current image captured by the gun camera; A control module, used to control the dome camera to rotate to multiple positions according to the adjustable angle range of the gun camera, and obtain corresponding position images taken by the dome camera at the multiple positions; A determination module, used for determining a target rotation angle of the ball camera according to the current image and a plurality of position images; The calibration module is used to perform linkage calibration of the gun camera and the ball camera according to the target rotation angle.

9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.

Citation Information

Patent Citations

  • Method and device for controlling linkage of dome camera and gun camera and medium

    CN111698455A

  • Gun-ball linkage tracking method and device, computer equipment and storage medium

    CN111885301A

  • Target tracking method and system, computer equipment and readable medium

    CN115278014A

  • Method and apparatus for controlling linkage between ball camera and gun camera, and medium

    WO2020182176A1