CN114862889A - Road edge extraction method and device based on remote sensing image - Google Patents
Road edge extraction method and device based on remote sensing image Download PDFInfo
- Publication number
- CN114862889A CN114862889A CN202210483668.0A CN202210483668A CN114862889A CN 114862889 A CN114862889 A CN 114862889A CN 202210483668 A CN202210483668 A CN 202210483668A CN 114862889 A CN114862889 A CN 114862889A
- Authority
- CN
- China
- Prior art keywords
- image
- pixel
- remote sensing
- noise
- edge extraction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000605 extraction Methods 0.000 title claims abstract description 84
- 238000000034 method Methods 0.000 claims abstract description 47
- 238000007781 pre-processing Methods 0.000 claims abstract description 16
- 230000008030 elimination Effects 0.000 claims abstract description 13
- 238000003379 elimination reaction Methods 0.000 claims abstract description 13
- 238000005457 optimization Methods 0.000 claims abstract description 9
- 238000005260 corrosion Methods 0.000 claims description 28
- 230000007797 corrosion Effects 0.000 claims description 28
- 230000011218 segmentation Effects 0.000 claims description 26
- 230000009466 transformation Effects 0.000 claims description 24
- 230000008961 swelling Effects 0.000 claims description 15
- 230000000877 morphologic effect Effects 0.000 claims description 14
- 238000012545 processing Methods 0.000 claims description 11
- 238000003860 storage Methods 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 7
- 230000006870 function Effects 0.000 claims description 5
- 238000004364 calculation method Methods 0.000 claims description 4
- 230000010339 dilation Effects 0.000 claims description 4
- 230000004044 response Effects 0.000 claims description 4
- 230000008569 process Effects 0.000 description 7
- 238000003708 edge detection Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003628 erosive effect Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000009499 grossing Methods 0.000 description 2
- 238000003709 image segmentation Methods 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
- G06T5/30—Erosion or dilatation, e.g. thinning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10032—Satellite or aerial image; Remote sensing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30204—Marker
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30248—Vehicle exterior or interior
- G06T2207/30252—Vehicle exterior; Vicinity of vehicle
- G06T2207/30256—Lane; Road marking
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
The invention provides a road edge extraction method and a road edge extraction device based on a remote sensing image, wherein the method comprises the following steps: acquiring a target remote sensing image, wherein the target remote sensing image is a remote sensing image comprising a road, preprocessing the target remote sensing image, and preliminarily segmenting the road and the background in the target remote sensing image to generate a segmented image; roughly eliminating noise from the segmented image, judging the segmented image subjected to rough noise elimination pixel by pixel, marking a road edge and a background area, extracting the road edge, and generating an edge extraction image; and capturing a sliding window according to a preset noise pixel unit comprising a plurality of scales, capturing and eliminating plaque noise in the edge extraction image, and generating an optimized edge extraction image. In this way, on the basis of effectively extracting the road edge of the high-resolution remote sensing image, the patch noises with different sizes in the image can be eliminated, and the extraction and optimization of the road edge are realized.
Description
Technical Field
Embodiments of the present disclosure generally relate to the field of remote sensing image processing data preprocessing technology, and more particularly, to a method and an apparatus for extracting road edges based on remote sensing images.
Background
With the rapid development of the high-resolution remote sensing detection technology, the high-resolution image can meet the task requirement of large-scale ground object detection, and can provide clearer ground object shapes, abundant texture information and accurate spatial distribution, so that the method plays an important role in monitoring urban infrastructure, especially in the construction of intelligent cities such as urban intelligent traffic and digital maps in China. Road edge extraction is an important basis for urban road digital construction, however, the traditional artificial road vectorization method consumes huge manpower, material resources and financial resources, so that the road edge automatic extraction technology based on high-resolution images becomes one of research hotspots.
At present, the edge detection technology based on image processing is still one of the most convenient and efficient methods for high-resolution remote sensing image target edge detection, operators can be extracted according to the texture, shape and gray scale characteristics of an object to be detected in a targeted design manner, and road edge extraction of the universe of high-resolution remote sensing images can be automatically and efficiently implemented. The traditional edge detection algorithm such as sobel operator, roberts operator, canny operator and the like is widely applied to actual production, image segmentation is mainly carried out through preprocessing methods such as histogram equalization and binarization, image noise reduction is carried out through spatial filtering, and then road edge detection is carried out through the edge detection operator.
Although the high-resolution remote sensing image can provide rich information such as road shape, texture, gray level and the like, but also contains a large amount of information of other ground features (such as buildings, vehicles, trees, shadows and the like), the traditional edge detection algorithm can also extract edges of non-road ground features, so that information redundancy is caused, and a large amount of noise with different forms is generated. Therefore, the automatic extraction and noise reduction optimization of the road edge aiming at the high-resolution remote sensing image become difficult problems.
Disclosure of Invention
According to the embodiment of the disclosure, a pixel capturing model capable of simultaneously implementing road edge extraction and multi-scale noise removal is provided, and a set of complete road edge extraction method based on a high-resolution remote sensing image is established. The method can remove the patch noise with different sizes in the image on the basis of effectively extracting the road edge of the high-resolution remote sensing image, and realizes the extraction and optimization of the road edge.
In a first aspect of the present disclosure, a method for extracting road edges based on remote sensing images is provided, including:
acquiring a target remote sensing image, wherein the target remote sensing image is a remote sensing image comprising a road, preprocessing the target remote sensing image, and preliminarily segmenting the road and the background in the target remote sensing image to generate a segmented image;
roughly eliminating noise from the segmented image, judging the segmented image subjected to rough noise elimination pixel by pixel, marking a road edge and a background area, extracting the road edge, and generating an edge extraction image;
and capturing a sliding window according to a preset noise pixel unit comprising a plurality of scales, capturing and eliminating plaque noise in the edge extraction image, and generating an optimized edge extraction image.
In some embodiments, the preprocessing the target remote sensing image includes:
carrying out gray processing on the target remote sensing image by adopting a weighted average method, which specifically comprises the following steps:
for a true color target remote sensing image comprising three channels of red, green and blue, weighting is carried out on three wave bands of red, green and blue, and the gray value of the image is calculated by a weighted average method, wherein the calculation formula of the weighted average method is as follows:
g=0.3R+0.59G+0.11B
wherein g is a gray level image gray level value; r is the gray value of the red wave band of the original image; g is the gray value of the green wave band of the original image; b is the gray value of the blue wave band of the original image.
In some embodiments, the preprocessing the target remote sensing image further includes:
the gray scale image is subjected to piecewise linear transformation by adopting a gray scale transformation enhancement method, and the formula of a piecewise linear transformation function is as follows:
wherein x is 1 And x 2 Is the range of gray values to be enhanced, y 1 And y 2 The parameters determine the slope of the linear transformation, x is the pixel value of the pixel point of the gray-scale image before transformation, and f (x) is the pixel value of the pixel point of the gray-scale image after transformation.
In some embodiments, the preprocessing the target remote sensing image further includes:
and performing binarization threshold segmentation on the gray level image after gray level transformation enhancement, wherein the formula of the binarization threshold segmentation is as follows:
wherein I is a segmentation threshold.
In some embodiments, the performing noise rough culling on the segmented image comprises:
and carrying out noise rough elimination on the segmented image by sequentially adopting morphological corrosion and morphological expansion, wherein the morphological corrosion comprises the following steps:
adopting a template of '5 multiplied by 5' as a corrosion primitive, and performing corrosion operation on an image area containing the corrosion primitive by sliding the corrosion primitive in a segmented image, wherein the corrosion operation formula is as follows:
wherein A is a pixel set in the segmentation image, B is a pixel set in the corrosion element, and a is an element in the set A; b is an element in the set B;
the morphological dilation comprises:
adopting a template of '5 multiplied by 5' as a swelling element, and performing a swelling operation on an image area containing the swelling element by sliding the swelling element in a segmented image, wherein the swelling operation formula is as follows:
wherein A is a pixel set in the segmentation image, c is a pixel set in the expansion element, and a is an element in the set A; c is an element in the set C.
In some embodiments, the performing pixel-by-pixel judgment and marking road edges and background regions on the segmented image after the noise rough removal, extracting road edges, and generating an edge-extracted image includes:
to comprise N 2 Taking a central pixel of a square template of pixels as a reference point, sequentially matching all pixels in a segmented image, counting the number P of pixels meeting a preset condition in the square template, marking the pixel in the segmented image corresponding to the central pixel of the square template as a captured object when the P is smaller than a preset threshold, not marking the pixel in the segmented image corresponding to the central pixel of the square template when the P is larger than the preset threshold, setting the pixel value of the captured object to be 255, and setting the pixel value of the object which is not captured to be 0,the method comprises the steps of capturing road edge pixels and background area pixels in a segmentation image, overlapping the image captured by the pixels and the segmentation image, removing the background area, extracting road edges and generating an edge extraction image.
In some embodiments, the capturing and removing the plaque noise in the edge extraction image according to a preset noise pixel element including multiple scales to generate an optimized edge extraction image includes:
for a noise pixel capture sliding window of each scale, taking a central pixel of the current noise pixel capture sliding window as a reference point to perform parallel sliding in an edge extraction image, judging whether a target pixel exists at a corresponding pixel position on the edge of the current noise pixel capture sliding window, responding to the existence of the target pixel, continuously moving the current noise pixel capture sliding window, responding to the nonexistence of the target pixel, and marking a pixel in the coverage area of the current noise pixel capture sliding window as a noise point;
and capturing a sliding window by utilizing a plurality of noise pixel elements to perform parallel sliding traversal on the edge extraction image, marking all noise points at the position and deleting the noise points to generate an optimized edge extraction image.
In a second aspect of the present disclosure, there is provided a road edge extraction device based on a remote sensing image, including:
the remote sensing image acquisition module is used for acquiring a target remote sensing image, preprocessing the target remote sensing image, and preliminarily segmenting the road and the background in the target remote sensing image to generate a segmented image;
the edge extraction image generation module is used for carrying out noise rough elimination on the segmentation image, carrying out pixel-by-pixel judgment on the segmentation image subjected to the noise rough elimination, marking a road edge and a background area, extracting the road edge and generating an edge extraction image;
and the edge extraction image optimization module is used for capturing a sliding window according to preset noise pixel elements comprising a plurality of scales, capturing and eliminating plaque noise in the edge extraction image, and generating an optimized edge extraction image.
In a third aspect of the present disclosure, an electronic device is provided, comprising a memory having stored thereon a computer program and a processor implementing the method as described above when executing the program.
In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method as set forth above.
By the road edge extraction method based on the remote sensing image, patch noises with different sizes in the image can be removed on the basis of effectively extracting the road edge of the high-resolution remote sensing image, and road edge extraction and optimization are realized.
The statements made in this summary are not intended to limit key or critical features of the embodiments of the disclosure, nor are they intended to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, like or similar reference characters designate like or similar elements, and wherein:
fig. 1 shows a flowchart of a road edge extraction method based on a remote sensing image according to a first embodiment of the present disclosure;
fig. 2 shows a schematic structural diagram of a remote sensing image-based road edge extraction device according to a second embodiment of the disclosure;
fig. 3 shows a schematic structural diagram of a road edge extraction device based on a remote sensing image according to a third embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The road edge extraction method based on the remote sensing image can remove the patch noise with different sizes in the image on the basis of effectively extracting the road edge of the high-resolution remote sensing image, and realizes the extraction and optimization of the road edge.
Specifically, as shown in fig. 1, the method is a flowchart of a road edge extraction method based on a remote sensing image according to a first embodiment of the present disclosure. In this embodiment, the method for extracting road edge based on remote sensing image may include the following steps:
s101: the method comprises the steps of obtaining a target remote sensing image, wherein the target remote sensing image is a remote sensing image comprising a road, preprocessing the target remote sensing image, and preliminarily segmenting the road and the background in the target remote sensing image to generate a segmentation image.
The road edge extraction method based on the remote sensing image can be used for extracting the road edge on the high-resolution remote sensing image so as to accurately identify the road from the high-resolution remote sensing image. Specifically, a target remote sensing image to be identified needs to be acquired, wherein the target remote sensing image is a remote sensing image including road information. And preprocessing the target remote sensing image, and performing primary segmentation on the road and the background in the target remote sensing image to generate a segmented image.
In this embodiment, the preprocessing the target remote sensing image includes: carrying out gray level processing on the target remote sensing image by adopting a weighted average method, carrying out piecewise linear transformation on the gray level image by adopting a gray level transformation enhancement method, and carrying out binarization threshold segmentation on the gray level image after the gray level transformation enhancement.
The graying processing of the target remote sensing image by adopting a weighted average method comprises the following steps:
for a true color target remote sensing image comprising three channels of red, green and blue, weighting is carried out on three wave bands of red, green and blue, and the gray value of the image is calculated by a weighted average method, wherein the calculation formula of the weighted average method is as follows:
g=0.3R+0.59G+0.11B
wherein g is a gray level image gray level value; r is the gray value of the red wave band of the original image; g is the gray value of the green wave band of the original image; b is the gray value of the blue wave band of the original image.
And, the weighting coefficients 0.3, 0.59, and 0.11 are obtained by weighting three bands of red, green, and blue based on the characteristic that the human visual system is most sensitive to green and least sensitive to blue.
After the image is subjected to graying processing, the color difference between the road in the image and the surrounding ground objects is small, and the image segmentation precision is influenced. Therefore, in order to enhance the contrast between the road and the surrounding features, a gray scale conversion enhancement method may be used to enhance the contrast between the road region of the original image and the surrounding features by performing piecewise linear conversion on the image gray scale to enhance the gray scale portion of the road region of the original image while suppressing the gray scale portion of the surrounding features of the road.
The gray scale image is subjected to piecewise linear transformation by adopting a gray scale transformation enhancement method, and the formula of a piecewise linear transformation function is as follows:
wherein x is 1 And x 2 Is the range of gray values to be enhanced, y 1 And y 2 The parameters determine the slope of the linear transformation, x is the pixel value of the pixel point of the gray image before transformation, and f (x) is the pixel value of the pixel point of the gray image after transformation.
And performing binarization threshold segmentation on the gray level image subjected to gray level transformation enhancement to generate a segmented image. The formula of the binary threshold segmentation is as follows:
wherein I is a segmentation threshold.
S102: and carrying out noise rough elimination on the segmented image, carrying out pixel-by-pixel judgment on the segmented image subjected to the noise rough elimination, marking the road edge and the background area, extracting the road edge, and generating an edge extraction image.
In this embodiment, when the grayscale image after the grayscale conversion enhancement is subjected to binarization threshold segmentation to generate a segmented image, for the generated segmented image, pixel-by-pixel judgment and marking of a road edge and a background area can be performed to extract the road edge, so as to generate an edge extraction image.
Specifically, morphological erosion and morphological expansion are sequentially adopted to perform noise rough elimination on the segmented image, wherein the morphological erosion comprises:
adopting a template of '5 multiplied by 5' as a corrosion primitive, and performing corrosion operation on an image area containing the corrosion primitive by sliding the corrosion primitive in a segmented image, wherein the corrosion operation formula is as follows:
wherein A is a pixel set in the segmentation image, B is a pixel set in the corrosion element, and a is an element in the set A; b is an element in set B.
For the segmented image, sliding is started from the upper left corner of the image by taking a corrosion element as a basic unit, each pixel of the segmented image is traversed in sequence, when the positions of the corrosion element corresponding to all the pixels are all contained in a target region, the pixel corresponding to the central element of the corrosion element on the segmented image is reserved, other pixels are removed, and morphological corrosion is achieved.
The morphological dilation comprises:
adopting a template of '5 multiplied by 5' as a swelling element, and performing a swelling operation on an image area containing the swelling element by sliding the swelling element in the segmented image, wherein the swelling operation formula is as follows:
wherein A is a pixel set in the segmentation image, c is a pixel set in the expansion element, and a is an element in the set A; c is an element in the set C.
Road width information is restored through morphological expansion, large-area cavities formed in the corrosion process are filled, and a '5 x 5' template with the same size as the corrosion template is adopted as an expansion element to perform expansion operation so as to restore road information. For the segmented image, the expansion element is taken as a basic unit to start sliding from the upper left corner of the image, each pixel of the segmented image is traversed in sequence, when the expansion element has the phenomenon that a certain pixel is overlapped with the pixel in the segmented image, all pixels of the expansion element are supplemented to the corresponding pixels on the segmented image, and expansion is achieved.
After completing the erosion and dilation of the segmentation image to contain N 2 The method comprises the steps that a central pixel of a square template of each pixel is taken as a reference point, all pixels in a segmented image are sequentially matched, the number P of pixels meeting preset conditions in the square template is counted, when the P is smaller than a preset threshold value, the pixel in the segmented image corresponding to the central pixel of the square template is marked as a captured object, when the P is larger than the preset threshold value, 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 be 255, the pixel value of the non-captured object is set to be 0, the capture of pixels of a road edge and pixels of a background area in the segmented image is achieved, the image captured by the pixels and the segmented image are overlapped, the background area is removed, the road edge is extracted, and an edge extraction image is generated.
The capture process of the road edge and the background is described by taking a 3 × 3 template as an example, the threshold T is set to 7, and pixel-by-pixel statistics is performed on the image.
In the original image, the gray value of the background pixel is "0", and the gray value of the pixel of the target object is "255". And performing sliding calculation on the original image by applying a '3 multiplied by 3' capturing template, and counting the number P of pixels with the pixel gray value of '255' in the capturing template one by one. When P is less than or equal to T, marking the image element as a captured image; when P > T, no capture is performed. After capturing the whole road edge and background pixels of the original image, assigning '255' to the marked pixels of the blank image with the same size, and assigning the unmarked pixels with '0' to obtain a new image. And finally, performing superposition operation on the original image and the new image, namely subtracting the gray value of the corresponding pixel of the original image after the new image and the gray value are turned over (the pixel is turned over, namely the road pixel is changed from 255 to 0, and the background pixel is changed from 0 to 255), wherein the pixel with the pixel value of 255 in the new image is the road edge.
S103: and capturing a sliding window according to a preset noise pixel unit comprising a plurality of scales, capturing and eliminating plaque noise in the edge extraction image, and generating an optimized edge extraction image.
Capturing road edge pixels and background area pixels in the segmented image by adopting a square template with edges containing different pixel points, and generating an optimized edge extraction image by performing multiple overlapping capture and eliminating patch noise in the edge extraction image.
Specifically, for a noise pixel capturing sliding window of each scale, taking a center pixel of a current noise pixel capturing sliding window as a reference point to perform parallel sliding in an edge extraction image, judging whether a target pixel exists at a corresponding pixel position on the edge of the current noise pixel capturing sliding window, continuing to move the current noise pixel capturing sliding window in response to the existence of the target pixel, and marking a pixel in the coverage area of the current noise pixel capturing sliding window as a noise point in response to the absence of the target pixel; and capturing a sliding window by utilizing a plurality of noise pixel elements to perform parallel sliding traversal on the edge extraction image, marking all noise points at the position and deleting the noise points to generate an optimized edge extraction image.
After the edge extraction image is generated, due to the influence of vehicles and surrounding vegetation on the road, patch noise having a large area is also present in the edge extraction image, and the patch noise is also extracted from the edge extraction image, so that the patch noise needs to be removed. Therefore, the embodiment of the disclosure firstly defines an "N × N" pixel capture template, performs smoothing in the target image by using the center of the template as a reference point, and then determines whether a "frame" of the template coincides with the "target" in the smoothing process, that is, determines whether the "target" pixel exists in the "frame" pixel of the template. When the 'frame' is overlapped with the 'target', the target is intersected with the road edge or the noise edge, and the template is moved to the next position; if the 'frame' is separated from the 'target', the noise object is contained in the template or no object is in the template, and at the moment, pixels of the coverage area of the template are marked and finally removed uniformly. The road edge has the characteristics of linearity, wide range, strong continuity and the like, so the template can be ensured to be intersected with the road edge when moving to the road edge part, a noise object can be surrounded, the road edge and the noise edge can be distinguished, and the noise can be removed.
Taking a pixel capturing template of '5 × 5' as an example, establishing a 'frame' with the number of pixels being 16, and firstly establishing a blank image I3 with the same size as an image I2 to be denoised; the image I2 is then smoothed using the pixel capture template to determine if there are edge pixels (pixels with a grey value of "255") in the "border" pixels. If the gray value of the pixel of the original image I2 in the template is not the gray value of the pixel of the original image I3, assigning the pixel of the corresponding template in the I3 as 1, and if the gray value of the pixel of the original image I2 in the template is the gray value of the pixel of the original image I3, wherein the gray value of the pixel of the original image I2 is 1 in the copying process; and finally, replacing the gray level of the pixel with the gray value of 1 in I3 with the gray value of background gray value 0, traversing all pixels and completing the denoising of the image.
The road edge extraction method based on the remote sensing image can remove the patch noise with different sizes in the image on the basis of effectively extracting the road edge of the high-resolution remote sensing image, and realizes the extraction and optimization of the road edge.
It is noted that while for simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present disclosure is not limited by the order of acts, as some steps may, in accordance with the present disclosure, occur in other orders and concurrently. Further, those skilled in the art should also appreciate that the embodiments described in this specification are all alternative embodiments and that the acts and modules involved are not necessarily essential to the disclosure.
The above is a description of embodiments of the method, and the embodiments of the apparatus are further described below.
Fig. 2 is a schematic structural diagram of a road edge extraction device based on a remote sensing image according to a second embodiment of the present disclosure. The road edge extraction device based on the remote sensing image of the embodiment comprises:
the remote sensing image acquisition module 201 is configured to acquire a target remote sensing image, preprocess the target remote sensing image, preliminarily segment a road and a background in the target remote sensing image, and generate a segmented image.
The edge extraction image generation module 202 is configured to perform noise rough removal on the segmented image, perform pixel-by-pixel judgment on the segmented image after the noise rough removal, mark a road edge and a background area, extract the road edge, and generate an edge extraction image.
And the edge extraction image optimization module 203 is configured to capture a sliding window according to preset noise pixels with multiple scales, capture and eliminate plaque noise in the edge extraction image, and generate an optimized edge extraction image.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the described module may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
FIG. 3 shows a schematic block diagram of an electronic device 300 that may be used to implement embodiments of the present disclosure. As shown, device 300 includes a Central Processing Unit (CPU)301 that may perform various appropriate actions and processes in accordance with 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 necessary for the operation of the device 300 can also be stored. The CPU 301, ROM 302, and RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Various components in device 300 are connected to I/O interface 305, including: an input unit 306 such as a keyboard, a mouse, or the like; an output unit 307 such as various types of displays, speakers, and the like; a storage unit 308 such as a magnetic disk, optical disk, or the like; and a communication unit 309 such as a network card, modem, wireless communication transceiver, etc. The communication unit 309 allows the device 300 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processing unit 301, which tangibly embodies a machine-readable medium, such as the storage unit 308, performs the various methods and processes described above. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 300 via ROM 302 and/or 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 may be performed. Alternatively, in other embodiments, the CPU 301 may be configured to perform the above-described method in any other suitable manner (e.g., by way of firmware).
The functions described herein above 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: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a load programmable logic device (CPLD), and the like.
Program code for implementing the methods 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, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The 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, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims (10)
1. The road edge extraction method based on the remote sensing image is characterized by comprising the following steps:
acquiring a target remote sensing image, wherein the target remote sensing image is a remote sensing image comprising a road, preprocessing the target remote sensing image, and preliminarily segmenting the road and the background in the target remote sensing image to generate a segmented image;
roughly eliminating noise from the segmented image, judging the segmented image subjected to rough noise elimination pixel by pixel, marking a road edge and a background area, extracting the road edge, and generating an edge extraction image;
and capturing a sliding window according to a preset noise pixel unit comprising a plurality of scales, capturing and eliminating plaque noise in the edge extraction image, and generating an optimized edge extraction image.
2. The road edge extraction method according to claim 1, wherein the preprocessing the target remote sensing image comprises:
carrying out gray processing on the target remote sensing image by adopting a weighted average method, which specifically comprises the following steps:
for a true color target remote sensing image comprising three channels of red, green and blue, weighting is carried out on three wave bands of red, green and blue, and the gray value of the image is calculated by a weighted average method, wherein the calculation formula of the weighted average method is as follows:
g=0.3R+0.59G+0.11B
wherein g is a gray level image gray level value; r is the gray value of the red wave band of the original image; g is the gray value of the green wave band of the original image; b is the gray value of the blue wave band of the original image.
3. The road edge extraction method according to claim 2, wherein the preprocessing the target remote sensing image further comprises:
the gray scale image is subjected to piecewise linear transformation by adopting a gray scale transformation enhancement method, and the formula of a piecewise linear transformation function is as follows:
wherein x is 1 And x 2 Is the range of gray values to be enhanced, y 1 And y 2 The parameters determine the slope of the linear transformation, x is the pixel value of the pixel point of the gray image before transformation, and f (x) is the pixel value of the pixel point of the gray image after transformation.
4. The road edge extraction method according to claim 3, wherein the preprocessing the target remote sensing image further comprises:
and performing binarization threshold segmentation on the gray level image after gray level transformation enhancement, wherein the formula of the binarization threshold segmentation is as follows:
wherein I is a segmentation threshold.
5. The road edge extraction method according to claim 4, wherein the performing noise rough elimination on the segmented image comprises:
and carrying out noise rough elimination on the segmented image by sequentially adopting morphological corrosion and morphological expansion, wherein the morphological corrosion comprises the following steps:
adopting a template of '5 multiplied by 5' as a corrosion primitive, and performing corrosion operation on an image area containing the corrosion primitive by sliding the corrosion primitive in a segmented image, wherein the corrosion operation formula is as follows:
wherein A is a pixel set in the segmentation image, B is a pixel set in the corrosion element, and a is an element in the set A; b is an element in the set B;
the morphological dilation comprises:
adopting a template of '5 multiplied by 5' as a swelling element, and performing a swelling operation on an image area containing the swelling element by sliding the swelling element in a segmented image, wherein the swelling operation formula is as follows:
wherein A is a pixel set in the segmented image, c is a pixel set in the expansion primitive, and a is an element in the set A; c is an element in the set C.
6. The road edge extraction method of claim 5, wherein the step of performing pixel-by-pixel judgment on the segmented image after the noise rough removal and marking the road edge and the background area to extract the road edge and generate the edge extraction image comprises:
to comprise N 2 The method comprises the steps that a central pixel of a square template of each pixel is taken as a datum point, all pixels in a segmented image are sequentially matched, the number P of pixels meeting preset conditions in the square template is counted, when the P is smaller than a preset threshold value, the pixel in the segmented image corresponding to the central pixel of the square template is marked as a captured object, when the P is larger than the preset threshold value, 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 be 255, the pixel value of the non-captured object is set to be 0, and road edge pixels and background pixels in the segmented image are achievedAnd capturing the area pixels, namely overlapping the image which is captured by the pixels with the segmentation image, removing a background area, extracting a road edge and generating an edge extraction image.
7. The road edge extraction method according to claim 6, wherein the capturing a sliding window according to preset noise pixels including multiple scales, capturing and eliminating plaque noise in the edge extraction image, and generating an optimized edge extraction image comprises:
for a noise pixel capturing sliding window of each scale, taking a center pixel of the current noise pixel capturing sliding window as a reference point to perform parallel sliding in an edge extraction image, judging whether a target pixel exists at a corresponding pixel position on the edge of the current noise pixel capturing sliding window, continuing to move the current noise pixel capturing sliding window in response to the existence of the target pixel, and marking a pixel in the coverage area of the current noise pixel capturing sliding window as a noise point in response to the absence of the target pixel;
and capturing a sliding window by utilizing a plurality of noise pixel elements to perform parallel sliding traversal on the edge extraction image, marking all noise points at the position and deleting the noise points to generate an optimized edge extraction image.
8. Road edge extraction element based on remote sensing image, its characterized in that includes:
the remote sensing image acquisition module is used for acquiring a target remote sensing image, preprocessing the target remote sensing image, and preliminarily segmenting the road and the background in the target remote sensing image to generate a segmented image;
the edge extraction image generation module is used for carrying out noise rough elimination on the segmentation image, carrying out pixel-by-pixel judgment on the segmentation image subjected to the noise rough elimination, marking a road edge and a background area, extracting the road edge and generating an edge extraction image;
and the edge extraction image optimization module is used for capturing a sliding window according to preset noise pixel elements comprising a plurality of scales, capturing and eliminating plaque noise in the edge extraction image, and generating an optimized edge extraction image.
9. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the processor, when executing the program, implements the method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210483668.0A CN114862889A (en) | 2022-05-05 | 2022-05-05 | Road edge extraction method and device based on remote sensing image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210483668.0A CN114862889A (en) | 2022-05-05 | 2022-05-05 | Road edge extraction method and device based on remote sensing image |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114862889A true CN114862889A (en) | 2022-08-05 |
Family
ID=82635844
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210483668.0A Pending CN114862889A (en) | 2022-05-05 | 2022-05-05 | Road edge extraction method and device based on remote sensing image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114862889A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117011413A (en) * | 2023-09-28 | 2023-11-07 | 腾讯科技(深圳)有限公司 | Road image reconstruction method, device, computer equipment and storage medium |
-
2022
- 2022-05-05 CN CN202210483668.0A patent/CN114862889A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117011413A (en) * | 2023-09-28 | 2023-11-07 | 腾讯科技(深圳)有限公司 | Road image reconstruction method, device, computer equipment and storage medium |
CN117011413B (en) * | 2023-09-28 | 2024-01-09 | 腾讯科技(深圳)有限公司 | Road image reconstruction method, device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109558806B (en) | Method for detecting high-resolution remote sensing image change | |
CN107045634B (en) | Text positioning method based on maximum stable extremum region and stroke width | |
CN110298802B (en) | Pavement crack detection method and device | |
CN112614062B (en) | Colony counting method, colony counting device and computer storage medium | |
CN111260616A (en) | Insulator crack detection method based on Canny operator two-dimensional threshold segmentation optimization | |
CN109064411B (en) | Illumination compensation-based road surface image shadow removing method | |
CN109697717B (en) | Lining crack identification method based on image automatic search | |
CN111680690A (en) | Character recognition method and device | |
CN111539238B (en) | Two-dimensional code image restoration method and device, computer equipment and storage medium | |
CN113240623B (en) | Pavement disease detection method and device | |
CN112052777B (en) | Method and device for extracting water-crossing bridge based on high-resolution remote sensing image | |
CN113505702A (en) | Pavement disease identification method and system based on double neural network optimization | |
CN113537037A (en) | Pavement disease identification method, system, electronic device and storage medium | |
CN113971669A (en) | Three-dimensional detection system applied to pipeline damage identification | |
CN116128849A (en) | Method, device, equipment and storage medium for detecting underwater cracks of concrete dam | |
CN114862889A (en) | Road edge extraction method and device based on remote sensing image | |
CN111179289B (en) | Image segmentation method suitable for webpage length graph and width graph | |
CN116739943A (en) | Image smoothing method and target contour extraction method | |
CN111695374B (en) | Segmentation method, system, medium and device for zebra stripes in monitoring view angles | |
CN109448010B (en) | Automatic four-side continuous pattern generation method based on content features | |
CN114627463B (en) | Non-contact power distribution data identification method based on machine identification | |
CN110633705A (en) | Low-illumination imaging license plate recognition method and device | |
CN111027441B (en) | Road extraction method based on airborne hyperspectral remote sensing image | |
CN106682627A (en) | Identifying method and device of palm print data | |
CN112052859A (en) | License plate accurate positioning method and device in free scene |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |