Vector layer extraction method based on WGS84 coordinate system
The village contour lines are extracted by the non-derived scanning state and scanning direction dynamic adaptation method and converted into vector layers under the WGS84 coordinate system, which solves the problem of fuzzy village contour lines when zooming in, and realizes stable application under the WGS84 coordinate system.
Patent Information
- Application Number
- CN202210841539.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-07-18
AI Technical Summary
The prior art is difficult to extract village contour lines from rural geographic images that are not affected by the scaling operation and convert them into vector layers under the WGS84 coordinate system, resulting in the village contours being blurred when enlarged, affecting the use effect.
The image is scanned by a non-derived scanning state, scanned around the color pixel points, and turned to the derivative scanning state. The scanning direction dynamic adaptation method is used to extract edge pixel points, form an edge point set, and convert it into coordinates under the WGS84 coordinate system.
It realizes that the village contour line is not affected by the scaling operation and can be directly applied to the vector layer of the WGS84 coordinate system, and is suitable for navigation and urban construction planning and other fields.
Smart Images

Figure CN115222757B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image feature recognition and extraction, and in particular to a vector layer extraction method in a WGS84 coordinate system. Background Art
[0002] Geographic images such as satellite images and aerial images can extract features such as building complexes, road networks, green spaces, and water bodies, and convert these features into vector layers. These vector layers can be superimposed on geographic images or the WGS84 coordinate system, thus serving as information or data sources. They are widely used in navigation, urban planning, scientific research, and other fields.
[0003] Rural geographic images typically include features such as villages, green spaces, road networks, and water bodies. Limited by the resolution of the original geographic images, after extracting the village outlines and converting them into vector layers, the village outlines often become blurred as the user zooms in, affecting user usability. Furthermore, since village outlines are usually not single-pixel lines, they are difficult to apply to the WGS84 coordinate system.
[0004] In summary, how to obtain village outlines from original geographic images that are not affected by scaling operations and can be directly applied to vector layers in the WGS84 coordinate system has become an urgent problem to be solved. Summary of the Invention
[0005] The object of the present invention is to provide a vector layer extraction method in the WGS84 coordinate system, which can obtain village outlines that are not affected by zoom operations from the image to be processed and can be directly applied to the vector layer of the WGS84 coordinate system.
[0006] To achieve the above-mentioned object, the present invention provides the following technical solution: a method for extracting a vector layer in the WGS84 coordinate system, for extracting the edges of building groups in an image to be processed into a vector layer that can be used in the WGS84 coordinate system, comprising the following steps:
[0007] S1, extracting all connected domains from the image to be processed, and assigning a different marking color to each connected domain;
[0008] The pixels with the marked color are called colored pixels, and the pixels without any marked color are called black pixels.
[0009] S2, scanning the image to be processed in a non-derivative scanning state until a point that is not in any edge point set G is found. i After scanning a color pixel point A in the image, scan around the color pixel point A; if the edge pixel point B is scanned i , i=1,2,3,......,n, then the edge pixel point Bi Add to the edge point set G i , after changing the scanning state to the derivative scanning state, proceed to step S3; if no edge pixel is scanned, continue scanning the image to be processed in the non-derivative scanning state;
[0010] S3, when scanning the image to be processed in the derivative scanning state, a dynamic adaptation method of the scanning direction is used to surround the edge point set G that is finally added to the edge point set G. i An edge pixel B i Scan until the scan finds a point that is not in the edge point set G i Another edge pixel B in i+1 , the edge pixel point B i+1 Add to the edge point set G i ;
[0011] S4, repeat step S3 until the edge point set G i is greater than the preset length L1, and the last one is added to the edge point set G i The edge pixel B i When the distance between the edge point set G and the color pixel point A is less than the preset length L2, the edge point set G is output. i , and change the scanning state to non-derivative scanning state;
[0012] S5, repeat steps S2 to S4 until all pixels of the image to be processed are scanned, and output all edge point sets G i , as the edge of the building complex;
[0013] S6. Convert the pixel coordinates of all edges of the building complex into coordinates in the WGS84 coordinate system.
[0014] In the above technical solution, the edge pixel point B i Specifically, it refers to a pixel that is a colored pixel and has a black pixel adjacent to it.
[0015] In the above technical solution, in step S2, the scanned point is not found in any edge point set G i After finding a color pixel A in the image, scanning is performed around the color pixel A, specifically:
[0016] Starting from a pixel point directly above the color pixel point A, the eight pixel points around the color pixel point A are scanned in sequence in a clockwise manner.
[0017] In the above technical solution, step S3 specifically includes:
[0018] For the first edge point set G i The edge pixel B1 is rotated two pixels clockwise from the color pixel A, and then the eight pixels around the edge pixel B1 are scanned in a clockwise manner until a pixel that is not in the edge point set G is found. i Another edge pixel point B2 in the edge point set G is added to the edge pixel point set G. i ;
[0019] For the edge point set G that is subsequently added i The edge pixel B i ,i=2,3,4,......,n, from the last one added to the edge point set G i The edge pixel B i-1 After rotating two pixels in the clockwise direction, the edge pixel B is scanned in a clockwise manner. i The surrounding 8 pixels are scanned until a pixel that is not in the edge point set G is found. i Another edge pixel B in i+1 , the edge pixel point B i+1 Add to the edge point set G i .
[0020] In the above technical solution, in step S3, if the last one is added to the edge point set G i The edge pixel B i , the distance between i=a and the color pixel point A is greater than the preset length L2, then the edge pixel point B i , i=a is excluded from the edge point set G i In addition, from the edge pixel point B i , i=a, starting from the next pixel point in the clockwise direction, surrounding the last pixel added to the edge point set G i The edge pixel B i , i=a-1 and scan until the scan finds a point that is not in the edge point set G i Another edge pixel B in i , i≠a, the edge pixel point B i , i≠a is added to the edge point set G i .
[0021] In the above technical solution, after step S1, the method further comprises: removing unidirectional channel pixels between two connected domains.
[0022] In the above technical solution, the unidirectional channel pixel specifically refers to a pixel that is a color pixel and has two or more adjacent black pixels that are not connected to each other.
[0023] In the above technical solution, the method for determining whether the target pixel is the unidirectional channel pixel is:
[0024] On the basis that the target pixel is a color pixel, the eight pixels around the target pixel are scanned in sequence, and the number of changes between the color pixel and the black pixel during the scanning process is recorded; if the number of changes does not exceed 2 times, the target pixel is not a unidirectional channel pixel; if the number of changes exceeds 2 times, the target pixel is a unidirectional channel pixel.
[0025] In the above technical solution, in step S4, the edge point set G is output i , when i=a, read the edge point set G i , i=edge pixel B contained in a i Mark color;
[0026] If there is already an edge pixel B with the same marking color i Another edge point set G i , i≠a, then the edge point set G i , i=a is incorporated into the edge point set G i ,i≠a;
[0027] If there is no edge pixel B containing the same marked color i Another edge point set, then the edge point set G i , i=a as the new edge point set G i And output.
[0028] In the above technical solution, step S6 is specifically as follows:
[0029] S6.1, according to the Mercator coordinates of the reference point of the image to be processed and the Mercator coordinate span of the unit pixel, each edge pixel point B included in the edge of the building group is respectively i The pixel coordinates are converted into Mercator coordinates;
[0030] S6.2, by the following conversion formula, each of the edge pixel points B i The Mercator coordinates are converted to the WGS84 coordinate system:
[0031] WGS84_lon=mercator_x / 20037508.34*180;
[0032] WGS84_lat=180 / π*(2*arctan(e(mercator_y / 20037508.34*180)*π / 180 -π / 2));
[0033] Where WGS84_lon is the longitude in the WGS84 coordinate system, mercator_x is the x-axis coordinate in the Mercator coordinate system, WGS84_lat is the latitude in the WGS84 coordinate system, and mercator_y is the y-axis coordinate in the Mercator coordinate system.
[0034] Compared with the prior art, the present invention has the following advantages: the vector layer extraction method under the WGS84 coordinate system of the present invention scans the color pixel point in the non-derivative scanning state, then switches to the derivative scanning state, and in the derivative scanning state, the edge pixel point B is scanned. i Derivative scanning obtains the next edge pixel B i+1 , after repeating this, we can get the edge pixel point B i The edge point set G i The depicted vector layer serves as the edge of a building complex. This edge is not affected by scaling operations, resulting in better performance and adaptability to applications in navigation, urban planning, scientific research, and other fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a flowchart of the steps of embodiment 1 of the present invention.
[0036] Figure 2 This is a schematic diagram of scanning around a color pixel point A in the first embodiment of the present invention.
[0037] Figure 3 This is one of the schematic diagrams of the scanning process of the dynamic adaptation method of the scanning direction in the first embodiment of the present invention.
[0038] Figure 4 This is the second schematic diagram of the scanning process of the scanning direction dynamic adaptation method in the first embodiment of the present invention.
[0039] Figure 5 Schematic diagram of two connected domains connected by unidirectional channel pixels in embodiment 3 of the present invention.
[0040] Figure 6 Schematic diagram of a unidirectional channel pixel in the third embodiment of the present invention.
[0041] Figure 7 This is a schematic diagram of a common pixel in the third embodiment of the present invention. DETAILED DESCRIPTION
[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0043] Example 1:
[0044] This embodiment provides a vector layer extraction method in the WGS84 coordinate system, which is used to extract the edges of building groups in an image to be processed into a vector layer that can be used in the WGS84 coordinate system.
[0045] Specifically, this embodiment is used to extract the edges of the building complex in the image to be processed as a vector layer, and assign coordinates in the WGS84 coordinate system to each pixel point on the edge of the building complex under the vector layer, so that the contour line of the edge of the building complex is not affected by the scaling operation and can be directly applied to the WGS84 coordinate system.
[0046] The image to be processed is a satellite image or aerial image of a rural area, and the edge of the building complex is the edge of the village building complex. Generally speaking, rural areas have a large area of fields, green spaces and water areas. In the image to be processed, the characteristics of the village building complex are quite different from those of other elements such as fields, green spaces and water areas, which is specifically reflected in the large differences in color, brightness and infrared reflectivity, making it easy to process each village building complex as a connected domain.
[0047] See also Figure 1 The vector layer extraction method in the WGS84 coordinate system includes the following steps:
[0048] S1. Extract all connected domains from the image to be processed and assign different marking colors to each connected domain.
[0049] Pixels with marked colors are called colored pixels, and pixels without any marked colors (not belonging to any connected domain) are called black pixels.
[0050] Since the characteristics of village building complexes in the image to be processed are quite different from those of other elements such as fields, green spaces and water areas, which are specifically reflected in the large differences in color, brightness and infrared reflectivity, it is easy to process each village building complex as a connected domain. At this time, colored pixels with different marking colors represent each village building complex, and black pixels represent other elements such as fields, green spaces and water areas.
[0051] S2, scan the image to be processed in a non-derivative scanning state until the scan finds a point that is not in any edge point set G iAfter finding a color pixel A in the image, scan around the color pixel A; if the edge pixel B is scanned i , i=1,2,3,......,n, then the edge pixel point B i Add to the edge point set G i After the scanning state is changed to the derivative scanning state, step S3 is entered; if no edge pixel points are scanned, the image to be processed continues to be scanned in the non-derivative scanning state.
[0052] Among them, the edge pixel B i Specifically, it refers to a pixel that is a color pixel and has adjacent black pixels. That is, to determine whether the target pixel is an edge pixel, it is only necessary to first determine whether it is a color pixel and then determine whether there are adjacent black pixels. In this embodiment, B i ,i=1,2,3,......,n represents the 1st, 2nd, 3rd...nth edge pixel points.
[0053] like Figure 2 As shown, in step S2, the scan finds a point that is not in any edge point set G i After finding a color pixel A in the image, scan around the color pixel A. Specifically, start from a pixel just above the color pixel A and scan the 8 pixels around the color pixel A in a clockwise rotation.
[0054] S3, when scanning the image to be processed in the derivative scanning state, the dynamic adaptation method of the scanning direction is used to surround the edge point set G that is finally added i An edge pixel B i Scan until the scan is not in the edge point set G i Another edge pixel B in i+1 , the edge pixel B i+1 Add to the edge point set G i .
[0055] Step S3 specifically includes:
[0056] like Figure 3 As shown, for the first edge point set G i The edge pixel B1 is rotated two pixels clockwise from the color pixel A, and then the eight pixels around the edge pixel B1 are scanned in a clockwise manner until a pixel that is not in the edge point set G is found. i Another edge pixel point B2 in the edge point set G is added to the edge point set G. i .
[0057] like Figure 4As shown, for the edge point set G that is subsequently added i The edge pixel B i ,i=2,3,4,……,n, from the last edge point set G i The edge pixel B i-1 After rotating two pixels clockwise, the edge pixel B is scanned in a clockwise manner. i The surrounding 8 pixels are scanned until they are not in the edge point set G i Another edge pixel B in i+1 , the edge pixel B i+1 Add to the edge point set G i .
[0058] When scanning the image to be processed in the derivative scanning state, in order to avoid abnormal termination of the scanning process or edge pixel B i The arrangement order of the images is disordered, so the dynamic adaptation method of the scanning direction is adopted.
[0059] by Figure 3 The case of is taken as an example to explain a case of the dynamic adaptation method of the scanning direction. The edge pixel point B1 is obtained by scanning around the color pixel point A in step S2. Therefore, Figure 3 Pixel C has been scanned in the previous scan and should be skipped. At this time, the position of color pixel A rotated two pixels clockwise should be used as the scanning starting point of the dynamic adaptation method of the scanning direction. Pixel D is close to color pixel A and its features are similar to those of color pixel A. Therefore, pixel D is used as the scanning end point of the dynamic adaptation method of the scanning direction.
[0060] by Figure 4 As an example, another case of the dynamic adaptation method of the scanning direction is explained. The edge pixel point B i ,i=2,3,4,.....,n is the edge point set G around the last one added i The edge pixel B i-1 Scanned, so Figure 4 The pixel point C in the image has been scanned in the previous scan, so it should be skipped. At this time, the edge pixel point B should be used instead. i-1 The position after rotating two pixels clockwise is used as the scanning starting point of the dynamic adaptation method of the scanning direction, and the pixel D is close to the edge pixel B. i-1 , which is consistent with the edge pixel B i-1 The features of are relatively similar, so pixel point D is taken as the scanning end point of the dynamic adaptation method of the scanning direction.
[0061] S4, repeat step S3 until the edge point set G iGreater than the preset length L1, and the last one is added to the edge point set G i The edge pixel B i When the distance between the color pixel point A is less than the preset length L2, the edge point set G is output. i , and change the scan state to non-derived scan state.
[0062] Repeat step S3, i.e., the last one added to the edge point set G i The edge pixel B i Scan as the center point to obtain the next edge pixel B i+1 Then, the edge pixel B i+1 Scan as the center point to obtain another edge pixel point B i+2 , until no more edge pixels B can be obtained i .
[0063] Edge point set G i The included edge pixels B i When the number of values is large enough, the edge point set G i The length of L1 is long enough, and the generated building cluster edge is long enough, so L1 is the preset edge pixel point B i The number of edge point sets G i Specifically, the edge point set G is greater than the preset length L1. i Contains edge pixels B i Greater than the preset number; length L2 refers to the preset pixel distance, and the last one is added to the edge point set G i The edge pixel B i When the distance between the edge pixel point B and the color pixel point A is less than the preset length L2 (pixel distance), the edge pixel point B i The closed loop formed with the color pixel point A can represent the edge of the closed building complex.
[0064] Furthermore, in step S4, the edge point set G is output. i , when i=a, read the edge point set G i , i=edge pixel B contained in a i Mark color; if there is an edge pixel B with the same mark color i Another edge point set G i , i≠a, then the edge point set G i , i=a is incorporated into the edge point set G i ,i≠a; if there is no edge pixel B with the same marking color i Another edge point set, then the edge point set G i , i=a as the new edge point set Gi In this way, it avoids the occurrence of multiple edge point sets G in the same connected domain (representing the same village building complex) i .
[0065] S5, repeat steps S2-S4 until all pixels of the image to be processed are scanned, and output all edge point sets G i , as the edge of the building complex.
[0066] After step S5, the outline of the edge of the building complex that is not affected by the scaling operation can be obtained.
[0067] S6. Convert the pixel coordinates of all building complex edges into coordinates in the WGS84 coordinate system.
[0068] Step S6 is specifically as follows:
[0069] S6.1, according to the Mercator coordinates of the reference point of the image to be processed and the Mercator coordinate span of the unit pixel, each edge pixel point B included in the edge of the building group is respectively i The pixel coordinates are converted into Mercator coordinates;
[0070] S6.2, through the following transformation formula, each edge pixel B i The Mercator coordinates are converted to the WGS84 coordinate system:
[0071] WGS84_lon=mercator_x / 20037508.34*180;
[0072] WGS84_lat=180 / π*(2*arctan(e (mercator_y / 20037508.34*180)*π / 180 -π / 2));
[0073] Where WGS84_lon is the longitude in the WGS84 coordinate system, mercator_x is the x-axis coordinate in the Mercator coordinate system, WGS84_lat is the latitude in the WGS84 coordinate system, and mercator_y is the y-axis coordinate in the Mercator coordinate system.
[0074] The vector layer extraction method under the WGS84 coordinate system of this embodiment scans the color pixel point in the non-derivative scanning state, then switches to the derivative scanning state, and in the derivative scanning state, scans the edge pixel point B i Derivative scanning obtains the next edge pixel B i+1 , after repeating this, we can get the edge pixel point B i The edge point set G iThe depicted vector layer serves as the edge of a building complex. This edge is not affected by scaling operations, resulting in better performance and adaptability to applications in navigation, urban planning, scientific research, and other fields.
[0075] Example 2:
[0076] This embodiment provides a method for extracting vector layers in the WGS84 coordinate system. Based on the method for extracting vector layers in the WGS84 coordinate system provided in the first embodiment, the method further includes the following technical solutions:
[0077] In order to avoid the scanning falling into abnormal disconnection (which is manifested in actual disconnection, road under construction, and extension block of village building group, etc.), in step S3, if the last one is added to the edge point set G i The edge pixel B i , the distance between i=a and the color pixel point A is greater than the preset length L2, then the edge pixel point B i , i=a is excluded from the edge point set G i In addition, from the edge pixel point B i , i=a, starting from the next pixel in the clockwise direction, surrounding the last pixel added to the edge point set G i The edge pixel B i , i=a-1 and scan until the scan finds a point that is not in the edge point set G i Another edge pixel B in i , i≠a, the edge pixel B i , i≠a is added to the edge point set G i .
[0078] The last one is added to the edge point set G i The edge pixel B i , i=a specifically means that step S3 is repeated until no more edge pixels B can be obtained i After that, the last one is added to the edge point set G i The edge pixel B i ,i=a。
[0079] In fact, if the last one is added to the edge point set G i The edge pixel B i , the distance between i=a and the color pixel point A is greater than the preset length L2, then the edge pixel point B i , i=a cannot form a closed loop with the color pixel point A, and cannot form a closed building group edge. At this time, the edge pixel point B i , i=a is removed and returns to the last edge point set G that was added i The edge pixel Bi , i=a-1Continue scanning, which can effectively correct the scanning of abnormal circuit breakers. The manifestation in the image is that each edge pixel point B i Gradually exited from the abnormal circuit breaker.
[0080] If the edge pixel point B generated in the subsequent result i If the distance between the pixel A and the color pixel is still not less than the preset length L2, the above steps of this embodiment are repeated until the last one is added to the edge point set G. i The edge pixel B i The distance between the edge pixel point B and the color pixel point A is less than the preset length L2 (pixel distance). i It can form a closed loop with the color pixel point A, which can represent the edge of a closed building complex.
[0081] The vector layer extraction method in the WGS84 coordinate system of this embodiment is to extract the vector layer from the edge point set G i Exclude edge pixels B that do not meet the conditions i , back to the last edge point set G i The edge pixel B i , i=a-1 continues to scan, which can effectively correct the scanning of abnormal circuit breaks and improve the scanning performance of the system.
[0082] Example 3:
[0083] This embodiment provides a method for extracting vector layers in the WGS84 coordinate system. Based on the method for extracting vector layers in the WGS84 coordinate system provided in the first embodiment, the method further includes the following technical solutions:
[0084] After step S1, the method further includes: removing pixels of a one-way channel between two connected domains.
[0085] When two connected domains are connected by only one channel, and the width of the channel is only one pixel (called a one-way channel pixel), for the edge pixel B i The scan can only pass through the channel from a single direction and cannot turn back. In this case, the edge pixel point B cannot form a closed loop in the total connected domain formed by the combination of the two connected domains. i and the color pixel point A (the distance is less than the preset length L2), resulting in the two connected domains being unable to generate the edge point set G i ,Therefore, after extracting all connected domains from the image to be processed, it is necessary to remove the unidirectional channel pixels; Figure 5 That is, a schematic diagram showing two connected domains connected by unidirectional channel pixels.
[0086] A unidirectional channel pixel specifically refers to a pixel that is a color pixel and has two or more mutually unconnected black pixels adjacent to it. That is, to determine whether a target pixel is a unidirectional channel pixel, it is only necessary to first determine whether it is a color pixel and then determine whether it has two or more mutually unconnected black pixels adjacent to it. Figure 6 That is, a schematic diagram showing three types of unidirectional channel pixels, Figure 7 That is, a schematic diagram showing three types of common pixels (non-unidirectional channel pixels).
[0087] To facilitate the determination of unidirectional channel pixels, this embodiment provides a method for determining whether a target pixel is a unidirectional channel pixel: on the basis that the target pixel is a color pixel, eight pixels around the target pixel are scanned in sequence, and the number of changes between the color pixels and the black pixels during the scanning process is recorded; if the number of changes does not exceed 2 times, the target pixel is not a unidirectional channel pixel; if the number of changes exceeds 2 times, the target pixel is a unidirectional channel pixel.
[0088] According to the above judgment method, if the number of changes between colored pixels and black pixels exceeds 2 times during the scanning process, it means that the 8 pixels around the target pixel have at least experienced a change from black pixels to colored pixels and then from colored pixels to black pixels, that is, there are at least two black pixels around the target pixel that are not connected to each other.
[0089] The vector layer extraction method in the WGS84 coordinate system of this embodiment eliminates the one-way channel pixels between two connected domains, ensuring that any two independent connected domains can generate an edge point set G i .
[0090] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A vector layer extraction method in the WGS84 coordinate system, for extracting the edges of building groups in an image to be processed into a vector layer that can be used in the WGS84 coordinate system, characterized in that: The steps include: S1, extracting all connected domains from the image to be processed, and assigning a different marking color to each connected domain; The pixels with the marked color are called colored pixels, and the pixels without any marked color are called black pixels. S2, scanning the image to be processed in a non-derivative scanning state until a point that is not in any edge point set G is found. i After scanning a color pixel point A in the image, scan around the color pixel point A; if the edge pixel point B is scanned i , i=1,2,3,......,n, then the edge pixel point B i Add to the edge point set G i , after changing the scanning state to the derivative scanning state, enter step S3; if no edge pixel point is scanned, continue to scan the image to be processed in the non-derivative scanning state; the edge pixel point B i Specifically, it refers to a pixel that is a colored pixel and has a black pixel adjacent to it; S3, when scanning the image to be processed in the derivative scanning state, a dynamic adaptation method of the scanning direction is used to surround the edge point set G that is finally added to the edge point set G. i An edge pixel B i Scan until the scan finds a point that is not in the edge point set G i Another edge pixel B in i+1 , the edge pixel point B i+1 Add to the edge point set G i ; S4, repeat step S3 until the edge point set G i is greater than the preset length L1, and the last one is added to the edge point set G i The edge pixel B i When the distance between the edge point set G and the color pixel point A is less than the preset length L2, the edge point set G is output. i , and change the scanning state to non-derivative scanning state; S5, repeat steps S2 to S4 until all pixels of the image to be processed are scanned, and output all edge point sets G i , as the edge of the building complex; S6. Convert the pixel coordinates of all edges of the building complex into coordinates in the WGS84 coordinate system.
2. The vector layer extraction method in the WGS84 coordinate system according to claim 1, characterized in that: In step S2, the scan finds a point that is not in any edge point set G. i After finding a color pixel A in the image, scanning is performed around the color pixel A, specifically: Starting from a pixel point directly above the color pixel point A, the eight pixel points around the color pixel point A are scanned in sequence in a clockwise manner.
3. The vector layer extraction method in the WGS84 coordinate system according to claim 1, characterized in that: After step S1, the method further includes: One-way channel pixels between two connected domains are eliminated; the one-way channel pixels specifically refer to pixels that are color pixels and have two or more adjacent black pixels that are not connected to each other.
4. The vector layer extraction method in the WGS84 coordinate system according to claim 3, characterized in that: The method for determining whether the target pixel is the unidirectional channel pixel is: On the basis that the target pixel is a color pixel, the eight pixels around the target pixel are scanned in sequence, and the number of changes between the color pixel and the black pixel during the scanning process is recorded; if the number of changes does not exceed 2 times, the target pixel is not a unidirectional channel pixel; if the number of changes exceeds 2 times, the target pixel is a unidirectional channel pixel.
5. The vector layer extraction method in the WGS84 coordinate system according to claim 1, characterized in that: In step S4, the edge point set G is output i , when i=a, read the edge point set G i , i=edge pixel B contained in a i Mark color; If there is already an edge pixel B with the same marking color i Another edge point set G i , i≠a, then the edge point set G i , i=a is incorporated into the edge point set G i ,i≠a; If there is no edge pixel B containing the same marked color i Another edge point set, then the edge point set G i , i=a as the new edge point set G i And output.
6. The vector layer extraction method in the WGS84 coordinate system according to claim 1, characterized in that: The step S6 is specifically as follows: S6.1, according to the Mercator coordinates of the reference point of the image to be processed and the Mercator coordinate span of the unit pixel, each edge pixel point B included in the edge of the building group is respectively i The pixel coordinates are converted into Mercator coordinates; S6.2, by the following conversion formula, each of the edge pixel points B i The Mercator coordinates are converted to the WGS84 coordinate system: WGS84_lon=mercator_x / 20037508.34*180; WGS84_lat=180 / π*(2*arctan(e (mercator_y / 20037508.34*180)*π / 180 -π / 2)); Where WGS84_lon is the longitude in the WGS84 coordinate system, mercator_x is the x-axis coordinate in the Mercator coordinate system, WGS84_lat is the latitude in the WGS84 coordinate system, and mercator_y is the y-axis coordinate in the Mercator coordinate system.
Citation Information
Patent Citations
Facility vegetable extraction method based on multi-temporal high-resolution remote sensing image
CN108830844A
Model profile diagram generation method, device and system
CN111932566A