A camera-based method, system, device, and medium for drawing a person's trajectory
By using a camera-based personnel trajectory mapping method, combined with a BeiDou positioning terminal and a human target detection algorithm, the workload and accuracy issues of personnel trajectory positioning in substations have been resolved, thereby improving the monitoring capabilities of the substation security system and reducing equipment maintenance costs.
Patent Information
- Application Number
- CN202410100875.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-24
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-01-24
AI Technical Summary
Existing personnel trajectory positioning technologies in substations have shortcomings such as imposing additional workload on operators, low positioning accuracy, and high maintenance costs. There is a lack of methods to enable cameras to automatically analyze and map personnel positions using AI target detection technology.
A camera-based method for drawing personnel trajectories is adopted. By determining the camera coordinates, lens positioning coordinates, and relevant distance parameters, and combining them with a human target detection algorithm, the coordinates of the personnel are calculated and the positioning is solved. The Beidou positioning terminal is used to assist the camera positioning and draw the accurate movement trajectory of the personnel.
It improves the accuracy of identifying and tracking the movement trajectories of substation workers, strengthens the monitoring and early warning capabilities of the security system, reduces equipment and maintenance costs, and enables cameras to automatically analyze and map personnel positions.
Smart Images

Figure CN117935114B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of power operation safety management and control, and particularly relates to a personnel trajectory drawing method, system, device and medium based on a camera. BACKGROUND
[0002] When personnel enter a substation for operation or maintenance, the safety supervision requires drawing and tracing the action trajectory of the personnel. If the personnel enter a non-operation allowed area, a safety accident may occur, causing personal or property safety problems. The existing substation personnel trajectory recording is mainly based on Beidou positioning terminal, UWB wireless pulse positioning terminal and the like. The above methods mainly have the following disadvantages: 1. In order to realize personnel positioning, personnel need to wear additional positioning devices, which brings additional work burden to the operating personnel; 2. Beidou positioning is greatly affected by the environment. In cloudy and rainy weather, the positioning accuracy of Beidou positioning will have a great error, affecting the positioning accuracy. The positioning error of UWB wireless pulse positioning is relatively large in an environment with complex environment and many obstacles, and it is only suitable for open indoor scenes; 3. The use of positioning devices needs to build a wireless network connection, which brings additional hidden dangers and protection costs to the safety of the substation, and the devices and network bring additional material costs and maintenance costs.
[0003] A Chinese patent with publication number "CN115761808A" discloses a substation indoor personnel identification and positioning method, system, memory and device. The method calculates the position information of the indoor ultra-wideband positioning terminal in the substation based on the radio frequency signals sent by the indoor ultra-wideband positioning terminal in the substation, obtains the position trajectory of the indoor ultra-wideband positioning terminal in the substation, detects and tracks the indoor personnel in the substation based on the indoor video information of the substation, and obtains the personnel trajectory in the substation. The indoor personnel trajectory in the substation is matched with the indoor personnel trajectory in the substation, the indoor personnel in the substation is identified, and the personnel trajectory is obtained. The present application needs to wear an ultra-wideband device by the personnel in the substation, and based on the uniqueness of the ultra-wideband device number and the stability of the device signal, the UWB positioning personnel trajectory in the substation is used. The same as the above-mentioned, the personnel need to wear additional positioning devices, which brings additional work burden to the operating personnel, the positioning error of UWB wireless pulse positioning is relatively large in an environment with complex environment and many obstacles, and it is only suitable for open indoor scenes. SUMMARY
[0004] The present application provides a personnel trajectory drawing method, system, device and medium based on a camera, which aims to solve the problems of the existing substation personnel trajectory positioning technology, such as bringing additional work burden to the operating personnel, low positioning accuracy, high maintenance cost and the like, and lack of a method for automatically analyzing and drawing personnel positions by AI target detection technology.
[0005] To solve the above technical problems, the present application provides a camera-based personnel trajectory drawing method, comprising the following steps:
[0006] S1: determining camera coordinates, camera lens positioning coordinates and camera-related distance parameters.
[0007] S2: when a person walks into the camera picture monitoring range and the human body target detection algorithm detects the person, setting personnel coordinates and measuring related distance parameters.
[0008] S3: calculating the actual straight-line distance between C1 and C5 according to the camera coordinate parameters obtained in step S1 in combination with the personnel coordinate parameters measured in step S2, calculating the actual straight-line distance between C4 and C5 through the actual straight-line distance between C1 and C5, and positioning and solving the personnel coordinates C4 according to the actual straight-line distance between C1 and C5 and the actual straight-line distance between C4 and C5 to obtain the personnel coordinates after positioning and solving.
[0009] S4: calculating the personnel coordinates of all time periods at a set time interval according to the personnel coordinates after positioning and solving, simultaneously calculating the positioning results of different cameras on the selected regional plan, performing personnel coordinate mean value calculation, drawing a connected personnel trajectory with the obtained mean value personnel coordinates, and determining the accurate action trajectory of the personnel.
[0010] Preferably, the step S1 is specifically:
[0011] S11: using the Beidou positioning terminal worn by the personnel to position the camera in Beidou coordinates, obtaining the camera coordinates and setting them as C1, and obtaining the camera lens positioning coordinates of the set position in front of the camera lens and setting them as C2.
[0012] S12: simultaneously obtaining the camera picture erection height and setting it as h1, obtaining the ground coordinates of the midpoint of the bottom edge of the camera picture and setting them as C3, obtaining the horizontal distance between C3 and the camera and setting it as d1, and obtaining the actual visual angle width of the camera picture and setting it as w1.
[0013] Preferably, the step S2 is specifically: setting the personnel coordinates photographed by the camera as C4, setting the intersection point coordinates of the horizontal extension line of the personnel coordinates and the vertical center line of the camera picture as C5, measuring the horizontal offset distance of the personnel relative to the left frame in the picture and setting it as w2, measuring the vertical offset distance of the personnel relative to the bottom frame in the picture and setting it as h2, setting the camera resolution width as w3, and setting the camera resolution height as h3.
[0014] Preferably, the method for calculating the actual straight-line distance between C1 and C5 according to the camera coordinate parameters obtained in step S1 in combination with the personnel coordinate parameters measured in step S2 in the step S3 is specifically:
[0015] A1: coordinates of intersection point of straight line actually connected by C1 and C5 and vertical line of C3 are set as C6, height of C6 is set as h4, and the calculation formula of h4 is:
[0016]
[0017] In the formula, h1 is the camera picture erection height, h2 is the vertical offset distance of the person in the picture relative to the bottom frame, and h3 is the camera resolution height.
[0018] A2: actual straight line distance of C1 and C5 is set as d2, d2 is calculated according to h4, and the calculation formula of d2 is:
[0019]
[0020] In the formula, d1 is the horizontal distance of C3 and the camera, h4 is the height of C6, and h1 is the camera picture erection height.
[0021] Preferably, the method for calculating the actual straight line distance of C4 and C5 through the actual straight line distance of C1 and C5 in the step S3 is specifically:
[0022] B1: the horizontal offset distance of the person in the picture relative to the vertical center line of the picture is set as w4, and the calculation formula of w4 is:
[0023]
[0024] In the formula, w3 is the camera resolution width, and w2 is the horizontal offset distance of the person in the picture relative to the left frame.
[0025] B2: the intersection point of the straight line actually connected by C1 and C4 is set as C7, and the actual straight line distance of C7 and C3 is set as w5, and the calculation formula of w5 is:
[0026]
[0027] In the formula, w1 is the actual visual angle width of the camera picture, w4 is the horizontal offset distance of the person in the picture relative to the vertical center line of the picture, and w3 is the camera resolution width.
[0028] B3: the actual straight line distance of C4 and C5 is set as w6, w6 is calculated according to w5, and the calculation formula of w6 is:
[0029]
[0030] In the formula, w5 is the actual straight line distance of C7 and C3, d2 is the actual straight line distance of C1 and C5, and d1 is the horizontal distance of C3 and the camera.
[0031] Preferably, the method for positioning calculation according to d2 and w6 in the step S3 is specifically as follows:
[0032] C1: calculating the actual straight-line distance d3 between C1 and C7 according to d2 and w6, wherein the calculation formula of d3 is:
[0033]
[0034] wherein d2 is the actual straight-line distance between C1 and C5, and w6 is the actual straight-line distance between C4 and C5.
[0035] C2: setting the camera coordinate C1 as (x1, y1), setting the positioning coordinate C2 of the position in front of the camera lens as (x2, y2), setting the positioning coordinate C4 of the person as (x3, y3), setting the included angle between the straight line connected by C1 and C2 and the actual straight line connected by C1 and C4 as A, setting the included angle between the straight line connected by C1 and C2 and the longitude axis as B, and setting the included angle between the actual straight line connected by C1 and C4 and the longitude axis as C, wherein the calculation formula of A is:
[0036]
[0037] wherein d2 is the actual straight-line distance between C1 and C5, and w6 is the actual straight-line distance between C4 and C5.
[0038] The calculation formula of B is:
[0039]
[0040] wherein (x1, y1) is the camera coordinate C1, and (x2, y2) is the positioning coordinate C2 of the position in front of the camera lens.
[0041] The calculation formula of C is:
[0042] C=A+B
[0043] wherein A is the included angle between the straight line connected by C1 and C2 and the actual straight line connected by C1 and C4, and B is the included angle between the straight line connected by C1 and C2 and the longitude axis.
[0044] C3: setting the actual longitude difference between C1 and C4 as w7, and setting the actual latitude difference between C1 and C4 as h5, wherein the calculation formula of w7 is:
[0045] w7=d3*cosC
[0046] wherein d3 is the actual straight-line distance between C1 and C4, and C is the included angle between the actual straight line connected by C1 and C4 and the longitude axis.
[0047] The calculation formula of h5 is:
[0048] h5=d3*sinC
[0049] In the formula, d3 is the actual straight-line distance between C1 and C4, and C is the included angle between the actual straight line connected with C1 and C4 and the longitude axis.
[0050] According to w7 and h5, the (x3, y3) of the personnel coordinate C4 is calculated, and the calculation formula of (x3, y3) is:
[0051]
[0052] In the formula, (x1, y1) is the camera coordinate C1, w7 is the actual longitude difference between C1 and C4, and h5 is the actual latitude difference between C1 and C4.
[0053] In another aspect, the present application provides a personnel trajectory drawing system based on a camera, which comprises a personnel target detection module, a personnel positioning analysis module and a personnel trajectory drawing module.
[0054] The personnel target detection module is used for determining the camera coordinate, the camera lens positioning coordinate and the camera related distance parameter, and when a person walks into the camera picture monitoring range and the human target detection algorithm detects the person, the personnel coordinate and the related distance parameter are set.
[0055] The personnel positioning module is used for positioning and solving the personnel coordinate.
[0056] The personnel trajectory drawing module is used for calculating the personnel coordinate of all time periods according to the personnel coordinate after the positioning and solving, calculating the mean value of the personnel coordinate on the selected area plan in combination with the positioning results calculated by different cameras at the same time, and drawing the personnel trajectory of the connecting line according to the mean value personnel coordinate to determine the accurate action trajectory of the personnel.
[0057] In still another aspect, the present application further provides an electronic device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the personnel trajectory drawing method based on a camera according to any one of the embodiments of the present application when executing the computer program.
[0058] In still another aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executable on a processor to implement the personnel trajectory drawing method based on a camera according to any one of the embodiments of the present application.
[0059] Compared with the prior art, the present application has the following technical effects:
[0060] 1. The present application greatly improves the identification and tracking of the action trajectory of the personnel entering the substation by proposing a camera-based personnel trajectory drawing method. Combined with the security linkage system, the security system of the substation can strengthen the monitoring and early warning capability of the personnel activity area, provide video analysis and trajectory evidence for the standardized management of the personnel activity area in the power grid operation site, provide strong technical support, and have important significance for the intrinsic safety of the substation operation.
[0061] 2. The present application uses a human target detection algorithm to realize real-time calculation and conversion of multiple dimensions such as the offset angle and distance of the personnel relative to the camera position, and can achieve automatic analysis and drawing of the personnel position based on the camera. BRIEF DESCRIPTION OF DRAWINGS
[0062] Figure 1 is a whole flow chart of the camera-based personnel trajectory drawing method described in the present application;
[0063] Figure 2 is a side view of the camera parameters described in the present application;
[0064] Figure 3 is an actual view angle width top view of the camera picture described in the present application;
[0065] Figure 4 is a personnel coordinate and related parameter diagram in the camera picture described in the present application;
[0066] Figure 5 is a side view of the actual coordinate and related parameters described in the present application;
[0067] Figure 6 is a diagram of the horizontal offset distance of the personnel relative to the vertical center line of the picture described in the present application;
[0068] Figure 7 is a top view of the actual coordinate and related parameters described in the present application;
[0069] Figure 8 is a diagram of positioning and solving the personnel coordinate described in the present application;
[0070] Figure 9 is a diagram of mean value calculation of the personnel coordinate calculated by three cameras described in the present application;
[0071] Figure 10 is a whole structure diagram of the camera-based personnel trajectory drawing system described in the present application;
[0072] Figure 11 is a personnel entering the station action trajectory drawing diagram described in the present application. DETAILED DESCRIPTION
[0073] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with specific embodiments of the present application and with reference to the accompanying drawings.
[0074] Example 1
[0075] This embodiment proposes a method for drawing people's trajectories based on cameras. (See attached document.) Figure 1 As shown, it includes the following steps:
[0076] S1: Determine the camera coordinates, camera lens positioning coordinates, and related distance parameters of the camera, specifically:
[0077] S11: See also Figure 2 As shown, S11: Using a Beidou positioning terminal worn by personnel, the camera is positioned using Beidou coordinates. The camera coordinates are obtained and set as C1. The camera lens positioning coordinates at a set position directly in front of the camera lens are obtained and set as C2. In this embodiment, the set position can be set to approximately two meters directly in front of the camera lens.
[0078] S12: See also Figure 2 , Figure 3 As shown, the camera's mounting height is obtained and set as h1, the ground coordinates of the midpoint of the bottom edge of the camera's view are obtained and set as C3, the horizontal distance between C3 and the camera is obtained and set as d1, and the actual viewing angle width of the camera's view is obtained and set as w1.
[0079] S2: When a person enters the camera's monitoring range and the human target detection algorithm detects the person, set the person's coordinates and measure relevant distance parameters. (See [link]). Figure 4 As shown, specifically: set the coordinates of the person captured by the camera to C4, set the coordinates of the intersection of the horizontal extension line of the person's coordinates and the vertical center line of the camera screen to C5, measure the horizontal offset distance of the person in the screen relative to the left edge and set it to w2, measure the vertical offset distance of the person in the screen relative to the bottom edge and set it to h2, set the camera resolution width to w3, and set the camera resolution height to h3.
[0080] S3: Calculate the actual straight-line distance between C1 and C5 based on the camera coordinate parameters obtained in step S1 and the personnel coordinate parameters measured in step S2. Calculate the actual straight-line distance between C4 and C5 based on the actual straight-line distance between C1 and C5. Perform positioning calculation on the personnel coordinate C4 based on the actual straight-line distance between C1 and C5 and the actual straight-line distance between C4 and C5 to obtain the positioned personnel coordinates.
[0081] Specifically, the method for calculating the actual straight-line distance between C1 and C5 in step S3, based on the camera coordinate parameters obtained in step S1 and the personnel coordinate parameters measured in step S2, is as follows:
[0082] A1: coordinates of intersection point of straight line actually connected by C1 and C5 and vertical line of C3 are set as C6, height of C6 is set as h4, and the calculation formula of h4 is:
[0083]
[0084] In the formula, h1 is camera picture erection height, h2 is vertical offset distance of personnel in picture relative to bottom frame, and h3 is camera resolution height.
[0085] A2: d2 is calculated according to h4:
[0086]
[0087] The calculation formula of d2 after transformation equation is:
[0088]
[0089] In the formula, d1 is horizontal distance of C3 and camera, h4 is height of C6, h1 is camera picture erection height, h2 is vertical offset distance of personnel in picture relative to bottom frame, and h3 is camera resolution height.
[0090] Specifically, the method for calculating the actual straight line distance between C4 and C5 through C1 and C5 in the step S3 is specifically:
[0091] B1: referring to Figure 6 , horizontal offset distance of personnel in picture relative to vertical center line of picture is set as w4, and the calculation formula of w4 is:
[0092]
[0093] In the formula, w3 is camera resolution width, and w2 is horizontal offset distance of personnel in picture relative to left frame.
[0094] B2: referring to Figure 7 , intersection point of straight line actually connected by C1 and C4 and straight line where w1 is located is set as C7, and actual straight line distance between C7 and C3 is set as w5:
[0095]
[0096] The calculation formula of w5 after transformation equation is:
[0097]
[0098] In the formula, w1 is the actual visual angle width of the camera picture, w4 is the horizontal offset distance of the person in the picture relative to the vertical center line of the picture, and w3 is the camera resolution width.
[0099] B3: the actual straight-line distance between C4 and C5 is set as w6, w6 is calculated according to w5, and the calculation formula of w6 is:
[0100]
[0101] In the formula, w5 is the actual straight-line distance between C7 and C3, d2 is the actual straight-line distance between C1 and C5, and d1 is the horizontal distance between C3 and the camera.
[0102] Specifically, referring to FIG. 3, the method of positioning calculation according to d2 and w6 in step S3 is specifically: Figure 8
[0103] C1: the actual straight-line distance d3 between C1 and C7 is calculated according to d2 and w6, and the calculation formula of d3 is:
[0104]
[0105] In the formula, d2 is the actual straight-line distance between C1 and C5, and w6 is the actual straight-line distance between C4 and C5.
[0106] C2: according to the Beidou positioning coordinate system, the camera coordinate C1 is set as (x1, y1), the positioning coordinate C2 of the position directly in front of the camera lens is set as (x2, y2), the positioning calculation of the person coordinate C4 is set as (x3, y3), the included angle A between the straight line connected by C1 and C2 and the actual straight line connected by C1 and C4, the included angle B between the straight line connected by C1 and C2 and the longitude axis, and the included angle C between the actual straight line connected by C1 and C4 and the longitude axis, and the calculation formula of A is:
[0107]
[0108] In the formula, d2 is the actual straight-line distance between C1 and C5, and w6 is the actual straight-line distance between C4 and C5.
[0109] The calculation formula of B is:
[0110]
[0111] In the formula, (x1, y1) is the camera coordinate C1, and (x2, y2) is the positioning coordinate C2 of the position directly in front of the camera lens.
[0112] The calculation formula of C is:
[0113] C=A+B
[0114] In the formula, A is the included angle between the straight line connecting C1 and C2 and the actual straight line connecting C1 and C4, and B is the included angle between the straight line connecting C1 and C2 and the longitude axis.
[0115] C3: the actual longitude difference value of C1 and C4 is set as w7, and the actual latitude difference value of C1 and C4 is set as h5, the calculation formula of w7 is:
[0116] w7=d3*cosC
[0117] In the formula, d3 is the actual straight line distance between C1 and C4, and C is the included angle between the actual straight line connecting C1 and C4 and the longitude axis.
[0118] The calculation formula of h5 is:
[0119] h5=d3*sinC
[0120] In the formula, d3 is the actual straight line distance between C1 and C4, and C is the included angle between the actual straight line connecting C1 and C4 and the longitude axis.
[0121] According to w7 and h5, the (x3, y3) of the personnel coordinate C4 is calculated, and the calculation formula of (x3, y3) is:
[0122]
[0123] In the formula, (x1, y1) is the camera coordinate C1, w7 is the actual longitude difference value of C1 and C4, and h5 is the actual latitude difference value of C1 and C4.
[0124] S4: according to the personnel coordinate after positioning calculation, the personnel coordinates of all time periods are calculated at a set time interval, and in the selected regional plan, the personnel coordinate mean value is calculated in combination with the actual situation and different regions such as substations, in combination with the positioning results calculated by different cameras at the same time, to obtain the mean personnel coordinate to draw the personnel trajectory of the connecting line, and to determine the accurate action trajectory of the personnel.
[0125] Specifically, the positioning results calculated by different cameras at the same time are calculated, and the personnel coordinate mean value is calculated. Referring to Figure 9 , the embodiment lists three cameras at the same time, and the coordinate results P1, P2 and P3 calculated for the same personnel target appear position deviation, then the three coordinates are added and the mean value is calculated to obtain the mean personnel coordinate P0.
[0126] Embodiment two
[0127] Correspondingly, referring to Figure 10As shown, the application also provides a camera-based personnel trajectory drawing system, which comprises a personnel target detection module, a personnel positioning analysis module and a personnel trajectory drawing module, and communicates with the camera through the RSTP protocol.
[0128] The personnel target detection module is used to determine the camera coordinates, the camera lens positioning coordinates and the camera related distance parameters, and when a person walks into the camera picture monitoring range and the human target detection algorithm detects the person, the personnel coordinates and the related distance parameters are set; this module is used to realize the functions of steps S1 and S2 in the first embodiment, and will not be described here.
[0129] The personnel positioning module is used to position and solve the personnel coordinates; this module is used to realize the function of step S3 in the first embodiment, and will not be described here.
[0130] The personnel trajectory drawing module is used to calculate the personnel coordinates of all time periods at a set time interval according to the personnel coordinates after the positioning solution, and on the selected regional plan, the personnel coordinate mean value is calculated in combination with the positioning results calculated by different cameras at the same time, so that the personnel trajectory is drawn by the obtained mean personnel coordinates, and the accurate action trajectory of the personnel is determined; this module is used to realize the function of step S4 in the first embodiment, and will not be described here.
[0131] Referring to Figure 11 As shown, the system can be applied to determine the accurate action trajectory of personnel entering the substation. For example, in a small substation with a size of 150m x 100m, one camera is erected every 50m on the long sides of the two sides, and 2 cameras are erected on each side. One camera is erected at 50m on the short sides of the two sides. Each camera covers a fan-shaped area with a radius of 50m. The six cameras can cover most of the area of the substation. The drawing of the action trajectory of the personnel in the substation is realized.
[0132] Embodiment three
[0133] The embodiment provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the processor realizes a camera-based personnel trajectory drawing method according to any one of the embodiments of the application when executing the computer program.
[0134] Embodiment four
[0135] The embodiment provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize a camera-based personnel trajectory drawing method according to any one of the embodiments of the application.
[0136] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the cases of A alone, A and B together, and B alone. Wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" and the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0137] Those of ordinary skill in the art can realize that the units and algorithm steps described in the embodiments disclosed herein can be realized in electronic hardware, computer software, and a combination of electronic hardware and computer software. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0138] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0139] In several embodiments provided in the present application, any function realized in the form of a software function unit and sold or used as an independent product can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory; hereinafter referred to as: ROM), a random access memory (Random Access Memory; hereinafter referred to as: RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0140] The above only describes the embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation based on the content of the present application specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A camera-based method of people tracking, characterized in that, The method comprises the following steps: S1: determining camera coordinates, camera lens positioning coordinates and camera related distance parameters; S2: when a person walks into the camera picture monitoring range and a human body target detection algorithm detects the person, setting person coordinates and measuring related distance parameters; S3: calculate the personnel coordinate parameters according to the camera coordinate parameters acquired in step S1 and the personnel coordinate parameters measured in step S2 with actual straight-line distance, by with actual straight-line distance calculation with actual straight-line distance, according to with actual straight-line distance, with actual straight-line distance to the personnel coordinate perform positioning calculation, and obtain the personnel coordinate after the positioning calculation; S4: according to the person coordinates after positioning calculation, calculating the person coordinates of all time periods at a set time interval, on the selected area plan, combining the positioning results calculated by different cameras at the same time, performing person coordinate mean value calculation, and drawing a continuous line person trajectory according to the obtained mean value person coordinates to determine the accurate action trajectory of the person; The step S1 is specifically: S11: using the Beidou positioning terminal worn by the personnel to perform Beidou coordinate positioning on the camera, obtaining the camera coordinate and setting it as , obtaining the camera lens positioning coordinate of the set position in front of the camera lens and setting it as ; S12: get camera picture erecting height and set as , get camera picture bottom edge midpoint ground coordinate and set as , get horizontal distance from camera and set as , get camera picture actual visual angle width and set as ; The step S2 is specifically: Set the coordinate of the person shot by the camera as Set the coordinate of the intersection point of the horizontal extension line of the person coordinate and the vertical center line of the camera picture as Measure the horizontal offset distance of the person in the picture relative to the left side frame and set it as Measure the vertical offset distance of the person in the picture relative to the bottom frame and set it as Set the width of the camera resolution as Set the height of the camera resolution as ; The step S3 is performed according to With The method for positioning solution is specifically: S31: According to With Calculate With Actual straight-line distance , the The formula for calculating is: wherein is with actual straight-line distance, is with actual straight-line distance; S32: according to the Beidou positioning coordinate system, the camera coordinates Set as , the positioning coordinates of the camera lens front position Set as , the personnel coordinates Positioning solution is set as , the , The angle between the connected straight line and , The angle between the actual connected straight line and , the , The angle between the connected straight line and the longitude axis is set as , the , The angle between the actual connected straight line and the longitude axis is set as , the calculation formula of the The The calculation formula is: wherein is the camera coordinate , is the positioning coordinate of the set position in front of the camera lens ; The The calculation formula is: wherein is , the angle between the connecting straight line and , the angle between the actual connecting straight line and is , the angle between the connecting straight line and the meridian axis; S33: setting , the actual longitude difference value as , , the actual latitude difference value as , the calculation formula of the . wherein is and actual straight-line distance, is , the angle between the actual connected straight line and the longitude axis; The The calculation formula is: According to , calculate the personnel coordinates of the calculation formula is: wherein is the camera coordinate , is the , actual longitude difference, is the , actual latitude difference.
2. The camera-based people tracking method of claim 1, wherein, The step S3 combines the camera coordinate parameters obtained in step S1 with the personnel coordinate parameters measured in step S2 to calculate With The method for calculating the actual straight-line distance is specifically: A1: the height of the intersection point of the actual connected straight line and the vertical line is set as , the actual connected straight line and the vertical line the intersection point coordinate is set as , the height of the intersection point of the actual connected straight line and the vertical line is set as , the calculation formula of the intersection point of the actual connected straight line and the vertical line is , the calculation formula of the intersection point of the actual connected straight line and the vertical line is wherein, is the camera picture mounting height, is the vertical offset distance of the person in the picture relative to the bottom frame, is the camera resolution height; A2: the actual straight-line distance is set as with the actual straight-line distance is set as , according to the calculation formula of the actual straight-line distance is: , the calculation formula of the actual straight-line distance is: the calculation formula of the actual straight-line distance is: wherein is horizontal distance from the camera, is height of the camera, is the camera picture mounting height.
3. The camera-based method of drawing a person's trajectory according to claim 2, wherein, The step S3 is performed by With The actual straight-line distance calculation With The method of the actual straight-line distance is specifically: B1: set the horizontal offset distance of the person in the picture relative to the vertical center line of the picture as , the calculation formula of the is: In the formula, is the camera resolution width, is the horizontal offset distance of the person in the picture relative to the left frame. B2: the intersection point of the actual connected straight line and the straight line where the center of the circle is located is set as the first intersection point , the actual straight line distance between the first intersection point and the second intersection point is set as the first straight line distance , the intersection point of the actual connected straight line and the straight line where the center of the circle is located is set as the second intersection point , the actual straight line distance between the first intersection point and the second intersection point is set as the second straight line distance , the calculation formula of the first straight line distance and the second straight line distance is: In the formula, is the actual horizontal width of the camera view, is the horizontal offset distance of the person in the picture relative to the vertical center line of the picture, is the width of the camera resolution; B3: the straight line distance between the two points is calculated as With The actual straight line distance is set as According to The calculation formula of The calculation formula of The calculation formula of wherein is with actual straight-line distance, is with actual straight-line distance, is horizontal distance from the camera.
4. A camera-based people tracking system, characterized by, The system is used for realizing the camera-based person trajectory drawing method as claimed in any one of claims 1 to 3, and comprises a person target detection module, a person positioning analysis module and a person trajectory drawing module; The person target detection module is used for determining camera coordinates, camera lens positioning coordinates and camera related distance parameters, setting person coordinates and measuring related distance parameters when a person walks into the camera picture monitoring range and a human body target detection algorithm detects the person; The person positioning analysis module is used for performing positioning calculation on the person coordinates; The person trajectory drawing module is used for calculating the person coordinates of all time periods at a set time interval according to the person coordinates after positioning calculation, on the selected area plan, combining the positioning results calculated by different cameras at the same time, performing person coordinate mean value calculation, and drawing a continuous line person trajectory according to the obtained mean value person coordinates to determine the accurate action trajectory of the person.
5. An electronic device, comprising: The memory, the processor and the computer program stored on the memory and executable on the processor, characterized in that the processor implements the camera-based person trajectory drawing method as claimed in any one of claims 1 to 3 when executing the computer program.
6. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the camera-based person trajectory drawing method as claimed in any one of claims 1 to 3.
Citation Information
Patent Citations
Substation indoor personnel identification and positioning method, system, memory and equipment
CN115761808A
Power transmission line galloping monitoring method on basis of monocular vision analysis method
CN103698001A
Method and system for determining personnel track based on camera
CN112307912A