Remote sensing image contour anomaly processing method and device, medium and computer equipment

By automatically identifying and processing the contour pixels of remote sensing images, fitting straight line segments and processing them in groups, the problem of abnormal image color was solved, the generation quality and efficiency of remote sensing images were improved, and the needs of large-scale production were met.

CN120876527BActive Publication Date: 2025-12-23NAT GEOMATICS CENT OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the production of remote sensing images, existing technologies often exhibit color anomalies at the boundary between the effective area of ​​the image and the background during uniform light and color processing. This leads to a decline in data quality, affects the accuracy of visual interpretation and automated analysis, and the low efficiency of manual processing makes it difficult to meet the needs of large-scale production.

Method used

By automatically identifying image contour pixels, fitting straight line segments and grouping them, abnormal contour areas are determined based on the relationship between the number of groups and a preset threshold, and pixels are automatically assigned as image background values, thereby improving recognition efficiency and accuracy.

Benefits of technology

It enables rapid and accurate identification and processing of abnormal contour regions in remote sensing images, improving image generation quality and efficiency, and meeting the needs of large-scale production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876527B_ABST
    Figure CN120876527B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of remote sensing image processing, and particularly discloses a remote sensing image contour abnormality processing method and device, a medium and computer equipment. The method comprises the following steps: acquiring a remote sensing image to be processed, extracting pixel points belonging to an image contour from the remote sensing image to be processed, 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 the angles corresponding to each straight line segment, and grouping all the straight line segments according to the angles of the straight line segments to obtain a plurality of straight line segment groups; counting the number of the straight line segment groups, and determining an abnormal contour determination method corresponding to the remote sensing image to be processed based on the relationship between the number and a preset number threshold; determining an abnormal contour region of the remote sensing image to be processed by the abnormal contour determination method based on the straight line segments, assigning pixel values of pixel points in the abnormal contour region to image background pixel values of the remote sensing image to be processed, and obtaining a processed remote sensing image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of remote sensing image processing, in particular to a remote sensing image contour abnormality processing method and device, medium and computer equipment. BACKGROUND

[0002] As basic geographic information data, remote sensing image results play an irreplaceable role in many key fields such as natural resource investigation and monitoring, basic surveying and mapping, geological survey, natural resource supervision, law enforcement, etc., and greatly improve the guarantee capability of surveying and mapping geographic information services. With the continuous rise of demand for geographic information services in China, higher requirements are put forward for the quality and acquisition efficiency of remote sensing images. Remote sensing image production, as a systematic project, covers many complex links such as orthorectification, image registration, dodging and color matching, image mosaicking, etc., each of which directly affects the quality of the final image results. Among them, dodging and color matching processing is an important link to ensure that remote sensing image products meet the requirements of visual interpretation and subsequent automated analysis, and is crucial for improving the overall quality and use value of images.

[0003] At present, in the production of remote sensing images on a large scale in the country, dodging and color matching processing is mainly carried out by matching the reference image template to match the color in the region. Although this method can ensure the color consistency between different scenes to some extent, it often appears as red or green strip-shaped color abnormality phenomenon at the junction of the effective area and the background of the image, as shown in Figure 1 Analysis shows that this phenomenon may be caused by the limitations of the template matching algorithm or background value interference. This color abnormality leads to a decrease in data quality, seriously affecting the visual interpretation effect of remote sensing images, making it difficult to accurately identify ground object information when manually visualizing; at the same time, it also interferes with subsequent automated analysis, reducing the accuracy and reliability of the analysis results.

[0004] In view of the above color abnormality problem, the existing technical solutions usually adopt the method of manual visual discovery, and the operator needs to manually discover the abnormal pixel area at the junction of the effective area and the background of the image, and then manually selects these areas and assigns them as the background value of the image. However, remote sensing images generally have a large size, with both length and width values exceeding ten thousand, and the abnormal pixel area is usually only about tens of pixels wide. In actual operation, the operator needs to enlarge the entire contour to discover the abnormal pixel area and make modifications and assignments, which is not only time-consuming and laborious, but also prone to errors. In addition, due to the low efficiency of manual operation, it is difficult to meet the demand of large-scale remote sensing image production. SUMMARY

[0005] Therefore, the application provides a contour anomaly processing method and device for remote sensing images, a medium and a computer device, automatically identifies image contour pixel points, flexibly determines an abnormal contour determination method according to the number of straight line segments fitted from the image contour pixel points, and further automatically identifies an abnormal contour region according to the abnormal contour determination method and the fitted straight line segments, so as to improve the identification efficiency and accuracy of the abnormal contour region and facilitate meeting the rapid production requirements of large-scale remote sensing images.

[0006] According to an aspect of the application, a contour anomaly processing method for remote sensing images is provided, comprising:

[0007] acquiring a remote sensing image to be processed, extracting pixel points belonging to an image contour from the remote sensing image to be processed, and constructing a contour point set based on the pixel points and the order of each pixel point in the image contour;

[0008] performing straight line segment fitting on continuous pixel points in the contour point set to obtain a plurality of straight line segments, calculating the angle corresponding to each straight line segment based on the head point and tail point of the straight line segment, and grouping all straight line segments according to the angle of each straight line segment to obtain a plurality of straight line segment groups;

[0009] counting the number of the plurality of straight line segment groups, and determining an abnormal contour determination method corresponding to the remote sensing image to be processed based on the relationship between the number and a preset number threshold;

[0010] determining an abnormal contour region corresponding to the remote sensing image to be processed by the abnormal contour determination method based on each straight line segment, and assigning the pixel value of the pixel points in the abnormal contour region to an image background pixel value of the remote sensing image to be processed to obtain a processed remote sensing image.

[0011] According to another aspect of the application, a contour anomaly processing device for remote sensing images is provided, comprising:

[0012] a remote sensing image acquisition module, configured to acquire a remote sensing image to be processed, extract pixel points belonging to an image contour from the remote sensing image to be processed, and construct a contour point set based on the pixel points and the order of each pixel point in the image contour;

[0013] a straight line segment fitting module, configured to perform straight line segment fitting on continuous pixel points in the contour point set to obtain a plurality of straight line segments, calculate the angle corresponding to each straight line segment based on the head point and tail point of the straight line segment, and group all straight line segments according to the angle of each straight line segment to obtain a plurality of straight line segment groups;

