Contour anomaly processing method and device of remote sensing image, medium and computer equipment

By automatically identifying and processing contour anomalies in remote sensing images, and employing straight line segment fitting and grouping methods, the problem of color anomalies in remote sensing images has been solved, improving recognition efficiency and accuracy, and meeting the needs of large-scale production.

CN120876527AActive Publication Date: 2025-10-31NAT GEOMATICS CENT OF CHINA
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511373790.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2025-10-31
Estimated Expiration
2045-09-25

AI Technical Summary

Technical Problem

Existing technologies exhibit color anomalies at the boundary between the effective image area and the background in remote sensing images, leading to a decline in data quality, affecting the accuracy of visual interpretation and automated analysis, and making manual processing inefficient and unable to meet the needs of large-scale production.

Method used

By automatically identifying image contour pixels, constructing a contour point set, performing line segment fitting and grouping processing, determining abnormal contour areas based on the relationship between the number of groups and a preset threshold, and assigning their pixel values ​​as image background values, automated processing is achieved.

Benefits of technology

It improves the efficiency and accuracy of identifying abnormal contour regions in remote sensing images, meets the needs of rapid production of large-scale remote sensing images, reduces human intervention and errors, and improves image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876527A_ABST
    Figure CN120876527A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of remote sensing image processing, and particularly discloses a remote sensing image contour anomaly processing method and device, a medium and computer equipment, and the method comprises the steps: obtaining a to-be-processed remote sensing image, extracting pixel points belonging to an image contour from the remote sensing image, and constructing a contour point set based on the pixel points; performing straight line segment fitting on continuous pixel points in the contour point set to obtain a plurality of straight line segments, calculating an angle corresponding to each straight line segment, and performing grouping processing on all the straight line segments according to the angle of each straight line segment to obtain a plurality of straight line segment groups; counting the group number of the plurality of straight line segment groups, and determining an abnormal contour determination method corresponding to the to-be-processed remote sensing image based on the relationship between the group number and a preset number threshold; and based on each straight line segment, determining an abnormal contour area of the to-be-processed remote sensing image through an abnormal contour determination method, and assigning pixel values of pixel points in the abnormal contour area as image background pixel values of the to-be-processed remote sensing image to obtain a processed remote sensing image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of remote sensing image processing technology, and in particular to a method, apparatus, medium, and computer equipment for processing contour anomalies in remote sensing images. Background Technology

[0002] Remote sensing imagery, as fundamental geographic information data, plays an irreplaceable role in many key areas such as natural resource surveys and monitoring, basic surveying and mapping, geological surveys, natural resource supervision, and law enforcement, greatly enhancing the support capabilities of surveying and mapping geographic information services. With the continuous increase in demand for geographic information services in my country, higher requirements are being placed on the quality and acquisition efficiency of remote sensing imagery. Remote sensing image production, as a systematic project, encompasses multiple complex stages, including orthorectification, image registration, illumination and color homogenization, and image mosaicking. Each stage directly affects the quality of the final image output. Among these, illumination and color homogenization is a crucial step in ensuring that remote sensing image products meet the requirements for visual interpretation and subsequent automated analysis, and is essential for improving the overall quality and usability of the images.

[0003] Currently, in the production of large-scale remote sensing images across the country, uniform illumination and color processing mainly employs reference image template matching for regional color matching. While this method can ensure color consistency between different scenes to a certain extent, it often exhibits reddish or greenish banded color anomalies at the boundary between the effective image area and the background, such as... Figure 1 As shown in the image. Analysis suggests that this phenomenon may be caused by limitations of the template matching algorithm or interference from background values. This color anomaly leads to a decline in data quality, severely affecting the visual interpretation of remote sensing images and making it difficult to accurately identify ground features during manual visual interpretation. Simultaneously, it also interferes with subsequent automated analysis, reducing the accuracy and reliability of the analysis results.

[0004] To address the aforementioned color anomaly issue, existing solutions typically employ manual visual inspection. Operators must manually identify anomalous pixel areas at the boundary between the effective image area and the background, then manually select these areas and assign them as the image background value. However, remote sensing images are generally large in size, with dimensions exceeding 10,000 pixels, while anomalous pixel areas are usually only a few dozen pixels wide. In practice, operators need to zoom in on the entire outline to identify and correct these anomalous pixel areas, a process that is not only time-consuming and labor-intensive but also prone to errors. Furthermore, the inefficiency of manual operation makes it difficult to meet the demands of rapid production of large-scale remote sensing images. Summary of the Invention

[0005] In view of this, this application provides a method, apparatus, medium, and computer equipment for processing contour anomalies in remote sensing images. It automatically identifies contour pixels in the image, flexibly determines the method for identifying anomalies based on the number of line segments fitted from the contour pixels, and further automatically identifies anomaly contour regions based on the method for identifying anomalies and the fitted line segments. This can improve the efficiency and accuracy of identifying anomaly contour regions and is beneficial to meeting the needs of rapid production of large-scale remote sensing images.

[0006] According to one aspect of this application, a method for contour anomaly processing of remote sensing images is provided, comprising: Acquire a remote sensing image to be processed, extract pixels belonging to the image contour from the remote sensing image to be processed, and construct a contour point set based on the pixels and the order of each pixel in the image contour. Line segment fitting is performed on continuous pixels in the contour point set to obtain multiple line segments. Based on the first and last endpoints of each line segment, the angle corresponding to the line segment is calculated. Based on the angle of each line segment, all line segments are grouped to obtain multiple line segment groups. The number of groups of the multiple straight line segments is counted, and based on the relationship between the number of groups and a preset quantity threshold, the abnormal contour determination method corresponding to the remote sensing image to be processed is determined. Based on each straight line segment, the abnormal contour region corresponding to the remote sensing image to be processed is determined by the abnormal contour determination method, and the pixel value of the pixel point in the abnormal contour region is assigned as the image background pixel value of the remote sensing image to be processed, so as to obtain the processed remote sensing image.

[0007] According to another aspect of this application, a contour anomaly processing apparatus for remote sensing images is provided, comprising: The remote sensing image acquisition module is used to acquire remote sensing images to be processed, extract pixels belonging to the image contour from the remote sensing images to be processed, and construct a contour point set based on the pixels and the order of each pixel in the image contour. The line segment fitting module is used to fit line segments to continuous pixels in the contour point set to obtain multiple line segments. Based on the first and last endpoints of each line segment, the module calculates the angle corresponding to the line segment and groups all line segments according to the angles of each line segment to obtain multiple line segment groups. The statistics module is used to count the number of groups of the multiple line segment groups, and based on the relationship between the number of groups and a preset quantity threshold, to determine the abnormal contour determination method corresponding to the remote sensing image to be processed. An abnormal contour processing module is used to determine the abnormal contour region corresponding to the remote sensing image to be processed based on each straight line segment using the abnormal contour determination method, and to assign the pixel value of the pixel point in the abnormal contour region to the image background pixel value of the remote sensing image to be processed, thereby obtaining the processed remote sensing image.

