Gun-ball calibration data acquisition method, gun-ball calibration method, device and electronic equipment

By automatically controlling the movement of the PTZ camera and obtaining calibration point pair data through the linkage between the PTZ camera and the camera, the problem of cumbersome calibration process in the existing technology is solved, achieving efficient calibration data acquisition and simplified construction, and is suitable for complex environments.

CN115719383BActive Publication Date: 2026-05-05HANGZHOU MICROIMAGE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU MICROIMAGE SOFTWARE CO LTD
Filing Date
2021-08-24
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In existing technologies, the data acquisition process for calibration point pairs in PTZ camera-based calibration is cumbersome, requiring manual control of the PTZ camera to capture video footage of the target object, which is time-consuming and difficult to implement effectively in complex environments.

Method used

By controlling the PTZ camera to move to an initial position corresponding to the reference position in the bullet camera's view, the calibration motion control parameters are determined using the bullet camera's field of view. The calibration image of the PTZ camera at the target position is automatically acquired, and the calibration point pair data between the bullet camera and the PTZ camera is determined based on the target area and the calibration image.

Benefits of technology

It enables automatic acquisition of calibration point pairs between bullet and PTZ cameras, simplifies the calibration process, reduces construction difficulty and cost, is suitable for complex environments, and improves calibration efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115719383B_ABST
    Figure CN115719383B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, and electronic device for acquiring calibration data of a PTZ camera, applicable to the field of image data processing technology. The method includes: controlling the PTZ camera to move to an initial position corresponding to the center of the PTZ camera's image and a reference position in the bullet camera's image; determining calibration motion control parameters for the PTZ camera using the reference position in the bullet camera's image and the bullet camera's field of view; wherein the calibration motion control parameters control the PTZ camera to move to a target area corresponding to the center of the PTZ camera's image; controlling the PTZ camera to move to the target position using the calibration motion control parameters and acquiring a calibration image captured by the PTZ camera at the target position; and determining a pair of calibration point data between the bullet camera and the PTZ camera using the target area in the bullet camera's image, the calibration image, and the calibration motion control parameters. This solution simplifies the process of acquiring calibration point data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing technology, and in particular to a method for acquiring gun-ball calibration data, a gun-ball calibration method, an apparatus, and an electronic device. Background Technology

[0002] Currently, mainstream video surveillance cameras are divided into bullet cameras (hereinafter referred to as bullet cameras) and dome cameras (hereinafter referred to as dome cameras). For video surveillance of moving targets over a large area, in order to monitor the overall movement of the target object as well as its details, a bullet-dome camera linkage video surveillance method is usually required. Bullet-dome camera linkage refers to the joint monitoring of the same scene by bullet cameras and dome cameras.

[0003] To achieve gun-ball linkage, calibration points are needed to calibrate the data for gun-ball linkage. In related technologies, calibration point data is mainly obtained manually, making the data acquisition process cumbersome. Summary of the Invention

[0004] The purpose of this invention is to provide a method and apparatus for acquiring ball-and-gun calibration data, simplifying the data acquisition process at calibration points. Furthermore, it provides a method and apparatus for ball-and-gun calibration to improve the efficiency of calibration. The specific technical solution is as follows:

[0005] In a first aspect, embodiments of the present invention provide a method for acquiring gun-ball calibration data, the method comprising:

[0006] Control the PTZ camera to move to the initial position corresponding to the center of the PTZ camera screen and the reference position in the bullet camera screen;

[0007] Using the reference position in the camera's view and the camera's field of view, the calibration motion control parameters of the PTZ camera are determined; wherein, the calibration motion control parameters can control the PTZ camera to move to a position where the center of the PTZ camera's view corresponds to the target area in the camera's view.

[0008] The PTZ camera is controlled to move to the target position using the calibration motion control parameters, and the calibration image captured by the PTZ camera at the target position is obtained.

[0009] Using the target area in the camera's view, the calibration view, and the calibration motion control parameters, a pair of calibration point data between the camera and the PTZ camera is determined.

[0010] Optionally, the camera view includes multiple different target areas; the calibration motion control parameters can control the PTZ camera to move to a position where the center of the PTZ camera view corresponds to one of the target areas in the camera view.

[0011] Optionally, the reference position in the gun view is the center of the gun view; or, the reference position in the gun view is one of the target areas in the gun view.

[0012] Optionally, if the reference position in the bolt image is one of the target areas in the bolt image, the method further includes:

[0013] Using the reference position in the camera lens and the motion control parameters of the PTZ camera moving to the initial position, a pair of calibration point data between the camera lens and the PTZ camera is determined.

[0014] Optionally, if the reference position in the camera view is one of the target areas in the camera view, the calibration motion control parameters can control the PTZ camera to move to the center of the PTZ camera view, which corresponds to a target area in the camera view other than the reference position.

[0015] Optionally, determining the calibration motion control parameters of the PTZ camera using the reference position in the camera's view and the camera's field of view includes: determining the calibration motion control parameters of the PTZ camera according to a preset order of target areas in the camera's view and using the reference position in the camera's view and the camera's field of view.

[0016] The calibration motion control parameters are parameters that allow the PTZ camera to move to a position where the center of the PTZ camera's image corresponds to a target area determined according to the preset order; the calibration image is the image captured by the PTZ camera when the center of the PTZ camera's image corresponds to the target area determined according to the preset order.

[0017] Optionally, determining a pair of calibration point data between the gun and the PTZ camera using the target area in the gun's view, the calibration view, and the calibration motion control parameters includes:

[0018] Identify a first sub-region of the target area in the gun's view and a second sub-region in the calibration view; wherein the content of the first sub-region and the second sub-region matches.

[0019] Using the position information of the first sub-region in the camera's view, and the motion control parameters that control the center of the PTZ camera's view corresponding to the first sub-region, a pair of calibration point data between the camera and the PTZ camera is determined.

[0020] Optionally, identifying the first sub-region of the target area in the gun view and the second sub-region in the calibration view includes:

[0021] Using a feature point recognition algorithm, feature points within the target area of ​​the gun's view and feature points within the calibration view are identified.

[0022] Feature points in the target area of ​​the gun bolt image and feature points in the calibration image are compared to determine multiple first feature points in the target area of ​​the gun bolt image and multiple second feature points in the calibration image; wherein, the multiple first feature points and the multiple second feature points represent the same object;

[0023] The smallest region containing the plurality of first feature points is determined from the target area of ​​the gun image as the first sub-region, and the smallest region containing the plurality of second feature points in the calibration image is determined as the second sub-region.

[0024] Optionally, determining a pair of calibration point data between the bullet camera and the PTZ camera using the position information of the first sub-region in the bullet camera's view, and motion control parameters that control the center of the PTZ camera's view corresponding to the first sub-region, includes:

[0025] In the gun view, the pixel coordinates of the pixel at the center point of the first sub-region are determined as the position information of the first sub-region in the gun view;

[0026] The position information of the second sub-region in the calibration screen is sent to the PTZ camera, and motion control parameters corresponding to the center of the PTZ camera screen and the first sub-region are obtained;

[0027] Using the determined position information and the acquired motion control parameters, a pair of calibration point data between the gun camera and the PTZ camera is determined.

[0028] Optionally, the bolt's field of view includes: the bolt's maximum horizontal field of view and the bolt's maximum vertical field of view;

[0029] The step of determining the calibration motion control parameters of the PTZ camera using the reference position in the camera's view and the camera's field of view includes:

[0030] Determine the distance of the target area relative to a reference position in the gun's view, a first offset angle in the horizontal direction, and a second offset angle in the vertical direction;

[0031] The horizontal movement position of the PTZ camera is determined based on the maximum horizontal field of view of the camera, the first offset angle, and the horizontal component of the distance.

[0032] The vertical movement position of the PTZ camera is determined based on the maximum vertical field of view of the gun, the second offset angle, and the vertical component of the distance.

[0033] The calibration motion control parameters of the PTZ camera are determined using the horizontal and vertical movement positions.

[0034] Optionally, determining the horizontal movement position of the PTZ camera based on the maximum horizontal field of view of the camera, the first offset angle, and the horizontal component of the distance includes:

[0035] The horizontal movement position of the PTZ camera is determined according to the following formula:

[0036]

[0037] Where P is the horizontal movement position of the PTZ camera, x is the abscissa of the center position of the target area, x′ is the abscissa of the reference position, (xx′) is the horizontal component, and P d The maximum horizontal field of view is α, which is a preset horizontal parameter corresponding to the first offset angle, and A is the multiple of the sampling accuracy of the PTZ camera relative to the sampling accuracy of the bullet camera.