[0014] The statistical module is configured to count the number of groups of the plurality of straight line segments, and determine an abnormal contour determination method corresponding to the to-be-processed remote sensing image based on a relationship between the number of groups and a preset number threshold.

[0015] The abnormal contour processing module is configured to determine an abnormal contour region corresponding to the to-be-processed remote sensing image based on each straight line segment by using the abnormal contour determination method, and assign a pixel value of a pixel point in the abnormal contour region as an image background pixel value of the to-be-processed remote sensing image to obtain a processed remote sensing image.

[0016] According to yet another aspect of the present application, a storage medium having a computer program stored thereon is provided, and the program is executed by a processor to implement the remote sensing image contour abnormal processing method.

[0017] According to still another aspect of the present application, a computer device is provided, which includes a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, and the processor implements the remote sensing image contour abnormal processing method when executing the program.

[0018] According to the technical solutions described above, the remote sensing image contour abnormal processing method and device, the storage medium, and the computer device provided by the present application can first obtain a to-be-processed remote sensing image. Then, pixel points belonging to an image contour are extracted from the remote sensing image. When extracting the image contour pixel points, the order information of each pixel point in the image contour can also be recorded, and a contour point set is constructed based on these pixel points and the order information. Next, the constructed contour point set is subjected to straight line segment extraction processing, and a straight line segment fitting operation is performed on the continuous pixel points to obtain a plurality of straight line segments. For each straight line segment, the corresponding angle of the straight line segment can be calculated according to the coordinate information of the head end point and the tail end point. Then, the straight line segments are grouped according to the angles of the straight line segments. Further, the number of groups of the plurality of straight line segments is counted, and the abnormal contour determination method corresponding to the to-be-processed remote sensing image is determined according to the size relationship between the number of groups and a preset number threshold. Based on the obtained straight line segments and the determined abnormal contour determination method, the abnormal contour region in the to-be-processed remote sensing image is identified. Finally, the pixel value of the pixel point in the identified abnormal contour region is assigned as the image background pixel value of the to-be-processed remote sensing image to obtain a processed remote sensing image. The present application automatically identifies the image contour pixel points, flexibly determines the abnormal contour determination method according to the number of straight line segments fitted by the image contour pixel points, further automatically identifies the abnormal contour region according to the abnormal contour determination method and the fitted straight line segments, can improve the identification efficiency and accuracy of the abnormal contour region, and is conducive to meeting the rapid production requirements of large-scale remote sensing images.

[0019] The above description is only a summary of the technical solutions of the present application. In order to enable one skilled in the art to better understand the technical means of the present application, the present application can be implemented according to the content of the description, and in order to enable the above and other purposes, characteristics and advantages of the present application to be more apparent and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS

[0020] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The schematic embodiments of the present application and the description thereof are used to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:

[0021] Figure 1 A schematic diagram of a strip-shaped color abnormality phenomenon at the junction of an effective area and a background of an image is shown;

[0022] Figure 2 A flowchart of a contour abnormality processing method for a remote sensing image is shown;

[0023] Figure 3 A block diagram of a remote sensing image is shown;

[0024] Figure 4 A detailed diagram of an image block is shown;

[0025] Figure 5 An eight-neighborhood diagram of an image block is shown;

[0026] Figure 6 An abnormal contour sub-region diagram is shown;

[0027] Figure 7 A structural diagram of a contour abnormality processing device for a remote sensing image is shown;

[0028] Figure 8 A device structure diagram of a computer device is shown. DETAILED DESCRIPTION

[0029] In the following, the present application will be described in detail with reference to the drawings and in combination with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0030] In the present embodiment, a contour abnormality processing method for a remote sensing image is provided, as shown in the figure, the method comprises: Figure 2

[0031] ​In step 101, a remote sensing image to be processed is acquired, and pixel points belonging to an image contour are extracted from the remote sensing image to be processed. A contour point set is constructed based on the pixel points and the order of each pixel point in the image contour.

[0032] In step 102, straight line segments are fitted for continuous pixel points in the contour point set, a plurality of straight line segments are obtained, the angle corresponding to each straight line segment is calculated based on the start point and the end point of the straight line segment, and all straight line segments are grouped based on the angle of each straight line segment, so that a plurality of straight line segment groups are obtained.

[0033] In step 103, the number of straight line segment groups is counted, and the abnormal contour determination method corresponding to the remote sensing image to be processed is determined based on the relationship between the number and a preset number threshold.

[0034] In step 104, the abnormal contour region corresponding to the remote sensing image to be processed is determined based on each straight line segment by using 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 that a processed remote sensing image is obtained.

[0035] The contour abnormality processing method for a remote sensing image provided by the embodiment can quickly identify the abnormal contour region of the remote sensing image, and is beneficial to improving the generation quality and efficiency of the remote sensing image.

[0036] Firstly, a remote sensing image to be processed can be acquired. Then, pixel points belonging to an image contour are extracted from the remote sensing image. These pixel points can be boundary pixel points between an effective region and a background region of the remote sensing image, wherein the effective region refers to a region containing basic geographic information. When the image contour pixel points are extracted, the order information of each pixel point in the image contour can also be recorded, and a contour point set is constructed based on the pixel points and the order information. It should be noted that the pixel points in the contour point set can be connected to form a closed curve.

[0037] Next, the constructed contour point set is subjected to a straight line segment extraction process, and the continuous pixel points therein are subjected to a straight line segment fitting operation. This process aims to approximate the complex contour curve as a polyline composed of multiple straight line segments, thereby simplifying the representation of the contour. The straight line segment extraction can be implemented using the Douglas-Peucker algorithm. For example, the point set within the range of a specified approximation precision parameter is represented by a straight line segment, and the parameter can be set to 5. Through the straight line segment fitting, multiple straight line segments can be obtained. For each straight line segment, the corresponding angle of the straight line segment can be calculated according to the coordinate information of the head end point and the tail end point of the straight line segment. This angle reflects the degree of inclination and direction of the straight line segment. Then, according to the angles of the straight line segments, all the straight line segments are subjected to grouping processing. Specifically, the straight line segments belonging to the same angle range can be grouped into the same group, thereby obtaining multiple straight line segment groups.

