A layered control line generation method and terminal equipment for a covering layer slope
By acquiring a set of key images of overburden slopes, segmenting and quality scoring are performed to generate continuous layered control lines. This solves the problems of unstable image quality and strong subjectivity in manual interpretation in existing technologies, and realizes the standardized generation and automated processing of layered control lines for overburden slopes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA HYDROELECTRIC ENGINEERING CONSULTING GROUP CHENGDU RESEARCH HYDROELECTRIC INVESTIGATION DESIGN AND INSTITUTE
- Filing Date
- 2026-04-22
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies for determining the layer interface and boundary control lines of overburden slopes suffer from problems such as unstable image quality, strong subjectivity in manual interpretation, insufficient consistency of layer control lines, difficulty in forming standardized reuse, and numerous linear results with broken boundaries, jagged edges, and noise points, resulting in low automation value.
By acquiring a set of key images, performing segmentation and quality scoring screening, the upper boundary of the candidate region of the main body of the overlay layer that meets the coverage conditions is extracted. Combined with a two-dimensional density field and cost function, continuous layered control lines are generated, and scale transformation and CAD vectorization processing are performed to form standardized CAD vector results.
It enables the efficient and accurate generation of layered control lines for overburden slopes in complex environments, improves the automation of image acquisition and the standardization and reusability of results, and reduces the cost of manual processing and verification.
Smart Images

