Gun-ball linkage positioning method, device, equipment, medium and product
By judging the trend of the monitored target and allocating priority queues based on the historical coordinate data of the camera-ball linkage device, the problem of time-consuming target selection is solved, and fast and efficient target positioning is achieved.
Patent Information
- Application Number
- CN202511536738.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-01-23
AI Technical Summary
When selecting a target, the camera-ball linkage device needs to traverse the candidate queue, which makes the target selection operation time-consuming and affects the positioning efficiency.
Based on the historical coordinate data of the monitored target, determine whether it has a tendency to leave the monitoring screen, and add it to candidate queues of different priorities and types, giving priority to targets with urgent location needs.
By rationally grouping and prioritizing urgent targets, the number of candidate queue elements was reduced, the speed of target selection and location efficiency were improved, and target omissions were avoided.
Smart Images

Figure CN121391925A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of target positioning, in particular to a gun-ball linkage positioning method, device, equipment, medium and product. BACKGROUND
[0002] Gun-ball linkage equipment is a product favored by customers on the market today, mainly applied to key area control, face collection in crowded areas and key vehicle control scenes. The gun-ball linkage equipment includes a gun type monitoring device and a ball type monitoring device, and target positioning is realized through the linkage of the two monitoring devices.
[0003] The process of target positioning by the gun-ball linkage equipment includes target collection, target selection and prediction of the pose data of the ball type monitoring device by the gun type monitoring device, target positioning, intelligent analysis and snapshot operation by the ball type monitoring device according to the predicted pose.
[0004] At present, the gun type monitoring device places each target collected in a candidate queue, and then selects a target to be positioned from the candidate queue. However, the number of targets in the candidate queue is large, so the entire candidate queue needs to be traversed every time a target to be positioned is selected, and the operation of selecting a target will be time-consuming. SUMMARY
[0005] Therefore, it is necessary to provide a gun-ball linkage positioning method, device, equipment, medium and product capable of reducing the time required for selecting a target.
[0006] In a first aspect, the present application provides a gun-ball linkage positioning method applied to a gun type monitoring device in a gun-ball linkage equipment, and the method comprises:
[0007] detecting at least one monitoring target in a monitoring picture;
[0008] for each monitoring target, determining whether the monitoring target has a trend of leaving the monitoring picture according to historical coordinate data of the monitoring target;
[0009] adding the monitoring target to a target queue in at least two candidate queues according to the leaving trend determination result of the monitoring target and the target type to which the monitoring target belongs;
[0010] selecting a target to be positioned from the at least two candidate queues, and controlling a ball type monitoring device in the gun-ball linkage equipment to perform positioning processing on the target to be positioned.
[0011] In one embodiment, at least two candidate queues include a first target queue and a second target queue under different target types; based on the departure trend of the monitored target and the target type to which the monitored target belongs, the monitored target is added to the target queue of the at least two candidate queues, including: if the monitored target has a trend of leaving the monitored screen, the monitored target is added to the first target queue corresponding to the target type to which the monitored target belongs; if the monitored target does not have a trend of leaving the monitored screen, the monitored target is added to the second target queue corresponding to the target type to which the monitored target belongs; wherein, the priority of the first target queue is higher than the priority of the second target queue.
[0012] In one embodiment, selecting a target to be located from at least two candidate queues includes: selecting at least two candidate target queues from at least two candidate queues based on the presence of queue elements in a first target queue; determining that the departure trend of the monitored targets in at least two candidate target queues is the same; and selecting a target to be located from at least two candidate target queues based on the number of queue elements in each candidate target queue.
[0013] In one embodiment, at least two candidate target queues are selected from at least two candidate queues based on the presence of queue elements in the first target queue, including any one of the following: if queue elements exist in the first target queue, the at least two candidate target queues include first target queues of different target types; if no queue elements exist in any of the first target queues, the at least two candidate target queues include second target queues of different target types.
[0014] In one embodiment, the target type includes a first target type and a second target type; the movement speed of the monitored target of the first target type is greater than the movement speed of the monitored target of the second target type; correspondingly, based on the number of queue elements in each candidate target queue, a target to be located is selected from at least two candidate target queues, including any one of the following: if the number of queue elements in the candidate target queue under the first target type is greater than or equal to the number of queue elements in the candidate target queue under the second target type, the target to be located is selected from the candidate target queue under the first target type; if the number of queue elements in the candidate target queue under the first target type is less than the number of queue elements in the candidate target queue under the second target type, the target to be located is selected from the candidate target queue under the second target type.
[0015] In one embodiment, determining whether a monitored target has a tendency to leave the monitoring screen based on its historical coordinate data includes: determining the relative movement direction of the monitored target relative to the PTZ camera based on the earliest and latest historical coordinate data of the monitored target; and determining whether the monitored target has a tendency to leave the monitoring screen based on its historical coordinate data when the relative movement direction is toward the PTZ camera.
[0016] In one embodiment, determining whether a monitored target has a tendency to leave the monitoring screen based on its historical coordinate data includes: determining the time interval between the earliest and latest historical coordinate data of the monitored target; and, if the time interval reaches a preset time interval, determining whether the monitored target has a tendency to leave the monitoring screen based on its historical coordinate data.
[0017] In one embodiment, determining whether a monitored target has a tendency to leave the monitoring screen based on its historical coordinate data includes any one of the following: if the horizontal coordinate in the latest historical coordinate data is less than a first preset value and the horizontal coordinate in the earliest historical coordinate data is greater than the horizontal coordinate in the latest historical coordinate data, then the monitored target has a tendency to leave the monitoring screen; if the horizontal coordinate in the latest historical coordinate data is greater than a second preset value and the horizontal coordinate in the latest historical coordinate data is greater than the horizontal coordinate in the earliest historical coordinate data, then the monitored target has a tendency to leave the monitoring screen; if the vertical coordinate in the latest historical coordinate data is greater than a third preset value, then the monitored target has a tendency to leave the monitoring screen.
[0018] In one embodiment, the method further includes: adding target information corresponding to the monitored target to the information list corresponding to the target type to which the monitored target belongs, according to the target type to which the monitored target belongs; wherein the target information includes the target identifier and historical coordinate data corresponding to the monitored target; correspondingly, determining whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target includes: if the target identifier corresponding to the monitored target exists in the corresponding information list, determining whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data corresponding to the information list.
[0019] In one embodiment, the method further includes: adding the target information corresponding to the monitoring target to the corresponding information list when the target identifier corresponding to the monitoring target does not exist in the corresponding information list.
[0020] In one embodiment, the method further includes any one of the following: if the number of historical coordinate data of the monitored target in the corresponding information list reaches a first quantity, delete the earliest historical coordinate data of the monitored target in the corresponding information list and add the latest historical coordinate data of the monitored target; if the number of historical coordinate data of the monitored target in the corresponding information list does not reach the first quantity, add the latest historical coordinate data of the monitored target in the corresponding information list.
[0021] In one embodiment, the target information further includes a location status identifier, which is used to indicate whether the monitored target has been linked to the location; correspondingly, determining whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target includes: when the location status identifier of the monitored target indicates that the monitored target has not been linked to the location, determining whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target.
[0022] In one embodiment, the spherical monitoring device in the control PTZ linkage device performs positioning processing on the target to be positioned, including: sending a positioning notification to the spherical monitoring device for the target to be positioned, so that the spherical monitoring device can perform image acquisition after positioning the target to be positioned to obtain a partial image; mapping the image acquisition area corresponding to the partial image to the monitoring screen to obtain the mapping area corresponding to the partial image; and setting the positioning status identifier of the monitoring target falling in the mapping area to be linked and positioned.
[0023] In one embodiment, a positioning notification for the target to be positioned is sent to a spherical monitoring device, so that the spherical monitoring device can perform image acquisition after positioning the target to obtain a partial image. This includes: converting the first coordinate data of the target to be positioned in the monitoring screen into second coordinate data in the coordinate system of the spherical monitoring device; sending the second coordinate data to the spherical monitoring device, so that the spherical monitoring device can position the target to be positioned according to the second coordinate data, and perform image acquisition after positioning to obtain a partial image; correspondingly, mapping the image acquisition area corresponding to the partial image to the monitoring screen to obtain the mapped area corresponding to the partial image includes: mapping the image acquisition area corresponding to the partial image to the monitoring screen according to the second coordinate data to obtain the mapped area corresponding to the partial image.
[0024] In one embodiment, the second coordinate data includes a horizontal rotation angle, a vertical pitch angle, and a zoom ratio; correspondingly, based on the second coordinate data, the image acquisition area corresponding to the local scene is mapped onto the monitoring screen to obtain the mapped area corresponding to the local scene, including: based on the horizontal rotation angle and vertical pitch angle in the second coordinate data, and the field of view corresponding to the zoom ratio, the image acquisition area corresponding to the local scene is mapped onto the monitoring screen to obtain the mapped area corresponding to the local scene.
[0025] According to a second aspect, embodiments of the present invention provide a gun-ball linkage positioning device, applied to a gun-type monitoring device in a gun-ball linkage equipment, the device comprising:
[0026] The target detection module is used to detect at least one monitored target in the monitoring screen;
[0027] The trend determination module is used to determine, for each monitored target, whether the monitored target has a trend of leaving the monitoring screen based on the historical coordinate data of the monitored target.
[0028] The target addition module is used to determine the result and the target type of the monitored target based on the departure trend of the monitored target, and add the monitored target to the target queue in at least two candidate queues;
[0029] The target selection module is used to select the target to be located from at least two candidate queues and control the ball-and-gun linkage device in the ball-and-gun linkage device to perform positioning processing on the target to be located.
[0030] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method provided in the first aspect.
[0031] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method provided in the first aspect.
[0032] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the method provided in the first aspect.
[0033] The aforementioned gun-ball linkage positioning method, device, equipment, medium, and product, for each monitored target, determine whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target. Then, based on the departure trend of the monitored target and the target type to which the monitored target belongs, the monitored target is added to a target queue in at least two candidate queues. It can be seen that the number of queue elements in a single target queue in this embodiment is less than the number of queue elements in the prior art, which facilitates the rapid selection of targets to be located. Moreover, since the positioning needs of monitored targets with a tendency to leave the monitoring screen are relatively urgent, and the transport speeds of different target types of monitored targets are different, the positioning needs of monitored targets with faster running speeds are also relatively urgent. Therefore, this embodiment adds monitored targets to different target queues according to the urgency of their positioning needs, that is, it achieves reasonable grouping of monitored targets according to their urgency, making it easier to prioritize monitored targets with higher urgency when selecting targets to be located later, avoiding the problem of positioning omissions caused by monitored targets leaving the monitoring screen before they have been located. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a flowchart illustrating a gun-ball linkage positioning method in one embodiment;
[0036] Figure 2 This is a flowchart illustrating the steps of adding a monitored target to a target queue in one embodiment;
[0037] Figure 3 This is a flowchart illustrating the target selection step in one embodiment;
[0038] Figure 4 This is a flowchart illustrating the departure trend determination step in one embodiment;
[0039] Figure 5 This is a flowchart illustrating the departure trend determination step in one embodiment;
[0040] Figure 6 A flowchart illustrating the step of adding first information in one embodiment;
[0041] Figure 7 A flowchart illustrating the second information addition step in one embodiment;
[0042] Figure 8 This is a flowchart illustrating the departure trend determination step in one embodiment;
[0043] Figure 9 This is a schematic diagram of the target sorting process in one embodiment;
[0044] Figure 10 This is a flowchart illustrating the positioning process steps in one embodiment;
[0045] Figure 11 This is a flowchart illustrating the notification delivery steps in one embodiment;
[0046] Figure 12 This is a structural block diagram of the gun-ball linkage positioning device in one embodiment;
[0047] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0049] In one exemplary embodiment, a gun-ball linkage positioning method is provided, which is applied to a gun-type monitoring device in a gun-ball linkage device. See also Figure 1 The method includes steps S110 to S140:
[0050] S110, detect at least one monitored target in the monitoring screen.
[0051] Since the PTZ camera continuously collects monitoring footage, the monitoring footage can be footage collected by the PTZ camera at the current moment and at multiple historical moments.
[0052] In real-world scenarios, the camera-ball linkage device can be installed above the non-motorized vehicle lane to collect monitoring footage of the non-motorized vehicle lane. The monitoring targets in the footage can include various types such as non-motorized vehicles and people.
[0053] S120 determines, based on the historical coordinate data of each monitored target, whether the monitored target has a tendency to leave the monitoring screen.
[0054] Understandably, since the monitored target is in motion, each monitored target has one historical coordinate data in one frame of historical monitoring footage. Therefore, for a given monitored target, there will be multiple historical coordinate data in multiple frames of historical monitoring footage. Based on the multiple historical coordinate data of each monitored target, it is determined whether the monitored target has a trend of leaving the monitoring footage, thus obtaining the result of determining the departure trend of the monitored target.
[0055] S130, based on the departure trend of the monitored target and the target type to which the monitored target belongs, determine the result and add the monitored target to the target queue in at least two candidate queues.
[0056] Understandably, if a monitored target shows a tendency to leave the monitoring screen, the camera-panel linkage device has an urgent need to locate that target. Different target types have different movement speeds; some target types move faster and quickly leave the monitoring screen. Therefore, the camera-panel linkage device has an urgent need to locate this type of target. Thus, in S130, based on the departure trend of each monitored target and its target type, the monitored target is added to the corresponding target queue.
[0057] As can be seen, by adding each monitored target to its corresponding target queue through S130, instead of adding all monitored targets to the same queue, the number of queue elements in a single target queue in this embodiment is less than the number of queue elements in the queue in the prior art, which facilitates the rapid selection of the target to be located.
[0058] As can be seen, the sorting of monitored targets is achieved through S120 and S130.
[0059] S140: Select the target to be located from at least two candidate queues, and control the ball-type monitoring device in the gun-ball linkage device to perform positioning processing on the target to be located.
[0060] There are several ways to select the target to be located from at least two candidate queues. For example, the target to be located can be selected first from the target queue containing monitored targets whose departure trend is determined to be trending away from the monitoring screen, and then the target to be located can be selected from other target queues. Alternatively, the target to be located can be selected first from the target queue containing monitored targets of a relatively fast-moving type, and then the target to be located can be selected from other target queues. Of course, there are other selection methods as well, which can be found in the following embodiments and will not be elaborated here.
[0061] In this embodiment, for each monitored target, based on its historical coordinate data, it is determined whether the target has a tendency to leave the monitoring screen. Based on this departure trend and the target type, the monitored target is added to a target queue from at least two candidate queues. It is evident that the number of queue elements in a single target queue in this embodiment is less than that in existing technologies, facilitating rapid selection of targets to be located. Furthermore, since the location needs of monitored targets with a tendency to leave the monitoring screen are more urgent, and different target types have different transport speeds, those with faster operating speeds also have more urgent location needs, this embodiment adds monitored targets to different target queues according to the urgency of their location needs. This achieves reasonable grouping of monitored targets according to urgency, allowing priority to be given to targets with higher urgency when selecting targets to be located, avoiding location omissions caused by targets leaving the monitoring screen before they can be located.
[0062] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided. In this optional embodiment, the above at least two candidate queues are further refined to include a first target queue and a second target queue under different target types, and the step of adding the monitored target to the target queue in S130 is further refined.
[0063] See Figure 2 The steps for adding a monitoring target to the target queue include:
[0064] S210, if the monitored target shows a tendency to leave the monitoring screen, add the monitored target to the first target queue corresponding to the target type to which the monitored target belongs.
[0065] S220, if the monitored target does not show any tendency to leave the monitoring screen, add the monitored target to the second target queue corresponding to the target type to which the monitored target belongs; wherein, the priority of the first target queue is higher than the priority of the second target queue.
[0066] As can be seen, the priority of the target queue depends on the departure trend determination result of the monitored targets in the target queue. The target queue containing monitored targets that are determined to have a departure trend of leaving the monitoring screen is the first target queue, and the target queue containing monitored targets that are determined not to have a departure trend of leaving the monitoring screen is the second target queue. The location of monitored targets that are determined to have a departure trend of leaving the monitoring screen is more urgent, so the priority of the first target queue is higher than that of the second target queue.
[0067] In this embodiment, for the same target type, if a monitored target shows a tendency to leave the monitoring screen, it is added to a first target queue with higher priority; if a monitored target does not show a tendency to leave the monitoring screen, it is added to a second target queue with lower priority. This achieves target grouping based on whether the monitored target shows a tendency to leave the monitoring screen. Furthermore, different target types each have a first target queue and a second target queue, thus also achieving target grouping based on the target type to which the monitored target belongs. This ensures that all monitored targets in a target queue have the same target type and the same departure trend determination result, facilitating rapid selection of the target to be located subsequently.
[0068] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the step of selecting the target to be located in S140 is refined.
[0069] See Figure 3 The steps for selecting the target to be located include:
[0070] S310, based on the existence of queue elements in the first target queue, select at least two candidate target queues from at least two candidate queues; the departure trend determination results of the monitored targets in the at least two candidate target queues are the same.
[0071] Understandably, the existence status of queue elements in the first target queue refers to whether there are queue elements in the first target queue, i.e., whether the first target queue is empty.
[0072] In one optional implementation, in step S310, based on the presence of queue elements in the first target queue, at least two candidate target queues are selected from at least two candidate queues, including any one of the following:
[0073] (1) If there are queue elements in the first target queue, at least two candidate target queues include the first target queue under different target types.
[0074] (2) In the case that there are no queue elements in each of the first target queues, at least two candidate target queues include second target queues under different target types.
[0075] In the above implementation, if at least one first target queue is not empty, then the first target queue under the first target type and the first target queue under the second target type are selected as candidate target queues. Since the monitored targets in the first target queues under each target type all tend to leave the monitoring screen, using each first target queue as a candidate target queue when at least one first target queue is not empty facilitates the subsequent selection of the target to be located from the first target queues, satisfying the requirement to prioritize the location of monitored targets with a tendency to leave the monitoring screen. If all first target queues are empty, then the second target queues under each target type are selected as candidate target queues, thus facilitating the subsequent selection of the target to be located from the second target queues.
[0076] S320: Select the target to be located from at least two candidate target queues based on the number of queue elements in each candidate target queue.
[0077] Understandably, the number of queue elements in the candidate target queue is the number of monitored targets in the candidate target queue.
[0078] The number of queue elements in different candidate target queues may vary. In candidate target queues with a larger number of queue elements, there are more monitoring targets that need to be located. Therefore, the target to be located can be selected from the candidate target queues with a larger number of queue elements first.
[0079] In one optional implementation, the target type includes a first target type and a second target type; the movement speed of the monitored target of the first target type is greater than the movement speed of the monitored target of the second target type; in S320, the target to be located is selected from at least two candidate target queues based on the number of queue elements in each candidate target queue, including any one of the following:
[0080] (1) If the number of queue elements in the candidate target queue under the first target type is greater than or equal to the number of queue elements in the candidate target queue under the second target type, the target to be located shall be selected from the candidate target queue under the first target type.
[0081] (2) If the number of queue elements in the candidate target queue under the first target type is less than the number of queue elements in the candidate target queue under the second target type, the target to be located shall be selected from the candidate target queue under the second target type.
[0082] The first target type is, for example, a non-motorized vehicle, but it can also be other target types.
[0083] The second target type can be, for example, people, but it can also be other target types. Generally, the speed of people is less than that of non-motorized vehicles.
[0084] In the above implementation, since there are two target types, and each target type has a first target queue and a second target queue, there are a total of four target queues, which can also be understood as four candidate queues. For example, the first target queue under the first target type can be denoted as Q11, the second target queue under the first target type can be denoted as Q12, the first target queue under the second target type can be denoted as Q21, and the second target queue under the second target type can be denoted as Q22.
[0085] In the above implementation, if the movement speed of the monitored targets of the first target type is relatively fast, and the number of queue elements in the candidate target queue of the first target type is greater than or equal to the number of queue elements in the candidate target queue of the second target type, the target to be located is preferentially selected from the candidate target queue of the first target type to avoid missing the location of the faster-moving and more numerous monitored targets. If the number of queue elements in the candidate target queue of the first target type is less than the number of queue elements in the candidate target queue of the second target type, although the movement speed of the monitored targets of the first target type is relatively fast, the target to be located is preferentially selected from the candidate target queue of the second target type because the number of monitored targets in the candidate target queue is larger. Therefore, by comprehensively considering both the movement speed of the monitored targets and the number of monitored targets in the candidate target queue, the priority selection of the candidate target queue for the target to be located is determined, ensuring the rationality of the selection of the target to be located.
[0086] For example, the specific process of selecting the target to be located in step S140 may include:
[0087] S1, if the number of monitored targets in the first target queue corresponding to the first target type is greater than or equal to the number of monitored targets in the first target queue corresponding to the second target type, select the first monitored target from the first target queue corresponding to the first target type as the target to be located, and remove the target to be located from the first target queue corresponding to the first target type;
[0088] S2, if no target to be located is selected from the first target queue corresponding to the first target type, select the first monitoring target from the first target queue corresponding to the second target type as the target to be located, and remove the target to be located from the first target queue corresponding to the second target type.
[0089] S3, if no target to be located is selected from the first target queue corresponding to the second target type, and the number of monitored targets in the second target queue corresponding to the first target type is greater than or equal to the number of monitored targets in the second target queue corresponding to the second target type, then the first monitored target is selected from the second target queue corresponding to the first target type as the target to be located, and the target to be located is removed from the second target queue corresponding to the first target type.
[0090] S4, if no target to be located is selected from the second target queue corresponding to the first target type, select the first monitoring target from the second target queue corresponding to the second target type as the target to be located, and remove the target to be located from the second target queue corresponding to the second target type.
[0091] In this embodiment, firstly, based on the presence of queue elements in the first target queue, at least two candidate target queues are selected from at least two candidate queues. It is evident that the presence of queue elements in the first target queue is given priority because the monitored targets in the first target queue all tend to leave the monitoring screen. Preferentially considering the first target queue minimizes the possibility of targets not being located when they leave the monitoring screen, thus reducing omissions. Then, based on the number of queue elements in each candidate target queue, a target to be located is selected from at least two candidate target queues. It is clear that the selection process considers the number of queue elements in the candidate target queues, ensuring the rationality of the selected target.
[0092] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the departure trend determination step in S120 is refined.
[0093] See Figure 4 The steps to determine the departure trend include:
[0094] S410 determines the relative motion direction of the monitored target with respect to the PTZ camera based on the earliest and latest historical coordinate data of the monitored target.
[0095] Among them, the earliest historical coordinate data of the monitored target is the earliest historical coordinate data among all the historical coordinate data stored for the monitored target, and the latest historical coordinate data of the monitored target is the latest historical coordinate data among all the historical coordinate data stored for the monitored target.
[0096] S420, when the relative motion direction is towards the PTZ camera, determines whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target.
[0097] For example, if the ordinate y1 in the latest historical coordinate data of monitored target a is greater than the ordinate y0 in the earliest historical coordinate data of monitored target a, it indicates that monitored target a is moving towards the camera-ball linkage device, and the front of monitored target a exists in the monitoring screen. Subsequent positioning and capturing of monitored target a is then meaningful. Therefore, a step is performed to determine whether monitored target a has a tendency to leave the monitoring screen.
[0098] In this embodiment, subsequent steps are only performed on the monitored target if the relative movement direction of the monitored target to the ball-and-shoot linkage device is towards the ball-and-shoot linkage device, so as to ensure that the front or frontal view of the monitored target can be captured in the subsequent steps, thus ensuring the effectiveness of positioning and capture.
[0099] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the departure trend determination step in S120 is refined.
[0100] See Figure 5 The steps to determine the departure trend include:
[0101] S510, determine the time interval between the earliest and latest historical coordinate data of the monitored target.
[0102] S520, when the time interval reaches the preset time interval, determines whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target.
[0103] The time interval between the earliest and latest historical coordinate data is the time interval between the earliest historical coordinate data point and the latest historical coordinate data point.
[0104] The preset time interval can be set as needed, for example, to 1 second, or other values, which are not limited here.
[0105] In this embodiment, subsequent steps are only performed on the monitored target if the time interval between the earliest and latest historical coordinate data in the historical coordinate data of the monitored target reaches a preset time interval, so as to avoid the problem of inaccurate departure trend judgment results caused by the time interval corresponding to the monitored target being too short.
[0106] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the departure trend determination step in S120 is refined. The departure trend determination step includes any one of the following:
[0107] (1) If the horizontal coordinate in the latest historical coordinate data is less than the first preset value, and the horizontal coordinate in the earliest historical coordinate data is greater than the horizontal coordinate in the latest historical coordinate data, it is determined that the monitored target has a tendency to leave the monitoring screen.
[0108] Understandably, in case (1), it can be determined that the monitored target has a tendency to leave the monitoring screen from the left edge.
[0109] (2) If the horizontal coordinate in the latest historical coordinate data is greater than the second preset value, and the horizontal coordinate in the latest historical coordinate data is greater than the horizontal coordinate in the earliest historical coordinate data, it is determined that the monitored target has a tendency to leave the monitoring screen.
[0110] Understandably, in case (2), it can be determined that the monitored target has a tendency to leave the monitoring screen from the right edge.
[0111] (3) If the vertical coordinate in the latest historical coordinate data is greater than the third preset value, it is determined that the monitored target has a tendency to leave the monitoring screen.
[0112] Understandably, in case (3), it can be determined that the monitored target has a tendency to leave the monitoring screen from the bottom edge.
[0113] For example, the resolution of the monitoring screen is 8192×8192. The first preset value, the second preset value, and the third preset value can be set as needed. For example, the first preset value can be set to 400, the second preset value can be set to 7792, and the third preset value can be set to 7792 or 4096. Of course, each preset value can also be set to other values, which are not limited here.
[0114] This embodiment provides three methods to determine whether a monitored target tends to leave the monitoring screen. Under all three methods, it is possible to subsequently capture the front or frontal view of the monitored target. Only the case where the monitored target leaves the monitoring screen from the top edge is excluded, because in this case, a frontal or frontal view cannot be captured at all. Therefore, subsequent steps can be performed for all three determination methods to avoid missing the location of the monitored target.
[0115] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the gun-ball linkage positioning method is further refined to include a first information addition step.
[0116] See Figure 6 The steps for adding the first piece of information include:
[0117] S610, according to the target type to which the monitored target belongs, add the target information corresponding to the monitored target to the information list corresponding to the target type to which the monitored target belongs; wherein, the target information includes the target identifier and historical coordinate data corresponding to the monitored target.
[0118] For example, two information lists are set up: a first information list and a second information list. The first information list stores target information corresponding to monitoring targets of a first target type, and the second information list stores target information corresponding to monitoring targets of a second target type.
[0119] Each monitored target's information includes its own target identifier and historical coordinate data. In addition to the target identifier and historical coordinate data, the target information can also include the timestamp of the historical coordinate data and its location status. Therefore, besides storing the target identifier and historical coordinate data in the information list, the timestamp of the historical coordinate data and its location status can also be stored together.
[0120] The location status identifier indicates whether the monitored target has been located through linkage. Linked location refers to locating the monitored target by requiring two monitoring devices in a linked system to work together. The initial state of the monitoring target's location status identifier is that it has not been located through linkage (e.g., the initial value of the location status identifier is 0). After the monitoring target is located through linkage, the location status identifier of the monitoring target is updated, and the updated state is that it has been located through linkage (e.g., the updated value of the location status identifier is 1).
[0121] As can be seen, monitoring targets are continuously detected from the monitoring screen. Each time a monitoring target is detected, the target information corresponding to that monitoring target is added to the information list of the target type, thereby realizing the storage of target information.
[0122] Based on the above information addition steps, the departure trend determination step in S120 may include:
[0123] If the target identifier corresponding to the monitored target exists in the corresponding information list, determine whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data in the information list.
[0124] In this embodiment, if the target identifier corresponding to the monitored target exists in the information list corresponding to the target type of the monitored target, the corresponding historical coordinate data can be accurately obtained from the corresponding information list, thereby ensuring the accuracy of determining whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data.
[0125] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the gun-ball linkage positioning method is further refined to include a second information addition step.
[0126] See Figure 7 The second step of adding information includes:
[0127] S710: If the target identifier corresponding to the monitored target does not exist in the corresponding information list, add the target information corresponding to the monitored target to the corresponding information list.
[0128] As can be seen, if the target identifier corresponding to the monitored target does not exist in the information list corresponding to the target type to which the monitored target belongs, it means that the monitored target has just been detected and its target information has not yet been stored in the corresponding information list. Therefore, at this time, the target identifier, historical coordinate data, timestamp of historical coordinate data, and positioning status identifier corresponding to the monitored target are stored in the corresponding information list.
[0129] In this embodiment, if the target identifier corresponding to the monitored target does not exist in the corresponding information list, the target information corresponding to the monitored target is stored in the corresponding information list to avoid omission of target information storage.
[0130] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the gun-ball linkage positioning method is further refined to include a historical coordinate data processing step. The historical coordinate data processing step includes any one of the following:
[0131] (1) When the number of historical coordinate data of the monitored target in the corresponding information list reaches the first quantity, delete the earliest historical coordinate data of the monitored target in the corresponding information list and add the latest historical coordinate data of the monitored target.
[0132] (2) If the number of historical coordinate data of the monitored target in the corresponding information list does not reach the first number, add the latest historical coordinate data of the monitored target to the corresponding information list.
[0133] The first quantity, for example, is 37 (corresponding to a duration of approximately 3 seconds), but it can also be set to other values, which are not limited here.
[0134] Regarding the above (1), if the number of historical coordinate data of the monitored target in the information list corresponding to its target type reaches the first quantity, the earliest historical coordinate data in each historical coordinate data of the monitored target is deleted, and the latest collected coordinate data is added to the information list as the latest historical coordinate data, so as to ensure that the number of historical coordinate data of the monitored target does not exceed the first quantity, and avoid occupying too much memory. Because the number of monitored targets is huge, the storage resources that can be allocated to each monitored target are limited, so the historical coordinate data of each monitored target cannot be too much.
[0135] Regarding (2) above, if the number of historical coordinate data of the monitored target in the information list corresponding to its target type does not reach the first number, the latest collected coordinate data can be directly stored in the corresponding information list as the latest historical coordinate data.
[0136] In this embodiment, the number of historical coordinate data for each monitored target in the information list is limited to avoid consuming too much storage resources.
[0137] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided. In this optional embodiment, the departure trend determination step in S120 is refined based on including the positioning status identifier in the target information.
[0138] See Figure 8 The steps to determine the departure trend include:
[0139] S810, when the location status indicator of the monitored target indicates that the monitored target has not yet been linked for location, determines whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target.
[0140] In this embodiment, subsequent steps are only performed on the monitored target if the positioning status identifier of the monitored target indicates that the monitored target has not yet been linked for positioning, so as to avoid repeated positioning of the same monitored target.
[0141] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the monitoring target sorting process implemented by S120 and S130 is refined.
[0142] See Figure 9 The monitoring of the target sorting process includes:
[0143] S901, for each monitoring target detected from the monitoring screen, determine whether the target identifier corresponding to the monitoring target exists in the information list corresponding to the target type to which the monitoring target belongs; if yes, proceed to S902; otherwise, proceed to S911.
[0144] S902, based on the location status identifier of the monitored target in the corresponding information list, determine whether the monitored target has been linked for location; if yes, proceed to S913; if no, proceed to S903.
[0145] S903, determine whether the number of historical coordinate data of the monitored target in the corresponding information list has reached a first quantity (37 can be used as an example of the first quantity if the monitored target belongs to the second target type; 13 can be used as an example of the first quantity if the monitored target belongs to the first target type); if yes, delete the earliest historical coordinate data of the monitored target in the corresponding information list and add the latest historical coordinate data of the monitored target; otherwise, add the latest historical coordinate data of the monitored target to the corresponding information list; proceed to S904.
[0146] S904, determine the time interval (e.g., 1s) between the earliest and latest historical coordinate data of the monitored target in the historical coordinate data of the corresponding information list, and determine whether the time interval reaches the preset time interval. If yes, proceed to S905; otherwise, proceed to S913.
[0147] S905, based on the earliest and latest historical coordinate data of the monitored target, determine the relative movement direction of the monitored target relative to the PTZ camera, and determine whether the relative movement direction is towards the PTZ camera; if so, proceed to S906 if the target type of the monitored target is the second target type, and proceed to S910 if the target type of the monitored target is the first target type; otherwise, proceed to S913.
[0148] S906, determine whether the following conditions are met: the x-coordinate in the latest historical coordinate data is less than the first preset value (e.g., 400), and the x-coordinate in the earliest historical coordinate data is greater than the x-coordinate in the latest historical coordinate data; if so, proceed to S907; otherwise, proceed to S908.
[0149] S907, determine that the monitored target has a tendency to leave the monitoring screen, add the monitored target to the first target queue under the second target type, and proceed to S913.
[0150] S908, determine whether the following conditions are met: the x-coordinate in the latest historical coordinate data is greater than the second preset value (e.g., 7792), and the x-coordinate in the latest historical coordinate data is greater than the x-coordinate in the earliest historical coordinate data; if so, proceed to S907; otherwise, proceed to S909.
[0151] S909, determine whether the following condition is met: the ordinate in the latest historical coordinate data is greater than the third preset value (e.g., 7792); if yes, proceed to S907; otherwise, proceed to S912.
[0152] S910, determine whether the following condition is met: the ordinate in the latest historical coordinate data is greater than the third preset value (e.g., 4096); if so, determine that the monitored target has a tendency to leave the monitoring screen, and add the monitored target to the first target queue under the first target type; otherwise, add the monitored target to the second target queue under the first target type; proceed to S913.
[0153] S911, add the target information corresponding to the monitored target to the information list corresponding to the target type to which the monitored target belongs, and proceed to S913.
[0154] S912, determine that the monitored target does not have a tendency to leave the monitoring screen, add the monitored target to the second target queue under the second target type, and proceed to S913.
[0155] S913, terminate the process for this monitored target.
[0156] In this embodiment, sorting is implemented for each monitored target. Multiple factors are considered during the sorting process to ensure the rationality of the sorting.
[0157] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the positioning processing steps are refined.
[0158] See Figure 10 The positioning process includes:
[0159] S1010: Send a positioning notification to the spherical monitoring device for the target to be positioned, so that the spherical monitoring device can acquire images after positioning the target and obtain a partial image.
[0160] For example, the gun-type monitoring device sends a location notification for the target a to be located. The spherical monitoring device locates the target a. After location, the spherical monitoring device uses intelligent analysis to find a frame with better image quality and performs image acquisition on that frame to obtain a partial frame A including the target a. This partial frame A is the frame captured by the target a.
[0161] S1020 maps the image acquisition area corresponding to the partial image to the monitoring screen to obtain the mapped area corresponding to the partial image.
[0162] Understandably, since the image capture area of the partial view corresponds to a part of the monitoring screen captured by the bullet monitoring device, the corresponding part of the image capture area of the partial view in the monitoring screen captured by the bullet monitoring device is found and used as the mapping area.
[0163] S1030, set the location status identifier of the monitored target that falls within the mapping area to be linked and located.
[0164] For example, if target a is the target to be located, and target a and target b are relatively close (i.e., the two targets are very close together), then partial view A includes both target a and target b. In this case, the location status indicators for both target a and target b are set to "already linked for location." Since the linked location of target a has already been completed, its location status indicator is set to "already linked for location," meaning no further linked location operations will be performed on target a. Similarly, since partial view A also captures target b, its location status indicator is also set to "already linked for location," eliminating the need for further location, intelligent analysis, and partial view capture for target b.
[0165] Suppose that after capturing partial image A with target a as the target to be located, the location status of target b is not set to "linked to location". When the bullet-type monitoring device sends a location notification for target b (at this time, target b is the target to be located), the spherical monitoring device will locate target b, intelligently analyze it, and capture the corresponding partial image B. Since a and b are relatively close, the partial image B captured for target b will also include target a. Therefore, since both partial images A and B include targets a and b, there is a problem of duplicate image acquisition, i.e., duplicate snapshots, which reduces the snapshot rate. This embodiment avoids the problem of duplicate image acquisition and improves the snapshot rate.
[0166] In this embodiment, by setting the positioning status identifier of each monitored target in the local image to be linked and positioned, it is no longer necessary to control the spherical monitoring device to perform image acquisition on all monitored targets appearing in the local image, thus avoiding the problem of repeated image acquisition and improving the effective capture rate.
[0167] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the notification issuance steps in S1010 are further refined.
[0168] See Figure 11 The notification issuance steps include:
[0169] S1110 converts the first coordinate data of the target to be located in the monitoring screen into the second coordinate data in the coordinate system of the spherical monitoring device.
[0170] S1120, the second coordinate data is sent to the spherical monitoring device so that the spherical monitoring device can locate the target to be located according to the second coordinate data, and then perform image acquisition to obtain a partial image.
[0171] Understandably, the first coordinate data is the coordinate data of the target to be located in the coordinate system of the gun-type monitoring device, and the second coordinate data is the coordinate data of the target to be located in the coordinate system of the spherical monitoring device.
[0172] Among them, the second coordinate data is the PTZ coordinate, where the P coordinate is the horizontal rotation angle of the spherical monitoring device, the T coordinate is the vertical pitch angle of the spherical monitoring device, and the Z coordinate is the zoom ratio of the spherical monitoring device.
[0173] Understandably, after sending the second coordinate data to the spherical monitoring device, the device can adjust the horizontal rotation angle based on the P coordinate, the vertical pitch angle based on the T coordinate, and the zoom level based on the Z coordinate. After adjustment, the target to be located will fall within the field of view of the spherical monitoring device, allowing it to locate, intelligently analyze, and capture images of the target, thus obtaining a partial image including the target.
[0174] The zoom ratio is set by the bullet-type surveillance equipment as needed. For example, setting it to 5x will allow the dome-type surveillance equipment to magnify the image by 5 times before locating, intelligently analyzing, and capturing the target in the image. Of course, the zoom ratio can be set to other values, which are not limited here.
[0175] Based on the above notification issuance steps, the steps for obtaining the mapping area in S1020 include:
[0176] S1, based on the second coordinate data, map the image acquisition area corresponding to the local scene onto the monitoring screen to obtain the mapping area corresponding to the local scene.
[0177] The second coordinate data of the target to be located can be stored in the gun-type monitoring device. In this way, the gun-type monitoring device can map the image acquisition area corresponding to the local image based on the second coordinate data of the target to be located, and obtain the mapped area.
[0178] However, in real-world scenarios, the number of monitored targets is quite large. If the second coordinate data of all monitored targets were stored in the bullet-type monitoring device, it would require significant storage resources. Furthermore, the number of dome-type monitoring devices might be more than one, potentially consuming even more storage resources. To address this issue, the bullet-type monitoring device can avoid storing the second coordinate data of each monitored target. Instead, the dome-type monitoring device, after capturing a partial image, returns the second coordinate data to the bullet-type monitoring device. This allows the bullet-type monitoring device to use the received second coordinate data to map the corresponding image capture area to obtain the mapped region.
[0179] More specifically, when performing mapping, the pistol-type monitoring device actually uses the P-coordinate, T-coordinate, and the field of view corresponding to the Z-coordinate. To make mapping easier for the pistol-type monitoring device, the spherical monitoring device returns the P-coordinate, T-coordinate, and the field of view corresponding to the Z-coordinate in the second coordinate data to the pistol-type monitoring device. In this way, the pistol-type monitoring device does not need to convert the zoom ratio into the corresponding field of view itself when performing mapping, which also saves the computing resources of the pistol-type monitoring device.
[0180] In one optional implementation, S1 maps the image acquisition area corresponding to the local scene to the monitoring screen based on the second coordinate data to obtain the mapped area corresponding to the local scene. This can include: mapping the image acquisition area corresponding to the local scene to the monitoring screen based on the horizontal rotation angle and vertical pitch angle in the second coordinate data, as well as the field of view corresponding to the zoom magnification, to obtain the mapped area corresponding to the local scene.
[0181] Understandably, the target to be located is situated at the center of the local image. Therefore, the pistol-type monitoring device converts the P and T coordinates in the second coordinate data into corresponding first coordinate data, which is located at the center of the mapped area. The field of view of the local image can be determined based on the zoom level and the corresponding field of view angle. Furthermore, the size of the image acquisition area of the local image captured by the spherical monitoring device is known. Therefore, the pistol-type monitoring device can determine the size of the mapped area based on the field of view angle and the size of the image acquisition area of the local image. Finally, the mapped area can be obtained based on its center position and size.
[0182] In the above implementation, the gun-type monitoring device can accurately determine the mapping area based on the horizontal rotation angle and vertical pitch angle in the second coordinate data, as well as the field of view corresponding to the zoom magnification.
[0183] In this embodiment, by converting the first coordinate data of the target to be located into the second coordinate data in the coordinate system of the spherical monitoring device, and sending the second coordinate data to the spherical monitoring device, the positioning notification for the target to be located is realized, and the spherical monitoring device can accurately locate and acquire images of the target based on the second coordinate data.
[0184] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0185] Based on the same inventive concept, this application also provides a gun-ball linkage positioning device for implementing the gun-ball linkage positioning method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the gun-ball linkage positioning device provided below can be found in the limitations of the gun-ball linkage positioning method described above, and will not be repeated here.
[0186] In one exemplary embodiment, a gun-ball linkage positioning device is provided, applied to the gun-type monitoring device in a gun-ball linkage device, see [link to documentation]. Figure 12 The device includes a target detection module 1210, a trend determination module 1220, a target addition module 1230, and a target selection module 1240, wherein:
[0187] The target detection module 1210 is used to detect at least one monitored target in the monitoring screen;
[0188] The trend determination module 1220 is used to determine, for each monitored target, whether the monitored target has a trend of leaving the monitoring screen based on the historical coordinate data of the monitored target.
[0189] The target addition module 1230 is used to determine the result and the target type of the monitored target based on the departure trend of the monitored target, and add the monitored target to the target queue in at least two candidate queues;
[0190] The target selection module 1240 is used to select the target to be located from at least two candidate queues and control the ball monitoring device in the gun-ball linkage device to perform positioning processing on the target to be located.
[0191] In one embodiment, at least two candidate queues include a first target queue and a second target queue under different target types; the target adding module includes any one of the following: a first adding unit, used to add the monitored target to the first target queue corresponding to the target type to which the monitored target belongs when the monitored target has a tendency to leave the monitored screen; a second adding unit, used to add the monitored target to the second target queue corresponding to the target type to which the monitored target belongs when the monitored target does not have a tendency to leave the monitored screen; wherein, the priority of the first target queue is higher than the priority of the second target queue.
[0192] In one embodiment, the target selection module includes: a first selection unit, configured to select at least two candidate target queues from at least two candidate queues based on the presence of queue elements in the first target queue; wherein the departure trend determination results of the monitored targets in the at least two candidate target queues are the same; and a second selection unit, configured to select the target to be located from the at least two candidate target queues based on the number of queue elements in each candidate target queue.
[0193] In one embodiment, the first selection unit is specifically used to perform any of the following: when there are queue elements in the first target queue, at least two candidate target queues include first target queues of different target types; when there are no queue elements in any of the first target queues, at least two candidate target queues include second target queues of different target types.
[0194] In one embodiment, the target type includes a first target type and a second target type; the movement speed of the monitored target of the first target type is greater than the movement speed of the monitored target of the second target type; the second selection unit is used to perform any one of the following: if the number of queue elements in the candidate target queue under the first target type is greater than or equal to the number of queue elements in the candidate target queue under the second target type, select the target to be located from the candidate target queue under the first target type; if the number of queue elements in the candidate target queue under the first target type is less than the number of queue elements in the candidate target queue under the second target type, select the target to be located from the candidate target queue under the second target type.
[0195] In one embodiment, the trend determination module is specifically used to: determine the relative movement direction of the monitored target relative to the PTZ camera based on the earliest and latest historical coordinate data of the monitored target; and, if the relative movement direction is toward the PTZ camera, determine whether the monitored target has a trend of leaving the monitoring screen based on the historical coordinate data of the monitored target.
[0196] In one embodiment, the trend determination module is specifically used to: determine the time interval between the earliest and latest historical coordinate data of the monitored target; and, if the time interval reaches a preset time interval, determine whether the monitored target has a trend of leaving the monitoring screen based on the historical coordinate data of the monitored target.
[0197] In one embodiment, the trend determination module is specifically used to perform any of the following: if the x-coordinate in the latest historical coordinate data is less than a first preset value and the x-coordinate in the earliest historical coordinate data is greater than the x-coordinate in the latest historical coordinate data, determine that the monitored target has a trend of leaving the monitoring screen; if the x-coordinate in the latest historical coordinate data is greater than a second preset value and the x-coordinate in the latest historical coordinate data is greater than the x-coordinate in the earliest historical coordinate data, determine that the monitored target has a trend of leaving the monitoring screen; if the y-coordinate in the latest historical coordinate data is greater than a third preset value, determine that the monitored target has a trend of leaving the monitoring screen.
[0198] In one embodiment, the gun-ball linkage positioning device further includes: a third adding module, used to add target information corresponding to the monitored target to the information list corresponding to the target type to which the monitored target belongs, according to the target type to which the monitored target belongs; wherein, the target information includes the target identifier and historical coordinate data corresponding to the monitored target; correspondingly, the trend determination module is specifically used to: determine whether the monitored target has a trend of leaving the monitoring screen, based on the historical coordinate data corresponding to the information list, when the target identifier corresponding to the monitored target exists in the corresponding information list.
[0199] In one embodiment, the gun-ball linkage positioning device further includes: a fourth adding module, used to add the target information corresponding to the monitored target to the corresponding information list when the target identifier corresponding to the monitored target does not exist in the corresponding information list.
[0200] In one embodiment, the gun-ball linkage positioning device further includes any one of the following: a first adding module, used to delete the earliest historical coordinate data of the monitored target in the corresponding information list and add the latest historical coordinate data of the monitored target when the number of historical coordinate data of the monitored target in the corresponding information list reaches a first quantity; and a second adding module, used to add the latest historical coordinate data of the monitored target in the corresponding information list when the number of historical coordinate data of the monitored target in the corresponding information list does not reach the first quantity.
[0201] In one embodiment, the target information also includes a location status identifier, which is used to indicate whether the monitored target has been linked to the location; correspondingly, the trend determination module is specifically used to: when the location status identifier of the monitored target indicates that the monitored target has not been linked to the location, determine whether the monitored target has a trend of leaving the monitoring screen based on the historical coordinate data of the monitored target.
[0202] In one embodiment, the target selection module includes: a first sending unit, used to send a positioning notification to the spherical monitoring device for the target to be positioned, so that the spherical monitoring device can perform image acquisition after positioning the target to be positioned to obtain a partial image; a first mapping unit, used to map the image acquisition area corresponding to the partial image to the monitoring screen to obtain the mapping area corresponding to the partial image; and a first setting unit, used to set the positioning status identifier of the monitoring target falling in the mapping area to be linked and positioned.
[0203] In one embodiment, the first sending unit is specifically used to: convert the first coordinate data of the target to be located in the monitoring screen into the second coordinate data in the coordinate system of the spherical monitoring device; send the second coordinate data to the spherical monitoring device so that the spherical monitoring device can locate the target to be located according to the second coordinate data, and perform image acquisition after positioning to obtain a partial image; correspondingly, the first mapping unit is used to: map the image acquisition area corresponding to the partial image to the monitoring screen according to the second coordinate data to obtain the mapping area corresponding to the partial image.
[0204] In one embodiment, the second coordinate data includes a horizontal rotation angle, a vertical pitch angle, and a zoom ratio; the first mapping unit is used to: map the image acquisition area corresponding to the local image onto the monitoring screen according to the horizontal rotation angle and vertical pitch angle in the second coordinate data, and the field of view corresponding to the zoom ratio, to obtain the mapping area corresponding to the local image.
[0205] Each module in the aforementioned gun-ball linkage positioning device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0206] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 13 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores relevant data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network. When the computer program is executed by the processor, it implements a gun-ball linkage positioning method.
[0207] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0208] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the gun-ball linkage positioning method provided in the above embodiments.
[0209] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the gun-ball linkage positioning method provided in the above embodiments.
[0210] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the gun-ball linkage positioning method provided in the above embodiments.
[0211] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0212] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0213] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0214] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A gun-ball linkage positioning method, characterized in that, A gun-type monitoring device applied in a gun-ball linkage device, the method comprising: Detect at least one monitored target in the monitoring screen; For each monitored target, based on the historical coordinate data of the monitored target, determine whether the monitored target has a trend of leaving the monitored screen; Based on the departure trend of the monitored target and the target type to which the monitored target belongs, the monitored target is added to the target queue in at least two candidate queues; Select a target to be located from the at least two candidate queues, and control the ball-and-gun linkage device in the gun to perform positioning processing on the target to be located.
2. The method according to claim 1, characterized in that, The at least two candidate queues include a first target queue and a second target queue under different target types; the step of adding the monitored target to the target queue of the at least two candidate queues based on the departure trend determination result of the monitored target and the target type to which the monitored target belongs includes: If the monitored target shows a tendency to leave the monitoring screen, the monitored target is added to the first target queue corresponding to the target type to which the monitored target belongs; If the monitored target does not show any tendency to leave the monitoring screen, the monitored target is added to the second target queue corresponding to the target type to which the monitored target belongs; The first target queue has a higher priority than the second target queue.
3. The method according to claim 2, characterized in that, The step of selecting the target to be located from the at least two candidate queues includes: Based on the presence of queue elements in the first target queue, at least two candidate target queues are selected from the at least two candidate queues; the departure trend determination results of the monitored targets in the at least two candidate target queues are the same; The target to be located is selected from the at least two candidate target queues based on the number of queue elements in each candidate target queue.
4. The method according to claim 3, characterized in that, The step of selecting at least two candidate target queues from the at least two candidate queues based on the existence of queue elements in the first target queue includes any one of the following: If there are queue elements in the first target queue, the at least two candidate target queues include the first target queues under different target types; If no queue element exists in any of the first target queues, the at least two candidate target queues include second target queues of different target types.
5. The method according to claim 3, characterized in that, The target types include a first target type and a second target type; the movement speed of the monitored target of the first target type is greater than the movement speed of the monitored target of the second target type; correspondingly, the step of selecting the target to be located from the at least two candidate target queues based on the number of queue elements in each candidate target queue includes any one of the following: If the number of queue elements in the candidate target queue under the first target type is greater than or equal to the number of queue elements in the candidate target queue under the second target type, the target to be located is selected from the candidate target queue under the first target type. If the number of queue elements in the candidate target queue under the first target type is less than the number of queue elements in the candidate target queue under the second target type, the target to be located is selected from the candidate target queue under the second target type.
6. The method according to claim 1, characterized in that, The step of determining whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target includes: The relative motion direction of the monitored target with respect to the ball-and-shoot linkage device is determined based on the earliest and latest historical coordinate data of the monitored target. When the relative motion direction is toward the ball-and-shoot linkage device, the system determines whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target.
7. The method according to claim 1, characterized in that, The step of determining whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target includes: Determine the time interval between the earliest and latest historical coordinate data of the monitored target; If the time interval reaches a preset time interval, the system determines whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target.
8. The method according to claim 6 or 7, characterized in that, Determining whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target includes any one of the following: If the x-coordinate in the latest historical coordinate data is less than a first preset value, and the x-coordinate in the earliest historical coordinate data is greater than the x-coordinate in the latest historical coordinate data, it is determined that the monitored target has a tendency to leave the monitoring screen. If the horizontal coordinate in the latest historical coordinate data is greater than a second preset value, and the horizontal coordinate in the latest historical coordinate data is greater than the horizontal coordinate in the earliest historical coordinate data, it is determined that the monitored target has a tendency to leave the monitoring screen. If the ordinate in the latest historical coordinate data is greater than a third preset value, it is determined that the monitored target has a tendency to leave the monitoring screen.
9. The method according to any one of claims 1 to 7, characterized in that, The method further includes: Based on the target type to which the monitored target belongs, the target information corresponding to the monitored target is added to the information list corresponding to the target type to which the monitored target belongs; wherein, the target information includes the target identifier and historical coordinate data corresponding to the monitored target; Correspondingly, determining whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target includes: If the target identifier corresponding to the monitored target exists in the corresponding information list, determine whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data corresponding to the information list.
10. The method according to claim 9, characterized in that, The method further includes: If the target identifier corresponding to the monitored target does not exist in the corresponding information list, the target information corresponding to the monitored target will be added to the corresponding information list.
11. The method according to claim 9, characterized in that, The method further includes any one of the following: If the number of historical coordinate data of the monitored target in the corresponding information list reaches a first quantity, delete the earliest historical coordinate data of the monitored target in the corresponding information list and add the latest historical coordinate data of the monitored target. If the number of historical coordinate data of the monitored target in the corresponding information list does not reach the first quantity, the latest historical coordinate data of the monitored target is added to the corresponding information list.
12. The method according to claim 9, characterized in that, The target information also includes a location status identifier, which is used to indicate whether the monitored target has been located in a linked manner. Correspondingly, determining whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target includes: If the location status identifier of the monitored target indicates that the monitored target has not yet been linked for location, the system determines whether the monitored target has a tendency to leave the monitoring screen based on the historical coordinate data of the monitored target.
13. The method according to any one of claims 1 to 7, characterized in that, The control of the ball-and-shoot linkage device to locate the target includes: A positioning notification is sent to the spherical monitoring device for the target to be located, so that the spherical monitoring device can locate the target and then acquire images to obtain a partial view. The image acquisition area corresponding to the partial image is mapped onto the monitoring screen to obtain the mapping area corresponding to the partial image; Set the location status identifier of the monitored target that falls within the mapped area to "has been linked for location".
14. The method according to claim 13, characterized in that, The step of sending a positioning notification to the spherical monitoring device for the target to be located, so that the spherical monitoring device can locate the target and then acquire an image to obtain a partial view, includes: The first coordinate data of the target to be located in the monitoring screen is converted into second coordinate data in the coordinate system of the spherical monitoring device; The second coordinate data is sent to the spherical monitoring device so that the spherical monitoring device can locate the target to be located based on the second coordinate data, and then perform image acquisition after location to obtain a partial image; Correspondingly, mapping the image acquisition area corresponding to the partial view to the monitoring screen to obtain the mapping area corresponding to the partial view includes: Based on the second coordinate data, the image acquisition area corresponding to the local scene is mapped onto the monitoring screen to obtain the mapped area corresponding to the local scene.
15. The method according to claim 14, characterized in that, The second coordinate data includes the horizontal rotation angle, the vertical pitch angle, and the zoom ratio; Correspondingly, the step of mapping the image acquisition area corresponding to the partial view to the monitoring screen based on the second coordinate data to obtain the mapped area corresponding to the partial view includes: Based on the horizontal rotation angle and vertical pitch angle in the second coordinate data, and the field of view corresponding to the zoom ratio, the image acquisition area corresponding to the local image is mapped onto the monitoring screen to obtain the mapping area corresponding to the local image.
16. A gun-ball linkage positioning device, characterized in that, A gun-type monitoring device used in a PTZ (Pocket-Panel) linkage system, the device comprising: The target detection module is used to detect at least one monitored target in the monitoring screen; The trend determination module is used to determine, for each monitored target, whether the monitored target has a trend of leaving the monitoring screen based on the historical coordinate data of the monitored target; The target addition module is used to add the monitored target to a target queue in at least two candidate queues based on the result of the departure trend of the monitored target and the target type to which the monitored target belongs; The target selection module is used to select a target to be located from the at least two candidate queues and control the ball-and-gun linkage device in the gun to perform positioning processing on the target to be located.
17. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 15.
18. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 15.
19. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 15.