A method and system for identifying the approach of personnel to a port cable launch area, a terminal and a storage medium
Patent Information
- Application Number
- CN202610430253.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-02
- Publication Date
- 2026-08-18
AI Technical Summary
然而,传统技术无法根据这些动态因素实时更新危险区域,并及时调整危险等级判断标准
通过选取港口泊位固定缆柱作为物理参考物,利用激光测距仪精确测量其实际高度,并结合相机采集图像得到的像素高度,计算出像素距离系数。这一步骤建立了图像像素与实际物理距离的可靠映射关系,为后续准确计算人员与缆绳的实际距离奠定了基础,避免了因图像畸变或拍摄角度等因素导致的距离测量误差。
Smart Images

Figure CN122598087A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of port safety monitoring technology, specifically relating to a method, system, terminal, and storage medium for identifying personnel approach in a port cable ejection zone. Background Technology
[0002] In port operations, the cable ejection zone is a potentially extremely dangerous area. Port cables are typically used to secure ships. When a ship is subjected to external forces such as wind, waves, and tides, causing it to sway or shift, the cables are subjected to enormous tension and remain taut. If personnel inadvertently approach, the cables may suddenly snap or be ejected due to the ship's violent swaying, causing serious bodily injury or even endangering their lives.
[0003] Currently, port safety management for personnel in cable-launching areas mainly relies on manual patrols and simple video surveillance. Manual patrols are not only costly in terms of manpower and resources, but also lack the ability to provide 24 / 7, comprehensive real-time monitoring, failing to promptly detect personnel approaching dangerous areas. While traditional video surveillance systems can acquire real-time port footage, they only provide visual information and lack the ability to accurately measure the distance between personnel and cables, making it difficult to accurately determine whether personnel are within a danger zone.
[0004] Furthermore, most existing monitoring technologies do not take into account the dynamic changes in the port operating environment. For example, the tension of mooring lines changes constantly with factors such as the swaying of the ship, and the ship's berthing angle also affects the direction of force and the ejection range of the mooring lines. Meanwhile, the working environment and duration of personnel in the port are also important factors in assessing the level of danger. However, traditional technologies cannot update hazardous areas in real time based on these dynamic factors and adjust the hazard level assessment criteria accordingly. Summary of the Invention
[0005] To address the shortcomings of existing technologies that largely fail to consider the dynamic changes in the port operating environment—for example, the tension of cables constantly changes with factors such as ship swaying, affecting the direction of force and the ejection range—and the working environment and duration of personnel stay in the port are also crucial factors in assessing the level of danger, this invention provides a method, system, terminal, and storage medium for identifying personnel approaching port cable ejection zones to solve the aforementioned technical problems.
[0006] In a first aspect, the present invention provides a method for identifying personnel approach in a port cable ejection area, comprising: S1. Select the fixed cable bollards at the port berths as physical reference objects, obtain their actual heights, capture images of the cable bollards through network cameras and identify their pixel heights, and calculate the pixel distance coefficients. S2. Acquire panoramic images of port berths and perform multi-target segmentation on the acquired panoramic images of port berths to identify personnel, cables, bollards and ship outline targets. Extract the bounding box coordinates of personnel and cables and calculate the pixel distance between them in the image. Calculate the actual distance between personnel and cables through the pixel distance coefficient. When the actual distance is less than or equal to the preset danger threshold, filter out the danger area and trigger secondary focusing distance measurement. S3. Control the network camera to focus on the screened dangerous area, re-identify people and cables in the focused image and calculate the actual distance between them; S4. Obtain the current cable tension and ship berthing angle, and dynamically update the danger zone based on the obtained cable tension and ship berthing angle. S5. Obtain the personnel dwell time and work scene based on the focused image, and determine the hazard level based on the personnel dwell time, work scene, dangerous area, and actual distance between personnel and cable. S6. The actual distance between personnel and cables, personnel stay time, and work scene information are overlaid and displayed on the monitoring screen, and the corresponding alarm signal is output to the port security system according to the danger level.
[0007] Further improvements to this technical solution include step S1, which includes: S11. Select a fixed-height, unobstructed cable bollard in the port berth as a physical reference object, and use a laser rangefinder to measure the actual height H of the cable bollard, in meters. S12. Collect an image containing the cable post through a port monitoring network camera, extract the complete outline of the cable post in the image using a pre-stored edge detection algorithm, calculate the vertical difference between the top and bottom pixel coordinates of the outline, and obtain the pixel height h of the cable post in pixels. S13. Based on the actual height H of the cable post and the pixel height h, calculate the pixel distance coefficient K. The calculation formula is as follows: Where K represents the actual physical distance corresponding to 1 pixel in the image, in meters per pixel, and is used to establish the mapping relationship between image pixels and actual spatial scale.
[0008] Further improvements to this technical solution include step S2, which includes: S21. Collect panoramic images of the port berths using network cameras with resolutions of 2 megapixels or higher deployed in the port. The image resolution should be no less than 1920×1080 pixels. Use a pre-trained YOLOv8 deep learning model to perform multi-object segmentation on the panoramic images and output the bounding box coordinates (x1, y1, x2, y2) of personnel, cables, bollards, and ship outlines. Here, (x1, y1) is the pixel coordinate of the upper left corner of the bounding box, and (x2, y2) is the pixel coordinate of the lower right corner of the bounding box. S22. Extract the bounding box coordinates of the personnel and the cable, and calculate the pixel distance between them in the image. The calculation formula is: ;in, For the personnel bounding box coordinates, The coordinates of the cable boundary box, The unit is pixels; S23. Calculate the actual distance between the person and the cable using the pixel distance coefficient K obtained in step S. The formula is: ;in, The unit is meters; the calculated actual distance is compared with the preset danger threshold D, and... When this occurs, the area is marked as a danger zone and secondary focusing ranging is triggered.
[0009] Further improvements to this technical solution include step S3, which includes: S31. After receiving the secondary focusing instruction triggered in step S2, adjust the lens focal length so that the proportion of the dangerous area in the image is increased to more than 30% of the panoramic image, and obtain a high-resolution focused image with a resolution of not less than 2 million pixels. S32. Using a pre-trained YOLOv8 deep learning model, target recognition is performed on the focused image, and the bounding box coordinates of the personnel and the cable are re-extracted. and ; S33. Calculate the pixel distance between the person and the cable in the focused image. The formula is: ; S34. Calculate the actual distance after focusing, using the pixel distance coefficient K obtained in step S1. The formula is: .
[0010] Further improvements to this technical solution include step S4, which includes: S41. The tension γ of the cable is obtained by the tension sensor equipped with the cable; S42. Calculate the ship's berthing angle using the angle between the ship's outline boundary frame and the shoreline baseline. The formula is: ;in, The coordinates of the ship's outline bounding box. The coordinates of the endpoints of the shoreline baseline. The unit is radians; S43. Calculate the baseline radius R0 of the hazardous area: ;in, This is the actual length of the cable; S44. According to the ship's berthing angle The baseline radius R0 of the hazardous area is corrected using the following formula: Where R is the correction radius for the danger zone; S45. Using the two ends of the cable as a reference, generate points with pixel distances R / K corresponding to the danger zone correction radius R on both sides along the direction perpendicular to the cable, forming a dynamic danger zone polygon; the two ends include the pixel coordinates of the ship connection point P1. P2 pixel coordinates of the connection point with the shore-based cable post .
[0011] A further improvement to this technical solution is that, in step S45, the vertex coordinates of the dynamic hazardous area polygon are generated as follows: Calculate the cable direction vector ; Generate vertical unit vector ;in, Let x be the x-axis component of the cable direction vector. ; Let y be the y-axis component of the cable direction vector. ; The pixel coordinates of the polygon vertex are: ;in, Unit vector perpendicular to the cable direction Components on the x-axis; Unit vector perpendicular to the cable direction Components on the y-axis; ; ; ; Polygons are made of , , , They are connected sequentially to form a structure.
[0012] Further improvements to this technical solution include step S5, which includes: S51. In the focused image of step S3, the personnel target is continuously matched frame by frame using a pre-stored target tracking algorithm. The starting time t0 when the personnel enter the danger zone updated in step S4 is recorded. The difference between the current time t1 and t0 is the dwell time, and the formula is: ; where t is in seconds, and the timer is reset if personnel leave the danger zone; S52. By focusing on the image and analyzing the characteristics of the personnel's clothing, determine whether the personnel are cable maintenance workers; and when the personnel are determined to be cable maintenance workers, determine the scene coefficient s to be 0.5, otherwise the scene coefficient s to be 1; the characteristics of the personnel's clothing include whether they are wearing a safety helmet of a predetermined color and carrying maintenance tools. S53. Calculate the hazard assessment index I using the following formula: ;in, The preset base retention threshold; S54. Classify hazard levels according to the hazard assessment index I: when If the risk is deemed low, no alarm will be triggered. when When the risk level is determined to be medium, an early warning is issued. when If the situation is deemed high-risk, an emergency alarm will be triggered.
[0013] Secondly, the present invention provides a personnel proximity identification system for a port cable ejection area, comprising: The reference object calibration module is used to select fixed cable bollards at port berths as physical reference objects, obtain their actual height, receive cable bollard images captured by network cameras and identify their pixel heights, and calculate pixel distance coefficients. The far-field detection and initial screening module is used to acquire panoramic images of port berths, perform multi-target segmentation on the panoramic images to identify personnel, cables, bollards and ship outline targets, extract the bounding box coordinates of personnel and cables and calculate the pixel distance between them, calculate the actual distance through the pixel distance coefficient, and filter out dangerous areas and trigger a secondary focusing command when the actual distance is less than or equal to a preset danger threshold. The secondary focusing ranging module is used to receive secondary focusing instructions, control the network camera to focus on the dangerous area and acquire the focused image, identify people and cables in the focused image and calculate the actual distance between them; The hazardous area dynamic update module is used to obtain the current cable tension and the ship's berthing angle, and dynamically update the hazardous area based on the cable tension and the ship's berthing angle. The hazard level determination module is used to determine the hazard level based on the personnel dwell time and work scene obtained from the focused image, combined with the hazardous area and the actual distance between the personnel and the cable; The early warning output module is used to overlay the actual distance between personnel and cables, the time personnel stay, and the operation scene information on the monitoring screen, and output the corresponding alarm signal to the port security system according to the level of danger.
[0014] Thirdly, the present invention provides a terminal, comprising: Processor, memory, among which, This memory is used to store computer programs. The processor is used to retrieve and run the computer program from memory, causing the terminal to perform the terminal method described above.
[0015] Fourthly, the present invention provides a computer storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods described in the above aspects.
[0016] The beneficial effects of this invention are as follows: By selecting fixed bollards at port berths as physical references, their actual heights were precisely measured using a laser rangefinder. Combined with the pixel heights obtained from camera images, a pixel distance coefficient was calculated. This step established a reliable mapping relationship between image pixels and actual physical distances, laying the foundation for accurate calculation of the actual distance between personnel and the cables, and avoiding distance measurement errors caused by image distortion or shooting angles.
[0017] High-resolution network cameras are used to capture panoramic images of port berths, and a pre-trained YOLOv8 deep learning model is employed for multi-object segmentation, enabling rapid and accurate identification of personnel, cables, bollards, and vessel outlines. By calculating the pixel distance between personnel and cables in the image and combining this with a pixel distance coefficient, the actual distance is derived, thereby identifying hazardous areas and triggering secondary focusing and ranging. This method achieves real-time monitoring and preliminary hazard assessment of the port panorama, significantly improving the efficiency of detecting personnel approaching hazardous areas and reducing the workload and missed detection rate of manual inspections.
[0018] Upon receiving the secondary focusing command, the lens focal length is adjusted to acquire a high-resolution focused image, and the personnel and cable are identified and their distances calculated again. Secondary focusing distance measurement further improves the accuracy of distance measurement, especially when the distance between the personnel and cable is large and the bounding box is small in panoramic images. It can more accurately obtain the actual distance between them, providing more reliable data support for subsequent hazard level assessment.
[0019] By acquiring dynamic factors such as cable tension and ship berthing angle, and combining them with corresponding calculation formulas, the baseline radius of the hazardous area is corrected, and a dynamic hazardous area polygon is generated. This innovation fully considers the dynamic changes in the port operating environment, enabling real-time updates to the hazardous area. This makes the delineation of hazardous areas more consistent with the actual situation, avoiding misjudgments and omissions caused by fixed hazardous areas, and improving the accuracy and effectiveness of safety management.
[0020] Based on the time personnel remained in the work area obtained from focused images, and combined with the hazardous area and the actual distance between personnel and the cable, a hazard assessment index is calculated to classify the hazard level. This method comprehensively considers multiple factors affecting the degree of danger, enabling a more scientific and accurate assessment of the hazard level of personnel approaching the cable ejection zone, and providing a clear basis for taking appropriate safety measures.
[0021] The actual distance between personnel and cables, the time personnel remained in the area, and information about the work scenario are overlaid on the monitoring screen, and corresponding alarm signals are output to the port security system according to the level of danger. This intuitive display method and timely alarm mechanism enable port management personnel to quickly understand the situation on site and take timely measures, such as notifying personnel to evacuate and activating emergency plans, effectively preventing accidents and ensuring the safe operation of port operations. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic flowchart illustrating a method according to an embodiment of the present invention.
[0024] Figure 2 This is a schematic block diagram of a system according to an embodiment of the present invention.
[0025] Figure 3 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present invention.
[0026] 210 is the reference object calibration module, 220 is the long-range detection and initial screening module, 230 is the secondary focusing and ranging module, 240 is the dynamic update module for dangerous areas, 250 is the danger level determination module, and 260 is the early warning output module. Detailed Implementation
[0027] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the specific embodiments. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0029] Figure 1 This is a schematic flowchart illustrating a method for identifying personnel approach in a port cable ejection zone, provided by the present invention. Figure 1 The implementing entity could be a personnel proximity identification system for a port cable ejection area. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.
[0030] like Figure 1 As shown, the method includes: S1. Select the fixed cable bollards at the port berths as physical reference objects, obtain their actual heights, capture images of the cable bollards through network cameras and identify their pixel heights, and calculate the pixel distance coefficients. S2. Acquire panoramic images of port berths and perform multi-target segmentation on the acquired panoramic images of port berths to identify personnel, cables, bollards and ship outline targets. Extract the bounding box coordinates of personnel and cables and calculate the pixel distance between them in the image. Calculate the actual distance between personnel and cables through the pixel distance coefficient. When the actual distance is less than or equal to the preset danger threshold, filter out the danger area and trigger secondary focusing distance measurement. S3. Control the network camera to focus on the screened dangerous area, re-identify people and cables in the focused image and calculate the actual distance between them; S4. Obtain the current cable tension and ship berthing angle, and dynamically update the danger zone based on the obtained cable tension and ship berthing angle. S5. Obtain the personnel dwell time and work scene based on the focused image, and determine the hazard level based on the personnel dwell time, work scene, dangerous area, and actual distance between personnel and cable. S6. The actual distance between personnel and cables, personnel stay time, and work scene information are overlaid and displayed on the monitoring screen, and the corresponding alarm signal is output to the port security system according to the danger level.
[0031] To facilitate understanding of the present invention, the following description further illustrates the method for identifying personnel approaching a port cable launcher area, based on the principle of the present invention and the process of identifying personnel approaching a port cable launcher area in the embodiments.
[0032] First, step S1 includes: S11. Select a fixed-height, unobstructed cable bollard in the port berth as a physical reference object, and use a laser rangefinder to measure the actual height H of the cable bollard, in meters. S12. Collect an image containing the cable post through a port monitoring network camera, extract the complete outline of the cable post in the image using a pre-stored edge detection algorithm, calculate the vertical difference between the top and bottom pixel coordinates of the outline, and obtain the pixel height h of the cable post in pixels. S13. Based on the actual height H of the cable post and the pixel height h, calculate the pixel distance coefficient K. The calculation formula is as follows: Where K represents the actual physical distance corresponding to 1 pixel in the image, in meters per pixel, and is used to establish the mapping relationship between image pixels and actual spatial scale.
[0033] S11a. Select the bollards in the port berths that meet the following conditions as physical reference objects: The height is fixed and there is no obvious deformation (the material is reinforced concrete or steel, and the height error is ≤ ±5cm). Unobstructed (no containers, transport vehicles or other obstacles within a 3-meter radius to avoid obstruction during image acquisition); Stable surface features (spraying high-contrast reflective paint, such as alternating yellow and black stripes, with a stripe width ≥10cm, to ensure that the outline is recognizable in the image).
[0034] S11b, Method for measuring actual height H: Using a laser rangefinder with an accuracy of ±1mm (such as a Leica DISTO D510), measure the vertical distance from the bottom (contact point with the ground) to the top (highest point) of the cable post at a horizontal distance of 5 meters. Take the average value of the three consecutive measurements as the actual height H.
[0035] S12a, Image acquisition parameter settings: The port uses existing 2-megapixel network cameras (such as Hikvision DS-2CD3T25-I3), with the following parameter settings: Resolution: 1920×1080 pixels (16:9 aspect ratio); Focal length: 8mm (ensure the cable column occupies 5%-15% of the vertical pixel area in the image); Frame rate: 25fps; Exposure time: Auto (in backlit scenes, enable wide dynamic range mode, dynamic range ≥120dB).
[0036] Environmental adaptability: Supports wide dynamic range (≥120dB), backlight compensation and 3D noise reduction, and can still output clear images in backlight, nighttime (with infrared fill light, effective distance ≥30 meters) and other scenarios; The camera is mounted on the berth crane support or column, 8-10 meters above the ground, with a 30° downward angle, to ensure that the cable, ship and personnel targets are unobstructed; The data acquisition time covered different lighting conditions (such as sunny noon, cloudy day, and nighttime supplemental lighting), with 10 frames acquired under each condition.
[0037] S12b, Edge Detection and Contour Extraction: The specific steps for processing images using the Canny edge detection algorithm from the OpenCV 4.5.5 library are as follows: Image preprocessing: Convert the color image to grayscale and remove noise using a 3×3 Gaussian filter (σ=1.0). Edge detection: Set the high threshold to 150 and the low threshold to 50 to extract the cable post edges; Outline filtering: The complete outline of the bollard is filtered out by the outline area (≥500 pixels) and the aspect ratio (≥3:1, excluding approximately square bollards).
[0038] S13a, Dynamic calibration mechanism: Considering that network cameras may shift position due to wind, maintenance, etc., a calibration is automatically performed every hour. Reacquire cable post images and calculate h_new; If |h_new-h|>5% (i.e., the pixel height change exceeds 5%), then update K=H / h_new; The calibration results are stored in the system log to ensure that the ranging error is ≤0.5 meters.
[0039] Secondly, step S2 includes: S21. Collect panoramic images of the port berths using network cameras with resolutions of 2 megapixels or higher deployed in the port. The image resolution should be no less than 1920×1080 pixels. Use a pre-trained YOLOv8 deep learning model to perform multi-object segmentation on the panoramic images and output the bounding box coordinates (x1, y1, x2, y2) of personnel, cables, bollards, and ship outlines. Here, (x1, y1) is the pixel coordinate of the upper left corner of the bounding box, and (x2, y2) is the pixel coordinate of the lower right corner of the bounding box. S22. Extract the bounding box coordinates of the personnel and the cable, and calculate the pixel distance between them in the image. The calculation formula is: ;in, For the personnel bounding box coordinates, The coordinates of the cable boundary box, The unit is pixels; S23. Calculate the actual distance between the person and the cable using the pixel distance coefficient K obtained in step S. The formula is: ;in, The unit is meters; the calculated actual distance is compared with the preset danger threshold D, and... When this occurs, the area is marked as a danger zone and secondary focusing ranging is triggered.
[0040] Training and deployment of YOLOv8 models: Model pre-training: The YOLOv8n model was pre-trained based on the COCO dataset (containing 80 target classes), with the initial weights using the officially released yolov8n.pt. Port scene fine-tuning: Fine-tuning was performed using 5,000 port berth annotation images (covering day and night, rain, snow, fog and other environments). The annotation targets included "personnel", "cable ropes", "mooring posts" and "ship outlines", with ≥10,000 annotation boxes for each type of target. LabelStudio was used as the annotation tool, and the bounding box coordinate error was ≤2 pixels.
[0041] Training parameters: The model was trained on an NVIDIA A100 graphics card with a batch size of 16, an initial learning rate of 0.01, and 300 iterations. The final model achieved an mAP of 0.5 ≥ 0.92 on the validation set (mAP ≥ 0.95 for personnel targets and mAP ≥ 0.88 for cable targets).
[0042] Inference Deployment: Convert the trained model to ONNX format and deploy it on the port edge computing terminal (such as NVIDIA Jetson AGX Xavier). The single-frame inference time is ≤50ms, and the output target bounding box coordinates are (x1,y1,x2,y2), where (x1,y1) is the pixel coordinate of the upper left corner of the bounding box and (x2,y2) is the pixel coordinate of the lower right corner. The coordinate values are accurate to 1 pixel.
[0043] Next, step S3 includes: S31. After receiving the secondary focusing instruction triggered in step S2, adjust the lens focal length so that the proportion of the dangerous area in the image is increased to more than 30% of the panoramic image, and obtain a high-resolution focused image with a resolution of not less than 2 million pixels. S32. Using a pre-trained YOLOv8 deep learning model, target recognition is performed on the focused image, and the bounding box coordinates of the personnel and the cable are re-extracted. and ; S33. Calculate the pixel distance between the person and the cable in the focused image. The formula is: ; S34. Calculate the actual distance after focusing, using the pixel distance coefficient K obtained in step S1. The formula is: .
[0044] The system receives the secondary focusing command output from step S2, which includes the center pixel coordinates (x_center, y_center) and the bounding box coordinates (x_min, y_min, x_max, y_max) of the hazardous area. The system establishes communication with the camera through an industrial camera control protocol (such as the ONVIF protocol) to obtain the current camera focal length (the initial focal length is set to 2.8mm).
[0045] Based on the proportion of the danger zone in the panoramic image (current proportion = ((x_max-x_min)×(y_max-y_min)) / (1920×1080)), the target focal length is calculated using the following formula. : ;in, This is the current focal length (unit: mm). The target percentage is set at 0.3 (30%). The focal length adjustment range is limited to 2.8-12mm (to avoid exceeding the lens's physical focal length range). During the adjustment process, a step adjustment is achieved through the camera's built-in motor, with a step size of 0.1mm. After each adjustment, wait 300ms to ensure image stabilization.
[0046] If the dangerous area accounts for 10% of the panoramic image and the current focal length is 2.8mm, then the target focal length is 2.8×(0.3 / 0.1)=8.4mm. After adjustment, the dangerous area accounts for 32%, which meets the requirements.
[0047] The same pre-trained YOLOv8 model as in step S2 (fine-tuned for the port scene) is used, but the inference parameters are optimized for the focused image: Confidence threshold: increased from 0.5 for panoramic images to 0.8 (to reduce false recognition of complex backgrounds within the focal area); Non-maximum suppression (NMS) threshold: 0.3 (to avoid duplicate annotations when personnel and cable bounding boxes overlap).
[0048] Subsequently, step S4 includes: S41. The tension γ of the cable is obtained by the tension sensor equipped with the cable; S42. Calculate the ship's berthing angle using the angle between the ship's outline boundary frame and the shoreline baseline. The formula is: ;in, The coordinates of the ship's outline bounding box. The coordinates of the endpoints of the shoreline baseline. The unit is radians; S43. Calculate the baseline radius R0 of the hazardous area: ;in, This is the actual length of the cable; S44. According to the ship's berthing angle The baseline radius R0 of the hazardous area is corrected using the following formula: Where R is the correction radius for the danger zone; S45. Using the two ends of the cable as a reference, generate points with pixel distances R / K corresponding to the danger zone correction radius R on both sides along the direction perpendicular to the cable, forming a dynamic danger zone polygon; the two ends include the pixel coordinates of the ship connection point P1. P2 pixel coordinates of the connection point with the shore-based cable post .
[0049] Furthermore, in step S45, the vertex coordinates of the dynamic hazardous area polygon are generated as follows: Calculate the cable direction vector ; Generate vertical unit vector ;in, Let x be the x-axis component of the cable direction vector. ; Let y be the y-axis component of the cable direction vector. ; The pixel coordinates of the polygon vertex are: ;in, Unit vector perpendicular to the cable direction Components on the x-axis; Unit vector perpendicular to the cable direction Components on the y-axis; ; ; ; Polygons are made of , , , It is formed by connecting them sequentially, specifically by using polygons. → → → → They are connected sequentially to form a closed danger zone.
[0050] Step S41a, Tension Sensor Selection and Deployment: A cable-specific tension sensor (such as the LXT-100 tension / compression sensor) is used, with the following technical parameters: Measurement range: 0-500kN (suitable for cables with diameters of 20-200mm commonly used in ports). Accuracy class: 0.5 (error ≤ ±0.5% FS); Output signal: 4-20mA analog signal, converted into a digital signal by an A / D converter (sampling rate 10Hz); The sensor is installed at the connection point between the cable and the shore-based bollard (0.5 meters from the end point) to ensure that it is coaxial with the cable and avoids measurement errors caused by bending.
[0051] Tension γ is defined as the ratio of actual tension to rated tension, and the formula is: ;in, Real-time sensor measurement (unit: kN); The rated breaking tension of the cable (determined by the cable specifications, such as 200kN for a steel cable with a diameter of 50mm); the tension γ ranges from 0.5 to 1.2 (when γ > 1.2, it is judged as an over-tension state and is forcibly calculated as γ = 1.2).
[0052] Ship outline bounding box coordinates: Extract the bounding box of the "ship" category from the YOLOv8 recognition results in step S2. ,in The coordinates of the top left pixel. The coordinates of the bottom right pixel are used, and the longest side is taken as the main direction of the ship (if the width is greater than the height, the main direction is horizontal; otherwise, it is vertical).
[0053] The shoreline baseline endpoint coordinates are: The shoreline baseline (parallel to the edge of the wharf) is pre-determined by manual marking, and the endpoint coordinates are: and , stored in the system configuration file (such as the horizontal line of the dock edge from (0, 500) to (1920, 500)).
[0054] Then, step S5 includes: S51. In the focused image of step S3, the personnel target is continuously matched frame by frame using a pre-stored target tracking algorithm. The starting time t0 when the personnel enter the danger zone updated in step S4 is recorded. The difference between the current time t1 and t0 is the dwell time, and the formula is: ; where t is in seconds, and the timer is reset if personnel leave the danger zone; S52. By focusing on the image and analyzing the characteristics of the personnel's clothing, determine whether the personnel are cable maintenance workers; and when the personnel are determined to be cable maintenance workers, determine the scene coefficient s to be 0.5, otherwise the scene coefficient s to be 1; the characteristics of the personnel's clothing include whether they are wearing a safety helmet of a predetermined color and carrying maintenance tools. S53. Calculate the hazard assessment index I using the following formula: ;in, The preset base retention threshold; S54. Classify hazard levels according to the hazard assessment index I: when If the risk is deemed low, no alarm will be triggered. when When the risk level is determined to be medium, an early warning is issued. when If the situation is deemed high-risk, an emergency alarm will be triggered.
[0055] A ResNet-18-based image classification model is used to analyze the clothing features of people in focused images. The identification process is as follows: Feature extraction: The bounding box region of the person is cropped from the focused image (expanded by 10% pixels to include the complete clothing), and resized to 224×224 pixels as the model input; Model training: The model was trained using 2000 images of port workers (1000 images of maintenance workers and 1000 images of general staff). The labeled features for the maintenance workers included: Helmet color: Orange (RGB threshold: R=200-255, G=100-150, B=0-50); Tools carried: wrench, torque meter, etc. (identified with the aid of a target detection model, with a confidence level ≥ 0.6); Classification output: The model outputs two probabilities: "maintenance worker" and "non-maintenance worker". When the probability of "maintenance worker" is ≥0.8, it is determined to be an authorized operator.
[0056] Corresponding response measures: Low risk: No alarms are triggered; only the location and time of personnel are recorded in the system log. Medium risk: Triggering an alert, the personnel boundary frame in the monitoring screen flashes yellow, and a prompt message (including personnel coordinates and distance) is sent to the port security terminal at the same time. High risk: Triggers an emergency alarm, displays a red danger zone on the monitoring screen, activates the on-site audible and visual alarm (volume ≥110dB, flashing frequency 2Hz), and dials the preset management personnel's phone number.
[0057] Finally, step S6 includes: S61a. Real-time information overlay is performed on the focused image from step S3 and the panoramic image from step S2, specifically including: Actual distance between personnel and cable: Displayed as "Distance: XX meters" in bold white font (24pt), with a semi-transparent black background (70% transparency), located 10 pixels directly above the personnel's bounding box; XX represents the pixel distance between the personnel and cable calculated in step S3. (Accurate to 0.1 meters).
[0058] Personnel dwell time: Displayed in the form of "Dwell time: X seconds", with bold yellow font (24pt), background as above, located 10 pixels directly below the information; X is t (accurate to 1 second) calculated in step S51.
[0059] Work scenario identification: If it is a maintenance worker (s=0.5 in step S52), then an orange "Under Maintenance" label (18pt font, semi-transparent orange background) will be overlaid in the upper right corner of the personnel boundary box; otherwise, the label will not be displayed.
[0060] Dangerous area marking: Dangerous areas updated in step S4 are marked in real time with red dashed polygons (3 pixels wide, 80% transparency), and the inside of the polygons is filled with red semi-transparent blocks (30% transparency).
[0061] S61b, Display update frequency and adaptation: Information update frequency: synchronized with the camera frame rate (25fps) to ensure that dynamic data such as distance and time are refreshed in real time; Multi-view adaptation: The panoramic image only displays the danger zone markings and the approximate location of personnel, while the focused image displays complete details. The two are displayed in tandem through a picture-in-picture mode (the focused image occupies 30% of the panoramic image area and is located in the upper right corner).
[0062] S62a. Alarm signal types and corresponding measures: Based on the hazard level determined in step S54, three types of alarm signals are output, with specific parameters as follows: Low risk (no alarms): Events are recorded only in the local system log (storage path: / var / log / port_security / ), including time (accurate to milliseconds), personnel coordinates, distance and stay time. The logs are retained for 30 days.
[0063] Medium risk (warning): The screen displays the following: The bounding box of the person in the focused image is flashing (yellow, frequency 2Hz), and the polygon of the danger zone is flashing synchronously. System notification: A JSON-formatted warning message is sent to the port security system (IP address defaulted to 192.168.1.100, port 8080) via TCP / IP protocol, containing the following fields: {"level":"warning","time":"2024-08-05 10:00:00","location":{"x":500,"y":300},"distance":2.5,"stay_time":8}; Audible and visual prompts: Control the on-site warning lights (installed on the berth pillar, 5 meters above the ground) to emit a yellow flashing light (frequency 1Hz), with no sound output.
[0064] High risk (emergency alarm): The screen prompts: In the focused image, the personnel boundary and danger zone are flashed red at a high frequency (5Hz), and the corresponding area in the panoramic image is overlaid with a red "Emergency Danger" text label (48pt). System notification: Send a high-priority JSON message (field "level": "emergency") to the port security system, and trigger a system pop-up alarm (displayed in the center of the security monitoring main interface, and automatically pinned to the top if there is no operation within 5 seconds). Audible and visual alarm: Activate the on-site audible and visual alarm (model: LTE-1101J, installed within 30 meters of the cable), emitting a buzzer sound of more than 110dB (continuous sound) and a red flashing light (frequency 3Hz) until manually reset through the security system; Personnel notification: Automatically dials 3 preset management personnel phone numbers (via GSM module, numbers stored in system configuration file) and plays a voice prompt: "Emergency danger has occurred in the A3 cable area of berth. Personnel must be 1.2 meters away and remain for 15 seconds. Please handle immediately."
[0065] S63a, Communication protocol with port security system: The ONVIF protocol is used to interface with the port's existing security system (such as Hikvision iVMS-8700). The specific interaction process is as follows: When an alarm is triggered, the system proactively sends a PullPoint request to the security system and pushes alarm metadata (including event type, location, and time). After the security system responds, it returns an Ack confirmation signal. Once this system receives the signal, it stops sending it repeatedly (to avoid signal redundancy). When the danger is eliminated (such as when personnel leave the danger area or the alarm is manually reset), a Clear signal is sent, and the security system simultaneously cancels the alarm status.
[0066] In some embodiments, the personnel proximity recognition system 200 for the port cable launch area may include multiple functional modules composed of computer program segments. The computer programs for each program segment in the personnel proximity recognition system 200 for the port cable launch area may be stored in the memory of a computer device and executed by at least one processor to perform (see details). Figure 1 (Description) Function for identifying personnel proximity in the port cable launch area.
[0067] In this embodiment, the personnel proximity recognition system 200 in the port cable ejection area can be divided into multiple functional modules according to its functions, such as... Figure 2As shown. The functional modules may include: a reference object calibration module 210, a distant view detection and initial screening module 220, a secondary focusing and ranging module 230, a hazardous area dynamic update module 240, a hazardous level determination module 250, and an early warning output module 260. The module referred to in this invention is a series of computer program segments that can be executed by at least one processor and perform a fixed function, stored in memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0068] Specifically, the reference object calibration module 210 is used to select the fixed bollards of the port berth as physical reference objects, obtain their actual height, receive images of the bollards captured by the network camera and identify their pixel height, and calculate the pixel distance coefficient; the distant view detection and initial screening module 220 is used to acquire panoramic images of the port berth, perform multi-target segmentation on the panoramic images to identify personnel, cables, bollards and ship outline targets, extract the bounding box coordinates of personnel and cables and calculate the pixel distance between them, calculate the actual distance through the pixel distance coefficient, and screen out dangerous areas and trigger secondary focusing instructions when the actual distance is less than or equal to a preset danger threshold; the secondary focusing ranging module 230 is used to receive secondary focusing instructions and control The network camera focuses on the dangerous area and acquires a focused image, identifying personnel and cables in the focused image and calculating their actual distance; the dangerous area dynamic update module 240 is used to acquire the current cable tension and ship berthing angle, and dynamically update the dangerous area based on the cable tension and ship berthing angle; the danger level determination module 250 is used to acquire personnel dwell time and work scene based on the focused image, and determine the danger level by combining the dangerous area and the actual distance between personnel and cables; the early warning output module 260 is used to overlay the actual distance between personnel and cables, personnel dwell time and work scene information on the monitoring screen, and output the corresponding alarm signal to the port security system according to the danger level.
[0069] Figure 3 This is a schematic diagram of the structure of a terminal 300 provided in an embodiment of the present invention. The terminal 300 can be used to execute the personnel proximity identification method for port cable ejection areas provided in an embodiment of the present invention.
[0070] The terminal 300 may include a processor 310, a memory 320, and a communication module 330. These components communicate via one or more buses. Those skilled in the art will understand that the server structure shown in the figure does not constitute a limitation of the present invention. It may be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0071] The memory 320 can be used to store the execution instructions of the processor 310. The memory 320 can be implemented by any type of volatile or non-volatile memory terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the terminal 300 is able to perform some or all of the steps in the above method embodiments.
[0072] The processor 310 serves as the control center of the storage terminal, connecting various parts of the electronic terminal via various interfaces and lines. It executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 310 may consist only of a central processing unit (CPU). In this embodiment of the invention, the CPU may have a single processing core or include multiple processing cores.
[0073] The communication module 330 is used to establish a communication channel, enabling the storage terminal to communicate with other terminals. It receives user data sent by other terminals or sends user data to other terminals.
[0074] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, which, when executed, may include some or all of the steps provided in the embodiments of the present invention. The storage medium may be a magnetic disk, an optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0075] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or other media capable of storing program code. It includes several instructions to cause a computer terminal (which may be a personal computer, server, or a second terminal, network terminal, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0076] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the terminal embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
[0077] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or modules may be electrical, mechanical, or other forms.
[0078] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0079] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0080] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the present invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the present invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should also be covered within the protection scope of the present invention.
Claims
1. A method for identifying personnel approach in a port cable ejection area, characterized in that, include: S1. Select the fixed cable bollards at the port berths as physical reference objects, obtain their actual heights, capture images of the cable bollards through network cameras and identify their pixel heights, and calculate the pixel distance coefficients. S2. Acquire panoramic images of port berths and perform multi-target segmentation on the acquired panoramic images of port berths to identify personnel, cables, bollards and ship outline targets. Extract the bounding box coordinates of personnel and cables and calculate the pixel distance between them in the image. Calculate the actual distance between personnel and cables through the pixel distance coefficient. When the actual distance is less than or equal to the preset danger threshold, filter out the danger area and trigger secondary focusing distance measurement. S3. Control the network camera to focus on the screened dangerous area, re-identify people and cables in the focused image and calculate the actual distance between them; S4. Obtain the current cable tension and ship berthing angle, and dynamically update the danger zone based on the obtained cable tension and ship berthing angle. S5. Obtain the personnel dwell time and work scene based on the focused image, and determine the hazard level based on the personnel dwell time, work scene, dangerous area, and actual distance between personnel and cable. S6. The actual distance between personnel and cables, personnel stay time, and work scene information are overlaid and displayed on the monitoring screen, and the corresponding alarm signal is output to the port security system according to the danger level.
2. The method for identifying personnel proximity in a port cable ejection zone according to claim 1, characterized in that, Step S1 includes: S11. Select a fixed-height, unobstructed cable bollard in the port berth as a physical reference object, and use a laser rangefinder to measure the actual height H of the cable bollard, in meters. S12. Collect an image containing the cable post through a port monitoring network camera, extract the complete outline of the cable post in the image using a pre-stored edge detection algorithm, calculate the vertical difference between the top and bottom pixel coordinates of the outline, and obtain the pixel height h of the cable post in pixels. S13. Based on the actual height H of the cable post and the pixel height h, calculate the pixel distance coefficient K. The calculation formula is as follows: Where K represents the actual physical distance corresponding to 1 pixel in the image, in meters per pixel, and is used to establish the mapping relationship between image pixels and actual spatial scale.
3. The method for identifying personnel proximity in a port cable ejection zone according to claim 2, characterized in that, Step S2 includes: S21. Collect panoramic images of the port berths using network cameras with resolutions of 2 megapixels or higher deployed in the port. The image resolution should be no less than 1920×1080 pixels. Use a pre-trained YOLOv8 deep learning model to perform multi-object segmentation on the panoramic images and output the bounding box coordinates (x1, y1, x2, y2) of personnel, cables, bollards, and ship outlines. Here, (x1, y1) is the pixel coordinate of the upper left corner of the bounding box, and (x2, y2) is the pixel coordinate of the lower right corner of the bounding box. S22. Extract the bounding box coordinates of the personnel and the cable, and calculate the pixel distance between them in the image. The calculation formula is: ;in, For the personnel bounding box coordinates, The coordinates of the cable boundary box, The unit is pixels; S23. Calculate the actual distance between the person and the cable using the pixel distance coefficient K obtained in step S. The formula is: ;in, The unit is meters; the calculated actual distance is compared with the preset danger threshold D, and... When this occurs, the area is marked as a danger zone and secondary focusing ranging is triggered.
4. The method for identifying personnel proximity in a port cable ejection zone according to claim 3, characterized in that, Step S3 includes: S31. After receiving the secondary focusing instruction triggered in step S2, adjust the lens focal length so that the proportion of the dangerous area in the image is increased to more than 30% of the panoramic image, and obtain a high-resolution focused image with a resolution of not less than 2 million pixels. S32. Using a pre-trained YOLOv8 deep learning model, target recognition is performed on the focused image, and the bounding box coordinates of the personnel and the cable are re-extracted. and ; S33. Calculate the pixel distance between the person and the cable in the focused image. The formula is: ; S34. Calculate the actual distance after focusing, using the pixel distance coefficient K obtained in step S1. The formula is: .
5. The method for identifying personnel proximity in a port cable ejection zone according to claim 2, characterized in that, Step S4 includes: S41. The tension γ of the cable is obtained by the tension sensor equipped with the cable; S42. Calculate the ship's berthing angle using the angle between the ship's outline boundary frame and the shoreline baseline. The formula is: ;in, The coordinates of the ship's outline bounding box. The coordinates of the endpoints of the shoreline baseline. The unit is radians; S43. Calculate the baseline radius R0 of the hazardous area: ;in, This is the actual length of the cable; S44. According to the ship's berthing angle The baseline radius R0 of the hazardous area is corrected using the following formula: Where R is the correction radius for the danger zone; S45. Using the two ends of the cable as a reference, generate points with pixel distances R / K corresponding to the danger zone correction radius R on both sides along the direction perpendicular to the cable, forming a dynamic danger zone polygon; the two ends include the pixel coordinates of the ship connection point P1. P2 pixel coordinates of the connection point with the shore-based cable post .
6. The method for identifying personnel proximity in a port cable ejection zone according to claim 5, characterized in that, In step S45, the vertex coordinates of the dynamic hazardous area polygon are generated as follows: Calculate the cable direction vector ; Generate vertical unit vector ;in, Let x be the x-axis component of the cable direction vector. ; Let y be the y-axis component of the cable direction vector. ; The pixel coordinates of the polygon vertex are: ;in, Unit vector perpendicular to the cable direction Components on the x-axis; Unit vector perpendicular to the cable direction Components on the y-axis; ; ; ; Polygons are made of , , , They are connected sequentially to form a structure.
7. The method for identifying personnel proximity in a port cable ejection zone according to claim 4, characterized in that, Step S5 includes: S51. In the focused image of step S3, the personnel target is continuously matched frame by frame using a pre-stored target tracking algorithm. The starting time t0 when the personnel enter the danger zone updated in step S4 is recorded. The difference between the current time t1 and t0 is the dwell time, and the formula is: ; where t is in seconds, and the timer is reset if personnel leave the danger zone; S52. By focusing on the image and analyzing the characteristics of the personnel's clothing, determine whether the personnel are cable maintenance workers; and when the personnel are determined to be cable maintenance workers, determine the scene coefficient s to be 0.5, otherwise the scene coefficient s to be 1; the characteristics of the personnel's clothing include whether they are wearing a safety helmet of a predetermined color and carrying maintenance tools. S53. Calculate the hazard assessment index I using the following formula: ;in, The preset base retention threshold; S54. Classify hazard levels according to the hazard assessment index I: when If the risk is deemed low, no alarm will be triggered. when When the risk level is determined to be medium, an early warning is issued. when If the situation is deemed high-risk, an emergency alarm will be triggered.
8. A personnel proximity identification system for a port cable ejection area, characterized in that, include: The reference object calibration module is used to select fixed cable bollards at port berths as physical reference objects, obtain their actual height, receive cable bollard images captured by network cameras and identify their pixel heights, and calculate pixel distance coefficients. The far-field detection and initial screening module is used to acquire panoramic images of port berths, perform multi-target segmentation on the panoramic images to identify personnel, cables, bollards and ship outline targets, extract the bounding box coordinates of personnel and cables and calculate the pixel distance between them, calculate the actual distance through the pixel distance coefficient, and filter out dangerous areas and trigger a secondary focusing command when the actual distance is less than or equal to a preset danger threshold. The secondary focusing ranging module is used to receive secondary focusing instructions, control the network camera to focus on the dangerous area and acquire the focused image, identify people and cables in the focused image and calculate the actual distance between them; The hazardous area dynamic update module is used to obtain the current cable tension and the ship's berthing angle, and dynamically update the hazardous area based on the cable tension and the ship's berthing angle. The hazard level determination module is used to determine the hazard level based on the personnel dwell time and work scene obtained from the focused image, combined with the hazardous area and the actual distance between the personnel and the cable; The early warning output module is used to overlay the actual distance between personnel and cables, the time personnel stay, and the operation scene information on the monitoring screen, and output the corresponding alarm signal to the port security system according to the level of danger.
9. A terminal, characterized in that, include: processor; Memory used to store the processor's execution instructions; The processor is configured to perform the method according to any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.