Road edge extraction method and device based on remote sensing image
By adopting preprocessing, noise processing and multi-scale noise capture technologies in high-resolution remote sensing images, the problem of difficulty in removing large-area patch noise in traditional methods is solved, and precise extraction and optimization of road edges is achieved.
Patent Information
- Application Number
- CN202210483668.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-05-05
AI Technical Summary
Traditional high-resolution remote sensing image road edge detection methods are difficult to effectively remove large-area patch noise formed by non-road objects, resulting in information redundancy and noise impurities.
A road edge extraction method based on remote sensing images is adopted to achieve effective extraction of road edges and removal of patch noise through preprocessing, coarse noise removal, cell-by-cell judgment and marking, and multi-scale noise cell capture sliding window technology.
While maintaining high-resolution remote sensing images, it effectively eliminates patch noise of different sizes, improving the accuracy and optimization effect of road edge extraction.
Smart Images

Figure CN114862889B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure generally relate to the technical field of remote sensing image processing data preprocessing, and more specifically, to a road edge extraction method and apparatus based on remote sensing images. Background Art
[0002] With the rapid development of high-resolution remote sensing detection technology, high-resolution images have been able to meet the task requirements of large-scale object detection, and provide clearer object shapes, rich texture information and accurate spatial distribution. Therefore, they play an important role in the implementation of urban infrastructure monitoring, especially in the construction of smart cities such as urban intelligent transportation and digital maps in my country. Road edge extraction is an important foundation for the digital construction of urban roads. However, the traditional manual road vectorization method consumes huge human, material and financial resources. Therefore, the automatic extraction technology of road edges based on high-resolution images has become one of the research hotspots.
[0003] At present, edge detection technology based on image processing is still one of the most convenient and efficient methods for edge detection of high-resolution remote sensing images. It can design feature extraction operators according to the texture, shape and grayscale features of the object to be detected, and can automatically and efficiently implement road edge extraction in the entire domain of high-resolution remote sensing images. Traditional edge detection algorithms such as the Sobel operator, Roberts operator, and Canny operator have been widely used in actual production. Such methods mainly perform image segmentation through preprocessing methods such as histogram equalization and binarization, implement image denoising using spatial domain filtering, and then use edge detection operators to detect road edges.
[0004] Although high-resolution remote sensing images can provide rich information such as road shape, texture, and grayscale, they also contain a large amount of other ground object information (such as buildings, vehicles, trees, shadows, etc.). Traditional edge detection algorithms will also extract edges of non-road objects, resulting in information redundancy and a large amount of noise in various forms. Traditional spatial filtering denoising methods only have a good effect on pixel-level noise (such as salt and pepper noise), but cannot remove large-area patch noise formed by non-road objects. Therefore, automatic extraction and denoising optimization of road edges for high-resolution remote sensing images has become a difficult problem. Summary of the invention
[0005] According to the embodiments of the present disclosure, a pixel capture model capable of simultaneously implementing road edge extraction and multi-scale noise removal is provided, and a complete road edge extraction method based on high-resolution remote sensing images is established. The method can effectively extract the road edge of high-resolution remote sensing images, remove patch noise of different sizes in the image, and realize road edge extraction and optimization.
[0006] In a first aspect of the present disclosure, a road edge extraction method based on remote sensing images is provided, comprising:
[0007] Acquire a target remote sensing image, wherein the target remote sensing image is a remote sensing image including a road, pre-process the target remote sensing image, perform preliminary segmentation on the road and background in the target remote sensing image, and generate a segmented image;
[0008] Roughly removing noise from the segmented image, and performing pixel-by-pixel judgment and marking of road edges and background areas on the segmented image after the rough noise removal, extracting road edges, and generating edge extraction images;
[0009] According to a preset sliding window for capturing noise pixels of multiple scales, the patch noise in the edge extraction image is captured and removed to generate an optimized edge extraction image.
[0010] In some embodiments, the preprocessing of the target remote sensing image includes:
[0011] The target remote sensing image is grayed out using a weighted average method, specifically including:
[0012] For true color target remote sensing images including red, green and blue channels, weight the three bands of red, green and blue, and calculate the image grayscale value by weighted average method. The calculation formula of weighted average method is as follows:
[0013] g=0.3R+0.59G+0.11B
[0014] Among them, g is the grayscale value of the grayscale image; R is the grayscale value of the red band of the original image; G is the grayscale value of the green band of the original image; B is the grayscale value of the blue band of the original image.
[0015] In some embodiments, the preprocessing of the target remote sensing image further includes:
[0016] The grayscale transformation enhancement method is used to perform piecewise linear transformation on the grayscale image. The formula of the piecewise linear transformation function is as follows:
[0017]
[0018] Among them, x1 and x2 are the grayscale value ranges to be enhanced, y1 and y2 parameters determine the slope of the linear transformation, x is the pixel value of the pixel point of the grayscale image before the transformation, and f(x) is the pixel value of the pixel point of the grayscale image after the transformation.
[0019] In some embodiments, the preprocessing of the target remote sensing image further includes:
[0020] The grayscale image after grayscale transformation enhancement is subjected to binary threshold segmentation. The formula for binary threshold segmentation is as follows:
[0021]
[0022] Among them, I is the segmentation threshold.
[0023] In some embodiments, the step of roughly removing noise from the segmented image includes:
[0024] The segmented image is subjected to rough noise removal by sequentially using morphological erosion and morphological dilation, wherein the morphological erosion comprises:
[0025] A "5×5" template is used as an erosion primitive. The erosion primitive is slid in the segmented image to perform an erosion operation on the image area containing the erosion primitive. The erosion operation formula is as follows:
[0026]
[0027] Where A is the set of pixels in the segmented image, B is the set of pixels in the erosion primitive, a is an element in set A, and b is an element in set B;
[0028] The morphological expansion includes:
[0029] A "5×5" template is used as a dilation primitive. The dilation primitive is slid in the segmented image to perform a dilation operation on the image region containing the dilation primitive. The dilation operation formula is as follows:
[0030]
[0031] Among them, A is the set of pixels in the segmented image, c is the set of pixels in the dilation primitive, a is an element in set A; c is an element in set C.
[0032] In some embodiments, the step of performing pixel-by-pixel judgment and marking of road edges and background areas on the segmented image after rough noise removal, extracting road edges, and generating edge-extracted images includes:
[0033] To include N 2The central pixel of a square template with pixels is used as a reference point, and each pixel in the segmented image is matched in sequence. The number P of pixels in the square template that meet the preset conditions is counted. In response to P being less than a preset threshold, the pixel in the segmented image corresponding to the central pixel of the square template is marked as a captured object. In response to P being greater than the preset threshold, the pixel in the segmented image corresponding to the central pixel of the square template is not marked, the pixel value of the captured object is set to 255, and the pixel value of the non-captured object is set to 0, so as to capture the road edge pixels and background area pixels in the segmented image, superimpose the image with completed pixel capture on the segmented image and remove the background area, extract the road edge, and generate an edge extracted image.
[0034] In some embodiments, capturing and removing the patch noise in the edge extraction image according to the preset noise pixel capture sliding window including multiple scales to generate the optimized edge extraction image includes:
[0035] For each scale of the noise pixel capture sliding window, the central pixel of the current noise pixel capture sliding window is used as a reference point to perform parallel sliding in the edge extraction image, and it is determined whether there is a target pixel at the corresponding pixel position on the edge of the current noise pixel capture sliding window. In response to the existence of the target pixel, the current noise pixel capture sliding window is continued to be moved. In response to the absence of the target pixel, the pixels in the coverage area of the current noise pixel capture sliding window are marked as noise points;
[0036] The edge extraction image is traversed in parallel by using a plurality of noise pixel capture sliding windows, all noise points are marked and deleted, and an optimized edge extraction image is generated.
[0037] In a second aspect of the present disclosure, a road edge extraction device based on remote sensing images is provided, comprising:
[0038] A remote sensing image acquisition module is used to acquire a target remote sensing image, wherein the target remote sensing image is a remote sensing image including a road, pre-process the target remote sensing image, perform preliminary segmentation on the road and background in the target remote sensing image, and generate a segmented image;
[0039] An edge extraction image generation module is used to roughly remove noise from the segmented image, and to perform pixel-by-pixel judgment and mark the road edge and background area of the segmented image after the noise is roughly removed, extract the road edge, and generate an edge extraction image;
[0040] The edge extraction image optimization module is used to capture and remove the patch noise in the edge extraction image according to a preset noise pixel capture sliding window including multiple scales, so as to generate an optimized edge extraction image.
[0041] In a third aspect of the present disclosure, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, the method described above is implemented.
[0042] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described above is implemented.
[0043] Through the road edge extraction method based on remote sensing images disclosed in the present invention, it is possible to effectively extract the road edges of high-resolution remote sensing images, remove patch noise of different sizes in the image, and achieve road edge extraction and optimization.
[0044] The contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0046] Figure 1 A flowchart of a road edge extraction method based on remote sensing images according to a first embodiment of the present disclosure is shown;
[0047] Figure 2 A schematic diagram showing the structure of a road edge extraction device based on remote sensing images according to a second embodiment of the present disclosure is shown;
[0048] Figure 3 A schematic structural diagram of a road edge extraction device based on remote sensing images according to a third embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0050] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0051] The road edge extraction method based on remote sensing images in the disclosed embodiment can effectively extract the road edges of high-resolution remote sensing images, remove patch noise of different sizes in the image, and achieve road edge extraction and optimization.
[0052] Specifically, Figure 1 FIG. 1 is a flowchart of a method for extracting road edges based on remote sensing images according to a first embodiment of the present disclosure. In this embodiment, the method for extracting road edges based on remote sensing images may include the following steps:
[0053] S101: Acquire a target remote sensing image, wherein the target remote sensing image is a remote sensing image including a road, pre-process the target remote sensing image, perform preliminary segmentation on the road and background in the target remote sensing image, and generate a segmented image.
[0054] The road edge extraction method based on remote sensing images of the disclosed embodiment can be used to extract road edges on high-resolution remote sensing images to accurately identify roads from high-resolution remote sensing images. Specifically, it is first necessary to obtain a target remote sensing image to be identified, wherein the target remote sensing image is a remote sensing image including road information. The target remote sensing image is preprocessed, and the road and background in the target remote sensing image are preliminarily segmented to generate a segmented image.
[0055] In this embodiment, the target remote sensing image is preprocessed, including: graying the target remote sensing image using a weighted average method, performing piecewise linear transformation on the grayscale image using a grayscale transformation enhancement method, and performing binary threshold segmentation on the grayscale image after grayscale transformation enhancement.
[0056] The grayscale processing of the target remote sensing image is performed by using a weighted average method, including:
[0057] For true color target remote sensing images including red, green and blue channels, weight the three bands of red, green and blue, and calculate the image grayscale value by weighted average method. The calculation formula of weighted average method is as follows:
[0058] g=0.3R+0.59G+0.11B
[0059] Among them, g is the grayscale value of the grayscale image; R is the grayscale value of the red band of the original image; G is the grayscale value of the green band of the original image; B is the grayscale value of the blue band of the original image.
[0060] Moreover, the weight coefficients of 0.3, 0.59 and 0.11 are obtained by weighting the three bands of red, green and blue based on the characteristics that the human visual system is most sensitive to green and least sensitive to blue.
[0061] After the image is grayed, the color difference between the road and the surrounding objects in the image is small, which affects the accuracy of image segmentation. Therefore, in order to enhance the contrast between the road and the surrounding objects, the grayscale transformation enhancement method can be used to perform piecewise linear transformation on the image grayscale, increase the grayscale part of the road area in the original image, and suppress the grayscale part of the objects around the road, so as to enhance the contrast between the road area in the original image and the surrounding objects.
[0062] The grayscale transformation enhancement method is used to perform piecewise linear transformation on the grayscale image. The formula of the piecewise linear transformation function is as follows:
[0063]
[0064] Among them, x1 and x2 are the grayscale value ranges to be enhanced, y1 and y2 parameters determine the slope of the linear transformation, x is the pixel value of the pixel point of the grayscale image before the transformation, and f(x) is the pixel value of the pixel point of the grayscale image after the transformation.
[0065] The grayscale image after grayscale transformation enhancement is subjected to binary threshold segmentation to generate a segmented image. The formula for binary threshold segmentation is as follows:
[0066]
[0067] Among them, I is the segmentation threshold.
[0068] S102: performing rough noise elimination on the segmented image, and performing pixel-by-pixel judgment and marking of road edges and background areas on the segmented image after the rough noise elimination, extracting road edges, and generating edge extraction images.
[0069] In this embodiment, when the grayscale image after grayscale transformation enhancement is subjected to binary threshold segmentation to generate a segmented image, the generated segmented image can be pixel-by-pixel judged and marked for the road edge and background area, the road edge can be extracted, and an edge extraction image can be generated.
[0070] Specifically, morphological erosion and morphological dilation are sequentially used to roughly remove noise from the segmented image, wherein the morphological erosion includes:
[0071] A "5×5" template is used as an erosion primitive. The erosion primitive is slid in the segmented image to perform an erosion operation on the image area containing the erosion primitive. The erosion operation formula is as follows:
[0072]
[0073] Among them, A is the set of pixels in the segmented image, B is the set of pixels in the erosion primitive, a is an element in set A; b is an element in set B.
[0074] For the segmented image, the erosion primitive is used as the basic unit to slide from the upper left corner of the image, and each pixel of the segmented image is traversed in turn. When the positions of the pixels corresponding to the erosion primitive are all contained in the target area, the pixels corresponding to the central primitive of the erosion primitive on the segmented image are retained, and other pixels are removed to achieve morphological erosion.
[0075] The morphological expansion includes:
[0076] A "5×5" template is used as a dilation primitive. The dilation primitive is slid in the segmented image to perform a dilation operation on the image region containing the dilation primitive. The dilation operation formula is as follows:
[0077]
[0078] Among them, A is the set of pixels in the segmented image, c is the set of pixels in the dilation primitive, a is an element in set A; c is an element in set C.
[0079] The road width information is restored by morphological expansion, and the large area holes formed by the corrosion process are filled. The "5×5" template with the same scale as the corrosion template is used as the expansion primitive for expansion operation to restore the road information. For the segmented image, the expansion primitive is used as the basic unit to slide from the upper left corner of the image, and each pixel of the segmented image is traversed in turn. When a pixel of the expansion primitive overlaps with a pixel in the segmented image, all the pixels of the expansion primitive are added to the corresponding pixels on the segmented image to achieve expansion.
[0080] After completing the erosion and expansion of the segmented image, 2The central pixel of a square template with pixels is used as a reference point, and each pixel in the segmented image is matched in sequence. The number P of pixels in the square template that meet the preset conditions is counted. In response to P being less than a preset threshold, the pixel in the segmented image corresponding to the central pixel of the square template is marked as a captured object. In response to P being greater than the preset threshold, the pixel in the segmented image corresponding to the central pixel of the square template is not marked, the pixel value of the captured object is set to 255, and the pixel value of the non-captured object is set to 0, so as to capture the road edge pixels and background area pixels in the segmented image, superimpose the image with completed pixel capture on the segmented image and remove the background area, extract the road edge, and generate an edge extracted image.
[0081] Taking the “3×3” template as an example, the process of capturing the road edge and background is described. The threshold T is set to 7, and the image is counted pixel by pixel.
[0082] In the original image, the grayscale value of the background pixel is "0", and the grayscale value of the pixel of the target object is "255". The "3×3" capture template is used to perform sliding calculation on the original image, and the number of pixels P with a grayscale value of "255" in the capture template is counted pixel by pixel. When P≤T, the pixel is marked as the captured object; when P>T, it is not captured. After completing the capture of the road edge and background pixels of the entire original image, the marked pixel position of the blank image of the same size is assigned a value of "255", and the unmarked pixel is assigned a value of "0" to obtain a new image. Finally, the original image and the new image are superimposed, that is, the grayscale values of the corresponding pixels of the new image and the original image after the grayscale value is flipped (pixel flip: road pixels change from "255" to "0", background pixels change from "0" to "255") are subtracted. At this time, the pixel with a pixel value of "255" in the new image is the road edge.
[0083] S103: capturing and removing the patch noise in the edge extraction image according to a preset noise pixel capture sliding window including multiple scales, and generating an optimized edge extraction image.
[0084] A square template with different numbers of pixel points on the edge is used to capture road edge pixels and background area pixels in the segmented image. The optimized edge extraction image is generated by performing multiple superposition captures and removing the patch noise in the edge extraction image.
[0085] Specifically, for each scale of noise pixel capture sliding window, the central pixel of the current noise pixel capture sliding window is used as a reference point to perform parallel sliding in the edge extraction image, and it is determined whether there is a target pixel at the corresponding pixel position on the edge of the current noise pixel capture sliding window. In response to the existence of the target pixel, the current noise pixel capture sliding window is continued to be moved. In response to the absence of the target pixel, the pixels in the coverage area of the current noise pixel capture sliding window are marked as noise points. The edge extraction image is traversed in parallel using multiple noise pixel capture sliding windows, all the noise points at the marked locations are deleted, and an optimized edge extraction image is generated.
[0086] After the edge extraction image is generated, due to the influence of vehicles and surrounding vegetation on the road, there are still some large patch noises in the edge extraction image. After edge extraction, the patch noise is also extracted. Therefore, the patch noise needs to be removed. To this end, the embodiment of the present disclosure first defines an "N×N" pixel capture template, and smoothes the target image with the center of the template as the reference point. Then, during the smoothing process, it is determined whether the "border" of the template coincides with the "target", that is, it is determined whether there is a "target" pixel in the "border" pixel of the template. When the "border" coincides with the "target", it means that the target intersects with the edge of the road or the edge of the noise, and the template is moved to the next position; if the "border" is separated from the "target", it means that the noise object is contained in the template or there is no object in the template. At this time, the pixels in the template coverage area are marked and finally removed uniformly. Since the road edge has the characteristics of being linear, wide in range, and highly continuous, the present invention can ensure that when the template moves to the road edge, it will inevitably intersect with the road edge, and can surround the noise object, and can distinguish between the road edge and the noise edge, thereby achieving noise removal.
[0087] Taking the "5×5" pixel capture template as an example, a "border" with 16 pixels is established. First, a blank image I3 of the same size as the image I2 to be denoised is established; then the pixel capture template is applied to smooth the image I2 to determine whether there are edge pixels (pixels with a grayscale value of "255") in the "border" pixels. If not, the values of each pixel in the corresponding template in I3 are assigned to "1". If so, the grayscale values of the pixels in the original image I2 in the template are copied to the corresponding pixels in I3, and the grayscale of the pixels with a grayscale value of "1" in I2 is retained during the copying process; finally, the grayscale of the pixels with a grayscale value of "1" in I3 is replaced with the "background" grayscale value "0", and all pixels are traversed to complete the image denoising.
[0088] The road edge extraction method based on remote sensing images in the disclosed embodiment can effectively extract the road edges of high-resolution remote sensing images, remove patch noise of different sizes in the image, and achieve road edge extraction and optimization.
[0089] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.
[0090] The above is an introduction to the method embodiment. The following is a further explanation of the scheme disclosed in the present invention through an apparatus embodiment.
[0091] like Figure 2 FIG. 1 is a schematic diagram of the structure of a road edge extraction device based on remote sensing images according to a second embodiment of the present disclosure. The road edge extraction device based on remote sensing images according to this embodiment includes:
[0092] The remote sensing image acquisition module 201 is used to acquire a target remote sensing image, wherein the target remote sensing image is a remote sensing image including a road, pre-process the target remote sensing image, perform preliminary segmentation on the road and background in the target remote sensing image, and generate a segmented image.
[0093] The edge extraction image generation module 202 is used to roughly remove noise from the segmented image, and perform pixel-by-pixel judgment and mark the road edge and background area on the segmented image after the noise is roughly removed, extract the road edge, and generate an edge extraction image.
[0094] The edge extraction image optimization module 203 is used to capture and remove the patch noise in the edge extraction image according to a preset noise pixel capture sliding window including multiple scales, so as to generate an optimized edge extraction image.
[0095] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0096] Figure 3A schematic block diagram of an electronic device 300 that can be used to implement an embodiment of the present disclosure is shown. As shown, the device 300 includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 302 or loaded from a storage unit 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the device 300 can also be stored. The CPU 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0097] A number of components in the device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0098] The processing unit 301 performs the various methods and processes described above, which are tangibly contained in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 703 and executed by the CPU 301, one or more steps of the method described above can be performed. Alternatively, in other embodiments, the CPU 301 can be configured to perform the above method in any other suitable manner (e.g., by means of firmware).
[0099] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip systems (SOCs), load programmable logic devices (CPLDs), and the like.
[0100] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0101] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0102] In addition, although each operation is described in a specific order, this should be understood as requiring such operation to be performed in the specific order shown or in a sequential order, or requiring that all illustrated operations should be performed to obtain desired results. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single implementation in combination. On the contrary, the various features described in the context of a single implementation can also be implemented in multiple implementations individually or in any suitable sub-combination mode.
[0103] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A road edge extraction method based on remote sensing images, characterized in that: include: Acquire a target remote sensing image, wherein the target remote sensing image is a remote sensing image including a road, pre-process the target remote sensing image, perform preliminary segmentation on the road and background in the target remote sensing image, and generate a segmented image; The segmented image is subjected to rough noise elimination, and the segmented image after the rough noise elimination is subjected to pixel-by-pixel judgment and marking of road edges and background areas, the road edges are extracted, and an edge extraction image is generated; the segmented image after the rough noise elimination is subjected to pixel-by-pixel judgment and marking of road edges and background areas, the road edges are extracted, and an edge extraction image is generated, including: 2 The central pixel of a square template with pixels is used as the reference point, and each pixel in the segmented image is matched in sequence. The number of pixels P in the square template that meet the preset conditions is counted. In response to P being less than a preset threshold, the pixel in the segmented image corresponding to the central pixel of the square template is marked as a captured object. In response to P being greater than the preset threshold, the pixel in the segmented image corresponding to the central pixel of the square template is not marked, the pixel value of the captured object is set to 255, and the pixel value of the non-captured object is set to 0, so as to capture the road edge pixels and background area pixels in the segmented image, and complete the image. The image captured by the original image is superimposed with the segmented image and the background area is removed to extract the road edge and generate an edge extraction image; wherein the preset condition is: the gray value of the pixel is 255; the specific operation of superimposition is: subtracting the gray value of the corresponding pixel of the new image from the original image after the gray value is flipped; wherein the flipping is pixel flipping: the road pixel changes from 255 to 0, and the background pixel changes from 0 to 255; the new image is obtained by the following steps: after completing the capture of the road edge and background pixels of the entire original image, assigning 255 to the marked pixel position of the blank image of the same size, and assigning 0 to the unmarked pixel position, to obtain a new image; According to a preset sliding window for capturing noise pixels of multiple scales, the patch noise in the edge extraction image is captured and removed to generate an optimized edge extraction image.
2. The road edge extraction method according to claim 1, characterized in that: The preprocessing of the target remote sensing image comprises: The target remote sensing image is grayed out using a weighted average method, specifically including: For true color target remote sensing images including red, green and blue channels, weight the three bands of red, green and blue, and calculate the image grayscale value by weighted average method. The calculation formula of weighted average method is as follows: g=0.3R+0.59G+0.11B Among them, g is the grayscale value of the grayscale image; R is the grayscale value of the red band of the original image; G is the grayscale value of the green band of the original image; B is the grayscale value of the blue band of the original image.
3. The road edge extraction method according to claim 2, characterized in that: The preprocessing of the target remote sensing image also includes: The grayscale transformation enhancement method is used to perform piecewise linear transformation on the grayscale image. The formula of the piecewise linear transformation function is as follows: Among them, x1 and x2 are the grayscale value ranges to be enhanced, y1 and y2 parameters determine the slope of the linear transformation, x is the pixel value of the pixel point of the grayscale image before the transformation, and f(x) is the pixel value of the pixel point of the grayscale image after the transformation.
4. The road edge extraction method according to claim 3, characterized in that: The preprocessing of the target remote sensing image also includes: The grayscale image after grayscale transformation enhancement is subjected to binary threshold segmentation. The formula for binary threshold segmentation is as follows: Among them, I is the segmentation threshold.
5. The road edge extraction method according to claim 4, characterized in that: The step of roughly removing noise from the segmented image comprises: The segmented image is subjected to rough noise removal by sequentially using morphological erosion and morphological dilation, wherein the morphological erosion comprises: A "5×5" template is used as an erosion primitive. The erosion primitive is slid in the segmented image to perform an erosion operation on the image area containing the erosion primitive. The erosion operation formula is as follows: Where A is the set of pixels in the segmented image, B is the set of pixels in the erosion primitive, a is an element in set A, and b is an element in set B; The morphological expansion includes: A "5×5" template is used as a dilation primitive. The dilation primitive is slid in the segmented image to perform a dilation operation on the image region containing the dilation primitive. The dilation operation formula is as follows: Among them, A is the set of pixels in the segmented image, c is the set of pixels in the dilation primitive, a is an element in set A; c is an element in set C.
6. The road edge extraction method according to claim 1, characterized in that: The method captures and removes the patch noise in the edge extraction image according to the preset noise pixel capture sliding window including multiple scales to generate an optimized edge extraction image, including: For each scale of the noise pixel capture sliding window, the central pixel of the current noise pixel capture sliding window is used as a reference point to perform parallel sliding in the edge extraction image, and it is determined whether there is a target pixel at the corresponding pixel position on the edge of the current noise pixel capture sliding window. In response to the existence of the target pixel, the current noise pixel capture sliding window is continued to be moved. In response to the absence of the target pixel, the pixels in the coverage area of the current noise pixel capture sliding window are marked as noise points; The edge extraction image is traversed in parallel by using a plurality of noise pixel capture sliding windows, all noise points are marked and deleted, and an optimized edge extraction image is generated.
7. A road edge extraction device based on remote sensing images, characterized in that: include: A remote sensing image acquisition module is used to acquire a target remote sensing image, wherein the target remote sensing image is a remote sensing image including a road, pre-process the target remote sensing image, perform preliminary segmentation on the road and background in the target remote sensing image, and generate a segmented image; The edge extraction image generation module is used to perform rough noise elimination on the segmented image, and perform pixel-by-pixel judgment and marking of road edges and background areas on the segmented image after the rough noise elimination, extract the road edges, and generate edge extraction images; the segmented image after the rough noise elimination is judged pixel-by-pixel and marked with road edges and background areas, extract the road edges, and generate edge extraction images, including: 2 The central pixel of a square template with pixels is used as the reference point, and each pixel in the segmented image is matched in sequence. The number of pixels P in the square template that meet the preset conditions is counted. In response to P being less than a preset threshold, the pixel in the segmented image corresponding to the central pixel of the square template is marked as a captured object. In response to P being greater than the preset threshold, the pixel in the segmented image corresponding to the central pixel of the square template is not marked, the pixel value of the captured object is set to 255, and the pixel value of the non-captured object is set to 0, so as to capture the road edge pixels and background area pixels in the segmented image, and complete the image. The image captured by the original image is superimposed with the segmented image and the background area is removed to extract the road edge and generate an edge extraction image; wherein the preset condition is: the gray value of the pixel is 255; the specific operation of superimposition is: subtracting the gray value of the corresponding pixel of the new image from the original image after the gray value is flipped; wherein the flipping is pixel flipping: the road pixel changes from 255 to 0, and the background pixel changes from 0 to 255; the new image is obtained by the following steps: after completing the capture of the road edge and background pixels of the entire original image, assigning 255 to the marked pixel position of the blank image of the same size, and assigning 0 to the unmarked pixel position, to obtain a new image; The edge extraction image optimization module is used to capture and remove the patch noise in the edge extraction image according to a preset noise pixel capture sliding window including multiple scales, so as to generate an optimized edge extraction image.
8. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Hough-transform-based method for identifying transportation junction targets in remote-sensing image
CN101976349A
Way extracting method integrating object-oriented segmentation and grayscale morphology
CN103996042A