[0008] According to another aspect of this application, a storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described method for processing contour anomalies in remote sensing images.

[0009] According to another aspect of this application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-described method for processing contour anomalies in remote sensing images.

[0010] Using the above technical solution, this application provides a method, apparatus, storage medium, and computer device for processing contour anomalies in remote sensing images. First, the remote sensing image to be processed can be acquired. Then, pixels belonging to the image contour are extracted from the remote sensing image. During the extraction of image contour pixels, the order information of each pixel within the image contour can also be recorded, and a contour point set is constructed based on these pixels and their order information. Next, straight line segment extraction processing is performed on the constructed contour point set, and a straight line segment fitting operation is performed on consecutive pixels to obtain multiple straight line segments. For each straight line segment, the angle corresponding to the straight line segment can be calculated based on the coordinate information of its first and last endpoints. Then, based on the angles of each straight line segment, all straight line segments are grouped. Further, the number of groups of the obtained multiple straight line segments is counted, and the anomaly contour determination method corresponding to the remote sensing image to be processed is determined based on the relationship between the number of groups and a preset threshold. Based on the obtained straight line segments and the determined anomaly contour determination method, the anomaly contour region in the remote sensing image to be processed is identified. Finally, the pixel values ​​of the pixels within the identified abnormal contour regions are assigned as the image background pixel values ​​of the remote sensing image to be processed, resulting in the processed remote sensing image. This application embodiment automatically identifies image contour pixels and flexibly determines the abnormal contour identification method based on the number of line segments fitted from the image contour pixels. Furthermore, it automatically identifies abnormal contour regions based on the abnormal contour identification method and the fitted line segments, which can improve the identification efficiency and accuracy of abnormal contour regions, thus facilitating the rapid production needs of large-scale remote sensing images.

[0011] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0012] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This illustration shows a strip-shaped color anomaly phenomenon at the boundary between the effective area of ​​an image and the background, as provided in an embodiment of this application. Figure 2 A flowchart illustrating a method for processing contour anomalies in remote sensing images provided in an embodiment of this application is shown. Figure 3 This illustration shows a block diagram of a remote sensing image provided in an embodiment of this application; Figure 4 A detailed schematic diagram of an image block provided in an embodiment of this application is shown; Figure 5 This illustration shows an eight-neighborhood diagram of an image block provided in an embodiment of this application; Figure 6 This illustration shows a schematic diagram of an abnormal contour sub-region provided in an embodiment of this application; Figure 7 This illustration shows a schematic diagram of a contour anomaly processing device for remote sensing images provided in an embodiment of this application; Figure 8 A schematic diagram of the device structure of a computer device provided in an embodiment of this application is shown. Detailed Implementation

[0013] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.

[0014] This embodiment provides a method for processing contour anomalies in remote sensing images, such as... Figure 2 As shown, the method includes: Step 101: Obtain the remote sensing image to be processed, and extract the pixels belonging to the image contour from the remote sensing image to be processed. Based on the pixels and the order of each pixel in the image contour, construct a contour point set.

[0015] Step 102: Fit line segments to the continuous pixels in the contour point set to obtain multiple line segments. Calculate the angle corresponding to each line segment based on its first and last endpoints. Then, group all line segments according to their angles to obtain multiple line segment groups.

[0016] Step 103: Count the number of groups of the multiple straight line segments, and determine the abnormal contour determination method corresponding to the remote sensing image to be processed based on the relationship between the number of groups and the preset quantity threshold.

[0017] Step 104: Based on each line segment, determine the abnormal contour region corresponding to the remote sensing image to be processed using the abnormal contour determination method, and assign the pixel value of the pixel point in the abnormal contour region to the image background pixel value of the remote sensing image to be processed, thereby obtaining the processed remote sensing image.

[0018] The embodiments of this application provide a method for processing contour anomalies in remote sensing images, which can quickly identify abnormal contour regions in remote sensing images, thereby improving the generation quality and efficiency of remote sensing images.

[0019] First, the remote sensing image to be processed can be acquired. Then, pixels belonging to the image contour are extracted from this image. These pixels can be the boundary pixels between the effective area of ​​the image and the background area, where the effective area refers to the region containing basic geographic information. When extracting image contour pixels, the order information of each pixel within the image contour can also be recorded. Based on these pixels and their order information, a contour point set is constructed. It is important to note that the pixels in the contour point set can be connected to form a closed curve.

[0020] Next, the constructed contour point set is processed by extracting line segments, and line segment fitting is performed on consecutive pixels. This process aims to approximate complex contour curves as polylines composed of multiple line segments, thereby simplifying the contour representation. Line segment extraction can be implemented using the Douglas-Peucker algorithm. For example, a set of points within a specified approximation accuracy range can be represented by line segments, with the parameter set to 5. Through line segment fitting, multiple line segments can be obtained. For each line segment, the angle corresponding to the line segment can be calculated based on the coordinates of its first and last endpoints. This angle reflects the inclination and direction of the line segment. Then, based on the angles of each line segment, all line segments are grouped. Specifically, line segments belonging to the same angle range can be grouped together, resulting in multiple line segment groups.

[0021] Furthermore, the number of groups of line segments obtained earlier is counted. This number is then compared to a preset threshold. The preset threshold is an empirical value derived from the statistical analysis of the number of line segment groups in a large number of normal remote sensing image contours. If the number of groups is less than the preset threshold, it indicates that the contour is less tortuous. In this case, the true abnormal contour region can be further identified based on each line segment, thus improving the accuracy of abnormal contour region identification. If the number of groups is greater than the preset threshold, it indicates that the contour is more tortuous and overly complex. In this case, a contour sub-region can be directly determined based on each line segment, and all contour sub-regions can be considered as abnormal contour regions. Therefore, based on the relationship between the number of groups and the preset threshold, the abnormal contour determination method corresponding to the remote sensing image to be processed can be determined, allowing for the selection of different abnormal contour determination methods for different situations.

[0022] Based on the previously obtained line segments and the established method for identifying anomalous contours, anomalous contour regions in the remote sensing image to be processed are identified. Finally, the pixel values ​​of the pixels within the identified anomalous contour regions are assigned to the background pixel values ​​of the remote sensing image to be processed. In this way, the anomalous contour regions are "hidden" or "eliminated," blending them seamlessly with the image background, thus obtaining the processed remote sensing image. The processed remote sensing image exhibits contour representations that better conform to normal geographical features and remote sensing image patterns, reducing the interference of anomalous contours on subsequent image analysis and applications.