[0038] Further, the number of groups of the multiple straight line segments obtained in the foregoing is counted. Then, the group number is compared with a preset number threshold. The preset number threshold is an empirical value obtained according to the statistics of the number of straight line segment groups of a large number of normal remote sensing image contours. If the group number is less than the preset number threshold, it indicates that the degree of contour tortuosity is small, and for this case, the true abnormal contour region can be further identified based on each straight line segment, thereby facilitating the identification accuracy of the abnormal contour region; if the group number is greater than the preset number threshold, it indicates that the degree of contour tortuosity is large, and the contour is too complex, and for this case, a contour sub-region can be directly determined according to each straight line segment, and all the contour sub-regions are taken as the abnormal contour region. Thus, according to the size relationship between the group number and the preset number threshold, the abnormal contour determination method corresponding to the remote sensing image to be processed can be determined, thereby selecting different abnormal contour determination methods for different cases.

[0039] Based on the straight line segments obtained in the foregoing and the determined abnormal contour determination method, the abnormal contour region in the remote sensing image to be processed is identified. Finally, the pixel value of the pixel point in the identified abnormal contour region is assigned as the image background pixel value of the remote sensing image to be processed. In this way, the abnormal contour region is "hidden" or "eliminated", and is integrated with the image background, thereby obtaining the processed remote sensing image. The processed remote sensing image is more consistent with the normal geographical features and remote sensing image rules in terms of contour representation, and the interference of the abnormal contour on subsequent image analysis and application is reduced.

[0040] By applying the technical solution of the embodiment, firstly, the remote sensing image to be processed can be acquired. Then, the pixel points belonging to the image contour are extracted from the remote sensing image. When extracting the image contour pixel points, the sequence information of each pixel point in the image contour can also be recorded. Based on these pixel points and their sequence information, a contour point set is constructed. Next, the constructed contour point set is subjected to straight line segment extraction processing. The continuous pixel points are subjected to straight line segment fitting operation, and a plurality of straight line segments are obtained. For each straight line segment, the corresponding angle of the straight line segment can be calculated according to the coordinate information of the head end point and the tail end point. Then, according to the angles of the straight line segments, all the straight line segments are subjected to grouping processing. Further, the number of groups of the obtained plurality of straight line segments is counted. According to the size relationship between the group number and the preset number threshold, the abnormal contour determination method corresponding to the remote sensing image to be processed is determined. Based on the obtained straight line segments and the determined abnormal contour determination method, the abnormal contour region in the remote sensing image to be processed is identified. Finally, the pixel value of the pixel point in the identified abnormal contour region is assigned as the image background pixel value of the remote sensing image to be processed, and the processed remote sensing image is obtained. The embodiment of the application automatically identifies the image contour pixel points, flexibly determines the abnormal contour determination method according to the number of straight line segments fitted from the image contour pixel points, further automatically identifies the abnormal contour region according to the abnormal contour determination method and the fitted straight line segments, which can improve the identification efficiency and accuracy of the abnormal contour region, and is conducive to meeting the rapid production demand of large-scale remote sensing images.

[0041] In the embodiment of the application, optionally, the "extracting pixel points belonging to the image contour from the remote sensing image to be processed" in step 101 comprises: performing block processing on the remote sensing image to be processed according to a preset block strategy to obtain a plurality of image blocks; reading the pixel values of the pixel points in each image block in turn until the first pixel value of the pixel point is a non-image background pixel value, triggering a preset contour tracking algorithm, and determining a first sub-contour of the remote sensing image to be processed from the current image block through the preset contour tracking algorithm; determining whether the end pixel point in the first sub-contour is at the edge of the current image block, if the end pixel point is at the edge of the current image block, determining the target direction of the end pixel point relative to the current image block, and determining the next contour tracking image block from the remaining image blocks based on the target direction, determining a second sub-contour of the remote sensing image to be processed from the contour tracking image block through the preset contour tracking algorithm, determining the next contour tracking image block from the remaining image blocks based on the second sub-contour, and ending when the second sub-contour contains the first pixel point of the first sub-contour; and determining the pixel points of the image contour of the remote sensing image to be processed based on the first sub-contour and the pixel points contained in the second sub-contour corresponding to each contour tracking image block.

[0042] 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 size, 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.

[0043] 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.

[0044] After the first sub-contour is obtained, it is checked whether the end pixel point is located at the edge of the current image block. If the end pixel point is at the edge of the image block, it means that the contour in the current image block is not fully presented, and the contour needs to be tracked in other image blocks. At this time, the target direction of the end pixel point relative to the current image block is determined, for example, whether it is located at the upper side, lower side, left side or right side of the current image block. According to the target direction, the image block most likely to contain the continuation of the contour is selected from the remaining image blocks that have not been processed as the next contour tracking image block. For example, if the end pixel point is at 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 point is at 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 point is at the upper side of the image block, the next contour tracking image block is the previous row of the current image block; if the end pixel point is at the lower side of the image block, the next contour tracking image block is the next row of the current image block. It needs to be noted that special cases need to be handled. If the end pixel point is at a corner point, the image block that can be connected to the contour is read from the adjacent image blocks to select the image block for the next step. For example, if the end pixel point is at the lower right corner of the image block, the adjacent image blocks are searched from the right side of the current image block to determine whether the corresponding pixel value is a valid value. If it is, the current image block is the next image block; if it is not, the next image block is searched. For example, as shown in the eight-neighborhood diagram, the middle region is the current image block, and the image blocks at positions 4, 5 and 6 are searched in sequence to determine whether the corresponding corner points are valid values. Position 4 determines the lower left corner, position 5 determines the upper left corner, and position 6 determines the upper right corner. Then, the next contour tracking image block is determined. Figure 5

[0045] After that, the preset contour tracking algorithm is used again to determine the second sub-contour from the new image block. Then, according to the situation of the second sub-contour, the next contour tracking image block is determined from the remaining image blocks according to the same logic, and the process is repeated until the second sub-contour contains the first pixel point of the first sub-contour, which means that a complete contour closure loop has been completed, and the contour tracking process of the entire image is completed.