[0038] Determining the vertical movement position of the PTZ camera based on the maximum vertical field of view of the camera, the second offset angle, and the vertical component of the distance includes:

[0039] The vertical movement position of the PTZ camera is determined according to the following formula:

[0040]

[0041] Where T is the vertical rotation position of the PTZ camera, y is the ordinate of the center position of the target area, y′ is the ordinate of the reference position, and (yy′) is the vertical component. d β is the maximum vertical field of view, and β is a preset vertical parameter corresponding to the second offset angle.

[0042] Optionally, the gun is an infrared thermal imaging gun.

[0043] Secondly, embodiments of the present invention also provide a gun-ball calibration method, the method comprising:

[0044] Multiple calibration point pairs of data are obtained using the gun-ball calibration data acquisition method described in the first aspect;

[0045] Using the multi-point calibration data, the mapping relationship between each position in the camera's view and the motion control parameters of the PTZ camera is determined.

[0046] Thirdly, embodiments of the present invention also provide a gun-ball calibration data acquisition device, the device comprising:

[0047] The PTZ camera motion control module is used to control the PTZ camera to move to the initial position corresponding to the center of the PTZ camera screen and the reference position in the bullet camera screen;

[0048] The parameter determination module is used to determine the calibration motion control parameters of the PTZ camera using the reference position in the camera's view and the camera's field of view; wherein, the calibration motion control parameters can control the PTZ camera to move to a position where the center of the PTZ camera's view corresponds to the target area in the camera's view.

[0049] The image acquisition module is used to control the PTZ camera to move to the target position using the calibration motion control parameters, and to acquire the calibration image captured by the PTZ camera at the target position;

[0050] The data determination module is used to determine a pair of calibration point data between the gun and the PTZ camera by using the target area in the gun view, the calibration view, and the calibration motion control parameters.

[0051] Optionally, the camera view includes multiple different target areas; the calibration motion control parameters can control the PTZ camera to move to a position where the center of the PTZ camera view corresponds to one of the target areas in the camera view.

[0052] Optionally, the reference position in the gun view is the center of the gun view; or, the reference position in the gun view is one of the target areas in the gun view.

[0053] Optionally, the data determination module is further configured to, when the reference position in the camera view is one of the target areas in the camera view, determine a pair of calibration point pairs between the camera and the PTZ camera using the reference position in the camera view and the motion control parameters of the PTZ camera moving to the initial position.

[0054] Optionally, if the reference position in the camera view is one of the target areas in the camera view, the calibration motion control parameters can control the PTZ camera to move to the center of the PTZ camera view, which corresponds to a target area in the camera view other than the reference position.

[0055] Optionally, the parameter determination module is specifically used to determine the calibration motion control parameters of the PTZ camera according to the preset order of the target areas in the camera view and using the reference position in the camera view and the camera view angle of the camera.

[0056] The calibration motion control parameters are parameters that allow the PTZ camera to move to a position where the center of the PTZ camera's image corresponds to a target area determined according to the preset order; the calibration image is the image captured by the PTZ camera when the center of the PTZ camera's image corresponds to the target area determined according to the preset order.

[0057] Optionally, the data determination module includes:

[0058] The region recognition submodule is used to identify a first sub-region of the target region in the gun view and a second sub-region in the calibration view; wherein the content of the first sub-region and the second sub-region matches.

[0059] The data determination submodule is used to determine a pair of calibration point pairs between the bullet camera and the PTZ camera by using the position information of the first sub-region in the bullet camera's view and the motion control parameters that control the center of the PTZ camera's view to correspond to the first sub-region.

[0060] Optionally, the region identification submodule is specifically used to identify feature points within the target region of the gun bolt image and feature points within the calibration image using a feature point identification algorithm; compare the feature points of the target region of the gun bolt image and the feature points within the calibration image to determine multiple first feature points within the target region of the gun bolt image and multiple second feature points within the calibration image; wherein the multiple first feature points and the multiple second feature points represent the same object; determine the smallest region containing the multiple first feature points from the target region of the gun bolt image as a first sub-region, and determine the smallest region containing the multiple second feature points within the calibration image as a second sub-region.

[0061] Optionally, the data determination submodule is specifically used to determine the pixel coordinates of the pixel at the center point of the first sub-region in the camera view, as the position information of the first sub-region in the camera view; send the position information of the second sub-region in the calibration screen to the PTZ camera, and obtain motion control parameters corresponding to the center of the PTZ camera screen that can control the PTZ camera and the first sub-region; and use the determined position information and the obtained motion control parameters to determine a pair of calibration point pairs between the camera and the PTZ camera.

[0062] Optionally, the bolt's field of view includes: the bolt's maximum horizontal field of view and the bolt's maximum vertical field of view;

[0063] The parameter determination module includes:

[0064] Access the determination submodule to determine the distance of the target area relative to the reference position in the gun view, the first offset angle in the horizontal direction and the second offset angle in the vertical direction;

[0065] The horizontal position determination submodule is used to determine the horizontal movement position of the PTZ camera based on the maximum horizontal field of view of the gun, the first offset angle, and the horizontal component of the distance;

[0066] The vertical position determination submodule is used to determine the vertical movement position of the PTZ camera based on the maximum vertical field of view of the gun, the second offset angle, and the vertical component of the distance.

[0067] The parameter determination submodule is used to determine the calibration motion control parameters of the PTZ camera using the horizontal and vertical movement positions.

[0068] Optionally, the horizontal position determination submodule is specifically used to determine the horizontal movement position of the PTZ camera according to the following formula:

[0069]

[0070] Where P is the horizontal movement position of the PTZ camera, x is the abscissa of the center position of the target area, x′ is the abscissa of the reference position, (xx′) is the horizontal component, and P d The maximum horizontal field of view is α, which is a preset horizontal parameter corresponding to the first offset angle, and A is the multiple of the sampling accuracy of the PTZ camera relative to the sampling accuracy of the bullet camera.

[0071] The vertical position determination submodule is specifically used to determine the vertical movement position of the PTZ camera according to the following formula:

[0072]

[0073] Where T is the vertical rotation position of the PTZ camera, y is the ordinate of the center position of the target area, y′ is the ordinate of the reference position, and (yy′) is the vertical component. d β is the maximum vertical field of view, and β is a preset vertical parameter corresponding to the second offset angle.

[0074] Optionally, the gun is an infrared thermal imaging gun.

[0075] The above-described solution provided by the embodiments of the present invention can automatically acquire calibration data between the bullet camera and the PTZ camera without manually controlling the PTZ camera to capture video images of the target object, thereby simplifying the process of acquiring calibration data.

[0076] Fourthly, embodiments of the present invention also provide a gun-ball calibration device, the device comprising:

[0077] The data acquisition module is used to acquire multiple pairs of calibration point data using the gun-ball calibration data acquisition device described in the third aspect;

[0078] The relationship determination module is used to determine the mapping relationship between each position in the camera's view and the motion control parameters of the PTZ camera using the multi-point calibration data.

[0079] Fifthly, embodiments of the present invention provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0080] Memory, used to store computer programs;

[0081] When a processor executes a program stored in a memory, it implements the steps of the gun-ball calibration data acquisition method described in the first aspect or the gun-ball calibration method described in the second aspect.

[0082] In a sixth aspect, embodiments of the present invention provide a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the gun-ball calibration data acquisition method described in the first aspect or the gun-ball calibration method described in the second aspect.

[0083] Beneficial effects of the embodiments of the present invention:

[0084] In the method for acquiring calibration data of the PTZ camera provided in this embodiment of the invention, the PTZ camera is first controlled to move to an initial position corresponding to a reference position in the camera's view. Then, using the reference position and the camera's field of view, a target position is determined that the PTZ camera can be controlled to move to the center of the PTZ camera's view, corresponding to the target area in the camera's view. The calibration motion control parameters are then used to control the PTZ camera to move to the target position, thereby acquiring the calibration image captured by the PTZ camera at the target position. Finally, using the target area, the calibration image, and the calibration motion control parameters, a pair of calibration point data is determined. Since the PTZ camera can be controlled to move to the target position corresponding to the center of the PTZ camera's view and the target area through the determined calibration motion control parameters, the PTZ camera can acquire a calibration image containing the same object as the target area at the target position. This achieves automatic acquisition of calibration images containing the same object as the target area, thereby automatically acquiring the calibration point data between the camera and the PTZ camera, simplifying the process of acquiring calibration point data.