[0023] By applying the technical solution of this embodiment, firstly, a remote sensing image to be processed can be acquired. Then, pixels belonging to the image contour are extracted from the remote sensing image. During the extraction of image contour pixels, the order information of each pixel within the image contour can also be recorded. Based on these pixels and their order information, a contour point set is constructed. Next, straight line segment extraction processing is performed on the constructed contour point set. A straight line segment fitting operation is performed on consecutive pixels to obtain multiple straight line segments. For each straight line segment, the angle corresponding to the straight line segment can be calculated based on the coordinate information of its first and last endpoints. Then, based on the angles of each straight line segment, all straight line segments are grouped. Further, the number of groups of the obtained multiple straight line segments is counted. Based on the relationship between the number of groups and a preset threshold, an abnormal contour determination method corresponding to the remote sensing image to be processed is determined. Based on the previously obtained straight line segments and the determined abnormal contour determination method, abnormal contour regions in the remote sensing image to be processed are identified. Finally, the pixel values ​​of the pixels within the identified abnormal contour regions are assigned as the image background pixel values ​​of the remote sensing image to be processed, resulting in the processed remote sensing image. This application's embodiments automatically identify image contour pixels. Based on the number of straight line segments fitted from the image contour pixels, it flexibly determines the abnormal contour identification method. Furthermore, it automatically identifies abnormal contour regions based on the abnormal contour identification method and the fitted straight line segments, which can improve the identification efficiency and accuracy of abnormal contour regions and is beneficial to meeting the rapid production needs of large-scale remote sensing images.

[0024] In this embodiment of the application, optionally, step 101, "extracting pixels belonging to the image contour from the remote sensing image to be processed," includes: dividing the remote sensing image to be processed into multiple image blocks according to a preset block-division strategy; sequentially reading the pixel values ​​of pixels in each image block until the first pixel value is read as a non-image background pixel value, triggering a preset contour tracking algorithm; determining the first sub-contour of the remote sensing image to be processed from the current image block using the preset contour tracking algorithm; determining whether the end pixel in the first sub-contour is located at the edge of the current image block; if the end pixel is located at the edge of the current image block... The edge of the current image block is used to determine the target orientation of the end pixel relative to the current image block. Based on the target orientation, the next contour-tracking image block is determined from the remaining image blocks. The second sub-contour of the remote sensing image to be processed is determined from the contour-tracking image block using the preset contour-tracking algorithm. The next contour-tracking image block is determined from the remaining image blocks based on the second sub-contour, until the second sub-contour contains the first pixel of the first sub-contour. Based on the pixels contained in the first sub-contour and the second sub-contours corresponding to each contour-tracking image block, the pixels of the image contour of the remote sensing image to be processed are determined.

[0025] In this embodiment, since contour extraction requires edge tracking and connection across the entire image, and remote sensing images are generally large, directly loading the entire image into memory might lead to insufficient memory. Therefore, a block processing method is adopted. First, the remote sensing image to be processed is divided according to a pre-defined block strategy. The block strategy can be determined based on actual processing requirements such as fixed sizes, for example... Figure 3 As shown, a uniform partitioning method can be used to divide the remote sensing image into small blocks of equal size according to a fixed number of rows and columns. The outermost blue rectangle represents the remote sensing image to be processed, the gray rectangle represents the effective area of ​​the remote sensing image, and the other uncovered areas represent the background area of ​​the remote sensing image. The background pixel values ​​are generally all 0 in all three RGB bands. Alternatively, non-uniform partitioning can be used based on the complexity of the remote sensing image content, dividing complex areas into smaller blocks and simpler areas into larger blocks. This partitioning process breaks down the originally large remote sensing image into multiple relatively independent and easily processed image blocks, preparing for subsequent block-by-block contour pixel extraction, reducing processing complexity and improving processing efficiency.

[0026] Then, in a certain order (e.g.) Figure 3 The pixel values ​​of each image block are read sequentially (from left to right, top to bottom). For example, as shown... Figure 3 As shown, there are 9 image blocks. We can start by reading the first row of image blocks from left to right, then read the second row from left to right, and so on. For each image block, we use the same order to read the pixel value of each pixel. The image background pixel value is a fixed value used to represent non-effective areas in the remote sensing image. When the first pixel value is not a background pixel value, it means a point on the image outline has been found. For example... Figure 4 As shown, Figure 4 That is Figure 3 The first row and second column of the image block are selected. The red dot in this image block is the first pixel whose pixel value is not a background pixel value. At this point, a preset contour tracking algorithm is triggered. This algorithm tracks and determines a continuous image contour within the current image block according to certain rules. This image contour is the first sub-contour of the remote sensing image to be processed. The first sub-contour is the starting part of the entire image contour extraction, laying the foundation for the subsequent stitching of the complete contour.

[0027] After obtaining the first sub-contour, check if its end pixel is located at the edge of the current image block. If the end pixel is at the edge of the image block, it means that the contour within the current image block is not fully rendered, and it is necessary to continue tracking the contour in other image blocks. At this time, determine the target orientation of the end pixel relative to the current image block, such as whether it is located above, below, to the left, or to the right of the current image block. Based on this target orientation, select the image block most likely to contain the contour continuation from the remaining unprocessed image blocks as the next contour tracking image block. For example, if the end pixel is on the right side of the image block, the next contour tracking image block is the next column of the current image block; if the end pixel is on the left side of the image block, the next contour tracking image block is the previous column of the current image block; if the end pixel is on the top side of the image block, the next contour tracking image block is the previous row of the current image block; if the end pixel is on the bottom side of the image block, the next contour tracking image block is the next row of the current image block. Note the handling of special cases: if the end pixel is at a corner, it is necessary to read the adjacent image blocks and select image blocks whose contours can be connected for the next step of processing. If the last pixel is located at the lower right corner of the image block, then starting from the right side of the current image block, sequentially search adjacent image blocks to determine if the corresponding pixel value is valid. If it is, the current image block becomes the next image block; otherwise, continue searching the next image block. Figure 5 Taking the eight-neighborhood diagram as an example, the central area is the current image block. The image blocks at positions 4, 5, and 6 are searched sequentially to determine whether the corresponding corner points are valid values. Position 4 is used to determine the lower left corner, position 5 to determine the upper left corner, and position 6 to determine the upper right corner. This determines the next contour tracking image block.

[0028] Next, the preset contour tracking algorithm is used again to determine the second sub-contour from this new image block. Then, based on the second sub-contour, the next contour tracking image block is determined from the remaining image blocks according to the same logic. This process is repeated until the second sub-contour contains the first pixel of the first sub-contour. This means that a complete contour closure loop has been completed, and the entire image contour tracking process is over.