[0046] After the contour tracking process is completed, all pixel points contained in the first sub-contour and the second sub-contour corresponding to each contour tracking image block are integrated. These pixel points together constitute the pixel point set of the complete image contour of the remote sensing image to be processed. In this way, the pixel points of the image contour can be accurately and comprehensively extracted from the block-processed remote sensing image. At the same time, the next contour tracking image block is determined according to the target direction of the end pixel point relative to the current image block each time, which can quickly determine the image block for further contour tracking, and avoid invalid image blocks (i.e. image blocks that do not contain image contour pixel points, such as Figure 3 ​reading of the pixel value of the pixel point in the image block in the 2nd row and the 3rd column.

[0047] In the embodiment of the present application, optionally, the "determining the first sub-contour of the remote sensing image to be processed from the current image block by using the preset contour tracking algorithm" comprises: taking the pixel point with the first pixel value being the non-image background pixel value as a contour starting pixel point, determining the eight-neighborhood pixel points corresponding to the contour starting pixel point based on the current image block; reading the pixel value of each pixel point in the eight-neighborhood pixel points in a first target order until a target pixel point with the first pixel value being the non-image background pixel value is read, taking the target pixel point as a next contour pixel point; determining new eight-neighborhood pixel points corresponding to the next contour pixel point based on the current image block, and determining the next contour pixel point again from the new eight-neighborhood pixel points in a second target order until the next contour pixel point is at the edge of the current image block or the next contour pixel point is the contour starting pixel point; and obtaining the first sub-contour of the remote sensing image to be processed according to the contour starting pixel point and each contour pixel point.

[0048] In this embodiment, in the process of sequentially reading the pixel values of the pixel points of the image block, when a pixel point with the first pixel value not being the image background pixel value is encountered, the pixel point is the starting point of the contour, and thus is referred to as a contour starting pixel point. Since in digital image processing, the connection relationship of the pixel points is usually considered in the neighborhood thereof, and the eight-neighborhood can more comprehensively capture the connection of the pixel points in the horizontal and vertical directions and the diagonal direction, after the pixel point is determined as the contour starting pixel point, eight neighborhood pixel points around the contour starting pixel point are determined within the range of the current image block, and the eight pixel points cover each direction in which the contour starting pixel point can extend the contour, thereby providing an initial search range for subsequent contour tracking.

[0049] In order to find the next point of the contour in the eight-neighborhood pixel points, the pixel values of the pixel points can be read in a certain order, and the order is referred to as the first target order. For example, the pixel values of the pixel points can be sequentially read in the clockwise or counterclockwise direction, and each pixel value of the pixel points is checked. When a pixel point with the first pixel value not being the image background pixel value is read, the pixel point is logically the point in the extension direction of the contour after the contour starting pixel point, and thus is determined as the next contour pixel point, thereby realizing the extension of the contour from the starting point to the next point.

[0050] After the next contour pixel point is determined, the new eight-neighborhood pixel points corresponding to the new pixel point are determined in the current image block range, taking the new pixel point as the center. Then, the next contour pixel point is searched again from the new eight-neighborhood pixel points according to a second target order (which can be the same as or different from the first target order, and is set according to specific requirements). This process is repeated continuously, and each time a new contour pixel point is determined, the new eight-neighborhood is determined taking the new contour pixel point as the center, and the next point is searched according to the order. The loop can continue until one of the following two situations occurs: one is that the next contour pixel point determined is at the edge of the current image block, indicating that the contour has extended to the boundary in the current image block, and needs to be continued to track in combination with other image blocks; the other is that the next contour pixel point determined is the contour starting pixel point, which indicates that a closed contour ring has been completed, that is, the tracking process of the first sub-contour is completed.

[0051] When the contour tracking process ends according to the above steps, a series of continuous pixel points are obtained, including the contour starting pixel point initially determined and each contour pixel point determined through eight-neighborhood search subsequently. These pixel points are connected in turn according to the tracking order, which constitutes the first sub-contour of the to-be-processed remote sensing image in the current image block. This sub-contour is part of the entire contour of the to-be-processed remote sensing image, and accurately reflects the boundary shape of the effective region in the current image block range, providing key data support for splicing each sub-contour into a complete remote sensing image contour subsequently.

[0052] In the embodiment of the present application, optionally, the first target order is a clockwise order taking the top-left pixel point of the contour starting pixel point as the first reading pixel point; before the next contour pixel point is determined again from the new eight-neighborhood pixel points according to the second target order, the method further comprises: calculating a contour trend direction based on the next contour pixel point and a previous contour pixel point of the next contour pixel point, and determining a first reading pixel point from the eight-neighborhood pixel points corresponding to the next contour pixel point based on the contour trend direction, taking the clockwise order starting from the first reading pixel point and the counterclockwise order as the second target order.

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

[0054] The first target order can be a clockwise order in which the top-left pixel of the contour starting pixel is the first read pixel. Specifically, during the contour tracking process, after determining the contour starting pixel, the next contour pixel needs to be found from its eight-neighborhood pixel. Starting from the top-left corner, each neighborhood pixel is checked in turn, which can comprehensively cover the possible contour continuation directions around the starting pixel during the search process, ensuring that the first target pixel point meeting the contour point characteristics (pixel value is a non-image background pixel value) can be accurately found, thereby determining the next contour pixel.

[0055] The second target order can be dynamically determined. Specifically, after determining a next contour pixel, in order to more intelligently and quickly determine the contour pixel from the eight-neighborhood pixels of the next contour pixel, and to avoid reading the pixel value 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, and can be calculated based on the currently determined next contour pixel (i.e., the pixel point that is about to be searched in the eight-neighborhood) and its previous contour pixel. By analyzing the positional relationship between the two points, such as the coordinate difference between them, the general trend of the contour can be obtained. This calculation of the trend direction helps to more quickly determine the next contour pixel from its eight-neighborhood pixels, avoiding blind searching in the eight-neighborhood, and improving the efficiency and accuracy of contour tracking.

[0056] Further, according to the calculated contour trend direction, the first read pixel is determined from the eight-neighborhood pixels corresponding to the next contour pixel. Since the contour trend direction indicates the current development trend of the contour, searching from the neighborhood pixels near this direction is more likely to find the next pixel point meeting the contour characteristics. For example, if the contour trend direction is to the right and up, then the pixel points near the right and up in the eight-neighborhood are more likely to be the next contour pixel. By determining the first read pixel in this way, the contour tracking can be more in line with the actual trend of the contour, reducing unnecessary search steps, and improving the efficiency of the entire contour tracking algorithm.

[0057] After determining the first read pixel, in order to further ensure that the next contour pixel can be accurately found, the clockwise order and the counterclockwise order starting from the first read pixel are both used as the second target order. This is because in the actual contour tracking process, due to factors such as image noise and complex target object shape, the extension direction of the contour at a certain point can be uncertain. Considering both clockwise and counterclockwise orders for searching can expand the search range and improve the efficiency of finding the correct next contour pixel. This dual-order search strategy can improve the robustness of the contour tracking algorithm, making it better adapt to various complex image situations.

[0058] In the embodiment of the present application, optionally, the "obtaining a remote sensing image to be processed" in step 101 comprises: outputting an abnormal contour processing interface in response to a remote sensing image abnormal contour processing instruction; identifying an abnormal contour processing parameter from the abnormal contour processing interface, wherein the abnormal contour processing parameter comprises a remote sensing image source path; reading a remote sensing image under the remote sensing image source path as the remote sensing image to be processed; accordingly, the abnormal contour processing parameter further comprises a remote sensing image storage path and an operation parameter, the remote sensing image storage path is used to indicate the storage position of the processed remote sensing image, and the operation parameter is used to indicate the preset blocking strategy.

[0059] In this embodiment, when receiving a remote sensing image abnormal contour processing instruction issued by a user, a corresponding response mechanism can be triggered immediately. The instruction can be issued by the user through a specific operation interface, command line input or a preset shortcut key, etc. After receiving the instruction, an abnormal contour processing interface can be output. This interface is an important window for user interaction with the system, which is used to provide a visual operation environment for the user. The user can set various parameters, view the processing progress and obtain the processing result and other related information on this interface, which facilitates the user to operate and monitor the remote sensing image abnormal contour processing process.

[0060] After the abnormal contour processing interface is displayed to the user, the user can input or select related abnormal contour processing parameters on the interface. Specifically, the input situation of the interface can be monitored in real time, and when the user completes the parameter setting, these parameters can be identified from the abnormal contour processing interface. Among them, the abnormal contour processing parameter can include a remote sensing image source path, which is used to specify the specific position of the remote sensing image to be processed in the computer storage system. Through this path, the remote sensing image that needs to be processed for abnormal contour can be accurately found, providing accurate positioning information for subsequent reading and processing operations.

[0061] After successfully identifying the remote sensing image source path, the computer storage system can be accessed according to the path. The computer storage system can include a local hard disk, a network storage device, etc. Specifically, the specific file location where the remote sensing image is stored can be located according to the indication of the path, and then the remote sensing image under the path is read into the memory, so that the remote sensing image becomes the remote sensing image to be processed.

[0062] In addition to the remote sensing image source path, the abnormal contour processing parameter can also include a remote sensing image storage path and an operation parameter. The remote sensing image storage path is used to determine where the processed remote sensing image should be stored in the computer storage system. After the abnormal contour processing of the remote sensing image is completed, the processed remote sensing image can be automatically saved according to the storage path, which is convenient for the user to find and use later. The operation parameter is used to indicate a preset blocking strategy, for example, including the size of the block, the way of blocking (such as uniform blocking, content-based blocking, etc.), and other information, which lays a foundation for the subsequent contour extraction and processing steps.

[0063] In the embodiment of the present application, optionally, the "determining the abnormal contour determination method corresponding to the remote sensing image to be processed based on the relationship between the group number and the preset number threshold" in step 103 comprises: if the group number is greater than the preset number threshold, determining that the abnormal contour determination method corresponding to the remote sensing image to be processed is a contour regularization processing method, otherwise, determining that the abnormal contour determination method corresponding to the remote sensing image to be processed is a contour differentiation processing method.

[0064] Correspondingly, when the abnormal contour determination method is a contour regularization processing method, the "determining the abnormal contour region corresponding to the remote sensing image to be processed based on each straight line segment through the abnormal contour determination method" in step 104 comprises: for each straight line segment, taking the straight line segment as the center line of a rectangular region, and taking a first preset width as the width of the rectangular region, constructing a rectangular region, and taking the rectangular region as the abnormal contour sub-region corresponding to the straight line segment; merging and removing 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.

[0065] When the abnormal contour determination method is the contour differentiation 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 by 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 a direction perpendicular to the straight line segment as a 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, reading pixel values of each pixel point in the abnormal contour search region in sequence along the search direction from the target search starting point, judging whether there is an abnormal pixel point in the abnormal contour search region based on the read pixel values, if there is an abnormal pixel point, continuing to judge along the search direction until the first non-abnormal pixel point is read, and determining an abnormal contour sub-region corresponding to the target search starting point according to a distance between the target search starting point and the first non-abnormal pixel point; and merging 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.

[0066] In this embodiment, when processing the remote sensing image to be processed, the abnormal contour determination method corresponding to the remote sensing image to be processed can be determined first. Specifically, the determination can be made according to the relationship between the group number of the straight line segment group and the preset number threshold. The preset number threshold can be a pre-set critical value, which can be determined based on a large amount of experience data and actual application scenarios. When the group number is greater than the preset number threshold, it indicates that the contour features in the remote sensing image are relatively complex, and the contour regularization processing method is used to efficiently and non-discriminatively determine the abnormal contour region. When the group number is not greater than the preset number threshold, it indicates that the contour feature complexity is low, and the contour differentiation processing method can be used to accurately find the real abnormal contour.

[0067] Since there is usually a strip-shaped color abnormality between the effective region and the background of the remote sensing image, the strip-shaped color abnormality is usually a pixel point width abnormality. Therefore, after determining the image contour of a pixel point width, the abnormal strip-shaped region can be further determined based on the image contour pixel points, that is, the abnormal contour region.

[0068] When it is determined that the abnormal contour determination method is the contour regularization processing method, the construction of the abnormal contour sub-region can be performed for each straight line segment. Specifically, a rectangular region can be constructed with the straight line segment as the rectangular center line and the first preset width as the rectangular width. At this time, the length of the rectangular region is the length of the straight line segment. The first preset width can be a fixed value that is set in advance, which determines the size of the rectangular region in the direction perpendicular to the straight line segment. Specifically, the first preset width can be determined by the user according to the actual needs. The determination of the first preset width can ensure that the width of the normal abnormal strip-shaped region is covered, and the influence on the effective region of the image is minimized. By constructing the rectangular region in this way, the region around the straight line segment can be quickly and effectively marked as an abnormal contour sub-region. This construction method is simple and direct, and is suitable for the determination of abnormal contour regions in complex contour situations. It should be noted that the abnormal contour sub-region here is not a real abnormal region, but a way to quickly determine the possible abnormal region under the complex contour. After constructing the abnormal contour sub-region for each straight line segment, since there are multiple straight line segments in the remote sensing image, the abnormal contour sub-regions corresponding to these straight line segments may have overlapping parts, and therefore can be merged and de-duplicated. Through the merging and de-duplicating operation, the abnormal contour sub-regions with overlapping parts are integrated, and the repeated parts are removed, to obtain a complete and non-repeated abnormal contour region.

[0069] When the abnormal contour determination method is the contour differentiation processing method, the processing manner is different from that of the regularization processing method. Specifically, for each straight line segment, first, an abnormal contour search region is determined based on the straight line segment and a second preset width. The second preset width is also a preset value, which determines the range of the search region in the direction perpendicular to the straight line segment, and the user can determine it according to the actual needs. Then, one or more target search starting points are determined from the straight line segment based on a preset distance interval. The preset distance interval can ensure that the search starting points are uniformly distributed on the straight line segment, so as to comprehensively search the area around the straight line segment and as far as possible not to miss possible abnormal contour points. Further, for each determined target search starting point, the pixel value of each pixel point in the abnormal contour search region can be read in sequence from the starting point along the previously determined search direction. By reading the pixel value, it can be judged whether the pixel point is an abnormal pixel point. Here, the pixel value of the abnormal pixel point can be predetermined, for example, by analyzing the pixel values of a large number of boundary abnormal strip-shaped pixel points of remote sensing images, it is found that the pixel value of the abnormal pixel point is that the RGB three-channel pixel values are all in [0, 20]. If there is an abnormal pixel point, the next pixel point can be judged along the search direction until the first non-abnormal pixel point is read, and the judgment is ended. Then, according to the distance between the target search starting point and the first non-abnormal pixel point, the abnormal contour sub-region corresponding to the target search starting point is determined. This distance reflects the extension range of the abnormal contour in the search direction, and by this way, the abnormal contour sub-region corresponding to each target search starting point can be accurately determined, which adapts to the complex situation of differentiated contour. It should be noted that if there is no abnormal pixel point, it means that all the normal pixel points in the corresponding search region, and at this time, the target search starting point does not correspond to the generation of an abnormal contour sub-region. After searching according to each target search starting point, a series of abnormal contour sub-regions can be determined, and these abnormal contour sub-regions may also have overlapping situations. Through the merging and deduplication operation, these overlapping abnormal contour sub-regions are integrated, the repeated parts are removed, and a complete and non-repeated abnormal contour region is obtained. The abnormal contour region obtained in this way can more accurately reflect the abnormal contour range determined based on the differentiation processing method in the remote sensing image to be processed, and provide more accurate data support for subsequent abnormal contour processing. The abnormal contour region determined by the contour differentiation processing method is a real abnormal strip-shaped region.

[0070] In one specific embodiment, as Figure 6As shown, the entire rectangular region (including the red region, the blue region and the gray region) is the abnormal contour search region, the red region represents the abnormal contour region, the dotted texture represents the normal effective region of the remote sensing image, the gray region represents the image background region of the remote sensing image, and the middle blue line represents the extracted straight line segment. The arrow represents that the search is started from one target search starting point along the direction perpendicular to the straight line segment, and when an abnormal pixel point is searched, the search is continued until the first non-abnormal pixel point (i.e. Figure 6 the dotted texture region) is searched, and the distance between the current point and the target search starting point is taken as the width of the abnormal contour sub-region corresponding to the target search starting point. With the 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, which is the abnormal contour sub-region corresponding to the target search starting point.

[0071] In the embodiment of the present application, the "determining the abnormal contour region corresponding to the remote sensing image to be processed based on each straight line segment by the abnormal contour determination method" in step 104 comprises: assigning an idle thread to each straight line segment group respectively, for each idle thread, determining the abnormal contour sub-region of each straight line segment in the corresponding straight line segment group by the abnormal contour determination method, and constructing the abnormal contour region corresponding to the remote sensing image to be processed according to the abnormal contour sub-regions corresponding to each straight line segment group.

[0072] In this embodiment, when processing the remote sensing image to be processed to determine its abnormal contour region, in order to improve the processing efficiency and make full use of the multi-thread processing capability of the computer system, an idle thread can be assigned to each straight line segment group, that is, each straight line segment group is bound to an idle thread, so that the determination of the abnormal contour sub-region of different straight line segment groups can be processed in parallel instead of being processed in series one by one, thereby shortening the overall processing time and improving the processing performance.

[0073] After assigning the idle threads to each straight line segment group, each thread can start to independently execute the task. Specifically, for each idle thread, each straight line segment in the corresponding straight line segment group can be processed according to the previously determined abnormal contour determination method (for example, the contour regularization processing method or the contour differentiation processing method). After each idle thread determines the abnormal contour sub-region of each straight line segment in the corresponding straight line segment group, the abnormal contour sub-regions can be integrated to construct the entire abnormal contour region corresponding to the to-be-processed remote sensing image. Since different straight line segments are distributed in different positions of the remote sensing image, there can be overlaps between the corresponding abnormal contour sub-regions, and therefore, comprehensive analysis can be performed on the abnormal contour sub-regions corresponding to all straight line segments in all straight line segment groups, and through merging and deduplication operations, the sub-regions can be organically combined together to remove the repeated and redundant parts, and form a complete region set that can accurately reflect the abnormal contour in the to-be-processed remote sensing image. This construction process ensures that the final obtained abnormal contour region can comprehensively and accurately cover all abnormal contour parts in the remote sensing image, and provides an accurate data basis for subsequent abnormal contour processing.

[0074] Further, as Figure 2 a specific implementation of the method, the embodiment of the present application provides a contour abnormality processing device for remote sensing images, as shown in the figure, the device comprises: Figure 7

[0075] a remote sensing image acquisition module, configured to acquire a to-be-processed remote sensing image, extract pixel points belonging to an image contour from the to-be-processed remote sensing image, and construct a contour point set based on the pixel points and the order of each pixel point in the image contour;

[0076] a straight line segment fitting module, configured to perform straight line segment fitting on continuous pixel points in the contour point set to obtain a plurality of straight line segments, calculate the angle corresponding to each straight line segment based on the head point and the tail point of the straight line segment, and group all straight line segments according to the angles of the straight line segments to obtain a plurality of straight line segment groups;

[0077] a statistical module, configured to count the number of the plurality of straight line segment groups, and determine an abnormal contour determination method corresponding to the to-be-processed remote sensing image based on the relationship between the number and a preset number threshold;

[0078] an abnormal contour processing module, configured to determine an abnormal contour region corresponding to the to-be-processed remote sensing image based on each straight line segment through the abnormal contour determination method, and assign the pixel value of the pixel points in the abnormal contour region as an image background pixel value of the to-be-processed remote sensing image to obtain a processed remote sensing image.

[0079] Optionally, the remote sensing image acquisition module is configured to:​

[0080] performing block processing on the remote sensing image to be processed according to a preset block strategy, to obtain a plurality of image blocks;

[0081] reading pixel values of pixel points in each image block in sequence until a pixel point whose first pixel value is a non-image background pixel value is read, triggering a preset contour tracking algorithm, and determining a first sub-contour of the remote sensing image to be processed from the current image block through the preset contour tracking algorithm;

[0082] determining whether an end pixel point in the first sub-contour is at an edge of the current image block, if the end pixel point is at the edge of the current image block, determining a target direction of the end pixel point relative to the current image block, and determining a next contour tracking image block from the remaining image blocks based on the target direction, determining a second sub-contour of the remote sensing image to be processed from the contour tracking image block through the preset contour tracking algorithm, determining a next contour tracking image block from the remaining image blocks based on the second sub-contour, and ending when the first pixel point of the first sub-contour is contained in the second sub-contour;

[0083] determining pixel points of an image contour of the remote sensing image to be processed based on the first sub-contour and pixel points contained in second sub-contours corresponding to the contour tracking image blocks.

[0084] Optionally, the remote sensing image acquisition module is further configured to:

[0085] determine eight-neighbor pixel points corresponding to the contour starting pixel point based on the current image block;

[0086] read pixel values of each pixel point in the eight-neighbor pixel points in a first target order until a target pixel point whose first pixel value is a non-image background pixel value is read, and take the target pixel point as a next contour pixel point;

[0087] determine new eight-neighbor pixel points corresponding to the next contour pixel point based on the current image block, and determine a next contour pixel point from the new eight-neighbor pixel points again in a second target order until the determined next contour pixel point is at an edge of the current image block or the determined next contour pixel point is the contour starting pixel point;

[0088] obtain a first sub-contour of the remote sensing image to be processed according to the contour starting pixel point and the contour pixel points.

[0089] Optionally, the first target order is a clockwise order with a top-left pixel point of the contour starting pixel point as a first read pixel point.

[0090] The apparatus further includes a sequence determination module; the sequence determination module is configured to:

[0091] Before the next contour pixel point is determined again from the new eight-neighborhood pixel points according to the second target sequence, a contour trend direction is calculated based on the next contour pixel point and a previous contour pixel point of the next contour pixel point, and a first reading pixel point is determined from the eight-neighborhood pixel points corresponding to the next contour pixel point based on the contour trend direction, and the clockwise sequence and the counterclockwise sequence starting from the first reading pixel point are simultaneously used as the second target sequence.

[0092] Optionally, the remote sensing image acquisition module is configured to:

[0093] In response to a remote sensing image abnormal contour processing instruction, an abnormal contour processing interface is outputted;

[0094] An abnormal contour processing parameter is identified from the abnormal contour processing interface, wherein the abnormal contour processing parameter includes a remote sensing image source path;

[0095] A remote sensing image under the remote sensing image source path is read as the to-be-processed remote sensing image;

[0096] Correspondingly, the abnormal contour processing parameter further includes a remote sensing image storage path and an operation parameter, the remote sensing image storage path is used to indicate a storage position of a processed remote sensing image, and the operation parameter is used to indicate the preset blocking strategy.

[0097] Optionally, the statistical module is configured to:

[0098] If the group number is greater than a preset number threshold, it is determined that an abnormal contour determination method corresponding to the to-be-processed remote sensing image is a contour regularization processing method, otherwise, it is determined that the abnormal contour determination method corresponding to the to-be-processed remote sensing image is a contour differentiation processing method;

[0099] Correspondingly, when the abnormal contour determination method is the contour regularization processing method, the abnormal contour processing module is configured to:

[0100] For each straight line segment, a rectangular region is constructed by taking the straight line segment as a rectangular center line and taking a first preset width as a rectangular width, and the rectangular region is used as an abnormal contour sub-region corresponding to the straight line segment;

[0101] The abnormal contour sub-regions corresponding to the straight line segments are merged and de-duplicated to obtain an abnormal contour region corresponding to the to-be-processed remote sensing image;

[0102] When the abnormal contour determination method is a contour differentiation processing method, the abnormal contour processing module is used to:

[0103] 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.

[0104] 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.

[0105] Optionally, the abnormal contour processing module is used to:

[0106] 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.

[0107] 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. Figure 2 to Figure 6 The corresponding descriptions in the method will not be repeated here.

[0108] 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.

[0109] Those skilled in the art can understand that Figure 8 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0110] In an embodiment, a computer readable storage medium is provided, which can be non-volatile or volatile, and has stored thereon a computer program which, when executed by a processor, implements the steps in any of the above method embodiments.

