Data boundary extraction method for multiple remote sensing image datasets after continuous cropping
By constructing the spatial relationship of the image data set and identifying the intersection area, the boundaries of the remote sensing image data set are automatically extracted, which solves the problem of low boundary extraction efficiency in the existing technology, and achieves efficient and accurate vector boundary recognition.
Patent Information
- Application Number
- CN202411216258.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-09-02
AI Technical Summary
When processing cropped remote sensing image data sets, the efficiency of obtaining actual vector data boundaries is low, and manual operations are cumbersome, which can easily lead to internal voids or large workloads in the image.
By constructing the spatial relationship in the image dataset, determine the rectangular outer frame surface of each image segment and establish an adjacency matrix. Use the initial seed points to identify connected pixels with similar colors, record boundary points by point, and combine the overlap information of the intersection area to automatically Identify the data-free areas between image segments and merge the actual data areas to determine the boundaries of the image data set.
It realizes fast and accurate boundary extraction of multiple remote sensing image data sets, reduces manual operations, improves work efficiency, and provides complete vector boundaries for spatial analysis and map services.
Smart Images

Figure CN118762052B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image data processing, and in particular to a data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping. Background Art
[0002] After years of development, remote sensing images have been extended to a wide range of application scenarios in natural resource monitoring, urban management and other fields. Especially with the development of geographic information application technology, various information systems based on maps have sprung up like mushrooms after rain. Remote sensing image data, as core map data, is frequently used as the base map of various spatial information platforms. With higher data security requirements and more mature remote sensing image data processing methods, the remote sensing image data currently obtained by many units are image data that have been processed by cropping according to the application scope. At the same time, due to the large amount of data characteristics of remote sensing images, image data is usually not stored in a single file, but in the form of an image set composed of a large number of rectangular partitioned files that meet specific standards, and there are generally overlapping parts between spatially adjacent image partitions, and the overlapping data are completely consistent. Usually the cropping range is a specific administrative area or a continuous working range, that is, the edge image partitions of the image set are usually cropped and the content is incomplete.
[0003] Since image data is usually stored in TIFF or JPEG format, the edge areas after being cropped are usually filled with black (or other solid colors). This results in the image data being published as a map service with patches of black (or other solid colors) on the edges, which affects the map visualization effect on the one hand, and covers other data in the underlying layer on the other hand, which has a negative impact on the application effect of the image data in the map service. To address this issue, the best method is to inversely calculate the actual vector data boundary of the image dataset for subsequent processing. At present, there are usually two solutions to this problem in the industry: one is to select the pixel value of the data-free area and directly delete all the pixel colors (usually black and white) with the same color in the image data to make it transparent. The main defects of this solution are that first, it is inevitable that there are pixels with the same color outside the boundary inside the remote sensing image range and they are mistakenly deleted, resulting in internal holes in the image and failure to truly obtain the vector boundary of the remote sensing data, which is not conducive to spatial topology calculations in different application scenarios; the other is to use image processing tools such as ArcGIS and Photoshop to manually identify the edge blank area and then obtain the single image vector data edge through a series of conversions. This method needs to rely on other processing tools, and can only process each image frame separately and then manually convert and merge the results. It is cumbersome and labor-intensive, and has low efficiency for remote sensing image data sets consisting of hundreds or thousands of frames. Summary of the invention
[0004] The main purpose of the present invention is to provide a data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping, aiming to solve the problem of low efficiency in obtaining actual vector data boundaries of image data sets.
[0005] To achieve the above object, the present invention provides a data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping, comprising:
[0006] Step 1, obtaining an external input image data set, and constructing a spatial relationship between multiple image frames in the image data set, including: determining the rectangular outer frame range of each image frame, and establishing an adjacency matrix between all image frames;
[0007] Step 2, obtaining an externally input initial seed point, and determining the image frame where the initial seed point is located as the current active frame according to the externally input initial seed point and the rectangular outer frame range of each image frame;
[0008] Step 3, in the current active frame, starting from the current active data-free seed point, identifying all connected pixels with similar colors until the connected area spreads to the actual data boundary of the current active frame or the boundary of the rectangular outer frame range, recording the pixel points of the boundary point by point and connecting them into lines to determine the data-free area in the current active frame; wherein, when step 2 is executed for the first time, the initial seed point is regarded as the current active data-free seed point;
[0009] Step 4: according to the adjacency matrix, determine all image frames adjacent to the current active frame; according to the data-free region in the current active frame and the rectangular outer frame range in each adjacent image frame, find the intersection area where the current active frame overlaps with the adjacent image frames; use a pixel point in the intersection area as a new current active data-free seed point; use the image frame adjacent to the current active frame where the new current active data-free seed point is located as the new current active frame; wherein the intersection area is the overlapping area of two adjacent data-free regions;
[0010] Step 5, repeating steps 3 and 4 according to the new currently active no-data seed point and the new currently active frame, until the new currently active no-data seed point of the intersection area between all image frames is determined, and then the no-data area of all image frames outside the cropping range is determined according to each new active no-data seed point;
[0011] Step 6: according to the rectangular outer frame range of all image frames, erase the portion covered by the non-data area in each image frame to determine the actual data area of all image frames; merge the actual data areas to determine the actual data boundary of the image data set.
[0012] Preferably, the initial seed point satisfies a first preset condition, wherein the first preset condition is that the initial seed point is a pixel point in the data-free area in any of the image frames.
[0013] Preferably, the adjacency matrix is a Boolean matrix M×N, and the matrix elements are V xy , x∈[1,M], y∈[1,N], V xy ∈{0,1}; where M represents the number of rows in the matrix, and M is equal to the number of image frames in each row; N represents the number of columns in the matrix, and N is equal to the number of image frames in each column, V xy Indicates whether the x-th image frame is adjacent to or overlaps with the y-th image frame.
[0014] Preferably, after step 2, the method further comprises:
[0015] Determine whether the overlap between the image frame where the currently active data-free seed point is located and each of the adjacent image frames is greater than a preset value;
[0016] When the overlap between the image frame where the currently active data-free seed point is located and each of the adjacent image frames is greater than or equal to a preset value, executing step 3;
[0017] When the overlap between the image frame where the currently active data-free seed point is located and the adjacent image frames is less than a preset value, the data-free area in the currently active frame is expanded by a preset number of pixels toward the rectangular outer frame boundary, and then step 3 is executed.
[0018] Preferably, the currently active data-free seed satisfies a second preset condition; the second preset condition includes that the currently active data-free seed point is located in the intersection area, and the interval distance between the currently active data-free seed point and the edge of the intersection area where the currently active data-free seed point is located is greater than a preset distance.
[0019] Preferably, step 3 comprises:
[0020] In the current active tile, the current active data-free seed point is used as the starting point;
[0021] Obtaining adjacent pixels in a first preset direction of the starting point, and determining whether a difference between a pixel value of the starting point and a pixel value of an adjacent pixel is less than a preset tolerance;
[0022] When the difference between the pixel value of the starting point and the pixel value of the adjacent pixel is less than a preset tolerance, the adjacent pixel is confirmed as an active point to be processed;
[0023] When the difference between the pixel value of the starting point and the pixel value of the adjacent pixel is greater than or equal to a preset tolerance, the adjacent pixel is confirmed as a boundary point of a data-free area in the current active frame;
[0024] Mark the determined starting point as the processed activity point;
[0025] Any active point to be processed is marked as a new starting point, and the steps of obtaining adjacent pixels in the first preset direction of the starting point and determining whether the difference between the pixel value of the starting point and the pixel value of the adjacent pixels is less than the preset tolerance are executed, until all active points to be processed are confirmed as processed active points, and it is determined that there is no data area in the current active partition.
[0026] Preferably, all pixels in the current active frame include:
[0027] O = W ∪ B ∪ S;
[0028] Among them, O is the set of all pixels in the current active frame; W is the set of all processed active points in the current active frame; B is the set of all boundary points in the current active frame; S is the set of all real data points in the current active frame.
[0029] Preferably, the boundary points in the boundary point set are arranged along a spatial adjacency relationship according to a preset order.
[0030] Preferably, the method for arranging each boundary point in the boundary point set includes:
[0031] Confirm any boundary point as the initial active boundary point, and confirm the initial active boundary point as the processed boundary point;
[0032] According to the second preset direction, confirming the boundary point adjacent to the initial active boundary point as the current active boundary point, and confirming the current active boundary point as the processed boundary point;
[0033] According to the second preset direction, a boundary point adjacent to the current active boundary point is confirmed as the next active boundary point, and the next active boundary point is confirmed as a processed boundary point, until all boundary points are confirmed as processed boundary points, and a boundary line of a data-free area in the current active partition is confirmed based on all processed boundary points; wherein the boundary line is composed of the processed boundary points arranged and connected along the spatial adjacency relationship according to a preset order.
[0034] Preferably, the step of confirming the boundary point adjacent to the current active boundary point as the next active boundary point according to the second preset direction, and confirming the next active boundary point as a processed boundary point until all boundary points are confirmed as processed boundary points, and confirming the boundary line of the data-free area in the current active partition according to all processed boundary points includes:
[0035] According to the second preset direction, determining whether the number of boundary points in the second preset direction among the current active boundary points is greater than one;
[0036] When the number of boundary points in the second preset direction in the current active boundary point is equal to one, a boundary point adjacent to the current active boundary point is confirmed as a next active boundary point, and the next active boundary point is confirmed as a processed boundary point, and the steps are performed until all boundary points are confirmed as processed boundary points, and a boundary line of a data-free area in the current active partition is confirmed according to all processed boundary points;
[0037] When the number of boundary points in the second preset direction among the current active boundary points is greater than one, an adjacent boundary point satisfying the third preset condition is confirmed as the next active boundary point.
[0038] The data-free area of the current active frame is quickly determined through the initial seed points and image data sets input externally, and the data-free points of the image frames adjacent to the current active frame are determined through the intersection, and the data-free area of the adjacent image frames is determined through the pixel value. In this way, the continuous boundary automatic identification from point to surface, and from a single surface to multiple surfaces is repeatedly realized, and finally it is expanded from a point on a single image frame to all image frames, completing the vector form description of the actual data area in each image frame, and finally determining the actual data boundary of the image dataset, providing accurate vector boundary, so as to facilitate the use of remote sensing image collections for spatial analysis, mapping and publishing map services. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 The present invention is a flow chart of a method for extracting data boundaries from a plurality of remote sensing image data sets after continuous cropping.
[0040] Figure 2 This is a schematic diagram of multiple image frames in an image dataset. The lines in the figure represent the rectangular borders of different image frames. For ease of understanding, the overlapping parts between the borders are exaggerated.
[0041] Figure 3 Schematic diagram for inputting initial seed points. The seed points can be located in any data-free area at the edge of the image.
[0042] Figure 4 A schematic diagram of obtaining the intersection of a data-free area identified by a seed point in the current active frame and a rectangular outer frame area in an image frame adjacent to the right thereof;
[0043] Figure 5 A schematic diagram for determining that the data-free area where the current active frame overlaps with the adjacent image frame is the intersection area;
[0044] Figure 6A schematic diagram of taking a pixel point in the intersection area as a new currently active data-free seed point:
[0045] Figure 7 Schematic diagram for determining the area without data in adjacent image frames:
[0046] Figure 8 Schematic diagram of determining the data-free area outside the clipping range for all image frames one by one through continuously extending seed points:
[0047] Fig. 9 The schematic diagram of merging the actual data regions and determining the actual data boundaries of the image data set is shown in the figure. The white line in the figure is the final data boundary.
[0048] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0049] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0050] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0051] See also Figures 1 to 9 To achieve the above object, a first embodiment of the present invention provides a data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping, comprising:
[0052] Step 1: Obtain an external input image dataset and construct the spatial relationship between multiple image frames in the image dataset, including: determining the rectangular outer frame range of each image frame, and establishing the adjacency matrix between all image frames (see Figure 2 );
[0053] Step 2: Get the initial seed point of external input (see Figure 3 ), according to the initial seed point input externally and the rectangular outer frame range of each image frame, the image frame where the initial seed point is located is determined as the current active frame;
[0054] Step 3: In the current active tile, starting from the current active data-free seed point, identify all connected pixels with similar colors until the connected area spreads to the actual data boundary of the current active tile or the boundary of the rectangular outer frame area, record the boundary pixels point by point and connect them into lines to determine the data-free area in the current active tile (see Figure 4); wherein, when step 2 is executed for the first time, the initial seed point is regarded as the current active data-free seed point;
[0055] Step 4: According to the adjacency matrix, determine all image frames adjacent to the current active frame; find the intersection of the data-free area in the current active frame and the rectangular outer frame area in each adjacent image frame to determine the overlapping intersection area of the current active frame and the adjacent image frame (see Figure 5 ); Take a pixel point in the intersection area as the new current active data-free seed point (see Figure 6 ); take the image frame adjacent to the current active frame where the new current active data-free seed point is located as the new current active frame (see Figure 7 ); wherein the intersection area is the overlapping area of two adjacent data-free areas;
[0056] Step 5: Repeat steps 3 and 4 according to the new currently active no-data seed point and the new currently active frame until the new currently active no-data seed point in the intersection area of all image frames is determined, and then the no-data area of all image frames outside the cropping range is determined according to each new active no-data seed point (see Figure 8 );
[0057] Step 6: According to the rectangular outer frame range of all image frames, erase the part of each image frame that is not covered by the data area to determine the actual data area of all image frames; merge the actual data areas to determine the actual data boundary of the image data set (see Fig. 9 ).
[0058] The data-free area of the current active frame is quickly determined through the initial seed points and image data sets input externally, and the data-free points of the image frames adjacent to the current active frame are determined through the intersection, and the data-free area of the adjacent image frames is determined through the pixel value. In this way, the continuous boundary automatic identification from point to surface, and from a single surface to multiple surfaces is repeatedly realized, and finally it is expanded from a point on a single image frame to all image frames, completing the vector form description of the actual data area in each image frame, and finally determining the actual data boundary of the image dataset, providing accurate vector boundary, so as to facilitate the use of remote sensing image collections for spatial analysis, mapping and publishing map services.
[0059] Specifically, the actual data area is Figures 2 to 3 There are areas of the image frame other than the area without data (represented by solid black).
[0060] Specifically, Figures 3 to 8 #1 is the initial seed point; Figures 6 to 8 #2 in the middle is a seed point with no data; Figure 8Among them, #3, #4, #5, #6, #7 and #8 are all seed points without data.
[0061] The entire recognition process does not require much manual operation. For the cropped image data set composed of hundreds or thousands of image frames, the overall actual data boundary is extracted and the vector boundary used for image cropping is restored, solving the problem of missing original boundary descriptions in multiple image data sets.
[0062] The application mode of the present invention is simple and has a high degree of automation. It only needs to specify any initial seed point in any image frame, and the method can be automatically extended to all data-free areas of all image frames, thereby obtaining the actual data area.
[0063] Specifically, if the intersection area of the data-free area overlapped by the current active frame and the adjacent image frame is greater than one, a pixel point is determined in all intersection areas as a new current active data-free seed point, and step 5 is executed. Since the cropping range of the original remote sensing image dataset is not a geometric convex hull, it is a reasonable situation. In this case, a seed point needs to be taken in each intersection surface, and steps 3 to 4 are executed for each seed point of the image frame in subsequent processing.
[0064] When a single intersection area overlaps with the data-free areas of multiple adjacent image frames, it is necessary to determine whether the intersection surface calculated by spatial calculation overlaps with the existing identified intersection surface to avoid repeated calculation.
[0065] The data boundary extraction method for multiple remote sensing image data sets after continuous cropping proposed in the second embodiment of the present invention is based on the first embodiment, and the initial seed point satisfies the first preset condition, wherein the first preset condition is that the initial seed point is a pixel point in the data-free area in any image frame.
[0066] Specifically, the initial seed point is a pixel point selected manually.
[0067] Specifically, the coordinates of the initial seed point are described using (X, Y), and the coordinates can be either the distance on a plane or the longitude and latitude on a spherical surface.
[0068] The no-data area in the image frame is generally a solid color area, and the initial seed point is located in the solid color area. The current no-data area and the actual data area, as well as the edge of the no-data area away from the actual data area (i.e., the rectangular outer frame boundary) can be quickly determined based on the pixels.
[0069] The third embodiment of the present invention proposes a data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping. Based on the first embodiment, the adjacency matrix is a Boolean matrix M×N, and the matrix elements are V xy , x∈[1,M], y∈[1,N], Vxy ∈{0,1}; where M represents the number of rows in the matrix, and M is equal to the number of image frames in each row; N represents the number of columns in the matrix, and N is equal to the number of image frames in each column, V xy Indicates whether the x-th image frame is adjacent to or overlaps with the y-th image frame.
[0070] The fourth embodiment of the present invention provides a method for extracting data boundaries for a plurality of remote sensing image data sets after continuous cropping. Based on the first embodiment, after step 2, the method further includes:
[0071] Step 2.1, determining whether the overlap between the image frame where the current active data-free seed point is located and each adjacent image frame is greater than a preset value;
[0072] Step 2.2, when the overlap between the image frame where the current active data-free seed point is located and each adjacent image frame is greater than or equal to a preset value, execute step 3;
[0073] Step 2.3, when the overlap between the image frame where the current active data-free seed point is located and the adjacent image frames is less than a preset value, the data-free area in the current active frame is expanded by a preset number of pixels toward the border of the rectangular outer frame, and then step 3 is executed.
[0074] Specifically, the preset value is greater than or equal to three pixels, and the preset value is less than or equal to ten pixels.
[0075] The fifth embodiment of the present invention proposes a data boundary extraction method for multiple remote sensing image data sets after continuous cropping. Based on the first embodiment, the current active seed with no data satisfies the second preset condition; the second preset condition includes that the current active seed point with no data is located in the intersection area, and the interval distance between the current active seed point with no data and the edge of the intersection area where the current active seed point with no data is located is greater than the preset distance.
[0076] Specifically, the preset distance is the diagonal length of the rectangular pixel.
[0077] Ensure that there is a distance between the determined no-data seed point and the pixel at the edge of the intersection area. When the selected pixel point meets the preset conditions, the selected pixel point is confirmed as the no-data seed point of the adjacent image frame; when the selected pixel point does not meet the preset conditions, the pixel point is randomly selected again until the selected pixel point meets the preset conditions.
[0078] The data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping proposed in the sixth embodiment of the present invention is based on any one of the first to fifth embodiments, and step 3 comprises:
[0079] Step 3.1, in the current activity partition, take the current activity data-free seed point as the starting point;
[0080] Step 3.2, obtaining adjacent pixels in a first preset direction of the starting point, and determining whether the difference between the pixel value of the starting point and the pixel value of the adjacent pixel is less than a preset tolerance;
[0081] Step 3.3, when the difference between the pixel value of the starting point and the pixel value of the adjacent pixel is less than a preset tolerance, the adjacent pixel is confirmed as an active point to be processed;
[0082] Step 3.4, when the difference between the pixel value of the starting point and the pixel value of the adjacent pixel is greater than or equal to the preset tolerance, the adjacent pixel is confirmed as a boundary point of the data-free area in the current active frame;
[0083] Step 3.5, marking the determined starting point as a processed activity point;
[0084] Step 3.6, mark any active point to be processed as a new starting point, and execute the step of obtaining the adjacent pixels in the first preset direction of the starting point, and determine whether the difference between the pixel value of the starting point and the pixel value of the adjacent pixel is less than the preset tolerance, until all active points to be processed are confirmed as processed active points, and determine that there is no data area in the current active partition.
[0085] Specifically, the first preset direction is at least one of the four directions of up, down, left and right where the starting points are adjacent.
[0086] Specifically, the preset tolerance is a constant, and the preset tolerance is greater than or equal to 0. The preset tolerance is determined according to the compression of the image data. If the image is not compressed, the color of the area without data is usually exactly the same, and the preset tolerance is 0; if the image is lossy compressed, the value needs to be determined according to the actual situation, and specifically does not exceed 20% of the upper limit of the pixel value type.
[0087] The seventh embodiment of the present invention proposes a data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping. Based on the sixth embodiment, all pixel points in the current active frame include:
[0088] O = W ∪ B ∪ S;
[0089] Wherein, w is the processed active point in the current active frame, W is the set of all processed active points in the current active frame, w∈W; b is the boundary point in the current active frame, B is the set of all boundary points in the current active frame, b∈B; s is the real data point in the current active frame, S is the set of all real data points in the current active frame, s∈S.
[0090] The eighth embodiment of the present invention provides a data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping. Based on the seventh embodiment, each boundary point in the boundary point set is arranged along a spatial adjacency relationship according to a preset order.
[0091] The ninth embodiment of the present invention provides a data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping. Based on the eighth embodiment, the method for arranging each boundary point in the boundary point set includes:
[0092] Step 3.7, confirming any boundary point as an initial active boundary point, and confirming the initial active boundary point as a processed boundary point;
[0093] Step 3.8, according to the second preset direction, confirming the boundary point adjacent to the initial active boundary point as the current active boundary point, and confirming the current active boundary point as the processed boundary point;
[0094] Step 3.9, according to the second preset direction, confirm the boundary point adjacent to the current active boundary point as the next active boundary point, and confirm the next active boundary point as a processed boundary point, until all boundary points are confirmed as processed boundary points, and confirm the boundary line of the data-free area in the current active partition according to all processed boundary points; wherein the boundary line is composed of the processed boundary points arranged and connected along the spatial adjacency relationship according to a preset order.
[0095] Specifically, the second preset direction is at least one of eight directions adjacent to the current active boundary point: up, down, left, right, upper left, lower left, upper right and lower right.
[0096] The data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping proposed in the tenth embodiment of the present invention is based on the ninth embodiment, step 7.2, comprising:
[0097] Step 3.10, according to the second preset direction, determining whether the number of boundary points in the second preset direction among the current active boundary points is greater than one;
[0098] Step 3.11, when the number of boundary points in the second preset direction in the current active boundary point is equal to one, the boundary point adjacent to the current active boundary point is confirmed as the next active boundary point, and the next active boundary point is confirmed as a processed boundary point, and the process is performed until all boundary points are confirmed as processed boundary points, and the boundary line of the data-free area in the current active partition is confirmed according to all processed boundary points;
[0099] Step 3.12: when the number of boundary points in the second preset direction among the current active boundary points is greater than one, an adjacent boundary point that meets the third preset condition is confirmed as the next active boundary point.
[0100] When the number of boundary points in any direction is greater than one, a quick determination is made according to the third preset condition to avoid logical errors.
[0101] Specifically, the third preset condition is that the data-free points and data-containing points identified in step 2 exist in the sets of the upper, lower, left and right directions of the front active boundary points.
[0102] Specifically, in step 6, the calculation formula for the actual data area set of multiple images is:
[0103]
[0104] in, is the actual data area set; The rectangular outer frame range of the i-th target image frame; is the data-free area of the i-th target image frame; n is the total number of all target image frames in the remote sensing image collection, ; It represents the absolute complement of the data-free area of the i-th target image frame in the rectangular outer frame area of the i-th target image frame.
[0105] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device to enter the method described in each embodiment of the present invention.
[0106] In the description of this specification, the description with reference to the terms "an embodiment", "another embodiment", "other embodiments", or "first embodiment to Xth embodiment" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, method steps or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0107] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0108] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0109] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping, characterized in that: include: Step 1, obtaining an external input image data set, and constructing a spatial relationship between multiple image frames in the image data set, including: determining the rectangular outer frame range of each image frame, and establishing an adjacency matrix between all image frames; Step 2, obtaining an externally input initial seed point, and determining the image frame where the initial seed point is located as the current active frame according to the externally input initial seed point and the rectangular outer frame range of each image frame; Step 3, in the current active frame, starting from the current active data-free seed point, identifying all connected pixels with similar colors until the connected area spreads to the actual data boundary of the current active frame or the boundary of the rectangular outer frame range, recording the pixel points of the boundary point by point and connecting them into lines to determine the data-free area in the current active frame; wherein, when step 2 is executed for the first time, the initial seed point is regarded as the current active data-free seed point; Step 4: according to the adjacency matrix, determine all image frames adjacent to the current active frame; according to the data-free region in the current active frame and the rectangular outer frame range in each adjacent image frame, find the intersection area where the current active frame overlaps with the adjacent image frames; use a pixel point in the intersection area as a new current active data-free seed point; use the image frame adjacent to the current active frame where the new current active data-free seed point is located as the new current active frame; wherein the intersection area is the overlapping area of two adjacent data-free regions; Step 5, repeating steps 3 and 4 according to the new currently active no-data seed point and the new currently active frame, until the new currently active no-data seed point of the intersection area between all image frames is determined, and then the no-data area of all image frames outside the cropping range is determined according to each new active no-data seed point; Step 6: according to the rectangular outer frame range of all image frames, erase the portion covered by the non-data area in each image frame to determine the actual data area of all image frames; merge the actual data areas to determine the actual data boundary of the image data set.
2. The data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping according to claim 1, characterized in that: The initial seed point satisfies a first preset condition, wherein the first preset condition is that the initial seed point is a pixel point in the data-free area in any of the image frames.
3. The data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping according to claim 1, characterized in that: The adjacency matrix is a Boolean matrix M×N, and the matrix elements are V xy , x∈[1,M], y∈[1,N], V xy ∈{0,1}; where M represents the number of rows in the matrix, and M is equal to the number of image frames in each row; N represents the number of columns in the matrix, and N is equal to the number of image frames in each column, V xy Indicates whether the x-th image frame is adjacent to or overlaps with the y-th image frame.
4. The data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping according to claim 1, characterized in that: After step 2, it also includes: Determine whether the overlap between the image frame where the currently active data-free seed point is located and each of the adjacent image frames is greater than a preset value; When the overlap between the image frame where the currently active data-free seed point is located and each of the adjacent image frames is greater than or equal to a preset value, executing step 3; When the overlap between the image frame where the currently active data-free seed point is located and the adjacent image frames is less than a preset value, the data-free area in the currently active frame is expanded by a preset number of pixels toward the rectangular outer frame boundary, and then step 3 is executed.
5. The data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping according to claim 1, characterized in that: The currently active seed point with no data satisfies a second preset condition; the second preset condition includes that the currently active seed point with no data is located in the intersection area, and the interval distance between the currently active seed point with no data and the edge of the intersection area where the currently active seed point with no data is located is greater than a preset distance.
6. The method for extracting data boundaries of a plurality of remote sensing image data sets after continuous cropping according to any one of claims 1 to 5, characterized in that: Step 3 includes: In the current active tile, the current active data-free seed point is used as the starting point; Obtaining adjacent pixels in a first preset direction of the starting point, and determining whether a difference between a pixel value of the starting point and a pixel value of an adjacent pixel is less than a preset tolerance; When the difference between the pixel value of the starting point and the pixel value of the adjacent pixel is less than a preset tolerance, the adjacent pixel is confirmed as an active point to be processed; When the difference between the pixel value of the starting point and the pixel value of the adjacent pixel is greater than or equal to a preset tolerance, the adjacent pixel is confirmed as a boundary point of a data-free area in the current active frame; Mark the determined starting point as the processed activity point; Any active point to be processed is marked as a new starting point, and the steps of obtaining adjacent pixels in the first preset direction of the starting point and determining whether the difference between the pixel value of the starting point and the pixel value of the adjacent pixels is less than the preset tolerance are executed, until all active points to be processed are confirmed as processed active points, and it is determined that there is no data area in the current active partition.
7. The data boundary extraction method for a plurality of remote sensing image data sets after continuous cropping according to claim 6, characterized in that: All pixels in the current active frame include: O = W ∪ B ∪ S; Among them, O is the set of all pixels in the current active frame; W is the set of all processed active points in the current active frame; B is the set of all boundary points in the current active frame; S is the set of all real data points in the current active frame.
8. The method for extracting data boundaries from a plurality of remote sensing image data sets after continuous cropping according to claim 7, characterized in that: The boundary points in the boundary point set are arranged along a spatial adjacency relationship according to a preset order.
9. The method for extracting data boundaries from a plurality of remote sensing image data sets after continuous cropping according to claim 8, characterized in that: The method for arranging each boundary point in the boundary point set includes: Confirm any boundary point as the initial active boundary point, and confirm the initial active boundary point as the processed boundary point; According to the second preset direction, confirming the boundary point adjacent to the initial active boundary point as the current active boundary point, and confirming the current active boundary point as the processed boundary point; According to the second preset direction, a boundary point adjacent to the current active boundary point is confirmed as the next active boundary point, and the next active boundary point is confirmed as a processed boundary point, until all boundary points are confirmed as processed boundary points, and a boundary line of a data-free area in the current active partition is confirmed based on all processed boundary points; wherein the boundary line is composed of the processed boundary points arranged and connected along the spatial adjacency relationship according to a preset order.
10. The method for extracting data boundaries from a plurality of remote sensing image data sets after continuous cropping according to claim 9, characterized in that: The step of confirming the boundary point adjacent to the current active boundary point as the next active boundary point according to the second preset direction, and confirming the next active boundary point as a processed boundary point until all boundary points are confirmed as processed boundary points, and confirming the boundary line of the data-free area in the current active partition according to all processed boundary points includes: According to the second preset direction, determining whether the number of boundary points in the second preset direction among the current active boundary points is greater than one; When the number of boundary points in the second preset direction in the current active boundary point is equal to one, a boundary point adjacent to the current active boundary point is confirmed as a next active boundary point, and the next active boundary point is confirmed as a processed boundary point, and the steps are performed until all boundary points are confirmed as processed boundary points, and a boundary line of a data-free area in the current active partition is confirmed according to all processed boundary points; When the number of boundary points in the second preset direction among the current active boundary points is greater than one, an adjacent boundary point satisfying the third preset condition is confirmed as the next active boundary point.