[0029] After the contour tracking process is completed, all pixels contained in the first sub-contour and the second sub-contour corresponding to each contour-tracked image block are integrated. These pixels together constitute the pixel set of the complete image contour of the remote sensing image to be processed. In this way, the pixels of the image contour can be accurately and comprehensively extracted from the block-processed remote sensing image. At the same time, the next contour-tracked image block is determined each time based on the target orientation of the last pixel relative to the current image block, which can quickly identify the image blocks to continue contour tracking and avoid invalid image blocks (i.e., image blocks that do not contain image contour pixels, such as...). Figure 3Read the pixel values ​​of the pixels in the image block in the second row and third column.

[0030] Optionally, in this embodiment, the step of "determining the first sub-contour of the remote sensing image to be processed from the current image block using the preset contour tracking algorithm" includes: taking the pixel with the first pixel value being a non-image background pixel value as the contour starting pixel; determining the eight neighboring pixels corresponding to the contour starting pixel based on the current image block; reading the pixel value of each pixel in the eight neighboring pixels according to a first target order until a target pixel with the first pixel value being a non-image background pixel value is read, and taking the target pixel as the next contour pixel; determining a new eight neighboring pixels corresponding to the next contour pixel based on the current image block, and determining the next contour pixel again from the new eight neighboring pixels according to a second target order, until the determined next contour pixel is located at the edge of the current image block, or the determined next contour pixel is the contour starting pixel; and obtaining the first sub-contour of the remote sensing image to be processed based on the contour starting pixel and each contour pixel.

[0031] In this embodiment, during the sequential reading of pixel values ​​of image blocks, when the first pixel value encountered is not a background pixel value, this pixel is the starting point of the contour and is therefore called the contour starting pixel. Since pixel connectivity in digital image processing typically considers its surrounding neighborhood, and eight-neighborhood mapping can more comprehensively capture the connectivity of pixels in horizontal, vertical, and diagonal directions, after determining this pixel as the contour starting pixel, eight neighboring pixels are determined within the current image block, centered on this contour starting pixel. These eight pixels cover all directions from which the contour starting pixel may extend, providing an initial search range for subsequent contour tracking.

[0032] To find the next point of the contour among eight neighboring pixels, the pixel values ​​of these pixels can be read in a certain order, which is the first target order. For example, they can be read sequentially in a clockwise or counterclockwise direction, checking the pixel value of each pixel one by one. When the first pixel value read is not a pixel value of the image background, logically it is a point in the direction of continuation of the contour after the starting pixel, so it is determined as the next contour pixel, realizing the extension of the contour from the starting point to the next point.

[0033] After determining the next contour pixel, the corresponding new eight-neighbor pixels are determined within the current image block, using this new pixel as the center. Then, following the second target order (which can be the same as or different from the first target order, depending on specific needs), the next contour pixel is searched again from these new eight-neighbor pixels. This process is repeated continuously. Each time a new contour pixel is determined, a new eight-neighbor area is determined using it as the center, and the next point is searched in sequence. The loop can continue until one of two situations occurs: first, the determined next contour pixel is located at the edge of the current image block, indicating that the contour has extended to the boundary within the current image block, and further tracking with other image blocks is required; second, the determined next contour pixel is the starting pixel of the contour, indicating that a closed contour loop has been completed, and the tracking process of the first sub-contour is over.

[0034] When the contour tracing process completes according to the steps described above, a series of consecutive pixels are obtained, including the initially determined starting pixel and subsequent contour pixels determined through eight-neighbor search. These pixels are connected sequentially in the tracing order to form the first sub-contour of the remote sensing image in the current image block. This sub-contour is part of the overall contour of the remote sensing image to be processed, accurately reflecting the boundary shape of the effective area within the current image block, providing crucial data support for subsequently stitching together the various sub-contours into a complete remote sensing image contour.

[0035] Optionally, in this embodiment of the application, the first target order is a clockwise order with the top-left corner pixel of the contour starting pixel as the first read pixel; before "determining the next contour pixel from the new eight neighboring pixels according to the second target order", the method further includes: calculating the contour trend direction based on the next contour pixel and the previous contour pixel of the next contour pixel, and determining the first read pixel from the eight neighboring pixels corresponding to the next contour pixel based on the contour trend direction, and using both the clockwise and counterclockwise order starting from the first read pixel as the second target order.

[0036] In this embodiment, the order of the first target and the order of the second target can be different.

[0037] The first target order can be a clockwise sequence, starting with the top-left pixel of the contour's starting pixel. Specifically, during contour tracking, after determining the starting pixel, the search for the next contour pixel needs to begin from its eight neighboring pixels. This can start from the top-left corner and check each neighboring pixel sequentially. This ensures comprehensive coverage of any possible contour continuation directions around the starting pixel during the search, guaranteeing the accurate identification of the first target pixel that matches the contour's characteristics (pixel value not matching the image background), thus determining the next contour pixel.

[0038] The order of the second target can be dynamically determined. Specifically, after a next contour pixel has been determined, to more intelligently and quickly determine the contour pixel from its eight neighboring pixels and avoid reading the pixel values ​​of invalid pixels, the contour trend direction can be calculated. The contour trend direction reflects the development trend of the contour at the current stage. Specifically, it can be calculated based on the currently determined next contour pixel (i.e., the pixel that will be searched in its eight neighboring area) and its previous contour pixel. By analyzing the positional relationship between these two points, such as their coordinate difference, the approximate direction of the contour can be obtained. This calculation of the trend direction helps to determine the next contour pixel from its eight neighboring pixels more quickly, avoiding blindly searching in the eight neighboring area and improving the efficiency and accuracy of contour tracking.

[0039] Furthermore, based on the calculated contour trend direction, the first read pixel is determined from the eight neighboring pixels corresponding to the next contour pixel. Since the contour trend direction indicates the current development trend of the contour, starting the search from neighboring pixels near this direction is more likely to find the next pixel that matches the contour features. For example, if the contour trend direction is upward to the right, then the pixels closest to the upward to the right in the eight-neighborhood are more likely to become the next contour pixel. Determining the first read pixel in this way allows contour tracking to better match the actual contour direction, reduces unnecessary search steps, and improves the efficiency of the entire contour tracking algorithm.

[0040] After determining the first read pixel, to further ensure accurate location of the next contour pixel, both clockwise and counterclockwise sequences starting from that first read pixel are used as a second target sequence. This is because in actual contour tracking, factors such as image noise and the complexity of the target object's shape may cause uncertainty in the direction of contour extension at a certain point. Simultaneously considering clockwise and counterclockwise sequences expands the search range and improves the efficiency of finding the correct next contour pixel. This dual-sequence search strategy enhances the robustness of the contour tracking algorithm, enabling it to better adapt to various complex image conditions.