[0111] In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps in any of the above method embodiments.

[0112] 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 for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.

[0113] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present 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 storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0114] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.

[0115] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method for contour anomaly processing of remote sensing images, characterized in that, The method comprises: acquiring a to-be-processed remote sensing image, and extracting pixel points belonging to an image contour from the to-be-processed remote sensing image, constructing a contour point set based on the pixel points and the order of each pixel point in the image contour; performing straight line segment fitting on continuous pixel points in the contour point set to obtain a plurality of straight line segments, calculating the angle corresponding to each straight line segment based on the start point and the end point of the straight line segment, and grouping all the straight line segments according to the angles of the straight line segments to obtain a plurality of straight line segment groups; counting the number of the 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 number and a preset number threshold; determining an abnormal contour region corresponding to the to-be-processed remote sensing image by the abnormal contour determination method based on each straight line segment, and assigning the pixel value of the pixel points in the abnormal contour region to an image background pixel value of the to-be-processed remote sensing image to obtain a processed remote sensing image.

2. The method of claim 1, wherein, The extraction of the pixel points belonging to the image contour from the to-be-processed remote sensing image comprises: performing block processing on the to-be-processed remote sensing image according to a preset block strategy to obtain a plurality of image blocks; reading the pixel values of the pixel points in each image block in turn until the pixel value of the first pixel point is a non-image background pixel value, triggering a preset contour tracking algorithm, and determining a first sub-contour of the to-be-processed remote sensing image from the current image block by the preset contour tracking algorithm; determining whether the end pixel point in the first sub-contour is at the edge of the current image block, if the end pixel point is at the edge of the current image block, determining the target direction of the end pixel point relative to the current image block, and determining the next contour tracking image block from the remaining image blocks based on the target direction, determining a second sub-contour of the to-be-processed remote sensing image from the contour tracking image block by the preset contour tracking algorithm, determining the next contour tracking image block from the remaining image blocks based on the second sub-contour, and ending until the second sub-contour contains the first pixel point of the first sub-contour; determining the pixel points of the image contour of the to-be-processed remote sensing image based on the first sub-contour and the pixel points contained in the second sub-contour corresponding to each contour tracking image block.