[0085] Based on this, the present invention also provides a gun-ball calibration method, which can acquire multiple pairs of calibration point data through the gun-ball calibration data acquisition method provided by the present invention, and use the multiple pairs of calibration point data to calibrate the gun and ball cameras. Since the gun-ball calibration data acquisition method simplifies the process of acquiring calibration point data, it can simplify the entire gun-ball calibration process and further improve the efficiency of gun-ball calibration.

[0086] Of course, implementing any product or method of the present invention does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0087] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.

[0088] Figure 1 This is a schematic diagram of the gun-ball linkage system;

[0089] Figure 2 The flowchart is for manual gun-ball linkage calibration and tracking;

[0090] Figure 3 Flowchart for manual gun-ball linkage calibration;

[0091] Figure 4 This is a flowchart of a gun-ball calibration data acquisition method provided in an embodiment of the present invention;

[0092] Figure 5 A schematic diagram for capturing video footage for a ball-and-shoot linkage system;

[0093] Figure 6 A schematic diagram of the gun's view division provided for an embodiment of the invention;

[0094] Figure 7 This is a schematic diagram of a preset sequence provided in an embodiment of the present invention;

[0095] Figure 8 This is another flowchart of the gun-ball calibration data acquisition method provided in an embodiment of the present invention;

[0096] Figure 9 This is another flowchart of the gun-ball calibration data acquisition method provided in an embodiment of the present invention;

[0097] Figure 10 A flowchart of the gun-ball calibration method provided in an embodiment of the present invention;

[0098] Figure 11This is a schematic diagram of the structure of the gun-ball calibration data acquisition device provided in an embodiment of the present invention;

[0099] Figure 12 This is a schematic diagram of the gun-ball calibration structure provided in an embodiment of the present invention;

[0100] Figure 13 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention; Detailed Implementation

[0101] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0102] To more clearly illustrate the technical solution of this invention, the gun-ball linkage system is described below.

[0103] like Figure 1 The diagram shows a schematic of a PTZ (Pocket Camera and Telescope) linkage system. In the diagram, 'a' represents camera a, the angle between the tilted dashed line and the horizontal solid line is the field of view angle of camera a, and 'c' represents the PTZ camera c, which has been pre-calibrated with camera a. Blocks containing human figures represent objects being monitored. The arrow to the right of the object indicates its direction of movement. Below the object are Pc, Tc, and Zc, which are the PTZ coordinates of the object in the PTZ coordinate system. In the PTZ coordinates, P (Pan, translation) is the horizontal movement parameter of the PTZ camera, such as the horizontal rotation angle; T (Tilt, tilt) is the vertical movement parameter of the PTZ camera, such as the vertical rotation angle or elevation angle; and Z (Zoom, zoom) is the focal length of the PTZ camera.

[0104] When the aforementioned object triggers an alarm in the bullet camera's view, bullet camera A can generate the PTZ coordinates (Pc, Tc, Zc in the diagram) of the object in the PTZ coordinate system based on the object's position in the bullet camera's view using a bullet calibration algorithm. Then, bullet camera A sends the generated PTZ coordinates to PTZ camera C via communication protocols such as the SDK (Software Development Kit) protocol. After receiving the PTZ coordinates, PTZ camera C moves according to the received PTZ coordinates, and at this time, the PTZ camera C's view automatically tracks the location of the object. As the object moves, bullet camera A continuously sends the object's PTZ coordinates to PTZ camera C, so that PTZ camera C continuously captures the image of the object until the object disappears from the bullet camera A's field of view.

[0105] To build a camera-tube linkage system, it is necessary to pre-calibrate both the camera and the PTZ camera to establish a mapping relationship between the coordinates on the camera's screen and the corresponding PTZ coordinates on the PTZ camera. Calibration requires first acquiring calibration point pair data.

[0106] To clearly illustrate the difference between the technical solution provided by this invention and the solutions in related technologies, the following describes the process of acquiring data for calibration points in related technologies.

[0107] In related technologies, the process of manually acquiring calibration point pair data includes: manually selecting the target object in the camera's view, and then manually controlling the PTZ camera to move to the position of the target object. At this time, the position information of the target object in the camera's view and the motion control parameters when the PTZ camera moves to the position of the target object are used to generate a pair of calibration point pair data.

[0108] like Figure 2 The diagram shows a flowchart of manual PTZ (Pocket Camera and Telescope Camera) linkage calibration and tracking in related technologies. The client can receive images from both the main camera (sold by the main camera) and the telescope camera (sold by the telescope camera), such as from a smartphone or computer. When PTZ linkage calibration is required, the user first observes the main camera image and selects the target object for calibration. After selecting the target object, the user can observe the telescope camera's feedback image through the client and simultaneously send PTZ monitoring commands to the telescope camera to control its movement, while also observing the telescope camera's feedback image in real time. Once the telescope camera acquires the target object's image, it can output the corresponding PTZ coordinates (i.e.,...) Figure 2 The PTZ position in the camera is fed back to the client. Simultaneously, the client records the target object's coordinates (X, Y) in the camera's view (i.e., the PTZ position). Figure 2 The process involves taking the bolt action (P, T) and generating a pair of calibration point pairs in the format (X, Y, P, T, Z). This process is typically repeated multiple times to obtain multiple pairs of calibration point pairs. At this point, the process of acquiring calibration point pairs in the relevant scheme is complete.

[0109] After obtaining the calibration point pair data, the gun application layer can send the calibration point pair data to the DSP (Digital Signal Processing) layer of the gun for algorithm calculation and processing to generate a calibration model, thus completing the gun-ball calibration.

[0110] When the camera detects a target object, the camera application layer can convert the position of the target object in the camera's view into the PTZ coordinate value of the PTZ camera through the generated calibration model, and send a command carrying the PTZ coordinate value to the PTZ camera so that the PTZ camera can move according to the PTZ coordinate value, and start tracking the target object after acquiring the PTZ camera view of the target object.

[0111] The following section introduces the processing procedure for manual ball-and-gun calibration in related technologies.

[0112] like Figure 3 As shown, the manual PTZ camera calibration process includes: clicking the command button on the interface, i.e., after receiving the trigger operation to start the PTZ camera calibration, the client begins the PTZ camera calibration. At this time, the client's main calibration entry is activated, i.e., the calibration point data acquisition process begins. After entering the main calibration entry, the configuration interface of the master-slave tracking configuration interface is displayed. Staff can configure the interface parameters of the camera (master) and PTZ camera (slave) on this interface, so that in subsequent processes, they can use the configured interface parameters to receive the real-time feedback images from the camera and PTZ camera. After the master-slave tracking configuration interface is configured, the user needs to confirm the current calibration type, i.e., confirm whether to enter manual calibration. If confirmed, the subsequent process continues; otherwise, it ends.

[0113] Once manual calibration is confirmed, it can be performed manually. This requires manually selecting the target object in the camera's view and then manually controlling the PTZ camera to move to the target object's location. Using the target object's position information in the camera's view and the motion control parameters of the PTZ camera when moving to that location, a pair of calibration point data is generated. After acquiring this pair of calibration point data, it needs to undergo a validity conversion process, transforming the acquired calibration point data into a preset valid format. The converted data is then validated to ensure its format is correct. If the validation is successful, the validity of the converted calibration point data continues to be checked to ensure there are no unreasonable values, such as excessively large or small values. If the validity check is successful, a pair of valid calibration point data is generated.

[0114] After generating a pair of calibration point data that meets the requirements, it checks whether nine manual calibrations have been completed. If not, it returns to the manual calibration process and continues to acquire calibration point data. If completed, the generated nine pairs of calibration point data are sent to the algorithm library. After further parameter checks confirm their accuracy, the generated nine pairs of calibration point data are used for gun-ball linkage calibration. After calibration is complete, a calibration completion flag is returned, and the client simultaneously notifies the user that calibration is complete.

[0115] As described in the appeal, these technologies require manual selection of the target object and manual control of the PTZ camera to obtain calibration point pair data, making the data acquisition process cumbersome. Furthermore, these technologies necessitate manual control of the PTZ camera to a designated position, which is time-consuming and often affects calibration results due to the difficulty in finding the target object. They also present significant challenges in on-site implementation, poor maintainability, and high construction costs. If no usable reference object is available in the environment, multiple people are required, with one person operating the client and another acting as the reference object. Moreover, these technologies rely on a reference object as the target object, thus limiting their applicability to open-field scenarios.

[0116] To simplify the process of acquiring calibration point data, this invention provides a method for acquiring gun-ball calibration data.

[0117] It should be noted that the gun-ball calibration data acquisition method provided in this embodiment of the invention can be applied to the gun receiver, as well as other electronic devices with data processing capabilities, such as mobile phones, servers, and computers. Furthermore, the gun-ball calibration data acquisition method provided in this embodiment of the invention can be implemented through software, hardware, or a combination of both.