[0041] In this embodiment of the application, optionally, the "acquiring the remote sensing image to be processed" step 101 includes: responding to the remote sensing image abnormal contour processing instruction, outputting an abnormal contour processing interface; identifying abnormal contour processing parameters from the abnormal contour processing interface, wherein the abnormal contour processing parameters include the remote sensing image source path; reading the remote sensing image under the remote sensing image source path as the remote sensing image to be processed; correspondingly, the abnormal contour processing parameters also include the remote sensing image storage path and operation parameters, wherein the remote sensing image storage path is used to indicate the storage location of the processed remote sensing image, and the operation parameters are used to indicate the preset block strategy.

[0042] In this embodiment, upon receiving a remote sensing image anomaly contour processing command from a user, a corresponding response mechanism can be triggered immediately. This command can be issued by the user through a specific user interface, command line input, or a preset shortcut key. Upon receiving the command, an anomaly contour processing interface can be output. This interface is a crucial window for user interaction with the system, providing a visual operating environment. Users can set various parameters, view processing progress, and obtain processing results on this interface, facilitating operation and monitoring of the remote sensing image anomaly contour processing process.

[0043] After the anomaly contour processing interface is displayed to the user, the user can input or select relevant anomaly contour processing parameters on this interface. Specifically, the input status of the interface can be monitored in real time. When the user completes the parameter settings, these parameters can be identified from the anomaly contour processing interface. Among these parameters, the anomaly contour processing parameters can include the remote sensing image source path, which specifies the exact location of the remote sensing image to be processed in the computer storage system. Through this path, the remote sensing image that needs anomaly contour processing can be accurately located, providing accurate positioning information for subsequent reading and processing operations.

[0044] After successfully identifying the source path of the remote sensing image, the computer's storage system can be accessed based on this path. The computer's storage system can include local hard drives, network storage devices, etc. Specifically, following the path, the specific file location where the remote sensing image is stored can be located, and then the remote sensing image at that path can be read into memory. This makes the remote sensing image the one to be processed.

[0045] In addition to the remote sensing image source path, the anomaly contour processing parameters can also include the remote sensing image storage path and operational parameters. The remote sensing image storage path specifies the location on the computer storage system where the processed remote sensing image should be stored. After anomaly contour processing is completed, the processed remote sensing image can be automatically saved according to this storage path for easy retrieval and use by users later. Operational parameters indicate the preset segmentation strategy, such as the segmentation size and method (e.g., uniform segmentation, content-based segmentation), laying the foundation for subsequent contour extraction and processing steps.

[0046] Optionally, in this embodiment of the application, the step 103 of "determining the abnormal contour determination method corresponding to the remote sensing image to be processed based on the relationship between the number of groups and the preset quantity threshold" includes: if the number of groups is greater than the preset quantity threshold, then the abnormal contour determination method corresponding to the remote sensing image to be processed is determined to be a contour regularization processing method; otherwise, the abnormal contour determination method corresponding to the remote sensing image to be processed is determined to be a contour differentiation processing method.

[0047] Accordingly, when the abnormal contour determination method is a contour regularization processing method, the step 104 of "determining the abnormal contour region corresponding to the remote sensing image to be processed based on each straight line segment" includes: for each straight line segment, constructing a rectangular region with the straight line segment as the center line of a rectangle and a first preset width as the width of the rectangle, and using the rectangular region as the abnormal contour sub-region corresponding to the straight line segment; merging and deduplicating the abnormal contour sub-regions corresponding to each straight line segment to obtain the abnormal contour region corresponding to the remote sensing image to be processed.

[0048] When the abnormal contour determination method is a contour differentiation processing method, step 104, "determining the abnormal contour region corresponding to the remote sensing image to be processed based on each straight line segment using the abnormal contour determination method," includes: for each straight line segment, determining an abnormal contour search region based on the straight line segment and a second preset width, taking the direction perpendicular to the straight line segment as the search direction, and determining at least one target search starting point from the straight line segment based on a preset distance interval; for each target search starting point, sequentially reading the pixel value of each pixel point in the abnormal contour search region along the search direction starting from the target search starting point, determining whether there are abnormal pixels in the abnormal contour search region based on the read pixel values, and if there are abnormal pixels, continuing to determine along the search direction until the first non-abnormal pixel point is read, and determining the abnormal contour sub-region corresponding to the target search starting point based on the distance between the target search starting point and the first non-abnormal pixel point; merging and deduplicating the abnormal contour sub-regions corresponding to each target search starting point to obtain the abnormal contour region corresponding to the remote sensing image to be processed.

[0049] In this embodiment, when processing the remote sensing image to be processed, the corresponding abnormal contour determination method can be determined first. Specifically, the determination can be made based on the relationship between the number of groups of line segments and a preset threshold. The preset threshold can be a pre-set critical value, determined based on a large amount of empirical data and actual application scenarios. When the number of groups is greater than the preset threshold, it indicates that the contour features in the remote sensing image are relatively complex. In this case, a contour regularization processing method can be used to efficiently and indiscriminately determine the abnormal contour region. Conversely, when the number of groups is not greater than the preset threshold, it indicates that the contour features are less complex, so a contour differentiation processing method can be used to accurately identify the true abnormal contours.

[0050] Since there are usually banded color anomalies between the effective area and the background of remote sensing images, and these banded color anomalies are usually anomalies of multiple pixel widths, after determining the image outline of one pixel width, the abnormal banded areas, i.e., the abnormal outline areas, can be further determined based on these image outline pixels.

[0051] Once the abnormal contour determination method is determined to be a contour regularization processing method, an abnormal contour sub-region can be constructed for each line segment. Specifically, a rectangular region can be constructed using the line segment as the center line and a first preset width as the rectangle width. The length of the rectangular region is then the length of the line segment. The first preset width can be a pre-defined fixed value, determining the size of the rectangular region perpendicular to the line segment; this can be determined by the user based on actual needs. Determining the first preset width ensures that it covers the width of the typical abnormal strip-shaped region while minimizing the impact on the effective area of ​​the image. Constructing rectangular regions in this way allows for the rapid and effective marking of the area surrounding the line segment as an abnormal contour sub-region. This construction method is simple and direct, suitable for determining abnormal contour regions in complex contour situations. It is important to note that these abnormal contour sub-regions are not actual abnormal regions, but rather a way to quickly identify potential abnormal regions in complex contour situations. After constructing abnormal contour sub-regions for each line segment, since multiple line segments exist in the remote sensing image, the corresponding abnormal contour sub-regions may overlap; therefore, they can be merged and deduplicated. By merging and deduplicating, overlapping abnormal contour sub-regions are integrated, and duplicate parts are removed to obtain a complete and non-repeating abnormal contour region.