Figure CN122289722A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of engineering geology and geotechnical engineering investigation, and more specifically, to a method and terminal device for generating layered control lines for overburden slopes. Background Technology
[0002] In water conservancy, hydropower, transportation, municipal, and mining engineering projects, the layer interfaces and boundary control lines of overburden slopes are crucial for data recording, stability analysis, and construction support design. In practice, this is often achieved through on-site image capture or surveying of the window surfaces, followed by manual interpretation, layer boundary delineation, statistical analysis, and mapping by technical personnel. Because overburden slope windows often require "precise photography," the image acquisition area cannot be too large and is significantly affected by factors such as lighting, dust, moisture reflection, confined space, and hand-held tremors, making it difficult to consistently guarantee image quality and scale consistency. Furthermore, manual interpretation and CAD delineation are labor-intensive, subjective, and costly to verify, making it difficult to establish a traceable and reusable standardized workflow.
[0003] Currently, the existing technological solutions involve acquiring images / videos of slopes or outcrops at the engineering site, or using UAVs / ground photogrammetry and ground / airborne LiDAR to obtain point clouds and 3D models. Then, under offline conditions, the interpretation, depiction, and statistical analysis of the overburden layer interfaces and boundaries are conducted to generate results usable for engineering mapping. While acquisition and modeling methods are becoming increasingly digitalized, the determination of layer control lines still typically requires geologists to interpret and depict based on experience, or to complete annotation / correction interactively within software. Because different personnel have varying understandings of layer control lines, line drawing scales, and selection criteria, the final layer control lines lack consistency and verifiability, and it is difficult to establish a standardized and reusable processing workflow.
[0004] Meanwhile, linear results, from images / point clouds to vector files that can be directly output to CAD drawings for engineering, still have problems such as broken boundaries, jagged edges and many noise points, unstable line segment topology, inconsistent scale and coordinates, and non-standard organization of layers and attributes. They often still require manual sorting, verification and secondary editing, which reduces the value of automation. Summary of the Invention
[0005] The purpose of this invention is to provide a method and terminal device for generating layered control lines for overburden slopes, which solves the problem that the layered control lines of overburden slopes extracted from images cannot be standardized and reused.
[0006] The above-mentioned technical objective of the present invention is achieved through the following technical solution:
[0007] A first aspect of the present invention provides a method for generating layered control lines for overburden slopes, the method comprising:
[0008] Acquire a set of key images of the overburden slope in each shooting window area;
[0009] Each key image in the key image set of each shooting window area is segmented to obtain at least one candidate area of the overlay body;
[0010] Determine whether at least one candidate area of the main body of the cover layer meets the cover condition. If the cover condition is met, extract the upper boundary of the candidate area of the main body of the cover layer within the corresponding shooting window area, and use it as the layer control line of the cover layer slope.
[0011] In one implementation, a set of key image frames is obtained for the slope overlying overburden in each shooting window region, including:
[0012] Acquire video data in each shooting window area, and extract multiple initial images of each shooting window area from the video data;
[0013] Multiple initial images are standardized according to preset processing parameters to obtain multiple standardized images; the processing parameters include window processing parameters, brightness processing parameters, contrast processing parameters, and color conversion parameters.
[0014] The quality index of each standardized image is calculated, and the quality score of each standardized image is calculated based on the quality index. Multiple candidate images are selected from multiple standardized images based on the quality score. The quality index includes sharpness, blur, and displacement.
[0015] The similarity between two adjacent candidate images is calculated. For two candidate images with a similarity greater than the similarity threshold, the one with the highest quality score is selected as the key image. When the similarity screening of all candidate images is completed, the set of key images of the overburden slope in each shooting window area is obtained.
[0016] In one implementation, the coverage conditions include any one or more of the following: candidate area ratio, horizontal coverage length, connectivity with the lower boundary of the shooting window area, and candidate area height ratio.
[0017] In one implementation scheme, the upper boundary of the candidate area of the main body of the overburden layer within the corresponding window area is extracted as the layer control line of the overburden slope, including:
[0018] For each column of pixels within the shooting window area, the uppermost pixel in the candidate area of the main body of the overlay layer is selected as the boundary point of each column.
[0019] When no pixel in any column of pixels within the shooting window area exists in the candidate area of the overlay body, interpolation or neighborhood completion is performed using the boundary points of adjacent columns to obtain a continuous sequence of boundary points.
[0020] Smoothing is performed on the continuous sequence of boundary points, and points where the longitudinal jump between adjacent points exceeds the threshold are identified as burrs. The burrs are replaced and corrected with neighborhood smoothing values to obtain continuous and usable control lines, which serve as the layered control lines for the overburden slope.
[0021] In one implementation, the method further includes: if the coverage condition is not met, constructing a two-dimensional density field based on the set of foreground pixels or connected points belonging to the coverage category in the candidate region of the main body of the coverage layer;
[0022] A scoring field is constructed based on the density difference between the two-dimensional density field in the upper and lower directions;
[0023] The longitudinal projection is calculated based on the two-dimensional density field, and the upper and lower boundaries of the candidate height zone where the layered control line is located are determined using the longitudinal projection.
[0024] Based on the upper and lower boundaries of the scoring field and the candidate height zone, the corresponding ordinate is selected for each column of pixel positions in the shooting window area. A cost function weighted by the scoring field, step size mutation, and curvature mutation is constructed for the ordinate. The path that minimizes the cost function is solved to obtain the continuous control line, which serves as the layered control line for the overburden slope.
[0025] In one implementation, the method further includes:
[0026] The point sequence of the layered control lines in the standardized window coordinate system is backmapped to the initial image coordinate system according to the scale transformation parameters to obtain the pixel coordinate sequence; wherein, the scale transformation parameters include the position offset of the shooting window region in the initial image coordinate system. The The coordinates of the top-left pixel of the shooting window region in the initial image coordinate system; and the scaling ratio between the normalized window and the shooting window region. The scaling ratio The coordinate values in the standardized window coordinate system are equal to the coordinate values in the shooting window area coordinate system multiplied by 1. ;
[0027] The pixel coordinate sequence is processed, and the point sequence file of each key image is output according to the preset sampling interval.
[0028] In one implementation, the layered control lines are mapped to the scale of the initial image according to scale transformation parameters to obtain a pixel coordinate sequence, including:
[0029] Obtain the point sequence of the layered control lines in the normalized window coordinate system. According to the scaling ratio Mapping the point sequence back to the coordinate system of the shooting window area yields... ,in: ;
[0030] Then, the position offset is superimposed in the coordinate system of the shooting window area. This yields the pixel coordinate sequence in the initial image coordinate system. ,in: .
[0031] In one implementation, the method further includes:
[0032] Based on the point sequence file, processing parameters, and segmentation results corresponding to each key image, layered statistical indicators are calculated in the shooting window area to obtain the statistical results of the layered statistical indicators; among them, the layered statistical indicators include thickness indicators and area ratio indicators.
[0033] The point sequence file of each key image is processed by polyline normalization to obtain a standardized point sequence file that meets the continuity and regularity of engineering vector lines. The standardized point sequence file is then converted into CAD vector elements, and CAD vector output files that can be used for CAD drawing are generated from the CAD vector elements.
[0034] In one implementation, the method further includes: performing redundancy processing on the CAD vector features; wherein the redundancy processing includes any one or more combinations of four methods: deleting short line segments with a length less than a threshold, merging adjacent collinear line segments with the same direction, performing connection or interpolation repair on broken line segments with a gap less than a threshold, and deduplicating duplicate line segments.
[0035] A second aspect of the present invention provides a terminal device, including a memory and a processor;
[0036] A memory for storing computer programs, the computer programs including program instructions;
[0037] A processor is configured to execute the program instructions to cause the terminal device to perform the steps of a method for generating layered control lines for overburden slopes as provided in the first aspect of the invention.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] In the technical solution provided by this invention, firstly, a set of key images of the slope of the overburden layer in each shooting window area is acquired. After generating a set of candidate images from continuous video data, images with higher comprehensive quality scores are preferentially retained within the time window. Similarity discrimination is performed on highly similar candidate images, and only representative images are retained to avoid the accumulation of duplicate images. Output is stopped when the number of key images reaches the target upper limit or the coverage sufficiency condition is met, thereby forming a set of key images with a moderate number and effective information. Then, each key image in the key image set of each shooting window area is segmented to obtain at least one candidate area of the overburden layer. Finally, it is determined whether at least one candidate area of the overburden layer meets the coverage condition. If the coverage condition is met, the upper boundary of the candidate area of the overburden layer in the corresponding shooting window area is extracted as the layer control line of the overburden slope. Overburden category recognition / semantic segmentation is performed on the key frames to output the candidate areas of various types of overburden layers. On this basis, pixel-level boundaries of the layer interface, dividing line or target structural surface are extracted to output layer control lines that are more in line with engineering expression habits. Attached Figure Description
[0040] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:
[0041] Figure 1 This is a flowchart illustrating a method for generating layered control lines for overburden slopes, as provided in an embodiment of the present invention. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0043] It should be noted that the terms "comprising" or "may include" used in the various embodiments of this application indicate the presence of the claimed function, operation, or element, and do not limit the addition of one or more functions, operations, or elements. Furthermore, as used in the various embodiments of this application, the terms "comprising," "having," and their cognates are intended only to indicate a specific feature, number, step, operation, element, component, or combination of the foregoing, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing, or adding one or more combinations of the foregoing.
[0044] It should be understood that terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0045] Please refer to Figure 1 This invention provides a method for generating layered control lines for slopes with overburden layers, the method comprising the following steps:
[0046] S101, acquire a set of key images of the overburden slope in each shooting window area.
[0047] In this embodiment, the current limitations on image acquisition areas, such as hand-held shaking, focus deviation, exposure reflection, viewing angle skew, and scale drift, are addressed. Existing technologies often employ a "discrete acquisition, offline import and post-processing" workflow. This lack of real-time assessment and immediate correction mechanisms for "identifiability" during the acquisition phase means problems often only surface during offline processing, necessitating rework and re-acquisition, impacting on-site efficiency and project timelines. Therefore, before starting, the shooting window range and scale / coordinate reference are determined and fixed to ensure consistent input boundaries and scale for subsequent frame extraction, recognition, and CAD vector output.
[0048] It is understood that image acquisition is performed on an image acquisition terminal, such as at least one image acquisition terminal deployed on a cover slope.
[0049] The main steps in establishing an image acquisition task and determining the shooting window area and scale reference are as follows:
[0050] 1. Start the image acquisition terminal's acquisition program, create the acquisition task for this shooting window area, generate a task number, and create a corresponding data storage directory to save the acquisition process data, parameters, and output results.
[0051] 2. Connect the image acquisition terminal to the camera and start the video stream, set the basic acquisition parameters (such as resolution, frame rate, exposure / focus strategy), and start displaying the image of the shooting window area in real time.
[0052] 3. Determine the area of the window to be captured in the real-time image. This can be done manually or by using a preset window template. Once the window area is determined, lock it; all subsequent processing should be performed within this area to avoid background interference and ensure input consistency.
[0053] 4. To meet the requirements for CAD drawing output, establish the correspondence between pixels and engineering scales (or relative coordinates) at the beginning of the data acquisition task, forming scale parameters that are saved with the task. The scale / coordinate reference can be implemented using any of the following methods:
[0054] (1) Place a known length ruler / calibration mark in the window and calculate the scale parameter accordingly;
[0055] (2) The pre-calibration method with fixed distance and fixed lens parameters is adopted, and the corresponding calibration parameters are directly loaded.
[0056] 5. Save the range parameters, scale / coordinate reference parameters, camera acquisition parameter snapshots, task number and log records of the shooting window area as input for subsequent key image screening, layer recognition and vectorization output.
[0057] With the shooting window area already locked, the system automatically filters out a set of clear, stable key images that can be used for recognition and image output from the continuous video data collected by the image acquisition terminal, in order to reduce recognition failures and rework caused by blur, reflection, shaking, etc.
[0058] Specifically, acquiring a set of key image frames of the overburden slope in each shooting window area includes the following steps:
[0059] S1011, acquire video data in each shooting window area, and extract multiple initial images of each shooting window area from the video data.
[0060] The process of extracting the initial image is as follows: Open the video file and predefine the coordinates (ROI, Region of Interest) of each shooting window region. Read video frames at fixed time / frame intervals to avoid extracting too many redundant images. For each read video frame, crop out the predefined shooting window regions, and name and save the cropped window region images according to the rules.
[0061] S1012, perform standardization processing on multiple initial images according to preset processing parameters to obtain multiple standardized images; wherein, the processing parameters include window processing parameters, brightness processing parameters, contrast processing parameters and color conversion parameters.
[0062] Specifically, the window processing parameters can perform size normalization of the initial image, that is, uniformly convert the cropped frames of the locked window area to a preset size or scale them proportionally to a preset long / short side range, and record the scaling ratio. The purpose of size normalization is to avoid incomparable quality indicators such as sharpness and texture intensity due to resolution differences, and to reduce the backend computing load, so as to ensure the stable operation of the extracted image and the recognition process.
[0063] Based on brightness and contrast parameters, image frames within the shooting window area can undergo unified brightness and contrast processing to ensure the overall brightness level falls within a set range, suppressing index drift caused by lighting fluctuations. This processing can be achieved through linear normalization, histogram constraints, or local contrast enhancement. The aim is to make quality assessments such as overexposure / underexposure judgment, reflection judgment, and texture visibility judgment more stable, reducing the impact of ambient lighting changes on frame extraction results.
[0064] Color conversion parameters can convert a frame within a shooting window from color to grayscale or extract the luminance channel in a specific color space for subsequent calculations of metrics such as sharpness and blur. This reduces the interference of color changes on the calculation of structural metrics, allowing edge / texture evaluations to focus more on structural information.
[0065] S1013, calculate the quality index of each standardized image, and calculate the quality score of each standardized image based on the quality index. Select multiple candidate images from multiple standardized images based on the quality score. The quality index includes sharpness, blur, and displacement.
[0066] In this embodiment, the sharpness index Used to reflect whether the focus is accurate and whether the details are sufficient; assuming the grayscale image of the shooting window area is... The Laplace operator is Sharpness is defined as: ,in The larger the value, the clearer the details of the window area.
[0067] Motion blur index Used to identify motion blur caused by hand shake or rapid movement; blur definition based on sharpness reduction can be used: ,in For reference clarity (e.g., median or historical best value within a sliding window); when If the value is above the threshold, it is considered blurry.
[0068] Window stability index This is used to determine whether there is significant shift or jitter in the image within a window, avoiding inconsistent input within the same task. The translation amount is obtained using inter-frame matching. The offset is defined as: When 𝐷 exceeds the threshold, the window range is determined to be unstable, and a prompt should be made to adjust or pause frame selection.
[0069] The above quality indicators can be individually set with thresholds and can be combined into a comprehensive quality score for screening candidate images.
[0070] The quality scoring rules are as follows: Let the threshold be... If and only if the following conditions are met: Only images that meet the minimum or maximum quality metric are included in the candidate set; otherwise, they are discarded. Within a time window or multiple initial images, the maximum and minimum values of each quality metric are taken:
[0071] Regarding clarity:
[0072] Regarding ambiguity:
[0073] For displacement:
[0074] The quality score for the initial image is defined as follows: ,in, , , [0,1], To prevent extremely small positive numbers with a denominator of zero. These are the weighting coefficients.
[0075] The quality rating rule is that the higher the quality rating, the better the quality of the initial image; according to... Take the first one from largest to smallest. Frames are used as key images. The source is the task parameters. (Default value) and min=5; if: the number of candidate images < If the number of candidate images is between [a certain threshold], a supplementary acquisition / correction command will be triggered, and the system will return to the image acquisition terminal for secondary acquisition. and Between these steps, output and record a flag indicating that there are not enough candidate images, based on the actual number of images.
[0076] S1014, calculate the similarity between two adjacent candidate images. For two candidate images with a similarity greater than the similarity threshold, select the one with the highest quality score as the key image. When the similarity screening of all candidate images is completed, obtain the set of key images of the overburden slope in each shooting window area.
[0077] In this embodiment, since the content of consecutive video frames is similar, the system performs optimization and redundancy removal processing on candidate frames to form a set of keyframes of moderate quantity and effective information:
[0078] (1) Prioritize frames with higher overall quality scores within the time window;
[0079] (2) Only representative frames are retained for highly similar candidate frames to avoid outputting a large number of duplicate images; where high similarity can be determined as follows: for two frames of window area images The similarity is calculated as follows: ,when The frame is judged to be highly similar, and only the frame with the higher overall quality score is retained. (Threshold) It can be obtained through pre-calibration or determined statistically based on several frames at the beginning of the mission and recorded along with the mission parameters.
[0080] S102, perform segmentation processing on each key image in the key image set of each shooting window area to obtain at least one candidate area of the overlay subject.
[0081] In this embodiment, after the key image set is output, overlay segmentation processing is performed on each key image in the key image set to generate the segmentation results required for subsequent layered control line extraction. Specifically, this includes: using the key image and its corresponding shooting window region as input, calling the overlay segmentation model or segmentation algorithm to perform pixel-level or region-level segmentation inference on the shooting window region to obtain the segmentation result; wherein, the segmentation result may include at least one of pixel label image, binary mask image, or candidate region contour of the overlay body. The segmentation result can be further post-processed to improve the connectivity and stability of the segmentation; post-processing may include at least one of removing small-area noise connected components, hole filling, and / or morphological smoothing. The segmentation result is saved and indexed according to the unique identifier of the key image, and an overlay preview image or visualization result image can be generated simultaneously; and the segmentation inference parameters and post-processing parameters are recorded as part of the task log. The segmentation result can further output structured information or quality evaluation indicators for subsequent control line extraction to support the generation and selection of subsequent layered control lines.
[0082] In this embodiment, after the key image set is output, overlay semantic segmentation is performed on each key image in the key image set to generate the segmentation results required for subsequent layer control line extraction. Specific detailed steps are as follows: Taking the key image and its corresponding shooting window region as input, the overlay semantic segmentation model or segmentation algorithm is called to classify the pixels within the window region to obtain pixel label results; post-processing of the pixel label results includes removing small-area isolated noise, hole filling, and morphological smoothing to obtain at least one connected and stable overlay main body candidate region as the segmentation result; the segmentation results are saved and indexed according to the unique identifier of the key image, including at least a label image and an overlay preview image, and the threshold parameters and post-processing parameters used are recorded as part of the task log; when a connected and stable overlay main body candidate region fails the basic quality check (including empty candidate regions or abnormal areas), the key image is marked as invalid segmentation, and a fallback strategy is triggered: for example, the key image can be skipped or the segmentation result of an adjacent key image can be used instead.
[0083] S103, determine whether at least one candidate area of the main body of the cover layer meets the cover condition. If the cover condition is met, extract the upper boundary of the candidate area of the main body of the cover layer within the corresponding shooting window area as the layer control line of the cover layer slope.
[0084] In this embodiment, before determining whether at least one candidate region of the overlay layer meets the overlay conditions, a key image is read, and the segmentation results (label image, overlay preview image) corresponding to the key image are read. The file name / index is checked for consistency. When there is a missing or mismatch, the anomaly is recorded and the key image is skipped.
[0085] Coverage conditions include any one or more of the following four factors: candidate area percentage, horizontal coverage length, connectivity with the lower boundary of the shooting window area, and candidate area height percentage.
[0086] For any candidate region of the main body of the overlay Define the following coverage conditions:
[0087] 1) Area percentage ,in, The number of pixels in the candidate region. This represents the number of pixels in the window area.
[0088] 2) Horizontal coverage (the ratio of coverage width to window width), let the projected length of the candidate region in the horizontal direction be... Window width is ,but .
[0089] 3) Bottom connectivity (degree of contact with the bottom boundary of the window), let the bottom boundary band of the window be... (For example, a strip of pixels at the bottom of the window), then
[0090] 4) Height percentage (the proportion of coverage height to window height), let the vertical projection height of the candidate region be... Window height is ,but .
[0091] Based on the above coverage conditions, when a candidate region meets one or a combination of the following conditions, it is determined to be significantly covered and enters the upper boundary extraction: The threshold parameter can be obtained through pre-calibration or determined statistically based on several frames of images at the initial stage of this acquisition task; the coverage condition threshold is recorded along with the task parameters to adapt to different camera resolutions, window area sizes and ambient lighting conditions.
[0092] Specifically, the process of extracting the upper boundary of the candidate area of the main body of the overburden layer within the corresponding window area includes: for each column of pixels within the shooting window area, selecting the uppermost pixel in the candidate area of the main body of the overburden layer as the boundary point of each column; when no pixel in the candidate area of the main body of the overburden layer exists in any column of pixels within the shooting window area, interpolation or neighborhood completion is performed using the boundary points of adjacent columns to obtain a continuous sequence of boundary points; smoothing is performed on the continuous sequence of boundary points, and points where the vertical jump of adjacent points exceeds the threshold are identified as spur points, and the spur points are replaced and corrected with neighborhood smoothing values to obtain a continuous and usable control line as the layer control line of the overburden slope.
[0093] In one embodiment, the method further includes: if the above-mentioned coverage conditions are not met, constructing a two-dimensional density field based on the set of foreground pixels or connected points belonging to the coverage layer category in the candidate region of the main body of the coverage layer. ; and for two-dimensional density fields Smoothing and normalization processes are performed to form the basic expression for boundary pathfinding.
[0094] A scoring field is constructed based on the density difference between the two-dimensional density field in the upward and downward directions. This is used to measure the preference of a pixel location as a boundary point. (Scoring field) It can be formed using "upper and lower direction density difference", the expression of which is:
[0095] ,in, Indicated by The average density value centered on and within a preset window area above it. It represents the average density within a preset window range below it; the window range parameter is a configurable parameter recorded with the task.
[0096] The longitudinal projection is calculated based on the two-dimensional density field, and then used to determine the upper and lower boundaries of the candidate height zone containing the stratification control line. The expression for the longitudinal projection is: ,in, The width of the window area. These are vertical row numbers. Then use... The effective interval determines the upper and lower boundaries of the candidate height band:
[0097] , ,in, The height of the window area. This is the projection threshold coefficient. This is a margin parameter (either in pixels or converted according to height ratio).
[0098] Vertical projection reflects the concentration range of overlay pixels in the height direction. Pathfinding within this range can reduce control lines jumping into invalid backgrounds.
[0099] Based on the upper and lower boundaries of the scoring field and the candidate height zone, the corresponding ordinate is selected for each column of pixel positions in the shooting window area. A cost function weighted by the scoring field, step size mutation, and curvature mutation is constructed for the ordinate. The path that minimizes the cost function is solved to obtain the continuous control line, which serves as the layered control line for the overburden slope.
[0100] Specifically, under the constraints of the scoring field and candidate height band, the corresponding ordinate is selected for each column of pixel positions in the shooting window area. By using dynamic programming to find the path that minimizes the total cost function, a continuous control line can be obtained. The total cost function can be expressed as: The first term is used to select positions with higher scores, the second term is used to limit abrupt changes in step size between adjacent columns, and the third term is used to limit abrupt changes in curvature, thereby ensuring that the control lines are continuous, smooth, and meet the requirements for vectorized plotting. These are configurable parameters and are recorded with each task.
[0101] In one embodiment, the point sequence of the layered control lines in the standardized window coordinate system is backmapped to the initial image coordinate system according to scale transformation parameters to obtain a pixel coordinate sequence; wherein, the scale transformation parameters include the position offset of the shooting window region in the initial image coordinate system. The The coordinates of the top-left pixel of the shooting window region in the initial image coordinate system; and the scaling ratio between the normalized window and the shooting window region. The scaling ratio The coordinate values in the standardized window coordinate system are equal to the coordinate values in the shooting window area coordinate system multiplied by 1. The pixel coordinate sequence is processed, and the point sequence file of each key image is output according to the preset sampling interval.
[0102] Specifically, mapping the layered control lines to the scale of the initial image according to the scale transformation parameters to obtain a pixel coordinate sequence includes: obtaining the point sequence of the layered control lines in the normalized window coordinate system. According to the scaling ratio Mapping the point sequence back to the coordinate system of the shooting window area yields... ,in: Then, the position offset is superimposed in the coordinate system of the shooting window area. This yields the pixel coordinate sequence in the initial image coordinate system. ,in: .
[0103] In one embodiment, the method further includes: calculating layered statistical indicators in the shooting window area based on the point sequence file, processing parameters, and segmentation results corresponding to each key image, and obtaining statistical results of the layered statistical indicators; wherein, the layered statistical indicators include thickness indicators and area ratio indicators; performing polyline normalization processing on the point sequence file of each key image to obtain a standardized point sequence file that meets the continuity and regularity of engineering vector lines; converting the standardized point sequence file into CAD vector elements; and generating a CAD vector result file that can be used for CAD drawing from the CAD vector elements.
[0104] Specifically, before performing the stratified statistical index calculation, the control line point sequence corresponding to each key image is read. For polyline features, read the segmentation results (label image / overlay preview image) paired with the keyframe, and read the scale / coordinate reference parameters for the task; perform consistency checks on key image numbers, file indexes, and parameters, recording anomalies and skipping processing when inconsistencies occur. Perform polyline normalization on the point sequence file to meet the continuity and regularity requirements of engineering vector lines, including removing duplicate points, resampling at preset sampling intervals, polyline simplification, and smoothing. Save the processed control lines as a standardized point sequence file as a unified input for subsequent statistical and CAD output. Sampling interval, simplification tolerance, and smoothing parameters are configurable and recorded with the task.
[0105] Within the valid statistical area, calculate stratified statistical indicators and output the statistical results. The statistical indicators should include at least one or more of the following: layer thickness-related indicators and area / proportion-related indicators.
[0106] When there are two boundary lines (upper and lower) (or the upper boundary line and the lower boundary of the window), for each column Calculate the layer thickness pixel value:
[0107] and according to scale parameters (This represents the actual length corresponding to each pixel) Converted to engineering thickness: Furthermore, it can calculate and output statistical values such as average thickness and maximum / minimum thickness.
[0108] When the segmentation result is a label image At that time, for each category within the effective statistical region Pixel count:
[0109] ,in, The effective statistical area, Ω, is the region within the shooting window area bounded by the layered control lines and the boundary of the shooting window area. The statistical side can be selected according to task parameters. This indicates the number of elements in the set, representing the percentage: If you need to output the project area, you can convert it according to the scale parameters: The aforementioned statistical definitions and output fields are recorded as configurable items along with the task to adapt to different engineering statistical requirements.
[0110] In some embodiments, to reduce the cost of secondary editing on the CAD side, redundancy processing is performed on CAD vector features; wherein, the redundancy processing includes any one or more combinations of the following four: deleting short line segments with a length less than a threshold, merging adjacent collinear line segments with the same direction, performing connection or interpolation repair on broken line segments with a gap less than a threshold, and deduplicating duplicate line segments.
[0111] Delete short line segments whose length is less than a threshold; the specific implementation is as follows: for any line segment... Calculate its length When satisfied
[0112] If it is a short segment, it is discarded; among them This is the length threshold parameter.
[0113] Merge adjacent collinear line segments that are in the same direction; the specific implementation is as follows: For two line segments to be merged... Take their direction vectors respectively Calculate the included angle When satisfied And the minimum distance between the endpoints of the two line segments If they are adjacent and have the same direction, then they are merged; where, For angle threshold, This is the gap threshold.
[0114] For broken line segments with gaps smaller than a threshold, perform connection or interpolation repair, specifically as follows: For two line segments that may belong to the same main line... If the minimum distance between its endpoints satisfies If the fracture gap is deemed acceptable, a connection is executed (either a direct connection or a transition segment generated by interpolation); where, This is the connection threshold parameter.
[0115] To remove duplicate or highly overlapping line elements, only the representative main line is retained. Specifically, this is achieved by processing two line segments... Calculate their overlap (expressed as the average distance from the sampling point to the other line segment). Let's assume... Point set obtained by uniform sampling ,definition ,when If the two lines are found to be highly overlapping, deduplication is performed, retaining only representative line segments (e.g., those with longer lengths or higher source confidence). This is the distance threshold parameter. (The above...) These are configurable parameters that can be determined through pre-calibration or statistical analysis at the initial stage of the task, and recorded along with the task parameters and logs to adapt to different resolutions, window sizes, and plotting accuracy requirements.
[0116] For each task sample, the final generated hierarchical control lines and vector results are subjected to quality assessment, which includes at least one or more of the following assessment items:
[0117] (1) Continuity determination of layered control lines: There are no over-threshold breaks or jumps in the control lines within the window area;
[0118] (2) Stability determination of layered control lines: The difference in the position of control lines between key images does not exceed the threshold range;
[0119] (3) Determination of the usability of vector results: DXF / TXT output is successful and meets the layer / feature organization requirements;
[0120] (4) Judgment of the completeness of statistical results: The statistical fields are complete and fall within a reasonable range.
[0121] When all decision criteria meet the threshold conditions, the result is determined as "can be generated".
[0122] When the quality judgment fails, a reason category is generated based on the failure item (e.g., insufficient clarity, unstable image, excessive reflection, broken control line, vector cleanup failure, etc.), and written to the task log as the basis for subsequent image acquisition and correction.
[0123] A correction instruction is generated based on the reason for the failure and sent back to the acquisition terminal. The correction instruction includes at least the following:
[0124] (1) Acquire stabilization commands (e.g., keep the camera stable, adjust the angle, reduce shaking);
[0125] (2) Lighting and reflection processing instructions (e.g., adjusting exposure, changing the angle of incidence to reduce reflection);
[0126] (3) Adjustment of the number of keyframes and target (e.g., increasing the upper limit of the number of keyframes K, and re-extracting keyframes).
[0127] (4) Re-acquisition trigger conditions (e.g., prompting refocus / re-acquisition when the quality threshold is not met for several consecutive frames).
[0128] After the image acquisition terminal performs supplementary acquisition, it re-executes the steps described above and performs a quality judgment again. It passes the test when the image output conditions are met. Upon termination, the final task status is output and all process records are archived.
[0129] This invention also provides a terminal device. The terminal device includes a processor, a memory, a communication interface, and at least one communication bus for connecting the processor, the memory, and the communication interface. The memory includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (PROM), or portable read-only memory (CD-ROM), and is used for related instructions and data.
[0130] The communication interface is used to receive and send data. The processor can be one or more CPUs; if the processor is a single CPU, it can be a single-core CPU or a multi-core CPU. The processor in the electronic device reads one or more programs stored in memory and performs the following operations: acquires a set of key images of the overburden slope in each shooting window area; segments each key image in the key image set of each shooting window area to obtain at least one candidate overburden main body region; determines whether the at least one candidate overburden main body region meets the coverage condition; if it does, extracts the upper boundary of the candidate overburden main body region within the corresponding shooting window area as the layer control line of the overburden slope.
[0131] It should be noted that the specific implementation of each operation can be described above. Figure 1 The corresponding description of the method embodiments shown indicates that the terminal device can be used to execute a carbon emission monitoring method for thermal power units according to the above method embodiments of this application, and will not be described in detail here.
[0132] This invention also provides a computer-readable storage medium, which is a memory device in a computer device for storing programs and data. It is understood that the computer-readable storage medium here can include both built-in storage media in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the operating system of the terminal. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the method for generating a layered control line for overburden slopes in the above embodiments. Those skilled in the art should understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0133] This invention also provides a computer program product containing program instructions. The computer program product may be software or program products containing program instructions, capable of running on a computing device or stored on any available medium. When the computer program product is run on at least one terminal device, it causes the at least one terminal device to execute a method for generating layered control lines for overburden slopes.
[0134] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for generating layered control lines for overburden slopes, characterized in that, The methods include: Acquire a set of key images of the overburden slope in each shooting window area; Each key image in the key image set of each shooting window area is segmented to obtain at least one candidate area of the overlay body; Determine whether at least one candidate area of the main body of the cover layer meets the cover condition. If the cover condition is met, extract the upper boundary of the candidate area of the main body of the cover layer within the corresponding shooting window area, and use it as the layer control line of the cover layer slope.
2. The method according to claim 1, characterized in that, Obtain a set of key image frames for the overburden slope in each shooting window area, including: Acquire video data in each shooting window area, and extract multiple initial images of each shooting window area from the video data; Multiple initial images are standardized according to preset processing parameters to obtain multiple standardized images; the processing parameters include window processing parameters, brightness processing parameters, contrast processing parameters, and color conversion parameters. The quality index of each standardized image is calculated, and the quality score of each standardized image is calculated based on the quality index. Multiple candidate images are selected from multiple standardized images based on the quality score. The quality index includes sharpness, blur, and displacement. The similarity between two adjacent candidate images is calculated. For two candidate images with a similarity greater than the similarity threshold, the one with the highest quality score is selected as the key image. When the similarity screening of all candidate images is completed, the set of key images of the overburden slope in each shooting window area is obtained.
3. The method according to claim 1, characterized in that, The coverage conditions include any one or more of the following four factors: candidate area ratio, horizontal coverage length, connectivity with the lower boundary of the shooting window area, and candidate area height ratio.
4. The method according to claim 3, characterized in that, Extract the upper boundary of the candidate area of the main body of the overburden layer within the corresponding window area, and use it as the layer control line for the overburden slope, including: For each column of pixels within the shooting window area, the uppermost pixel in the candidate area of the main body of the overlay layer is selected as the boundary point of each column. When no pixel in any column of pixels within the shooting window area exists in the candidate area of the overlay body, interpolation or neighborhood completion is performed using the boundary points of adjacent columns to obtain a continuous sequence of boundary points. Smoothing is performed on the continuous sequence of boundary points, and points where the longitudinal jump between adjacent points exceeds the threshold are identified as burrs. The burrs are replaced and corrected with neighborhood smoothing values to obtain continuous and usable control lines, which serve as the layered control lines for the overburden slope.
5. The method according to claim 3, characterized in that, The method further includes: if the coverage condition is not met, constructing a two-dimensional density field based on the set of foreground pixels or connected points belonging to the coverage category in the candidate region of the main body of the coverage layer; A scoring field is constructed based on the density difference between the two-dimensional density field in the upper and lower directions; The longitudinal projection is calculated based on the two-dimensional density field, and the upper and lower boundaries of the candidate height zone where the layered control line is located are determined using the longitudinal projection. Based on the upper and lower boundaries of the scoring field and the candidate height zone, the corresponding ordinate is selected for each column of pixel positions in the shooting window area. A cost function weighted by the scoring field, step size mutation, and curvature mutation is constructed for the ordinate. The path that minimizes the cost function is solved to obtain the continuous control line, which serves as the layered control line for the overburden slope.
6. The method according to claim 2, characterized in that, The method further includes: The point sequence of the layered control lines in the standardized window coordinate system is backmapped to the initial image coordinate system according to the scale transformation parameters to obtain the pixel coordinate sequence; wherein, the scale transformation parameters include the position offset of the shooting window region in the initial image coordinate system. The The coordinates of the top-left pixel of the shooting window region in the initial image coordinate system; and the scaling ratio between the normalized window and the shooting window region. The scaling ratio The coordinate values in the standardized window coordinate system are equal to the coordinate values in the shooting window area coordinate system multiplied by 1. ; The pixel coordinate sequence is processed, and the point sequence file of each key image is output according to the preset sampling interval.
7. The method according to claim 6, characterized in that, The layered control lines are mapped to the scale of the initial image according to the scale transformation parameters to obtain a pixel coordinate sequence, including: Obtain the point sequence of the layered control lines in the normalized window coordinate system. According to the scaling ratio Mapping the point sequence back to the coordinate system of the shooting window area yields... ,in: ; Then, the position offset is superimposed in the coordinate system of the shooting window area. This yields the pixel coordinate sequence in the initial image coordinate system. ,in: .
8. The method according to claim 6, characterized in that, The method further includes: Based on the point sequence file, processing parameters, and segmentation results corresponding to each key image, layered statistical indicators are calculated in the shooting window area to obtain the statistical results of the layered statistical indicators; among them, the layered statistical indicators include thickness indicators and area ratio indicators. The point sequence file of each key image is processed by polyline normalization to obtain a standardized point sequence file that meets the continuity and regularity of engineering vector lines. The standardized point sequence file is then converted into CAD vector elements, and CAD vector output files that can be used for CAD drawing are generated from the CAD vector elements.
9. The method according to claim 7, characterized in that, The method further includes: performing redundancy processing on the CAD vector features; wherein, the redundancy processing includes any one or more combinations of the following four methods: deleting short line segments with a length less than a threshold, merging adjacent collinear line segments with the same direction, performing connection or interpolation repair on broken line segments with a gap less than a threshold, and deduplicating duplicate line segments.
10. A terminal device, characterized in that, Including memory and processor; A memory for storing computer programs, the computer programs including program instructions; A processor is configured to execute the program instructions to cause the terminal device to perform the steps of a method for generating a layered control line for a cover slope as described in any one of claims 1 to 9.