APP下载

Edge detection method for remote sensing image based on morphological variable structuring element

2018-07-10YAOLijuanWANGXiaopengWANGWeiMAWengang

YAO Li-juan, WANG Xiao-peng, WANG Wei, MA Wen-gang

(School of Electronic and Information Engineering, Lanzhou Jiaotong University, Lanzhou 730070, China)

Abstract: There are problems such as incomplete edges and poor noise suppression when a single fixed morphological structuring element is used to detect the edges in remote sensing images. For this reason, a morphological edge detection method for remote sensing image based on variable structuring element is proposed. Firstly, the structuring elements with different scales and multiple directions are constructed according to the diversity of remote sensing imagery targets. In order to suppress the noise of the target background and highlight the edge of the image target in the remote sensing image by adaptive Top-hat and Bottom-hat transform, the corresponding adaptive morphological operations are constructed based on variable structuring elements; Secondly, adaptive morphological edge detection is used to obtain multiple images with different scales and directional edge features; Finally, the image edges are obtained by weighted summation of each direction edge, and then the least square is used to fit the edges for accurate location of the edge contour of the target. The experimental results show that the proposed method not only can detect the complete edge of remote sensing image, but also has high edge detection accuracy and superior anti-noise performance. Compared with classical edge detection and the morphological edge detection with a fixed single structuring element, the proposed method performs better in edge detection effect, and the accuracy of detection can reach 95%.

Key words: edge detection; remote sensing image; variable structuring element; least squares method

0 Introduction

With the implementation of the major project of the high resolution earth observation system, high resolution data have been widely applied in many aspects, such as exploitation of mineral resources, urban refined management, dynamic change monitoring and remote sensing database construction[1]. Edge detection is one of the key steps in the process of intelligent recognition and analysis of remote sensing image. In addition, the accuracy of edge detection is directly related to the subsequent analysis and recognition of the image. However, there exist some phenomena of noise, low contrast, incomplete edge in remote sensing images due to distortion, atmospheric scattering and other reasons, which may lead to lower edge detection precision. Various detection methods[2-12]concerning the remote sensing image edge detection have been proposed, Ye X et al.[8]proposed a relief tent detection from high resolution remote sensing image based on mathematical morphology and multi-angle template matching, which used morphological operations to extract the edge of the target image, and then recognized the relief tent by multi-angle template matching method. It is detrimental to the ability of noise reduction; Wang K et al.[9]proposed the spectral similarity and phase consistency model to obtain the edge response intensity, which can segment high resolution remote sensing image through automatic labeling watershed transform method. It effectively suppresses the false edge and noise information during the detection; Li H et al.[10]conducted the multi-scale edge detection of multi-spectral remote sensing images based on vector field model, in which two gradient direction quantization neighborhood models are used to obtain multi-scale edge information; Xiong Y et al.[11]proposed a remote sensing image edge detection algorithm based on wavelet and mathematical morphology, where wavelet transform is used to extract the edge information of high frequency band and low frequency band, and then a clearer image edge is obtained through morphological image edge enhancement; Yue A Z et al.[12]adopted the multi-scale structuring elements to remove noise, and then used watershed segmentation method with label control for remote sensing image segmentation. These methods can accurately detect the edge of the remote sensing image target, but the selection of the structuring elements is relatively fixed. Besides, improper selection is easy to cause error detection.

For the purpose of extracting the more complete target contour of remote sensing image and improving the ability of anti-noise, this paper presents an edge detection method for remote sensing image based on variable structuring elements. The proposed method is based on the difference of the shape and size of the structuring elements. Firstly, the remote sensing image is preprocessed by using the mathematical morphology; Secondly, the preprocessed image is deteced through the morphological edge detection operator, which is based on adaptive structuring element. The edge image is fitted with gray level according to the least square fitting principle; finally, the edge of target is extracted accurately.

1 Method implementation