[0052] When the abnormal contour determination method is a contour differentiation processing method, the processing method differs from the regularization processing method. Specifically, for each straight line segment, the abnormal contour search area is first determined based on the straight line segment and a second preset width. The second preset width is also a pre-set value, which determines the range of the search area in the direction perpendicular to the straight line segment, and the user can determine it according to actual needs. Then, one or more target search starting points are determined from the straight line segment based on preset distance intervals. The preset distance intervals can ensure that the search starting points are evenly distributed on the straight line segment, thereby comprehensively searching the area around the straight line segment and minimizing the omission of possible abnormal contour points. Furthermore, for each determined target search starting point, the pixel value of each pixel can be read sequentially within the abnormal contour search area, starting from that starting point and following the previously determined search direction. By reading the pixel value, it can be determined whether the pixel is an abnormal pixel. Here, the pixel value of the abnormal pixel can be pre-defined. For example, after analyzing the pixel values ​​of boundary abnormal strip-shaped pixels in a large number of remote sensing images, it was found that the pixel values ​​of the abnormal pixels are all within [0,20] of the RGB three-channel pixel values. If abnormal pixels are found, the search continues along the direction to determine the next pixel until the first non-abnormal pixel is encountered. Then, based on the distance from the target search starting point to the first non-abnormal pixel, the abnormal contour sub-region corresponding to that target search starting point is determined. This distance reflects the extent of the abnormal contour along the search direction. This method accurately determines the abnormal contour sub-region corresponding to each target search starting point, adapting to the complexities of differential contours. It's important to note that if no abnormal pixels are found, it means the corresponding search area contains only normal pixels; in this case, no abnormal contour sub-region is generated for that target search starting point. After searching based on each target search starting point, a series of abnormal contour sub-regions are determined. These sub-regions may overlap. A merging and deduplication operation integrates these overlapping sub-regions, removing duplicates to obtain a complete, non-repeating abnormal contour region. This obtained abnormal contour region more accurately reflects the range of abnormal contours determined by the differential processing method in the remote sensing image, providing more precise data support for subsequent abnormal contour processing. The abnormal contour region determined by the contour differential processing method is a true abnormal strip-shaped region.

[0053] In a specific embodiment, such as Figure 6As shown, the entire rectangular area (including the red, blue, and gray areas) is the anomaly contour search area. The red area represents the anomaly contour region, the dotted texture represents the normal, valid area of ​​the remote sensing image, the gray area represents the image background area, and the blue line in the middle represents the extracted straight line segment. The arrows indicate that a search is performed in two directions starting from one of the target search points along the direction perpendicular to the straight line segment. When an anomaly pixel is found, the search continues until the first non-anomaly pixel is found (i.e.,...). Figure 6 The distance between the current point and the target search starting point is used as the width of the abnormal contour sub-region corresponding to the target search starting point. Using this width as the width and the length between the target search starting point and the adjacent target search starting point as the length, a rectangular region is constructed. This rectangular region is the abnormal contour sub-region corresponding to the target search starting point.

[0054] Optionally, in this embodiment of the application, step 104, "determining the abnormal contour region corresponding to the remote sensing image to be processed based on each straight line segment using the abnormal contour determination method", includes: allocating an idle thread for each straight line segment group; for each idle thread, determining the abnormal contour sub-region of each straight line segment in the corresponding straight line segment group using the abnormal contour determination method; and constructing the abnormal contour region corresponding to the remote sensing image to be processed based on the abnormal contour sub-regions corresponding to each straight line segment group.

[0055] In this embodiment, when processing remote sensing images to determine their abnormal contour regions, in order to improve processing efficiency and make full use of the multi-threaded processing capabilities of the computer system, an idle thread can be allocated to each group of line segments, that is, each group of line segments is bound to an idle thread, so that the determination of abnormal contour sub-regions of different group of line segments can be processed in parallel, rather than processed sequentially, thereby shortening the overall processing time and improving processing performance.

[0056] After allocating an idle thread to each line segment group, each thread can begin executing its task independently. Specifically, for each idle thread, the abnormal contour sub-region corresponding to each line segment in the corresponding line segment group can be processed according to the previously determined abnormal contour determination method (e.g., contour regularization or contour differentiation). After each idle thread has determined the abnormal contour sub-regions of each line segment in the corresponding line segment group, these abnormal contour sub-regions can be integrated to construct the abnormal contour region corresponding to the entire remote sensing image to be processed. Since different line segments are distributed in different locations in the remote sensing image, their corresponding abnormal contour sub-regions may overlap. Therefore, the abnormal contour sub-regions corresponding to all line segments in all line segment groups can be comprehensively analyzed. Through operations such as merging and deduplication, the various sub-regions are organically combined, removing duplicate and redundant parts to form a complete set of regions that accurately reflects the abnormal contours in the remote sensing image to be processed. This construction process ensures that the final abnormal contour region can comprehensively and accurately cover all abnormal contour parts in the remote sensing image, providing an accurate data foundation for subsequent abnormal contour processing.

[0057] Furthermore, as Figure 2 In terms of specific implementation, this application provides a contour anomaly processing device for remote sensing images, such as... Figure 7 As shown, the device includes: The remote sensing image acquisition module is used to acquire remote sensing images to be processed, extract pixels belonging to the image contour from the remote sensing images to be processed, and construct a contour point set based on the pixels and the order of each pixel in the image contour. The line segment fitting module is used to fit line segments to continuous pixels in the contour point set to obtain multiple line segments. Based on the first and last endpoints of each line segment, the module calculates the angle corresponding to the line segment and groups all line segments according to the angles of each line segment to obtain multiple line segment groups. The statistics module is used to count the number of groups of the multiple line segment groups, and based on the relationship between the number of groups and a preset quantity threshold, to determine the abnormal contour determination method corresponding to the remote sensing image to be processed. An abnormal contour processing module is used to determine the abnormal contour region corresponding to the remote sensing image to be processed based on each straight line segment using the abnormal contour determination method, and to assign the pixel value of the pixel point in the abnormal contour region to the image background pixel value of the remote sensing image to be processed, thereby obtaining the processed remote sensing image.