[0118] The gun-ball calibration data acquisition method provided in this embodiment of the invention includes the following steps:

[0119] Control the PTZ camera to move to the initial position corresponding to the center of the PTZ camera screen and the reference position in the bullet camera screen;

[0120] Using the reference position in the camera's view and the camera's field of view, the calibration motion control parameters of the PTZ camera are determined; these calibration motion control parameters can control the PTZ camera to move to a position where the center of the PTZ camera's view corresponds to the target area in the camera's view.

[0121] The PTZ camera is controlled to move to the target position using the calibrated motion control parameters, and the calibration image captured by the PTZ camera at the target position is obtained.

[0122] Using the target area, calibration screen, and calibration motion control parameters in the bolt camera's view, a pair of calibration point data between the bolt camera and the PTZ camera is determined.

[0123] The above-mentioned solution provided by the embodiments of the present invention can control the PTZ camera to move to the target position corresponding to the center of the PTZ camera screen and the target area by determining the calibration motion control parameters. This allows the PTZ camera to collect calibration images containing the same objects as the target area at the target position, thereby realizing the automatic acquisition of calibration images containing the same objects as the target area. In turn, it can automatically acquire calibration point pair data between the bullet camera and the PTZ camera, simplifying the process of acquiring calibration point pair data.

[0124] At the same time, since it does not rely on manual operation, it can simplify the deployment of the gun-ball linkage system, reduce on-site construction difficulty, and reduce construction costs.

[0125] Furthermore, since the PTZ camera can be controlled to move to the target position corresponding to the center of the PTZ camera screen and the target area by calibrating the motion control parameters, the calibration screen containing the same object as the target area can be automatically acquired. Therefore, it can be applied to complex environments such as irregular terrain, uneven height, and narrow field of view. It can be seen that the above-mentioned solution of the present invention has low requirements for the environment.

[0126] The following is a detailed description of a gun-ball calibration data acquisition method provided by an embodiment of the present invention, with reference to the accompanying drawings.

[0127] like Figure 4 As shown, the gun-ball calibration data acquisition method provided in this embodiment of the invention may include the following steps:

[0128] S401 controls the PTZ camera to move to the initial position corresponding to the center of the PTZ camera screen and the reference position in the bullet camera screen;

[0129] Among them, a PTZ camera is a spherical camera, such as a high-speed PTZ camera or an intelligent PTZ camera, which can rotate horizontally or vertically and change the field of view by rotating. The center of the PTZ camera image is the center of the image captured by the PTZ camera.

[0130] The aforementioned bullet camera view refers to the video footage captured by the bullet camera, where the bullet camera is a pistol-type camera, such as an infrared thermal imaging bullet camera, which has a cuboid shape. The reference position in the bullet camera view can be any pre-specified point in the bullet camera view; for example, the reference position can be the center of the bullet camera view. Alternatively, if the bullet camera view contains multiple pre-divided regions, the reference position can also be one of those regions. Optionally, "reference position is one of those regions" means that the reference position is any point within that region; for example, the reference position can be the center of that region.

[0131] It should be noted that once deployed, the field of view of a bullet camera is fixed. This means that after deployment, the field of view captured by the bullet camera remains constant. Due to its larger field of view, the bullet camera's view can be considered the entire video feed of the monitored scene. Unlike bullet cameras, PTZ cameras can change their field of view by rotating horizontally or vertically.

[0132] For example, such as Figure 5The diagram shows a schematic of the camera-tube linkage system capturing images. In the diagram, PTZ camera image A1 is the image captured by the PTZ camera when its field of view is 1, corresponding to area A2 in the bullet camera image. By rotating, the PTZ camera changes its field of view from field of view 1 to field of view 2, and the image captured by the PTZ camera at this time is PTZ camera image B1, which corresponds to area B2 in the bullet camera image.

[0133] In this step, control operations for the PTZ camera can be received, and based on the received control operations, instructions to control the PTZ camera's movement can be generated and then sent to the PTZ camera to control its movement. During the control of the PTZ camera's movement, the PTZ camera's screen can be displayed in real time for on-site personnel to observe the camera's position. If the PTZ camera stops moving, it means that on-site personnel have observed that the center of the PTZ camera's screen corresponds to the reference position in the bullet camera's screen, and they stop sending instructions to the PTZ camera. At this point, the position the PTZ camera has moved to is the initial position.

[0134] For example, if object A exists at the reference position in the camera's view, when the camera is controlled to move, and a stop operation is executed by the on-site personnel when they observe that the center of the camera's view has moved to object A, a command is sent to the camera to continue. At this time, the camera moves to the initial position where object A also exists at the center of the camera's view.

[0135] S402 uses the reference position in the camera's view and the camera's field of view to determine the PTZ camera's calibration motion control parameters; these parameters control the PTZ camera to move until the center of the PTZ camera's view corresponds to the target area in the camera's view.

[0136] The target area can be any location in the camera's view. To ensure that the first sub-region can be identified from the target area, the target area should not be too small. In other words, the area of ​​the target area should be greater than a certain area threshold.

[0137] In one implementation, to improve the accuracy of the PTZ calibration, it is necessary to acquire multiple pairs of calibration point data. Therefore, in order to acquire multiple pairs of calibration point data, the aforementioned PTZ camera screen can contain multiple different target areas. In this case, the calibration motion control parameters can control the PTZ camera to move to the center of the PTZ camera screen, which corresponds to one of the target areas in the PTZ camera screen.

[0138] For example, the camera's view includes four target areas: target area 1, target area 2, target area 3, and target area 4. In this case, the calibration motion control parameters can control the PTZ camera to move to a position where the center of the PTZ camera's view corresponds to any one of the target areas 1, 2, 3, or 4. For instance, the calibration motion control parameters can control the PTZ camera to move to a position where the center of the PTZ camera's view corresponds to target area 1.

[0139] Optionally, in one implementation, multiple target regions can be divided from the camera view according to a preset division rule, which can be determined based on experience and requirements. Alternatively, in one implementation, the camera view can be evenly divided into a preset number of target regions. For example, such as... Figure 6 The diagram shown illustrates the division of the camera view. Taking a preset quantity of 4 as an example, the camera view is evenly divided into 4 screen areas.

[0140] The aforementioned calibration motion control parameters allow the PTZ camera to move to a position where the center of the PTZ camera's view corresponds to the target area in the bullet camera's view. Here, the correspondence between the center of the PTZ camera's view and the target area in the bullet camera's view indicates that the PTZ camera's view and the target area at this point contain the same object. It should be noted that the object mentioned in this embodiment of the invention can be any type of object, including people, trees, flowers, buildings, clouds, etc., either in whole or in part.

[0141] Since the location of the target area in the camera's view is known, its orientation relative to the reference position can be determined. Therefore, by combining this with the camera's field of view, the angle of view between the reference position and the target area can be determined. Furthermore, since the center of the PTZ camera's view at the initial position corresponds to the reference position, the calibration motion control parameters that allow the PTZ camera to move to the point where its center corresponds to the target area in the camera's view can be estimated based on the determined angle of view.

[0142] The aforementioned calibration motion parameters must include at least the P and Z values ​​in the PTZ coordinates of the PTZ camera, i.e., the horizontal and vertical positions of the PTZ camera after movement. If the calibration motion parameters only include the P and Z values, the PTZ camera can use its default focal length to capture the camera image.

[0143] S403 uses calibration motion control parameters to control the PTZ camera to move to the target position and acquire the calibration image captured by the PTZ camera at the target position;

[0144] In this step, motion control parameters can be calibrated and sent to the PTZ camera so that the PTZ camera can move according to the received calibration parameters. The position of the PTZ camera after the movement ends is the target position.

[0145] After the PTZ camera moves to the target position, it can acquire the calibration image captured by the PTZ camera at the target position. Optionally, an image acquisition command can be sent to the PTZ camera after the PTZ camera finishes moving to obtain the calibration image fed back by the PTZ camera, or the PTZ camera can actively feed back the calibration image captured at the target position after moving to the target position. Both of these are possible.

[0146] The S404 uses the target area, calibration screen, and calibration motion control parameters in the bolt image to determine a pair of calibration point data between the bolt and the PTZ camera.

[0147] In this step, since the calibration motion control parameters can control the PTZ camera to move to the center of the PTZ camera screen and correspond to the target area in the bullet camera screen, there is an object in the calibration screen obtained by using the calibration motion control parameters that is the same as the target area. At this time, we can first determine the object in the target area that is the same as the object in the calibration screen, and then use the position of the object in the target area and the calibration motion control parameters to determine a pair of calibration point data between the bullet camera and the PTZ camera.

