PTZ camera hidden danger tracking method
By dividing the monitoring area in the gimbal camera and calculating the tracking weight of the hidden danger target, combining the types and location of the hidden danger, automatic and accurate selection in multiple target scenarios is achieved, and the problem of randomness in tracking target selection in the existing technology is solved. Improved tracking stability.
Patent Information
- Application Number
- CN202310869696.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-17
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2043-07-17
Smart Images

Figure CN119323588A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the fields of image processing and computer vision, and in particular to a method for tracking hidden dangers of a pan-tilt camera. Background Art
[0002] The PTZ camera includes a PTZ and a camera mounted on the PTZ. The PTZ can rotate in multiple directions to change the monitoring area of the camera. Current PTZ cameras can be used in various scenarios such as daily hidden danger monitoring, hidden danger monitoring at construction sites, and hidden danger monitoring of power transmission lines. The PTZ camera of the prior art can identify hidden dangers in the video in real time, and after identifying the hidden danger target, track the hidden danger target for a period of time. However, the automatic selection of tracking targets in the existing technology in scenarios with multiple hidden danger targets is relatively random, and the hidden danger target to be selected is often not the one that is ultimately desired to be tracked, and manual selection of the tracking target is required. Summary of the invention
[0003] The present invention provides a method for tracking hidden dangers of a pan-tilt camera. In a scenario where multiple hidden danger targets are identified in a video picture, the present invention implements a process of manually selecting hidden danger targets to be tracked that is close to reality, thereby realizing automatic and accurate selection of hidden danger targets to be tracked.
[0004] The present invention provides the following technical solutions:
[0005] A method for tracking hidden dangers of a pan-tilt camera, the method comprising:
[0006] S10: Divide the surveillance image of the camera into multiple surveillance areas in advance, and assign a respective area weight to each surveillance area according to the degree of concern of each surveillance area to hidden dangers;
[0007] S20: pre-assigning a type weight to each hidden danger type according to the degree of concern for each hidden danger type and the severity of each hidden danger type;
[0008] S30: The PTZ controls the camera to stay at the initial position, and the camera continuously shoots video in real time, and performs hidden danger identification in real time, identifies hidden danger targets, and determines the hidden danger type of each hidden danger target;
[0009] S40: When hidden danger tracking is required, the location area where each hidden danger target is located is compared with each monitoring area of the monitoring screen to find all monitoring areas overlapping with each hidden danger target, and the maximum value of the area weights of all monitoring areas overlapping with each hidden danger target is used as the location weight of each hidden danger target;
[0010] S50: Calculating the tracking weight of each hidden danger target according to the position weight of each hidden danger target and the type weight of the hidden danger type of each hidden danger target;
[0011] S60: The hidden danger target with the largest tracking weight is taken as the target to be tracked, and the pan / tilt camera is controlled to track the target to be tracked. After the tracking is completed, the pan / tilt camera is controlled to return to the initial position.
[0012] Furthermore, if there are multiple hidden danger targets with the largest tracking weights, the multiple hidden danger targets with the largest tracking weights are taken as first-category candidate targets, and the hidden danger target with the largest position weight among the first-category candidate targets is selected as the target to be tracked;
[0013] If there are multiple potential danger targets with the largest position weights among the first category of candidate targets, then the multiple potential danger targets with the largest position weights are selected as the second category of candidate targets, and the potential danger target with the largest type weight among the second category of candidate targets is selected as the target to be tracked;
[0014] If there are multiple hidden danger targets with the largest type weights among the second category candidate targets, the multiple hidden danger targets with the largest type weights are taken as the third category candidate targets, and the hidden danger target with the largest hidden danger area among the third category candidate targets is selected as the target to be tracked.
[0015] Furthermore, when tracking the target to be tracked, the target to be tracked is enlarged to a set size, and the pan / tilt head is rotated so that the target to be tracked is always displayed at the center of the monitoring screen.
[0016] Furthermore, during the rotation of the pan / tilt head, a hidden danger target having the same hidden danger type as the target to be tracked and closest to the center point of the monitoring screen is selected for tracking.
[0017] Furthermore, during the rotation of the pan / tilt head, if there is no hidden danger target of the same hidden danger type as the target to be tracked, the hidden danger target closest to the center point of the monitoring screen is selected for tracking.
[0018] Furthermore, the tracking weight of each hidden danger target is calculated by the following formula:
[0019] Tracking weight = position weight + type weight.
[0020] The present invention has the following beneficial effects:
[0021] In the scenario where multiple hidden danger targets are identified in the video screen, the present invention divides the monitoring screen into multiple monitoring areas, sets the area weight of each monitoring area, and sets the type weight of each hidden danger type. The position weight of each hidden danger target is calculated by comparing the overlap between the hidden danger target and each monitoring area, and the tracking weight of each hidden danger target is calculated with the type weight of each hidden danger target. The hidden danger target to be finally tracked is determined according to the maximum value of different tracking weights. The present invention is close to the actual process of manually selecting the hidden danger target to be tracked, and realizes the automatic and accurate selection of the hidden danger target to be tracked. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flow chart of the method for tracking hidden dangers of a pan-tilt camera of the present invention;
[0023] Figure 2 A schematic diagram of multiple monitoring areas divided into monitoring screens and their area weights;
[0024] Figure 3 This is a schematic diagram of the overlap and comparison between hidden danger targets and various monitoring areas. DETAILED DESCRIPTION
[0025] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0026] The embodiment of the present invention provides a method for tracking hidden dangers of a pan-tilt camera, such as Figure 1 As shown, the method includes:
[0027] S10: Divide the monitoring screen of the camera into multiple monitoring areas in advance, and assign respective area weights to each monitoring area according to the degree of concern of each monitoring area to hidden dangers.
[0028] For example: Figure 2 As shown, the monitoring screen is divided into 9 monitoring areas, and a regional weight value is set for each monitoring area. The larger the regional weight is, the higher the degree of concern of this monitoring area is considered.
[0029] S20: According to the degree of concern for each hidden danger type and the severity of each hidden danger type, a respective type weight is pre-assigned to each hidden danger type.
[0030] There are many types of hidden dangers, such as construction machinery, fireworks, etc. The present invention assigns different type weight values to each type of hidden danger according to the degree of concern and severity. The larger the type weight, the higher the degree of concern for such hidden danger.
[0031] S30: The PTZ controls the camera to be at the initial position. The camera continuously shoots video in real time and performs hidden danger identification in real time, identifies hidden danger targets and determines the hidden danger type of each hidden danger target.
[0032] In the present invention, the camera is set on the pan-tilt, and the rotation of the camera is controlled by the up, down, left, and right rotation of the pan-tilt. In this step, the pan-tilt can be rotated to select a scene at an angle as the initial position for tracking (the initial position can be determined by setting the home position or the preset position). The camera continuously shoots video in real time and starts the hidden danger analysis and identification of the real-time video screen, identifies the hidden danger target and determines the hidden danger type of each hidden danger target. The specific method of hidden danger identification adopts the method of the prior art, such as machine learning and other methods, which will not be elaborated in the present invention.
[0033] S40: When hidden danger tracking is required, the location area of each hidden danger target is overlapped with each monitoring area of the monitoring screen to find out all monitoring areas overlapping with each hidden danger target, and the maximum value of the area weights of all monitoring areas overlapping with each hidden danger target is used as the location weight of each hidden danger target.
[0034] In this step, when hidden danger tracking is needed, you can add a hidden danger tracking task and set the time of the tracking task. When the time is up, the tracking task is considered to be over, for example, each tracking task tracks for 10 seconds. When performing hidden danger tracking tasks, the position of the hidden danger target in the monitoring screen is compared with each monitoring area, and the monitoring area with the highest area weight among the overlapping monitoring areas is selected, and its area weight is used as the position weight of the hidden danger target.
[0035] S50: Calculate the tracking weight of each hidden danger target according to the position weight of each hidden danger target and the type weight of the hidden danger type of each hidden danger target.
[0036] Exemplarily, the tracking weight of each hidden danger target may be calculated by the following formula: tracking weight=position weight+type weight.
[0037] S60: The hidden danger target with the largest tracking weight is taken as the target to be tracked, and the PTZ controls the camera to track the target to be tracked. After the tracking is completed, the PTZ controls the camera to return to the initial position.
[0038] like Figure 3 As shown in the figure, assuming that the dotted box represents the analyzed hidden danger target, hidden danger target 1, hidden danger target 2, and hidden danger target 3 are of the same hidden danger type, such as excavator, and their type hidden danger weights are all 6, then:
[0039] The tracking weight of hidden danger target 1 = 6 + 6 = 12;
[0040] The tracking weight of hidden danger target 2 = 9 + 6 = 15;
[0041] The tracking weight of hidden danger target 3 = 5 + 6 = 11;
[0042] Finally, the hidden danger target 2 is selected as the target to be tracked. After the tracking task is completed (such as reaching the set tracking time), it returns to the initial position, repeats the operations of S30 to S60, and selects the next target to be tracked for continuous tracking.
[0043] In the scenario where multiple hidden danger targets are identified in the video screen, the present invention divides the monitoring screen into multiple monitoring areas, sets the area weight of each monitoring area, and sets the type weight of each hidden danger type. The position weight of each hidden danger target is calculated by comparing the overlap between the hidden danger target and each monitoring area, and the tracking weight of each hidden danger target is calculated with the type weight of each hidden danger target. The hidden danger target to be finally tracked is determined according to the maximum value of different tracking weights. The present invention is close to the actual process of manually selecting the hidden danger target to be tracked, and realizes the automatic and accurate selection of the hidden danger target to be tracked.
[0044] When selecting the target to be tracked as mentioned above, if there are multiple hidden danger targets with the largest tracking weights, the multiple hidden danger targets with the largest tracking weights are taken as the first category candidate targets, and the hidden danger target with the largest position weight among the first category candidate targets is selected as the target to be tracked.
[0045] If there are multiple hidden danger targets with the largest position weights among the first category of candidate targets, the multiple hidden danger targets with the largest position weights are taken as the second category of candidate targets, and the hidden danger target with the largest type weight among the second category of candidate targets is selected as the target to be tracked.
[0046] If there are multiple hidden danger targets with the largest type weights among the second category candidate targets, the multiple hidden danger targets with the largest type weights will be taken as the third category candidate targets, and the hidden danger target with the largest hidden danger area among the third category candidate targets will be selected as the target to be tracked.
[0047] That is, when there are multiple hidden danger targets with the largest tracking weights, the hidden danger target with the largest location weight is prioritized for tracking, followed by the hidden danger target with the largest type weight, and finally the hidden danger target with the largest hidden danger area is prioritized for tracking.
[0048] When tracking the target in S60 of the present invention, the target is enlarged to a set size (eg, 1 / 8 of the monitoring screen), and the pan / tilt is rotated so that the target is always displayed at the center of the monitoring screen.
[0049] In the existing technology, the tracking process is easily disturbed by other hidden dangers, thus losing the tracking target. To solve this problem, the present invention selects hidden danger targets with the same hidden danger type as the target to be tracked and closest to the center point of the monitoring screen for tracking during the pan-tilt rotation process. The pan-tilt is rotated to ensure that the tracked hidden danger target is always at the center of the screen until the tracking task is completed.
[0050] Furthermore, during the pan / tilt rotation process, if there is no hidden danger target of the same hidden danger type as the target to be tracked, the hidden danger target closest to the center point of the monitoring screen is selected for tracking until the current tracking task is completed.
[0051] In the process of hidden danger tracking, the present invention tracks the hidden danger target of the same type closest to the center point. If there is no hidden danger target of the same type, it tracks other hidden danger targets closest to the center point. In the process of one tracking, the initially tracked hidden danger target can be tracked to the maximum extent to prevent the tracking target from being lost due to interference from other hidden dangers.
[0052] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for tracking hidden dangers of a PTZ camera, characterized in that: The method comprises: S10: Divide the surveillance image of the camera into multiple surveillance areas in advance, and assign respective area weights to each surveillance area according to the degree of concern of each surveillance area for hidden dangers; S20: pre-assigning a type weight to each hidden danger type according to the degree of concern for each hidden danger type and the severity of each hidden danger type; S30: The PTZ controls the camera to stay at the initial position, and the camera continuously shoots video in real time, and performs hidden danger identification in real time, identifies hidden danger targets, and determines the hidden danger type of each hidden danger target; S40: When hidden danger tracking is required, the location area where each hidden danger target is located is compared with each monitoring area of the monitoring screen to find all monitoring areas overlapping with each hidden danger target, and the maximum value of the area weights of all monitoring areas overlapping with each hidden danger target is used as the location weight of each hidden danger target; S50: Calculating the tracking weight of each hidden danger target according to the position weight of each hidden danger target and the type weight of the hidden danger type of each hidden danger target; S60: The hidden danger target with the largest tracking weight is taken as the target to be tracked, and the pan / tilt camera is controlled to track the target to be tracked. After the tracking is completed, the pan / tilt camera is controlled to return to the initial position.
2. The method for tracking hidden dangers of a PTZ camera according to claim 1, characterized in that: If there are multiple hidden danger targets with the largest tracking weights, the multiple hidden danger targets with the largest tracking weights are taken as first-category candidate targets, and the hidden danger target with the largest position weight among the first-category candidate targets is selected as the target to be tracked; If there are multiple potential danger targets with the largest position weights among the first category of candidate targets, then the multiple potential danger targets with the largest position weights are selected as the second category of candidate targets, and the potential danger target with the largest type weight among the second category of candidate targets is selected as the target to be tracked; If there are multiple hidden danger targets with the largest type weights among the second category candidate targets, the multiple hidden danger targets with the largest type weights are taken as the third category candidate targets, and the hidden danger target with the largest hidden danger area among the third category candidate targets is selected as the target to be tracked.
3. The method for tracking hidden dangers of a PTZ camera according to claim 1, characterized in that: When tracking the target to be tracked, the target to be tracked is enlarged to a set size, and the pan / tilt is rotated so that the target to be tracked is always displayed at the center of the monitoring screen.
4. The method for tracking hidden dangers of a PTZ camera according to claim 3, characterized in that: During the rotation of the pan / tilt head, a hidden danger target having the same hidden danger type as the target to be tracked and closest to the center point of the monitoring screen is selected for tracking.
5. The method for tracking hidden dangers of a PTZ camera according to claim 4, characterized in that: During the rotation of the pan / tilt head, if there is no hidden danger target of the same hidden danger type as the target to be tracked, the hidden danger target closest to the center point of the monitoring screen is selected for tracking.
6. The method for tracking hidden dangers of a PTZ camera according to any one of claims 1 to 5, characterized in that: The tracking weight of each hidden danger target is calculated by the following formula: Tracking weight = position weight + type weight.
Citation Information
Patent Citations
Danger prompting method and device and computer readable storage medium
CN111275911A
Target tracking method, monitoring equipment, storage medium and target tracking system
CN112055158A
Panoramic tracking method, panoramic monitoring tracking device and electronic equipment
CN113470083A
Target tracking method and system based on mobile camera
CN114827464A
Monitoring system
JP2016119626A
Cited By
Adaptive detection method based on guarantee of key target detection precision
CN121214357A