3. The method of claim 2, wherein, The determination of the first sub-contour of the to-be-processed remote sensing image from the current image block by the preset contour tracking algorithm comprises: taking the pixel point with the first pixel value as a non-image background pixel value as a contour starting pixel point, and determining the eight-neighborhood pixel points corresponding to the contour starting pixel point based on the current image block; reading the pixel values of each pixel point in the eight-neighborhood pixel points in a first target order until a target pixel point with a first pixel value as a non-image background pixel value is read, and taking the target pixel point as a next contour pixel point; determine a new eight-neighbor pixel corresponding to the next contour pixel point based on the current image block, and determine the next contour pixel point again from the new eight-neighbor pixel points in a second target order until the determined next contour pixel point is at an edge of the current image block or the determined next contour pixel point is the contour starting pixel point; obtain a first sub-contour of the to-be-processed remote sensing image according to the contour starting pixel point and each contour pixel point.

4. The method of claim 3, wherein, The first target order is a clockwise order in which a top-left pixel point of the contour starting pixel point is a first reading pixel point. Before the next contour pixel point is determined again from the new eight-neighbor pixel points in the second target order, the method further comprises: based on the next contour pixel point and a previous contour pixel point of the next contour pixel point, calculate a contour trend direction, and based on the contour trend direction, determine a first reading pixel point from the eight-neighbor pixel points corresponding to the next contour pixel point, and simultaneously use a clockwise order and a counterclockwise order starting from the first reading pixel point as the second target order.