[0058] Optionally, the remote sensing image acquisition module is used for: According to a preset segmentation strategy, the remote sensing image to be processed is segmented into multiple image blocks. The pixel values ​​of each pixel in each image block are read sequentially until the first pixel value that is not the image background pixel value is read. Then, a preset contour tracking algorithm is triggered. The first sub-contour of the remote sensing image to be processed is determined from the current image block through the preset contour tracking algorithm. Determine whether the end pixel in the first sub-contour is at the edge of the current image block. If the end pixel is at the edge of the current image block, determine the target orientation of the end pixel relative to the current image block. Based on the target orientation, determine the next contour tracking image block from the remaining image blocks. Using the preset contour tracking algorithm, determine the second sub-contour of the remote sensing image to be processed from the contour tracking image block. Based on the second sub-contour, determine the next contour tracking image block from the remaining image blocks again. The process ends when the second sub-contour contains the first pixel of the first sub-contour. The pixel points of the image contour of the remote sensing image to be processed are determined based on the first sub-contour and the second sub-contour corresponding to each contour tracking image block.

[0059] Optionally, the remote sensing image acquisition module is further configured to: The first pixel value is taken as the non-image background pixel value as the contour starting pixel. Based on the current image block, the eight neighboring pixels corresponding to the contour starting pixel are determined. Read the pixel value of each pixel in the eight neighboring pixels according to the first target sequence until the first target pixel with a non-image background pixel value is read, and use the target pixel as the next contour pixel. Based on the current image block, determine the new eight neighboring pixels corresponding to the next contour pixel, and determine the next contour pixel again from the new eight neighboring pixels according to the second target order, until the determined next contour pixel is at the edge of the current image block, or the determined next contour pixel is the contour starting pixel. The first sub-contour of the remote sensing image to be processed is obtained based on the starting pixel of the contour and each contour pixel.

[0060] Optionally, the first target order is a clockwise order with the top-left corner pixel of the contour starting pixel as the first pixel to be read; The device further includes a sequence determination module; the sequence determination module is used for: Before determining the next contour pixel from the new eight neighboring pixels according to the second target order, the contour trend direction is calculated based on the next contour pixel and the previous contour pixel. Based on the contour trend direction, the first read pixel is determined from the eight neighboring pixels corresponding to the next contour pixel. The clockwise and counterclockwise order starting from the first read pixel are used as the second target order.

[0061] Optionally, the remote sensing image acquisition module is used for: In response to remote sensing image anomaly contour processing instructions, output an anomaly contour processing interface; Identify abnormal contour processing parameters from the abnormal contour processing interface, wherein the abnormal contour processing parameters include the remote sensing image source path; Read the remote sensing images from the source path of the remote sensing images as the remote sensing images to be processed; Accordingly, the abnormal contour processing parameters also include remote sensing image storage path and operation parameters. The remote sensing image storage path is used to indicate the storage location of the processed remote sensing image, and the operation parameters are used to indicate the preset block strategy.

[0062] Optionally, the statistics module is used for: If the number of groups is greater than a preset threshold, then the abnormal contour determination method corresponding to the remote sensing image to be processed is determined to be a contour regularization processing method; otherwise, the abnormal contour determination method corresponding to the remote sensing image to be processed is determined to be a contour differentiation processing method. Accordingly, when the abnormal contour determination method is a contour regularization processing method, the abnormal contour processing module is used to: For each straight line segment, a rectangular region is constructed with the straight line segment as the center line of a rectangle and the first preset width as the width of the rectangle. The rectangular region is then used as the abnormal contour sub-region corresponding to the straight line segment. The abnormal contour sub-regions corresponding to each line segment are merged and deduplicated to obtain the abnormal contour regions corresponding to the remote sensing image to be processed. When the abnormal contour determination method is a contour differentiation processing method, the abnormal contour processing module is used to: For each line segment, an abnormal contour search area is determined based on the line segment and the second preset width. The direction perpendicular to the line segment is taken as the search direction, and at least one target search starting point is determined from the line segment based on a preset distance interval. For each target search starting point, the pixel value of each pixel is read sequentially in the abnormal contour search area along the search direction starting from the target search starting point. Based on the read pixel value, it is determined whether there is an abnormal pixel in the abnormal contour search area. If there is an abnormal pixel, the determination continues along the search direction until the first non-abnormal pixel is read. The abnormal contour sub-region corresponding to the target search starting point is determined according to the distance between the target search starting point and the first non-abnormal pixel. The abnormal contour sub-regions corresponding to the starting points of each target search are merged and deduplicated to obtain the abnormal contour regions corresponding to the remote sensing image to be processed.

[0063] Optionally, the abnormal contour processing module is used to: An idle thread is assigned to each line segment group. For each idle thread, the abnormal contour sub-region of each line segment in the corresponding line segment group is determined by the abnormal contour determination method. Based on the abnormal contour sub-region of each line segment group, the abnormal contour region corresponding to the remote sensing image to be processed is constructed.

[0064] It should be noted that other corresponding descriptions of the functional units involved in the contour anomaly processing device for remote sensing images provided in this application embodiment can be found in the following references. Figures 2 to 6 The corresponding descriptions in the method will not be repeated here.

[0065] This application also provides a computer device, which may specifically be a personal computer, a server, a network device, etc. Figure 8 As shown, the computer device includes a bus, a processor, memory, and a communication interface, and may also include an input / output interface and a display device. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores location information. The network interface allows communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the various method embodiments.

[0066] Those skilled in the art will understand that Figure 8The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0067] In one embodiment, a computer-readable storage medium is provided, which may be non-volatile or volatile, having stored thereon a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0068] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0069] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0070] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0071] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0072] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for processing contour anomalies in remote sensing images, characterized in that, include: Acquire a remote sensing image to be processed, extract pixels belonging to the image contour from the remote sensing image to be processed, and construct a contour point set based on the pixels and the order of each pixel in the image contour. Line segment fitting is performed on continuous pixels in the contour point set to obtain multiple line segments. Based on the first and last endpoints of each line segment, the angle corresponding to the line segment is calculated. Based on the angle of each line segment, all line segments are grouped to obtain multiple line segment groups. The number of groups of the multiple straight line segments is counted, and based on the relationship between the number of groups and a preset quantity threshold, the abnormal contour determination method corresponding to the remote sensing image to be processed is determined. Based on each straight line segment, the abnormal contour region corresponding to the remote sensing image to be processed is determined by the abnormal contour determination method, and the pixel value of the pixel point in the abnormal contour region is assigned as the image background pixel value of the remote sensing image to be processed, so as to obtain the processed remote sensing image.