The flow chart of the method is shown in Fig.1.

Firstly, the remote sensing image is preprocessed to suppress the noise of the target background and highlight the target edge of the specific target by adaptive Top-hat and Bottom-hat transform morphological filtering methods, which are based on the constructed 5×5 multi-structure elements. Secondly, adaptive morphological edge detection is carried out on the preprocessed image, which is based on the cross operations of the 3×3 and 5×5 multi-structure elements. The edge image is obtained by weighted summation of the detected multiple images, and then the least square fitting method is used to fit the gray level change of the edge image, thus the edge image is detected.

2 Construction of adaptive morphological edge detection operators

2.1 Construction of adaptive structuring element

The target structure of remote sensing image, which has multi-scale characteristics and also contains a lot of noise, is complex[13]. If a single structuring element is used for edge detection, the complex edge information of each shape can not be accurately detected. Meanwhile, the anti-noise performance is also limited to a certain extent. In addition, the structuring elements with different scales can detect edge information with different accuracies. Compared with small scale structuring elements, large scale structuring elements have a strong ability to suppress noise, but it is easy for them to ignore the details of the edges. To the contrary, small scale structuring elements can capture the full details of the edges, but they have weaker noise suppression capability[14]. Therefore, the cross operations of multiple structuring elementsb1andb2are selected in this paper, which can detect the edges with different accuracies and ensure the extracted edge information is complete and the speed is the fastest.

Hereb1is the 3×3 structuring element as

andb2is the 5×5 structuring element as

To construct the structuring elements with different directions, the structuring elementb2is decomposed intob2i(i=1,2,…,8), which comprises the structuring elements of eight orientations with an angular interval of 22.5°. These structuring elements effectively maintain the details in all directions of the image when edge detection is performed, so that the structuring elements cover all lines in the image[15].

2.2 Selection of edge detection operators

Morphological edge extraction is based on the basic operation properties of morphology. The edge of the image is obtained by making a difference between the original image and the image after a simple morphological transformation of the original image, in which the selection of structuring elements is the key to morphological edge detection. Assuming thatfis the original image,bi(i=1,2) is a structuring element, ⊕ expresses the expansion operation, Θ expresses the corrosion operation, the open and close operation can be expressed by

f∘bi=(fΘbi)⊕bi,

(1)

f·bi=(f⊕bi)bi.

(2)

In mathematical morphology, the common edge detection operators are

g1=f⊕bi-f,

(3)

g2=f-fΘbi,

(4)

g3=f⊕bi-fΘbi,

(5)

g4=f-f∘bi,

(6)

g5=f·bi-f,

(7)

g6=f·bi-f∘bi.

(8)

The above operators have been improved to enhance the anti-noise filtering performance of edge detection[16-17], with the following improvements as

g7=f(f·bi)∘bi-(f·bi) Θbi,

(9)

g8=(f∘bi)⊕bi-(f∘bi)∘bi,

(10)

g9=(f·bi)⊕bi-f(f∘bi) Θbi.

(11)

If the structuring element with a signle scale and fixed structure is adopted, the detection effects of the above methods are not ideal. Therefore, it is necessary to design an edge detection algorithm for multi-scale and omnidirectional structuring elements. In the simulation experiment, there are edge position deviation and edge blurring through Eqs.(9) and (10), but by Eq.(11) clear edge images can be obtained and noise can be removed. Thus the structuring elementsb1andb2iare used to construct a new morphological edge detection operator as

Gi=(f·b1)⊕b2i-(f∘bi) Θb2i.

(12)

3 Remote sensing image edge detection

3.1 Image preprocessing

Remote sensing images are influenced by factors such as environment and acquisition device in the process of acquisition, thus the obtained remote sensing image contains complex background information and noise, which results in low accuracy of edge detection. Morphological filtering is used to achieve target recognition by extracting the corresponding morphology of the image[18], which effectively preserves the useful contour edge and weakens the complex background information, thus making the image clearer. In this paper, adaptive morphological arithmetic is used for preprocessing the remote sensing image to remove the interference of the noise and complex background information. The process is as follows.