[0148] The above-mentioned solution provided by the embodiments of the present invention can control the PTZ camera to move to the target position corresponding to the center of the PTZ camera screen and the target area by determining the calibration motion control parameters. This allows the PTZ camera to collect calibration images containing the same objects as the target area at the target position, thereby realizing the automatic acquisition of calibration images containing the same objects as the target area. In turn, it can automatically acquire calibration point pair data between the bullet camera and the PTZ camera, simplifying the process of acquiring calibration point pair data.

[0149] In one embodiment of the present invention, when the camera view contains multiple different target areas, the reference position in the camera view can be the center of the camera view, or it can be one of the target areas in the camera view. It is understood that when the camera view is partially divided into target areas, the reference position in the camera view can be either the center of the camera view or one of the target areas in the camera view; both are acceptable.

[0150] For example, the camera view includes four target areas, namely target area 1, target area 2, target area 3 and target area 4. Target area 4 is located at the center of the camera view. At this time, the reference position is the center of the camera view and the target area 4 at the same time. That is, the reference position is both the center of the camera view and the target area 4.

[0151] When the reference position in the camera's view is one of the target areas in the camera's view, it means that the center of the camera's view at the initial position corresponds to one of the target areas. To reduce the number of times the camera moves, it is not necessary to control the camera to move again to the position where the center of the camera's view corresponds to the target area.

[0152] At this point, the aforementioned calibration motion control parameters can control the PTZ camera to move to a target area in the camera's view that corresponds to the center of the PTZ camera's view, excluding the reference position.

[0153] Using the example above, if the reference position is both the center of the camera's view and the target area 4, then the calibration motion control parameters can be used to control the camera to move so that the center of the camera's view corresponds to any one of the target areas 1, 2, and 3, without needing to control the camera to move so that the center of the camera's view corresponds to the target area 4.

[0154] In another embodiment, when the reference position in the camera's view is one of the target areas in the camera's view, the motion control parameters of the PTZ camera at its initial position and the reference position can be used to generate a pair of calibration point data between the camera and the PTZ camera. In this case, another camera-PTZ calibration data acquisition method provided in this embodiment of the invention may further include:

[0155] Using the reference position in the camera's view and the motion control parameters of the PTZ camera moving to its initial position, a pair of calibration point data between the camera and the PTZ camera is determined.

[0156] In this step, the reference position in the camera lens and the motion control parameters of the PTZ camera moving to the initial position can be determined as a pair of calibration point data between the camera lens and the PTZ camera.

[0157] For example, if the reference position in the camera lens is (Xo, Yo), and the motion control parameters for the PTZ camera to move to the initial position are (Po, To, Zo), then the generated pair of calibration point data is (Xo, Yo, Po, To, Zo).

[0158] In the above-described solution of this invention, when the reference position in the gun view is one of the target areas in the gun view, the reference position in the gun view and the motion control parameters of the PTZ camera moving to the initial position can be used directly to determine a pair of calibration point data between the gun and the PTZ camera. This eliminates the need to generate the calibration point data corresponding to the target area based on the calibration motion control parameters of the target area, thereby improving the efficiency of acquiring calibration point data.

[0159] In one embodiment of the present invention, when the camera view contains multiple target areas, the present invention also provides another method for obtaining camera calibration parameters. The method for determining the calibration motion control parameters of the PTZ camera using the reference position in the camera view and the camera's field of view can include:

[0160] The calibration motion control parameters of the PTZ camera are determined according to the preset order of the target area in the camera view and using the reference position in the camera view and the camera's field of view.

[0161] The preset order of target areas in the camera's view can be determined based on experience and requirements. For example, such as... Figure 7 The diagram shown illustrates the preset sequence provided in this embodiment of the invention. The preset sequence is target area 1 - target area 2 - target area 3 - target area 4. Specifically, first, the calibration motion control parameters for controlling the PTZ camera to move to the center of the PTZ camera screen corresponding to target area 1 are determined; then, the calibration motion control parameters for controlling the PTZ camera to move to the center of the PTZ camera screen corresponding to target area 2 are determined; then, the calibration motion control parameters for controlling the PTZ camera to move to the center of the PTZ camera screen corresponding to target area 3 are determined; and finally, the calibration motion control parameters for controlling the PTZ camera to move to the center of the PTZ camera screen corresponding to target area 4 are determined.

[0162] Based on the preset order of target areas in the bolt image, the target areas that need to be calibrated with corresponding motion control parameters can be determined. Then, based on the reference position in the bolt image and the bolt's field of view, the PTZ camera's calibration motion control parameters for that target area can be determined.

[0163] The calibration motion control parameters determined above can control the PTZ camera to move to the center of the PTZ camera screen, corresponding to the target area determined according to the preset order. For example, when the calibration motion control parameters corresponding to target area 2 are determined according to the preset order, the calibration motion control parameters can control the PTZ camera to move to the center of the PTZ camera screen, corresponding to target area 2.

[0164] Based on this, the aforementioned calibration image is the image captured by the PTZ camera when the center of the PTZ camera's image corresponds to the target area determined according to the preset order. For example, the calibration image is the image captured by the PTZ camera when the center of the PTZ camera's image corresponds to the target area.

[0165] By using a preset sequence, calibration images corresponding to each target area can be acquired sequentially, thereby determining a pair of calibration point data corresponding to each target area. It should be noted that in this embodiment of the invention, the process of determining the calibration motion control parameters and the process of acquiring the calibration point data can be synchronous. That is, each time the calibration motion control parameters for a target area are determined based on a preset sequence, the process of acquiring the calibration point data corresponding to that target area is executed. Alternatively, the process of determining the calibration motion control parameters and the process of acquiring the calibration point data can also be asynchronous. For example, the calibration motion control parameters corresponding to each target area can be predetermined based on a preset sequence, and then the calibration point data corresponding to each target area can be determined sequentially. Both of these methods are acceptable.

[0166] In the above-described scheme of this invention, the calibration images corresponding to the target area can be collected sequentially by a preset order, thereby determining a pair of calibration point data corresponding to each target area. It can be seen that the preset order realizes the automatic and orderly acquisition of multiple pairs of calibration point data, further simplifying the process of acquiring calibration point data. At the same time, by acquiring multiple pairs of calibration point data, the accuracy of subsequent gun-ball calibration using calibration point data can be improved.

[0167] exist Figure 4 Based on the embodiments, such as Figure 8 As shown, another method for acquiring calibration data between the gun and the PTZ camera, provided in this embodiment of the invention, which utilizes the target area in the gun view, the calibration view, and the calibration motion control parameters to determine a pair of calibration point data between the gun and the PTZ camera, may include:

[0168] S801 identifies a first sub-region of the target area in the bolt carrier view and a second sub-region in the calibration view; wherein the content of the first sub-region and the second sub-region match.

[0169] As mentioned above, if the target area and the calibration screen contain the same object, then the matching of the content in the first and second sub-regions means that the object described in the content of the first sub-region is the same as the object described in the content of the second sub-region. Therefore, the area in the gun view that describes the same object can be designated as the first sub-region, and the area in the calibration screen that describes the same object can be designated as the second sub-region.

[0170] Optionally, after acquiring the calibration screen, the content of the target area and the calibration screen can be compared to determine that the target area and the calibration screen describe the same object. Then, the sub-region of the object in the target area is taken as the first sub-region, and the area of ​​the object in the calibration screen is taken as the second sub-region.

[0171] For example, if the target area contains characters A, B, and C, while the calibration screen contains characters C and D, then the sub-region of character B within the target area will be designated as the first sub-region, and the area of ​​character B within the calibration screen will be designated as the second sub-region.

[0172] In one implementation, identifying a first sub-region of the target area in the bolt image and a second sub-region in the calibration image may include:

[0173] Step 1: Use a feature point recognition algorithm to identify feature points within the target area of ​​the gun's view and feature points within the calibration view;

[0174] The aforementioned feature point recognition algorithm can be any algorithm capable of feature point recognition, such as the SIFT (Scale-invariant feature transform) algorithm. Using this algorithm, feature points within the target area of ​​the gun's view, as well as feature points within the calibration view, can be identified. Feature points refer to points where the image grayscale value changes drastically or points with significant curvature at the image edges (i.e., the intersection of two edges).

[0175] Optionally, before performing feature point recognition on the calibration image, distortion removal, parameter processing, and image validity assessment can be performed on the calibration image. Distortion removal eliminates distortion in the calibration image; parameter processing acquires image parameters such as image size, channel information, and the size of the receiver image; after acquiring the image parameters, the calibration image can be validated to determine its validity. If valid, a feature point recognition algorithm is used to identify feature points within the calibration image.