2. The method according to claim 1, characterized in that, Extracting pixels belonging to the image contour from the remote sensing image to be processed includes: According to a preset segmentation strategy, the remote sensing image to be processed is segmented into multiple image blocks. The pixel values ​​of each pixel in each image block are read sequentially until the first pixel value that is not the image background pixel value is read. Then, a preset contour tracking algorithm is triggered. The first sub-contour of the remote sensing image to be processed is determined from the current image block through the preset contour tracking algorithm. Determine whether the end pixel in the first sub-contour is at the edge of the current image block. If the end pixel is at the edge of the current image block, determine the target orientation of the end pixel relative to the current image block. Based on the target orientation, determine the next contour tracking image block from the remaining image blocks. Using the preset contour tracking algorithm, determine the second sub-contour of the remote sensing image to be processed from the contour tracking image block. Based on the second sub-contour, determine the next contour tracking image block from the remaining image blocks again. The process ends when the second sub-contour contains the first pixel of the first sub-contour. The pixel points of the image contour of the remote sensing image to be processed are determined based on the first sub-contour and the second sub-contour corresponding to each contour tracking image block.

3. The method according to claim 2, characterized in that, The step of determining the first sub-contour of the remote sensing image to be processed from the current image block using the preset contour tracking algorithm includes: The first pixel value is taken as the non-image background pixel value as the contour starting pixel. Based on the current image block, the eight neighboring pixels corresponding to the contour starting pixel are determined. Read the pixel value of each pixel in the eight neighboring pixels according to the first target sequence until the first target pixel with a non-image background pixel value is read, and use the target pixel as the next contour pixel. Based on the current image block, determine the new eight neighboring pixels corresponding to the next contour pixel, and determine the next contour pixel again from the new eight neighboring pixels according to the second target order, until the determined next contour pixel is at the edge of the current image block, or the determined next contour pixel is the contour starting pixel. The first sub-contour of the remote sensing image to be processed is obtained based on the starting pixel of the contour and each contour pixel.

4. The method according to claim 3, characterized in that, The first target order is a clockwise order starting with the top-left corner pixel of the contour's starting pixel and reading the first pixel. Before determining the next contour pixel from the new eight neighboring pixels according to the second target order, the method further includes: Based on the next contour pixel and the previous contour pixel, the contour trend direction is calculated, and based on the contour trend direction, the first read pixel is determined from the eight neighboring pixels corresponding to the next contour pixel. The clockwise and counterclockwise order starting from the first read pixel is used as the second target order.

5. The method according to claim 2, characterized in that, The acquisition of the remote sensing image to be processed includes: In response to remote sensing image anomaly contour processing instructions, output an anomaly contour processing interface; Identify abnormal contour processing parameters from the abnormal contour processing interface, wherein the abnormal contour processing parameters include the remote sensing image source path; Read the remote sensing images from the source path of the remote sensing images as the remote sensing images to be processed; Accordingly, the abnormal contour processing parameters also include remote sensing image storage path and operation parameters. The remote sensing image storage path is used to indicate the storage location of the processed remote sensing image, and the operation parameters are used to indicate the preset block strategy.

6. The method according to claim 1, characterized in that, The method for determining the abnormal contours corresponding to the remote sensing image to be processed based on the relationship between the number of groups and a preset quantity threshold includes: If the number of groups is greater than a preset threshold, then the abnormal contour determination method corresponding to the remote sensing image to be processed is determined to be a contour regularization processing method; otherwise, the abnormal contour determination method corresponding to the remote sensing image to be processed is determined to be a contour differentiation processing method. Accordingly, when the abnormal contour determination method is a contour regularization processing method, the step of determining the abnormal contour region corresponding to the remote sensing image to be processed based on each straight line segment using the abnormal contour determination method includes: For each straight line segment, a rectangular region is constructed with the straight line segment as the center line of a rectangle and the first preset width as the width of the rectangle. The rectangular region is then used as the abnormal contour sub-region corresponding to the straight line segment. The abnormal contour sub-regions corresponding to each line segment are merged and deduplicated to obtain the abnormal contour regions corresponding to the remote sensing image to be processed. When the abnormal contour determination method is a contour differentiation processing method, the step of determining the abnormal contour region corresponding to the remote sensing image to be processed based on each straight line segment using the abnormal contour determination method includes: For each line segment, an abnormal contour search area is determined based on the line segment and the second preset width. The direction perpendicular to the line segment is taken as the search direction, and at least one target search starting point is determined from the line segment based on a preset distance interval. For each target search starting point, the pixel value of each pixel is read sequentially in the abnormal contour search area along the search direction starting from the target search starting point. Based on the read pixel value, it is determined whether there is an abnormal pixel in the abnormal contour search area. If there is an abnormal pixel, the determination continues along the search direction until the first non-abnormal pixel is read. The abnormal contour sub-region corresponding to the target search starting point is determined according to the distance between the target search starting point and the first non-abnormal pixel. The abnormal contour sub-regions corresponding to the starting points of each target search are merged and deduplicated to obtain the abnormal contour regions corresponding to the remote sensing image to be processed.

7. The method according to claim 1, characterized in that, The step of determining the abnormal contour region corresponding to the remote sensing image to be processed based on each straight line segment using the abnormal contour determination method includes: An idle thread is assigned to each line segment group. For each idle thread, the abnormal contour sub-region of each line segment in the corresponding line segment group is determined by the abnormal contour determination method. Based on the abnormal contour sub-region of each line segment group, the abnormal contour region corresponding to the remote sensing image to be processed is constructed.

8. A device for processing contour anomalies in remote sensing images, characterized in that, include: The remote sensing image acquisition module is used to acquire remote sensing images to be processed, extract pixels belonging to the image contour from the remote sensing images to be processed, and construct a contour point set based on the pixels and the order of each pixel in the image contour. The line segment fitting module is used to fit line segments to continuous pixels in the contour point set to obtain multiple line segments. Based on the first and last endpoints of each line segment, the module calculates the angle corresponding to the line segment and groups all line segments according to the angles of each line segment to obtain multiple line segment groups. The statistics module is used to count the number of groups of the multiple line segment groups, and based on the relationship between the number of groups and a preset quantity threshold, to determine the abnormal contour determination method corresponding to the remote sensing image to be processed. An abnormal contour processing module is used to determine the abnormal contour region corresponding to the remote sensing image to be processed based on each straight line segment using the abnormal contour determination method, and to assign the pixel value of the pixel point in the abnormal contour region to the image background pixel value of the remote sensing image to be processed, thereby obtaining the processed remote sensing image.

9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.

10. A computer device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for semi-automatically extracting buildings with different shapes from high-resolution remote sensing image

    CN111325684A

  • Edge defect detection method and device of target object, and storage medium

    CN113077467A

  • Calcium carbonate master batch wind shear forming detection system based on machine vision

    CN120404499A

  • Ecological remote sensing data processing system

    CN120689628A

  • Method, apparatus, and system for constructing a polygon from edges for object detection

    US20190073774A1