The adaptive morphological Top-hat and Bottom-hat transforms are defined respectively as

Th,i=f-(f∘b2i),

(13)

Bh,i=(f·b2i)-f,

(14)

where ∘ and · denote the morphological open and close operations, respectively. The open operation can remove the bright details, smaller than the structuring element; and the close operation can remove the dark details, smaller than the structuring element. The Top-hat transform has the function of high-pass filtering, which can enhance the edge information of the image. The Bottom-hat transform can extract the dark details of the image while suppressing the background. The Top-hat transform plus the result of the original image and then minus the Bottom-hat transform, which can further stretch the image grayscale and highlight specific targets and fine objects, which has an image enhancement effect[19]. If a single structuring element is used for morphological filtering, it will be difficult to adapt to the shape and size of the target in the image, which will cause some problems such as location offset of the partial target edge, loss of the small target in the resulting image, etc. Besides, the ability of noise suppression is also limited. Accordingly, this paper uses the multi-structure elementb2iof the above design.

The target areaFi(i=1,2,…,8) in the corresponding direction of the structuring elementb2iis defined as

Fi=f+Th,i-Bh,i.

(15)

The obtained target results for all the different azimuth grayscale distributions are combined together, that is

(16)

The complex background information of remote sensing images is weakened and noise is eliminated after morphological filtering, while preserving the integrity of the regional contours.

Fig.2 shows the results of the preprocessing of the remote sensing images.

Fig.2 Image preprocessing

From Fig.2(b), it can be seen that after the preprocessing, the internal noise of the building is smoothed and the building region is protruded. However, there are adhesions between buildings, vegetation and roads. Therefore, it is necessary to further detect the building edge through morphological edge detection method for more complete detection.

3.2 Morphological edge detection with adaptive structuring element

The adaptive structuring elementsb1andb2iare used to detect the edge of the preprocessed remote sensing image. The specific process is as follows: The edgeGi(i=1,2,…,8) is obtained by using the adaptive morphological edge detection operator as

Gi=(F·b1)⊕b2i-(F∘b1) Θb2i.

(17)

An improved edge detection operator in Eq.(17) is used to obtain the edge detection images based on 9 structuring elements. To obtain the edge with better details and smoothness, the results of the edge detection of the structuring element in each direction can be weighted summation to get a preliminary synthetic edge imageG(F) as

(18)

Although the edge image is obtained by the adaptive morphological edge detection algorithm, the obtained edge information not only is coarse, but also contains other regional information. For further eliminating the interference in other regions and accurately locating the edge position of the target, The least square method is used to make local fitting for the gray level data of the target edge of the image to obtain extreme value of grayscale data[20-21], which seeks the best function match of the data by minimizing the sum of the squares of the errors and improves the overall fitting accuracy, so that the detected edges are more complete.

Fig.3 Least square curve fitting model

Assuming that the grayscale value of image edge point isyiandΦ(xi) is an approximation function of

yi. The fitting curve of the least square method is shown in Fig.3, and the equation is expressed by

(19)

The best fitting of the least squares method is expressed expressed by

(20)

For the purpose of obtaining the minimum value ofE, it is necessary to find the values of three parametersa0,a1anda2to minimizeE. Therefore,Ecan also be set by

(21)

The partial derivatives of thea0,a1anda2are obtained by Eq.(21) and then the three partial derivatives are equal to zero, namely

(222)

Eq.(22) is expressed in the matrix form as

(23)

The values ofa0,a1anda2are calculated based on the related properties of non-homogeneous equations. These values are substituted into Eq.(19) to obtain the least square fitting curve, so as to locate the target edge.

4 Experimental results and analysis

