A method for intelligent monitoring and boundary violation early warning of construction planning red lines based on UAV aerial photography
By combining drone aerial photography with RTK systems and deep learning models, the problems of low accuracy and poor real-time performance of traditional construction planning red line monitoring methods have been solved. This has enabled full coverage and real-time dynamic monitoring of the construction area, improving monitoring efficiency and accuracy while reducing labor costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANGTZE THREE GORGES TECHNOLOGY & ECONOMY DEVELOPMENT CO LTD
- Filing Date
- 2026-02-25
- Publication Date
- 2026-06-30
Smart Images

Figure CN122306028A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of construction management, and in particular to a method for intelligent monitoring and early warning of construction planning red lines based on drone aerial photography. Background Technology
[0002] In the entire construction process, the construction planning red line is the core boundary defining the legal scope of the project's operations. It directly relates to the legality of the project's use, the safety of surrounding building structures, the protection of municipal pipelines, and the implementation of overall urban planning; it is the "lifeline" of construction management. Currently, construction projects generally exhibit characteristics such as a wide construction scope, rapid dynamic changes in the work area, and complex terrain environments. Traditional methods of monitoring construction red lines, which rely on manual on-site measurements, are no longer sufficient to meet the precise and real-time requirements of modern construction management.
[0003] Traditional construction planning boundary line monitoring mainly adopts a combination of total station fixed-point sampling and manual visual interpretation. This method has three major drawbacks: Low inspection coverage: Total stations can only perform discrete measurements on preset key points, and cannot achieve continuous monitoring of the entire construction area, which may easily miss the risk of boundary offset in non-critical areas. Delayed dynamic updates: Manual inspections are typically conducted every 1-3 days, making it difficult to capture changes in the red line boundary in real time, such as intensive operation of construction machinery or sudden adjustments to material stockpiling. This leads to delayed warnings of boundary crossing risks, which may cause compliance disputes or safety hazards. High subjective misjudgment rate: Visual interpretation relies on the experience of staff and is easily affected by factors such as light, weather, and terrain obstruction, which can lead to deviations in the identification of construction area boundaries, with a misjudgment rate of over 15%.
[0004] The above-mentioned defects are particularly prominent in large-scale infrastructure projects. Manual inspection requires a large investment of manpower and has low management efficiency. Delayed or misjudged monitoring results may lead to construction beyond the boundaries, damaging surrounding pipelines and encroaching on public space, which in turn may cause problems such as project delays and economic compensation.
[0005] Therefore, there is an urgent need for an intelligent monitoring technology for construction planning red lines that can cover the entire area, respond in real time, and make accurate judgments, so as to break through the limitations of traditional methods and promote the upgrading of construction management towards intelligence and automation. Summary of the Invention
[0006] The main objective of this invention is to provide an intelligent monitoring and boundary violation early warning method for construction planning red lines based on UAV aerial photography, which solves the problems of low monitoring accuracy, poor real-time performance, high labor costs, and limited coverage of traditional construction planning red line monitoring methods.
[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for intelligent monitoring and boundary crossing warning of construction planning red lines based on UAV aerial photography. Through four core processes, namely UAV data collection, construction area segmentation, red line coordinate mapping, and boundary crossing intelligent judgment, a complete construction planning red line monitoring technology system is formed. In the preferred embodiment, a method for intelligent monitoring and boundary violation early warning of construction planning red lines based on UAV aerial photography includes the following steps: S1. Select a drone equipped with a high-resolution aerial camera and a real-time differential positioning (RTK) system; the RTK system synchronously collects the drone's position information and flight attitude parameters, and the high-resolution camera is used to record continuous aerial video of the construction area.
[0008] In the preferred embodiment, step S1 further includes: Based on the scope of the construction area, a full-coverage flight route will be planned using UAV ground station software. The drone flies automatically along a preset route, simultaneously storing aerial video, RTK positioning data, and attitude parameters to the onboard storage module. Key frames are extracted from the collected aerial video at fixed time intervals. The image similarity algorithm is used to control the overlap rate of adjacent frames to be less than a preset value, so as to avoid continuous similar redundant frames occupying storage resources. Keyframe images are named using the format of time, GPS coordinates, and frame number, enabling precise association between each frame and the corresponding UAV position information and flight attitude parameters, providing basic data for subsequent coordinate transformation.
[0009] S2. Based on the project type of the target construction area, collect typical construction scene samples using drone aerial images, covering different construction stages, terrain and lighting conditions; use professional image annotation tools to annotate the boundaries of the construction areas in the samples, forming a sample dataset with pixel-level annotations.
[0010] In the preferred embodiment, step S2 further includes: Multi-dimensional data augmentation is performed on the sample dataset and real-time extracted keyframe images to improve the robustness and generalization ability of the deep learning model. Specific augmentation methods include: The brightness, contrast, hue, and saturation of the image are randomly adjusted, and Gaussian noise is added to simulate different lighting and weather conditions. The images are randomly cropped, but the core features of the construction area are preserved. The images are then horizontally flipped, rotated, and scaled to cover scenes from different shooting angles and distances. The deep learning model is a semantic segmentation model based on the U-Net++ architecture, which has excellent boundary extraction capabilities and is suitable for complex contours of construction areas. It takes the enhanced sample dataset as input, uses the cross-entropy loss function as the optimization objective, and trains the model iteratively by decaying the Adam optimizer. The training termination condition is: the cross-entropy loss function value of the validation set is less than the preset value, and the cross-union ratio of the construction area segment is greater than the preset cross-union ratio.
[0011] The logic for generating the construction area binarization mask is as follows: Real-time extracted keyframe images are input into the trained semantic segmentation model to obtain the classification and segmentation results of "construction area / non-construction area"; the segmentation results are optimized through morphological operations; and a construction area binarization mask is generated using a fixed threshold. Clearly define the spatial scope of the construction area.
[0012] S3. Using the CAD vector drawing of the construction planning red line, read the dedicated layer of "planning red line" in the drawing; extract the feature point coordinates of the red line outline. The feature point coordinate format is (X,Y,Z), where Z is the elevation value. Store it as a coordinate array, and then use a three-level coordinate transformation to map the three-dimensional actual coordinates of the planning red line to the pixel coordinates of the drone aerial image. In the preferred embodiment, in step S3: The specific process of multi-coordinate system transformation is as follows: Based on the ellipsoid parameters, projection method, and central meridian longitude marked on the CAD drawing, the coordinate transformation is completed using GIS software. The transformation formula is expressed as: ; in The coordinates are in the transformed coordinate system. For projection transformation function, The coordinates of the engineering coordinate system for the feature points along the planning red line; With the UAV's center of mass as the origin, establish a body-axis coordinate system: the X-axis represents the UAV's forward direction, the Y-axis represents horizontal to the right, and the Z-axis represents vertical downward. This is based on the UAV's position information collected by its inertial measurement unit. And real-time attitude parameters yaw angle, pitch angle and roll angle Construct the Euler transformation matrix R and the translation matrix S; convert the WGS84 coordinates to body axis coordinates through matrix operations, as expressed by the formula: ; Where S is the defined coordinate transformation matrix: ; R is the defined Euler transformation matrix. ; This refers to the location information of the drone. For the high-precision camera equipped on the UAV, Zhang Zhengyou's planar calibration method was used to calibrate it, determine the camera's intrinsic parameter matrix, and obtain the pixel coordinates of the planned red line based on the pinhole camera model. : ; in , Focal length , Principal point coordinates; For generating the binarized mask of the planned red line area, a limiting function is used based on the pixel coordinates of the transformed red line feature points. Constrain the coordinates to the valid range of the image to prevent them from going out of bounds; ; in , Where W is the image width in pixels and H is the image height in pixels; The constrained feature points are connected end to end in the order of the red line outline to form a closed red line region. The closed region is filled by the scan line filling algorithm to generate a binary mask of the planned red line region. In the mask, the pixel value "1" represents the legal region inside the red line and "0" represents the illegal region outside the red line.
[0013] S4. Intelligent judgment and early warning of behaviors that exceed the red line, and the binarized mask of the construction area generated by S2. Binarized mask of the planning red line area generated by S3 Pixel-level logical comparison is performed. The out-of-bounds region is defined as a set of pixels that belong to the construction area but not to the red line area, and the corresponding out-of-bounds region mask is used. The cross-boundary region is calculated and extracted using the following logical formula: ; in, This represents the complement of the red-lined area, i.e., the area outside the red line. This indicates a logical AND operation, which extracts pixels that simultaneously satisfy both the construction area and the area outside the red line. according to Count the number of pixels with a value of "1" in the mask of the out-of-bounds area. and the number of pixels with a value of "1" in the mask of the construction area. The percentage of the out-of-bounds area is calculated based on the ratio of the number of pixels. It is assumed that the actual area corresponding to a single pixel is... The area ratio is consistent with the pixel count ratio, expressed by the formula: ; Then, for each pixel within the boundary area, the Euclidean distance algorithm is used to calculate its shortest distance to the edge of the planned red line closed contour; all out-of-bounds pixels are traversed, and the maximum value of the shortest distance is taken as the maximum out-of-bounds distance. The formula is expressed as: ; in The shortest distance from each pixel to the edge of its planned red-line closed contour; In the preferred embodiment, step S4 further includes: Two thresholds are preset based on project management requirements: the threshold for the percentage of area exceeding the boundary. and maximum out-of-bounds distance threshold The classification is determined by combining the boundary crossing indicators: Serious boundary crossing is defined as: if and The system triggers a level-three warning and simultaneously records key information such as the time of the boundary crossing, the GPS coordinates of the center of the boundary crossing area, the boundary crossing area, and the maximum boundary crossing distance. Slight boundary violation is defined as: if or ,and , The system triggered a level-two warning, prompting administrators to pay attention and rectify the situation. No boundary crossing is: if and The system only records the monitoring results and does not trigger any warnings.
[0014] Automatically generate construction planning red line monitoring reports. The reports include monitoring date and time, monitoring area range, boundary violation judgment results, boundary violation details, corresponding aerial images and mask comparison diagrams, for construction management departments to archive and conduct compliance checks.
[0015] This invention provides an intelligent monitoring and boundary violation early warning method for construction planning red lines based on UAV aerial photography. Compared with existing traditional construction planning red line monitoring technologies, this invention constructs an integrated air, space, and ground automated monitoring system, integrating UAV aerial photography, RTK high-precision positioning, and intelligent ground data processing technologies to achieve full coverage and real-time dynamic monitoring of the construction area, improving monitoring efficiency and accuracy while reducing labor costs. It designs a transformation process between the engineering coordinate system, WGS84 coordinate system, aircraft axis coordinate system, and pixel coordinate system, combining Zhang Zhengyou camera calibration and real-time UAV attitude parameters to control coordinate transformation errors and ensure pixel-level boundary comparison accuracy. Through multi-dimensional data enhancement and morphological operations, it collaboratively improves the robustness of semantic segmentation, effectively solving the problem of boundary recognition ambiguity in complex scenarios such as dense machinery, undulating terrain, and changing lighting. Simultaneously, it introduces dual quantitative indicators—the proportion of boundary violation area and the maximum boundary violation distance—for graded early warning, avoiding polarized management and achieving precise early warning and graded handling. This provides decision support for rapid remediation of construction anomalies and reduces the risk of violations. Attached Figure Description
[0016] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a flowchart of a method for intelligent monitoring and boundary crossing early warning of construction planning red lines based on drone aerial photography, according to the present invention. Detailed Implementation Example 1 like Figure 1 As shown, a method for intelligent monitoring and boundary crossing early warning of construction planning red lines based on UAV aerial photography is combined with a case study of construction red line monitoring of water conservancy projects to provide a detailed explanation of the specific implementation process of the present invention; In this embodiment, the total construction area is approximately 8 square kilometers, involving concrete pouring, earthwork excavation, etc. The terrain in the construction area is highly undulating. A method for intelligent monitoring and boundary crossing warning of the construction planning red line based on drone aerial photography is adopted to avoid construction beyond the boundary that would occupy or damage the surrounding area.
[0017] In the preferred embodiment, a method for intelligent monitoring and boundary violation early warning of construction planning red lines based on UAV aerial photography includes the following steps: The S1 drone model is DJI Matrice 350RTK, equipped with Zenmuse P1 full-frame aerial camera and RTK positioning system; In the preferred embodiment, step S1 further includes: Based on the scope of the construction area, the DJI GS Pro ground station software was used to plan the flight path; The drone flies automatically along a preset route, simultaneously transmitting aerial video, RTK positioning data, and attitude parameters such as yaw angle range, pitch angle range, and roll angle range, while extracting key frames and storing them in the onboard storage module. By using an image similarity algorithm to control the overlap rate of two adjacent frames to be less than a preset value, key frames are extracted from the acquired aerial video, thus avoiding the occupation of storage resources by consecutive similar redundant frames. Keyframe images are named using the format of time, GPS coordinates, and frame number, enabling precise association between each frame and the corresponding UAV position information and flight attitude parameters, providing basic data for subsequent coordinate transformation.
[0018] S2. Based on the project type of the target construction area, aerial images of different construction stages of the water conservancy project are collected using drone aerial photography. The construction areas such as "concrete pouring area, earthwork excavation area, machinery parking area, and material storage area" are labeled using LabelMe to form a labeled sample set.
[0019] In the preferred embodiment, step S2 further includes: Enhancement of the sample set and keyframe images: brightness ±18%, contrast ±12%, hue ±8°, saturation ±15%, and addition of Gaussian noise with a variance of 0.008; and random cropping, horizontal flipping, rotation, and scaling are also performed. The deep learning model is the U-Net++ semantic segmentation model built on the PyTorch framework. It was trained for 300 rounds with an initial learning rate of 0.001, which decayed to 0.5 every 50 rounds. After training, the cross-entropy loss function value on the validation set was ≤0.05, and the intersection-over-union (IoU) ratio of the construction area segmentation was ≥0.9.
[0020] The logic for generating a binary mask for the construction area is as follows: Keyframe images extracted in real-time are input into the trained semantic segmentation model to obtain a classification segmentation result of "construction area / non-construction area". Morphological operations are then performed: a dilation operation on a 3×3 structuring element is iterated twice to eliminate small noise points; an erosion operation on a 3×3 structuring element is iterated once to connect the broken boundaries of the construction area, optimizing the segmentation result. A fixed threshold is used, and pixels with a classification probability ≥ 0.5 are identified as construction areas, generating a binary mask for the construction area. In the mask, pixel values "1" represent construction areas, and "0" represent non-construction areas, clearly defining the spatial range of the construction area.
[0021] S3. Using the CAD vector drawing of the construction planning red line, read the dedicated layer of "planning red line" in the drawing; extract the coordinates of 80 feature points of the red line outline using the AutoCAD API. The feature point coordinate format is (X,Y,Z), where Z is the elevation value. Store it as a coordinate array, and then use a three-level coordinate transformation to map the three-dimensional actual coordinates of the planning red line to the pixel coordinates of the drone aerial image. In the preferred embodiment, in step S3: The specific process of multi-coordinate system transformation is as follows: Based on the ellipsoid parameters, projection method, and central meridian longitude marked on the CAD drawing, ArcGIS is used to complete the coordinate transformation. The transformation formula is expressed as: ; in The coordinates are in the transformed coordinate system. For projection transformation function, The coordinates of the engineering coordinate system for the feature points along the planning red line; With the UAV's center of mass as the origin, establish a body-axis coordinate system: the X-axis represents the UAV's forward direction, the Y-axis represents horizontal to the right, and the Z-axis represents vertical downward. This is based on the UAV's position information collected by its inertial measurement unit. And real-time attitude parameters yaw angle, pitch angle and roll angle Construct the Euler transformation matrix R and the translation matrix S; convert the WGS84 coordinates to body axis coordinates through matrix operations, as expressed by the formula: ; Where S is the defined coordinate transformation matrix: ; R is the defined Euler transformation matrix. ; This refers to the location information of the drone. For the high-precision camera equipped on the UAV, Zhang Zhengyou's planar calibration method was used to calibrate it, determine the camera's intrinsic parameter matrix, and obtain the pixel coordinates of the planned red line based on the pinhole camera model. : ; in , Focal length , Principal point coordinates; For generating the binarized mask of the planned red line area, a limiting function is used based on the pixel coordinates of the transformed red line feature points. Constrain the coordinates to the valid range of the image to prevent them from going out of bounds; ; in , Where W is the image width in pixels and H is the image height in pixels; The constrained feature points are connected end to end in the order of the red line outline to form a closed red line region. The closed region is filled by the scan line filling algorithm to generate a binary mask of the planned red line region. In the mask, the pixel value "1" represents the legal region inside the red line and "0" represents the illegal region outside the red line.
[0022] S4. Intelligent judgment and early warning of behaviors that exceed the red line, and the binarized mask of the construction area generated by S2. Binarized mask of the planning red line area generated by S3 Pixel-level logical comparison is performed. The out-of-bounds region is defined as a set of pixels that belong to the construction area but not to the red line area, and the corresponding out-of-bounds region mask is used. The cross-boundary region is calculated and extracted using the following logical formula: ; in, This represents the complement of the red-lined area, i.e., the area outside the red line. This indicates a logical AND operation, which extracts pixels that simultaneously satisfy both the construction area and the area outside the red line. according to Count the number of pixels with a value of "1" in the mask of the out-of-bounds area. and the number of pixels with a value of "1" in the mask of the construction area. The percentage of the out-of-bounds area is calculated based on the ratio of the number of pixels. It is assumed that the actual area corresponding to a single pixel is... The area ratio is consistent with the pixel count ratio, expressed by the formula: ; Then, for each pixel within the boundary area, the Euclidean distance algorithm is used to calculate its shortest distance to the edge of the planned red line closed contour; all out-of-bounds pixels are traversed, and the maximum value of the shortest distance is taken as the maximum out-of-bounds distance. The formula is expressed as: ; in The shortest distance from each pixel to the edge of its planned red-line closed contour; In the preferred embodiment, step S4 further includes: Two thresholds are preset based on project management requirements: the threshold for the percentage of area exceeding the boundary. and maximum out-of-bounds distance threshold The classification is determined by combining the boundary crossing indicators: Serious boundary crossing is defined as: if and The system triggers a level-three warning and simultaneously records key information such as the time of the boundary crossing, the GPS coordinates of the center of the boundary crossing area, the boundary crossing area, and the maximum boundary crossing distance. Slight boundary violation is defined as: if or ,and , The system triggered a level-two warning, prompting administrators to pay attention and rectify the situation. No boundary crossing is: if and The system only records the monitoring results and does not trigger any warnings.
[0023] Automatically generate construction planning red line monitoring reports. The reports include monitoring date and time, monitoring area range, boundary violation judgment results, boundary violation details, corresponding aerial images and mask comparison diagrams, for construction management departments to archive and conduct compliance checks.
[0024] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.
Claims
1. A method for intelligent monitoring and boundary violation early warning of construction planning red lines based on UAV aerial photography, characterized in that, Includes the following steps: S1. Use drones to plan flight routes to collect aerial video of the construction area, extract key frames, and realize the association between frame images and position and attitude data; S2. Construct a sample dataset of construction scenarios and perform multi-dimensional data augmentation. Train a semantic segmentation model, optimize the segmentation results, and generate a binary mask for the construction area. S3. Analyze the planning red line map to extract the coordinates of feature points, and generate a binary mask of the planning red line area through three-level transformation; S4. Compare the construction area with the red line area to extract the boundary violation area using a mask, calculate the boundary violation area ratio and the maximum boundary violation distance, classify the boundary violation behavior according to the preset threshold and trigger the corresponding early warning, and output a monitoring report.
2. The method for intelligent monitoring and boundary violation early warning of construction planning red lines based on UAV aerial photography according to claim 1, characterized in that the steps are as follows: In S1: Based on the scope of the construction area, a full-coverage flight route will be planned using UAV ground station software. The drone flies automatically along a preset route, simultaneously storing aerial video, RTK positioning data, and attitude parameters to the onboard storage module. Keyframes use an image similarity algorithm to control the overlap rate between adjacent frames to be less than a preset value, thus avoiding the consumption of storage resources by consecutive similar redundant frames.
3. The intelligent monitoring and boundary violation early warning method for construction planning red lines based on UAV aerial photography according to claim 2, characterized in that: Keyframe images are named using the format of time, GPS coordinates, and frame number, and each frame is associated with the UAV's position information and flight attitude parameters at the corresponding time.
4. The intelligent monitoring and boundary violation early warning method for construction planning red lines based on UAV aerial photography according to claim 1, characterized in that, In step S2: Multi-dimensional data augmentation methods include: The brightness, contrast, hue, and saturation of the image are randomly adjusted, and Gaussian noise is added to simulate different lighting and weather conditions. After preserving the core features of the construction area, the images are randomly cropped, horizontally flipped, rotated, and scaled to cover scenes with different shooting angles and distances.
5. The intelligent monitoring and boundary violation early warning method for construction planning red lines based on UAV aerial photography according to claim 1, characterized in that, In step S2: The deep learning model is a semantic segmentation model adapted to the complex contours of the construction area. It takes the enhanced sample dataset as input, uses the cross-entropy loss function as the optimization objective, and iteratively decays the training model. The training termination conditions are: the cross-entropy loss function value of the validation set is less than the preset loss value, and the cross-union ratio of the construction area segment is greater than the preset cross-union ratio.
6. The intelligent monitoring and boundary violation early warning method for construction planning red lines based on UAV aerial photography according to claim 1, characterized in that, In step S2: The logic for generating the construction area binarization mask is as follows: Real-time extracted keyframe images are input into the trained semantic segmentation model to obtain the classification and segmentation results of "construction area / non-construction area"; the segmentation results are optimized through morphological operations; and a construction area binarization mask is generated using a fixed threshold. .
7. The intelligent monitoring and boundary violation early warning method for construction planning red lines based on UAV aerial photography according to claim 1, characterized in that, In step S3: The specific process of multi-coordinate system transformation is as follows: Based on the ellipsoid parameters, projection method, and central meridian longitude indicated on the drawing, the coordinate transformation is completed using software. The transformation formula is expressed as follows: ; in The coordinates are in the transformed coordinate system. For projection transformation function, The coordinates of the engineering coordinate system for the feature points along the planning red line; With the UAV's center of mass as the origin, establish a body-axis coordinate system: the X-axis represents the UAV's forward direction, the Y-axis represents horizontal to the right, and the Z-axis represents vertical downward. This is based on the UAV's position information collected by its inertial measurement unit. And real-time attitude parameters yaw angle, pitch angle and roll angle Construct the Euler transformation matrix R and the translation matrix S; convert the WGS84 coordinates to body axis coordinates through matrix operations, as expressed by the formula: ; Where S is the defined coordinate transformation matrix: ; R is the defined Euler transformation matrix. ; This refers to the location information of the drone. For the high-precision camera equipped on the UAV, Zhang Zhengyou's planar calibration method was used to calibrate it, determine the camera's intrinsic parameter matrix, and obtain the pixel coordinates of the planned red line based on the pinhole camera model. : ; in , Focal length , The coordinates of the main point.
8. The method for intelligent monitoring and boundary violation early warning of construction planning red lines based on UAV aerial photography according to claim 1, characterized in that, In step S3: For generating the binarized mask of the planned red line area, a limiting function is used based on the pixel coordinates of the transformed red line feature points. Constrain the coordinates to the valid range of the image; ; in , Where W is the image width in pixels and H is the image height in pixels; The constrained feature points are connected end to end in the order of the red line contour to form a closed red line region; the scan line filling algorithm is used to fill the closed region to generate a binary mask of the planned red line region.
9. The intelligent monitoring and boundary violation early warning method for construction planning red lines based on UAV aerial photography according to claim 1, characterized in that, In step S4: The comparison method involves using a binarized mask of the construction area generated by S2. Binarized mask of the planning red line area generated by S3 Logical comparison is performed, and the out-of-bounds area is defined as the set of pixels that belong to the construction area but not to the red line area, and the corresponding out-of-bounds area mask is used. The cross-boundary region is extracted using the following logical formula: ; in, This represents the complement of the red-lined area, i.e., the area outside the red line. This represents a logical AND operation, which extracts pixels that simultaneously satisfy both the construction area and the area outside the red line. according to Count the number of pixels with a value of "1" in the mask of the out-of-bounds area. and the number of pixels with a value of "1" in the mask of the construction area. The percentage of the area exceeding the boundary is calculated by the ratio of the number of pixels. Assuming that the actual area percentage corresponding to a single pixel is the same as the percentage of the number of pixels, the formula is expressed as: ; For each pixel within the boundary area, the Euclidean distance algorithm is used to calculate its shortest distance to the edge of the closed contour of the planned red line; all out-of-bounds pixels are traversed, and the maximum value of the shortest distance is taken as the maximum out-of-bounds distance. The formula is expressed as: ; in The shortest distance from each pixel to the edge of its planned red-line closed contour.
10. The method for intelligent monitoring and boundary violation early warning of construction planning red lines based on UAV aerial photography according to claim 1, characterized in that, In step S4: Serious boundary crossing is defined as: if and The system triggers a level-three warning and simultaneously records key information such as the time of the boundary crossing, the GPS coordinates of the center of the boundary crossing area, the boundary crossing area, and the maximum boundary crossing distance. Slight boundary violation is defined as: if or ,and , The system triggered a level-two warning, prompting administrators to pay attention and rectify the situation. No boundary crossing is: if and The system only records monitoring results and does not trigger warnings; in The threshold for the percentage of area exceeding the boundary. This is the maximum out-of-bounds distance threshold.