[0176] Step 2: Compare the feature points of the target area in the bolt image with the feature points in the calibration image to determine multiple first feature points in the target area in the bolt image and multiple second feature points in the calibration image; wherein, multiple first feature points and multiple second feature points represent the same object;

[0177] Among them, by comparing the feature points of the target area in the bolt image with the feature points in the calibration image, the feature points corresponding to the same object in the target area and the feature points in the calibration image can be determined, that is, multiple first feature points in the target area in the bolt image and multiple second feature points in the calibration image can be determined.

[0178] Step 3: Determine the smallest region containing multiple first feature points from the target area of ​​the gun view as the first sub-region, and determine the smallest region containing multiple second feature points in the calibration view as the second sub-region.

[0179] Since multiple first feature points and multiple second feature points represent the same object, the smallest area in the bullet camera image containing multiple first feature points matches the smallest area in the PTZ camera image containing multiple second feature points. That is, after determining multiple first feature points, the smallest area in the target area containing multiple first feature points can be used as the first sub-region. Similarly, after determining multiple second feature points, the smallest area in the calibration image containing multiple second feature points can be used as the second sub-region.

[0180] S802 uses the position information of the first sub-region in the camera's view and the motion control parameters of the center of the PTZ camera's view corresponding to the first sub-region to determine a pair of calibration point data between the camera and the PTZ camera.

[0181] The aforementioned location information can be the pixel coordinates of a specified pixel point in the first sub-region, such as the pixel coordinates of the center point of the first sub-region in the camera view.

[0182] In one implementation, step S802 may include:

[0183] Step a: In the camera view, determine the pixel coordinates of the pixel at the center point of the first sub-region, as the position information of the first sub-region in the camera view;

[0184] For example, if the pixel at the center of the first sub-region is pixel A, and the coordinates of pixel A in the camera view are (Xa, Ya), then the position information of the first sub-region in the camera view is (Xa, Ya).

[0185] Step b: Send the position information of the second sub-region in the calibration screen to the PTZ camera, and obtain the motion control parameters corresponding to the center of the PTZ camera screen and the first sub-region;

[0186] The motion control parameters corresponding to the center of the controllable PTZ camera screen and the first sub-region may be the same as or different from the calibration motion control parameters corresponding to the center of the controllable PTZ camera screen and the target region.

[0187] When the second sub-region is the center of the PTZ camera screen, the above motion control parameters are the same as the above-calibrated motion control parameters; when the second sub-region is not the center of the PTZ camera screen, the above motion control parameters are different from the above-calibrated motion control parameters.

[0188] When the motion control parameters are different from the above-mentioned calibration motion control parameters, the position information of the second sub-region in the calibration screen can be sent to the PTZ camera. Then, the PTZ camera determines the motion control parameters when acquiring the PTZ camera screen centered on the second sub-region according to its own conversion rules. That is, it determines the motion control parameters corresponding to the center of the PTZ camera screen and the first sub-region, and sends the determined motion parameters to the electronic device executing the embodiment of the present invention.

[0189] Step c: Using the determined position information and the acquired motion control parameters, determine a pair of calibration point data between the gun and the PTZ camera.

[0190] By determining the motion control parameters corresponding to the center of the PTZ camera's screen and the first sub-region, the determined position information and the acquired motion control parameters can be used to determine a pair of calibration point data between the camera and the PTZ camera.

[0191] Optionally, the determined position information and the acquired motion control parameters can be used to define a pair of calibration point data between the camera and the PTZ camera. For example, if the determined position information is (Xa, Ya) and the acquired motion control parameters are (Pa, Ta, Za), then the determined pair of calibration point data is (Xa, Ya, Pa, Ta, Za).

[0192] The above-described solution provided by this invention can automatically acquire calibration point pair data between the bullet camera and the PTZ camera, simplifying the process of acquiring calibration point pair data. Furthermore, by identifying a first sub-region and a second sub-region whose screen content matches, and then utilizing the position information of the first sub-region in the bullet camera's screen, as well as the motion control parameters corresponding to the center of the PTZ camera's screen and the first sub-region, an automatic method for determining motion control parameters is provided, laying the foundation for simplifying the process of acquiring calibration point pair data.

[0193] In another embodiment of the present invention, the bolt's field of view includes: the bolt's maximum horizontal field of view and the bolt's maximum vertical field of view; at this time, in Figure 4 Based on the embodiments, such as Figure 9 As shown, another method for acquiring PTZ camera calibration data provided in this embodiment of the invention, which uses the reference position in the camera's view and the camera's field of view to determine the PTZ camera's calibration motion control parameters, may include:

[0194] S901, determine the distance of the target area relative to the reference position in the bolt image, the first offset angle in the horizontal direction and the second offset angle in the vertical direction;

[0195] The distance between the target area and the reference position in the gun's view can be the distance between the center point of the target area and the reference position. Optionally, the distance can be the straight-line distance between the center point of the target area and the reference position. Alternatively, the distance can also include a horizontal component and a vertical component, where the horizontal component is the absolute value of the difference between the abscissa of the center point of the target area and the reference position, and the vertical component is the absolute value of the ordinate of the center point of the target area and the reference position.

[0196] The first offset angle in the horizontal direction is the angle between the target vector and the horizontal unit vector, and the second offset angle in the vertical direction is the angle between the target vector and the vertical unit vector. The target vector is a vector that starts from the reference position and ends at the center point of the target area.

[0197] S902 determines the horizontal movement position of the PTZ camera based on the maximum horizontal field of view of the bolt, the first offset angle, and the horizontal component of the distance;

[0198] The horizontal movement position of the PTZ camera is determined according to the following formula:

[0199]

[0200] Where P is the horizontal movement position of the PTZ camera, x is the x-coordinate of the center position of the target area, x′ is the x-coordinate of the reference position, (xx′) is the horizontal component, and P d α is the maximum horizontal field of view, α is the preset horizontal parameter corresponding to the first offset angle, and A is the multiple of the PTZ camera's sampling accuracy relative to the bullet camera's sampling accuracy.

[0201] Where % represents the remainder budget. For the horizontal direction, the angle can be pre-divided into multiple angle intervals, each corresponding to an angle parameter. For example, three angle intervals can be divided: interval 1: [0°, 60°), corresponding to α = -1; interval 2: [60°, 120°), corresponding to α = 0; and interval 3: [120°, 180°], corresponding to α = 1. Generally, the bolt advance is 0.0001, and the PTZ camera accuracy is 0.01, in which case A is 100.

[0202] S903 determines the vertical movement position of the PTZ camera based on the maximum vertical field of view of the bolt, the second offset angle, and the vertical component of the distance.

[0203] Determine the vertical movement position of the PTZ camera using the following formula:

[0204]

[0205] Where T is the vertical rotation position of the PTZ camera, y is the ordinate of the center position of the target area, y′ is the ordinate of the reference position, (yy′) is the vertical component, and T d β is the maximum vertical field of view, and β is the preset vertical parameter corresponding to the second offset angle.

[0206] Similar to the horizontal direction, the vertical direction can also be pre-divided into multiple angle intervals, each corresponding to an angle parameter. For example, three angle intervals can be divided: interval 1: [0°, 60°), corresponding to β = -1; interval 2: [60°, 120°), corresponding to β = 0; and interval 3: [120°, 180°], corresponding to β = 1.

[0207] S904 uses the horizontal and vertical movement positions to determine the calibration motion control parameters of the PTZ camera.

[0208] In this step, the horizontal and vertical movement positions can be determined as calibration motion control parameters. For example, if the horizontal movement position is Px and the vertical movement position is Tx, then the determined calibration motion control parameters can be (Px, Tx).

[0209] The above-described solution provided by this invention can automatically acquire calibration point pair data between the bullet camera and the PTZ camera, simplifying the process of acquiring calibration point pair data. Furthermore, by utilizing the distance of the target area relative to the reference position in the bullet camera's view, the first offset angle in the horizontal direction, and the second offset angle in the vertical direction, the calibration motion control parameters of the PTZ camera can be determined. This allows for the accurate determination of the calibration motion control parameters corresponding to the center of the controllable PTZ camera's view and the target area, thus providing a foundation for simplifying the process of acquiring calibration point pair data.

[0210] Based on the gun-ball calibration data acquisition method provided in the embodiments of the present invention, the embodiments of the present invention also provide a gun-ball calibration method.

[0211] like Figure 10 As shown, the gun-ball calibration method provided in this embodiment of the invention includes the following steps:

[0212] S1001, Use the above-mentioned gun-ball calibration data acquisition method to obtain multiple pairs of calibration point data;

[0213] In this step, the gun-ball calibration data acquisition method provided in the embodiments of the present invention can be used to obtain multiple pairs of calibration point data. For the specific implementation process, please refer to the relevant description in the above embodiments, which will not be repeated here.

[0214] The aforementioned multi-calibration point pair data can be at least 4 calibration point pairs, for example, it can be 4 calibration point pairs, 9 calibration point pairs, or 16 calibration point pairs, all of which are acceptable.

[0215] S1002 uses multi-calibration point pair data to determine the mapping relationship between each position in the bolt image and the motion control parameters of the PTZ camera.

[0216] After acquiring data from multiple calibration points, this data can be used to determine the mapping relationship between each position in the camera's view and the motion control parameters of the PTZ camera. Optionally, this data can be sent to the camera's DSP layer, where the DSP layer performs algorithmic processing to generate the mapping relationship between each position in the camera's view and the motion control parameters of the PTZ camera.

[0217] The above-described solution provided by the embodiments of the present invention can acquire multiple pairs of calibration point data through the gun-ball calibration data acquisition method provided by the present invention, and use the multiple pairs of calibration point data to calibrate the gun and ball cameras. Since the gun-ball calibration data acquisition method simplifies the process of acquiring calibration point data, it can simplify the entire gun-ball calibration process and further improve the efficiency of gun-ball calibration.

[0218] Corresponding to the gun-ball calibration data acquisition method provided in the above embodiments, such as Figure 11 As shown, this embodiment of the invention also provides a gun-ball calibration data acquisition device, which includes:

[0219] The PTZ camera motion control module 1101 is used to control the PTZ camera to move to an initial position corresponding to the center of the PTZ camera screen and the reference position in the bullet camera screen;

[0220] The parameter determination module 1102 is used to determine the calibration motion control parameters of the PTZ camera by using the reference position in the camera's view and the camera's field of view. The calibration motion control parameters can control the PTZ camera to move to the center of the PTZ camera's view and correspond to the target area in the camera's view.

[0221] The image acquisition module 1103 is used to control the PTZ camera to move to the target position using calibration motion control parameters, and to acquire the calibration image captured by the PTZ camera at the target position;

[0222] The data determination module 1104 is used to determine a pair of calibration point data between the bolt and the PTZ camera by using the target area, calibration screen and calibration motion control parameters in the bolt view.

[0223] Optionally, the camera view includes multiple different target areas; calibrating the motion control parameters can control the PTZ camera to move to a position where the center of the PTZ camera view corresponds to one of the target areas in the camera view.

[0224] Optionally, the reference position in the bolt image is the center of the bolt image; or, the reference position in the bolt image is one of the target areas in the bolt image.

[0225] Optionally, the data determination module is also used to determine a pair of calibration point pairs between the bolt and the PTZ camera when the reference position in the bolt view is one of the target areas in the bolt view.

[0226] Optionally, if the reference position in the camera view is one of the target areas in the camera view, the calibrated motion control parameters can control the PTZ camera to move to the center of the PTZ camera view, which corresponds to a target area in the camera view other than the reference position.

[0227] Optionally, the parameter determination module is specifically used to determine the calibration motion control parameters of the PTZ camera according to the preset order of the target area in the camera view and using the reference position in the camera view and the camera view angle of the camera.

[0228] The calibration motion control parameters are used to control the PTZ camera to move to a position where the center of the PTZ camera screen corresponds to a target area determined according to a preset sequence; the calibration image is the image captured by the PTZ camera when the center of the PTZ camera screen corresponds to the target area determined according to a preset sequence.

[0229] Optionally, the data determination module includes:

[0230] The region recognition submodule is used to identify the first sub-region of the target area in the gun view and the second sub-region in the calibration view; wherein the content of the first sub-region and the second sub-region match.

[0231] The data determination submodule is used to determine a pair of calibration point data between the bullet camera and the PTZ camera by using the position information of the first sub-region in the bullet camera's view and the motion control parameters that can control the PTZ camera to move to the center of the view as the second sub-region.

[0232] Optionally, the region recognition submodule is specifically used to identify feature points within the target region of the gun bolt image and feature points within the calibration image using a feature point recognition algorithm; compare the feature points of the target region in the gun bolt image and the feature points within the calibration image to determine multiple first feature points within the target region of the gun bolt image and multiple second feature points within the calibration image; wherein the multiple first feature points and multiple second feature points represent the same object; determine the smallest region containing multiple first feature points from the target region of the gun bolt image as the first sub-region, and determine the smallest region containing multiple second feature points within the calibration image as the second sub-region.

[0233] Optionally, the data determination submodule is specifically used to determine the pixel coordinates of the pixel at the center point of the first sub-region in the camera view, as the position information of the first sub-region in the camera view; send the position information of the second sub-region in the calibration view to the PTZ camera, and obtain the motion control parameters corresponding to the center of the PTZ camera view and the first sub-region; and use the determined position information and the obtained motion control parameters to determine a pair of calibration point data between the camera and the PTZ camera.

[0234] Optionally, the bolt's field of view includes: the bolt's maximum horizontal field of view and the bolt's maximum vertical field of view;

[0235] The parameter determination module includes:

[0236] Access the determination submodule to determine the distance of the target area relative to the reference position in the gun view, the first offset angle in the horizontal direction, and the second offset angle in the vertical direction;

[0237] The horizontal position determination submodule is used to determine the horizontal movement position of the PTZ camera based on the maximum horizontal field of view of the bolt, the first offset angle, and the horizontal component of the distance.

[0238] The vertical position determination submodule is used to determine the vertical movement position of the PTZ camera based on the vertical maximum field of view of the PTZ camera, the second offset angle, and the vertical component of the distance.

[0239] The parameter determination submodule is used to determine the calibration motion control parameters of the PTZ camera using the horizontal and vertical movement positions.

[0240] Optionally, the horizontal position determination submodule is used to determine the horizontal movement position of the PTZ camera according to the following formula:

[0241]

[0242] Where P is the horizontal movement position of the PTZ camera, x is the x-coordinate of the center position of the target area, x′ is the x-coordinate of the reference position, (xx′) is the horizontal component, and P d α is the maximum horizontal field of view, α is the preset horizontal parameter corresponding to the first offset angle, and A is the multiple of the PTZ camera's sampling accuracy relative to the bullet camera's sampling accuracy.

[0243] The vertical position determination submodule is specifically used to determine the vertical movement position of the PTZ camera according to the following formula:

[0244]

[0245] Where T is the vertical rotation position of the PTZ camera, y is the ordinate of the center position of the target area, y′ is the ordinate of the reference position, (yy′) is the vertical component, and Td β is the maximum vertical field of view, and β is the preset vertical parameter corresponding to the second offset angle.

[0246] Optionally, the receiver is an infrared thermal imaging receiver.

[0247] The above-mentioned solution provided by the embodiments of the present invention can control the PTZ camera to move to the target position corresponding to the center of the PTZ camera screen and the target area by determining the calibration motion control parameters. This allows the PTZ camera to collect calibration images containing the same objects as the target area at the target position, thereby realizing the automatic acquisition of calibration images containing the same objects as the target area. In turn, it can automatically acquire calibration point pair data between the bullet camera and the PTZ camera, simplifying the process of acquiring calibration point pair data.

[0248] Corresponding to the gun-ball calibration method provided in the embodiments of the present invention, such as Figure 12 As shown, this embodiment of the invention also provides a gun-ball calibration device, which includes:

[0249] Data acquisition module 1201 is used to acquire multiple pairs of calibration point data using any of the above-mentioned gun-ball calibration data acquisition devices;

[0250] The relationship determination module 1202 is used to determine the mapping relationship between each position in the bolt camera's view and the motion control parameters of the PTZ camera using data from multiple calibration points.

[0251] The above-described solution provided by the embodiments of the present invention can acquire multiple pairs of calibration point data through the gun-ball calibration data acquisition device provided by the present invention, and use the multiple pairs of calibration point data to calibrate the gun and ball cameras. Since the gun-ball calibration data acquisition method simplifies the process of acquiring calibration point data, it can simplify the entire gun-ball calibration process and further improve the efficiency of gun-ball calibration.

[0252] This invention also provides an electronic device, such as... Figure 13 As shown, it includes a processor 1301, a communication interface 1302, a memory 1303, and a communication bus 1304. The processor 1301, the communication interface 1302, and the memory 1303 communicate with each other through the communication bus 1304.

[0253] Memory 1303 is used to store computer programs;