5. The method of claim 2, wherein, The to-be-processed remote sensing image is obtained by: in response to a remote sensing image abnormal contour processing instruction, output an abnormal contour processing interface; identify an abnormal contour processing parameter from the abnormal contour processing interface, wherein the abnormal contour processing parameter includes a remote sensing image source path; read a remote sensing image under the remote sensing image source path as the to-be-processed remote sensing image; Correspondingly, the abnormal contour processing parameter further includes a remote sensing image storage path and an operation parameter, the remote sensing image storage path is used to indicate the storage position of the processed remote sensing image, and the operation parameter is used to indicate the preset blocking strategy.

6. The method of claim 1, wherein, The relationship between the group number and the preset number threshold is determined based on the relationship between the group number and the preset number threshold, and the abnormal contour determination method corresponding to the to-be-processed remote sensing image is determined, comprising: if the group number is greater than the preset number threshold, it is determined that the abnormal contour determination method corresponding to the to-be-processed remote sensing image is a contour regularization processing method, otherwise, it is determined that the abnormal contour determination method corresponding to the to-be-processed remote sensing image is a contour differentiation processing method; Correspondingly, when the abnormal contour determination method is the contour regularization processing method, the abnormal contour region corresponding to the to-be-processed remote sensing image is determined based on each straight line segment by the abnormal contour determination method, comprising: for each straight line segment, taking the straight line segment as the center line of the rectangle, taking the first preset width as the width of the rectangle, constructing a rectangular region, and taking the rectangular region as the abnormal contour sub-region corresponding to the straight line segment; merge and remove the abnormal contour sub-regions corresponding to each straight line segment to obtain the abnormal contour region corresponding to the to-be-processed remote sensing image; when the abnormal contour determination method is the contour differentiation processing method, the abnormal contour region corresponding to the to-be-processed remote sensing image is determined based on each straight line segment by the abnormal contour determination method, comprising: For each straight line segment, based on the straight line segment and a second preset width, an abnormal contour search region is determined, a direction perpendicular to the straight line segment is taken as a search direction, and at least one target search starting point is determined from the straight line segment based on a preset distance interval; for each target search starting point, pixel values of each pixel point in the abnormal contour search region are read in sequence along the search direction from the target search starting point, it is judged whether there is an abnormal pixel point in the abnormal contour search region based on the read pixel values, if there is an abnormal pixel point, the judgment is continued along the search direction until the first non-abnormal pixel point is read, and an abnormal contour sub-region corresponding to the target search starting point is determined according to a distance between the target search starting point and the first non-abnormal pixel point; The abnormal contour sub-regions corresponding to the target search starting points are merged and de-duplicated to obtain an abnormal contour region corresponding to the to-be-processed remote sensing image.