Two remote sensing images aere selected to verify the performance of the proposed method, and then converted to grayscale images. The verification analyswas is carried out by using Matlab R2016 on a computer with CPU of 2.5 GHz and memory of 4 GB. The edge of the image was detected by Prewitt algorithm, Canny algorithm, single structuring element method and proposed method, respectively.

4.1 Noiseless image results and analysis

Fig.4 shows the noiseless image experiment results obtained by detecting the edge of the image in Fig.2.

Fig.4 Noiseless image experimental results

Fig.4(a) shows the result of Prewitt operator. The extracted building has certain noise and the building image can not be detected accurately. Fig.4(b) shows the result of Canny operator. Although the edge of the building is detected, it is stuck with vegetation and road. Furthermore, the detected building has false edges. Fig.4(c) shows the result of a single structuring element method. The building edge is very rough and there is a loss in the details of the edge of the building. At the same time, non-buildings such as vegetation and garden are also detected together. Compared with Fig.4(c), Fig.4(d) is the result of the superposition of the proposed method and Fig.2(a), which effectively segregates the region of the building, and the detected edges are more accurate and clearer.

4.2 Noise image results and analysis

To further compare the anti-noise performance of the four kinds of edge detections, salt and pepper noise withσ=0.01 is added to the second image for processing.

Fig.5 shows the experimental result of salt and pepper noise withσ=0.01. The image with 685×345 pixels is a gray scale image with salt and pepper noise ofσ=0.01. In this noisy environment, Fig.5(b) shows Prewitt operator detection result, in which the edge of the building can not be detected effectively. Fig.5(c) shows the result of Canny operator detection. Although the edges of buildings are detected, the building region can not be divided well when there is noise disturbance. In addition, there are many double edges in the detected image. Fig.5(d) shows the detection result a single structuring element. Compared with the using two methods, the detection effect is better. However, the edge of the building is rather fuzzy and the noise suppression ability is poor. In contrast, Fig.5(e) is the result of the superposition of the proposed method and original image. It can be seen that the extracted edge contour is effective and clear.

4.3 Performance comparison and analysis

In order to quantitatively analyze the accuracy of edge detection, the mean square error (MSE), peak signal-to noise ratio (PSNR) and method runtime are used to measure the performance of edge detection.

The MSE and PSNR are defined respectively as

(24)

(25)

whereM×Nis the image size,I(i,j) is the original image without noise,G(i,j) is the processed image through edge detection algorithm andnis the number of bits in per pixel, generally 8. The unit ofδPSNRis dB. The larger theδPSNR, the smaller theδMSE. It indicates that the less the loss of edge details using the edge detection method, the better the noise smoothing effect.

Tables 1 and 2 show the comparison of performance indicators of several different edge detection methods, respectively. In Table 1, it is obvious that compared with other methods, the proposed method has a significantly higherδPSNR, lowerδMSEand little increase of computation time, and can effectively detect the edge images of the buildings under noisy environments. The detection accuracy reaches 95%. A total of 50 tests were tested and the accuracy of the test was obtained by using the number of successful times of each method, as listed in Table 2.

Table 1 Denoising performance comparison of different edge detection methods in Fig.5

Table 2 Performance comparison of different edge detection methods

5 Conclusion

A morphology edge detection method for remote sensing image based on adaptive structuring element is proposed. Firstly, adaptive structuring element is constructed according to the diversity of remote sensing imagery targets. The adaptive morphology operation is used to filter out the target internal details and noise and highlight the edge of the target image. Secondly, the edge of remote sensing image is detected by adaptive morphological edge detection operator. Finally, the target edge region is accurately located by means of the least square fitting method. Compared with Prewitt, Canny and a single structuring element methods, the proposed method effectively filters out noises and detects a complete target edge contour. The precision of edge detection can reach 95%. Moreover, the edge contour of the building is maintained in the process of detection, so as to ensure the accuracy of the target classification in the subsequent remote sensing image processing.