[0254] The processor 1301, when executing the program stored in the memory 1303, implements any of the above-mentioned gun-ball calibration data acquisition method or gun-ball calibration method steps.

[0255] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0256] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0257] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0258] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0259] In another embodiment of the present invention, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described gun-ball calibration data acquisition methods or gun-ball calibration methods.

[0260] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the gun-ball calibration data acquisition methods or gun-ball calibration methods described in the above embodiments.

[0261] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0262] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0263] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device, equipment, and system embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0264] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A method for acquiring ball-and-gun calibration data, characterized in that, The method includes: Control the PTZ camera to move to the initial position corresponding to the center of the PTZ camera screen and the reference position in the bullet camera screen; Using the reference position in the camera's view and the camera's field of view, the calibration motion control parameters of the PTZ camera are determined; wherein, the calibration motion control parameters can control the PTZ camera to move to a position where the center of the PTZ camera's view corresponds to the target area in the camera's view. The PTZ camera is controlled to move to the target position using the calibration motion control parameters, and the calibration image captured by the PTZ camera at the target position is obtained. Identify a first sub-region of the target area in the camera lens image and a second sub-region of the calibration image; wherein the image content of the first sub-region and the second sub-region matches; using the position information of the first sub-region in the camera lens image and the motion control parameters that control the center of the PTZ camera image corresponding to the first sub-region, determine a pair of calibration point data between the camera lens and the PTZ camera.

2. The method according to claim 1, characterized in that, The camera view contains multiple different target areas; the calibration motion control parameters can control the PTZ camera to move to the center of the PTZ camera view, which corresponds to one of the target areas in the camera view.

3. The method according to claim 2, characterized in that, The reference position in the gun view is the center of the gun view; or, the reference position in the gun view is one of the target areas in the gun view.

4. The method according to claim 3, characterized in that, When the reference position in the bolt image is one of the target areas in the bolt image, the method further includes: Using the reference position in the camera lens and the motion control parameters of the PTZ camera moving to the initial position, a pair of calibration point data between the camera lens and the PTZ camera is determined.

5. The method according to claim 3, characterized in that, When the reference position in the camera view is one of the target areas in the camera view, the calibration motion control parameters can control the PTZ camera to move to the center of the PTZ camera view, which corresponds to a target area in the camera view other than the reference position.

6. The method according to claim 2, characterized in that, The step of determining the calibration motion control parameters of the PTZ camera using the reference position in the camera's view and the camera's field of view includes: The calibration motion control parameters of the PTZ camera are determined according to the preset order of the target areas in the camera's view and using the reference position in the camera's view and the camera's field of view. The calibration motion control parameters can control the PTZ camera to move to the center of the PTZ camera screen and correspond to the target area determined according to the preset order; the calibration screen is the screen captured by the PTZ camera when the center of the PTZ camera screen corresponds to the target area determined according to the preset order.

7. The method according to claim 1, characterized in that, The calibration point pair data includes: the position information of the first sub-region in the target area, and motion control parameters corresponding to the position of the center of the PTZ camera screen and the first sub-region; the first sub-region is the area in the target area that matches the screen content in the calibration screen.

8. The method according to claim 1, characterized in that, The identification of the first sub-region of the target area in the gun's view and the second sub-region in the calibration view includes: Using a feature point recognition algorithm, feature points within the target area of ​​the gun's view and feature points within the calibration view are identified. Feature points in the target area of ​​the gun bolt image and feature points in the calibration image are compared to determine multiple first feature points in the target area of ​​the gun bolt image and multiple second feature points in the calibration image; wherein, the multiple first feature points and the multiple second feature points represent the same object; The smallest region containing the plurality of first feature points is determined from the target area of ​​the gun image as the first sub-region, and the smallest region containing the plurality of second feature points in the calibration image is determined as the second sub-region.

9. The method according to claim 1 or 8, characterized in that, The step of determining a pair of calibration point pairs between the bullet camera and the PTZ camera by utilizing the position information of the first sub-region in the bullet camera's view and the motion control parameters corresponding to the center of the PTZ camera's view and the first sub-region includes: In the gun view, the pixel coordinates of the pixel at the center point of the first sub-region are determined as the position information of the first sub-region in the gun view; The position information of the second sub-region in the calibration screen is sent to the PTZ camera, and motion control parameters corresponding to the center of the PTZ camera screen and the first sub-region are obtained; Using the determined position information and the acquired motion control parameters, a pair of calibration point data between the gun camera and the PTZ camera is determined.

10. The method according to claim 1, characterized in that, The bolt's field of view includes: the bolt's maximum horizontal field of view or the bolt's maximum vertical field of view; The step of determining the calibration motion control parameters of the PTZ camera using the reference position in the camera's view and the camera's field of view includes: Determine the distance of the target area relative to a reference position in the camera's view; When the field of view of the bolt includes the maximum horizontal field of view, a first offset angle in the horizontal direction of the target area relative to a reference position in the bolt image is determined, and the horizontal movement position of the PTZ camera is determined based on the maximum horizontal field of view of the bolt, the first offset angle, and the horizontal component of the distance; or... When the field of view of the gun includes the maximum vertical field of view, a second offset angle in the vertical direction of the target area relative to the reference position in the gun image is determined, and the vertical movement position of the PTZ camera is determined based on the maximum vertical field of view of the gun, the second offset angle and the vertical component of the distance. The calibration motion control parameters of the PTZ camera are determined using the horizontal or vertical movement position.

11. The method according to claim 10, characterized in that, Determining the horizontal movement position of the PTZ camera based on the maximum horizontal field of view of the camera, the first offset angle, and the horizontal component of the distance includes: The horizontal movement position of the PTZ camera is determined according to the following formula: ; in, The horizontal movement position of the PTZ camera. The x-coordinate of the center position of the target area. The x-coordinate of the reference position is... For the horizontal component, The maximum horizontal field of view. To preset the horizontal parameters corresponding to the first offset angle, The sampling accuracy of the PTZ camera is a multiple of the sampling accuracy of the bullet camera; Determining the vertical movement position of the PTZ camera based on the maximum vertical field of view of the camera, the second offset angle, and the vertical component of the distance includes: The vertical movement position of the PTZ camera is determined according to the following formula: ; in, This refers to the vertical rotation position of the PTZ camera. The ordinate of the center position of the target area is given by the following formula: The ordinate of the reference position is... The vertical component, The vertical maximum field of view is... The preset vertical parameters correspond to the second offset angle.

12. The method according to claim 1, characterized in that, The bolt carrier is an infrared thermal imaging bolt carrier.

13. A method for calibrating a ball-and-gun, characterized in that, The method includes: Multiple pairs of calibration point data are obtained using the gun-ball calibration data acquisition method according to any one of claims 1-12; Using the multi-point calibration data, the mapping relationship between each position in the camera's view and the motion control parameters of the PTZ camera is determined.

14. A gun-ball calibration data acquisition device, characterized in that, The device includes: The PTZ camera motion control module is used to control the PTZ camera to move to the initial position corresponding to the center of the PTZ camera screen and the reference position in the bullet camera screen; The parameter determination module is used to determine the calibration motion control parameters of the PTZ camera using the reference position in the camera's view and the camera's field of view; wherein, the calibration motion control parameters can control the PTZ camera to move to a position where the center of the PTZ camera's view corresponds to the target area in the camera's view. The image acquisition module is used to control the PTZ camera to move to the target position using the calibration motion control parameters, and to acquire the calibration image captured by the PTZ camera at the target position; The data determination module is used to determine a pair of calibration point data between the gun and the PTZ camera using the target area in the gun view, the calibration view, and the calibration motion control parameters; The data determination module includes: The region recognition submodule is used to identify the first sub-region of the target area in the gun view and the second sub-region in the calibration view; wherein the content of the first sub-region and the second sub-region match. The data determination submodule is used to determine a pair of calibration point data between the camera and the PTZ camera by using the position information of the first sub-region in the camera's view and the motion control parameters corresponding to the center of the PTZ camera's view and the first sub-region.

15. A gun-ball calibration device, characterized in that, The device includes: The data acquisition module is used to acquire multiple pairs of calibration point data using the gun-ball calibration point data acquisition device as described in claim 14; The relationship determination module is used to determine the mapping relationship between each position in the camera's view and the motion control parameters of the PTZ camera using the multi-point calibration data.

16. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method according to any one of claims 1-12 or 13.

Citation Information

Patent Citations

  • Gun-ball linkage calibration method, device and equipment

    CN112419424A

  • Gun and ball linkage calibration method and device, electronic equipment and a storage medium

    CN113038031A