7. The method of claim 1, wherein, The abnormal contour region corresponding to the to-be-processed remote sensing image is determined based on each straight line segment by using the abnormal contour determination method, and includes: An idle thread is allocated to each straight line segment group respectively, for each idle thread, an abnormal contour sub-region of each straight line segment in the corresponding straight line segment group is determined by using the abnormal contour determination method, and the abnormal contour region corresponding to the to-be-processed remote sensing image is constructed according to the abnormal contour sub-regions of each straight line segment group.

8. An apparatus for contour anomaly processing of a remote sensing image, characterized by comprising: It includes: A remote sensing image acquisition module is configured to acquire a to-be-processed remote sensing image, extract pixel points belonging to an image contour from the to-be-processed remote sensing image, and construct a contour point set based on the pixel points and orders of the pixel points in the image contour; A straight line segment fitting module is configured to perform straight line segment fitting on continuous pixel points in the contour point set to obtain a plurality of straight line segments, calculate angles corresponding to the straight line segments based on first end points and tail end points of each straight line segment, and group all the straight line segments according to the angles of the straight line segments to obtain a plurality of straight line segment groups; A statistical module is configured to count a number of the straight line segment groups, and determine an abnormal contour determination method corresponding to the to-be-processed remote sensing image based on a relationship between the number and a preset number threshold; An abnormal contour processing module is configured to determine an abnormal contour region corresponding to the to-be-processed remote sensing image based on each straight line segment by using the abnormal contour determination method, assign pixel values of pixel points in the abnormal contour region to image background pixel values of the to-be-processed remote sensing image, and obtain a processed remote sensing image.

9. A storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement the method in 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, The processor executes the computer program to implement the method in 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