WEN Hao-tian,WANG Xiao-peng
(School of Electronics and Information Engineering, Lanzhou Jiaotong University, Lanzhou 730070, China)
Abstract:The use of visible and infrared remote sensing images to calculate the water area is an effective means to grasp the basic situation of water resources, and water segmentation is the premise of statistics.Generally, the edge features of the water in the remote sensing images are complex.When the traditional morphology is used for image segmentation, it is easy to change the image edge and affect the accuracy of image segmentation because the fixed structuring elements are used to perform morphological operations on the image.To segment water in the remote sensing image accurately, a remote sensing image water segmentation method based on adaptive morphological elliptical structuring elements is proposed.Firstly, the eigenvalue and eigenvector of the image are estimated by linear structure tensor, and the elliptical structuring elements are constructed by the eigenvalue and eigenvector.Then adaptive morphological operations are defined, combining the close operation to eliminate the influence of dark detail noise on water without overstretching the water edge, so that the water edge can be maintained more accurately.Finally, on this basis, the water area can be segmented by gray slice.The experimental results show that the proposed method has higher segmentation accuracy and the average segmentation error is less than 1.43%.
Key words:image processing; adaptive morphology; elliptical structuring elements; remote sensing images; water segmentation; gray slice
Statistics on water area through remote sensing image analysis is an effective means to analyze water resources, which can overcome the shortcomings of time-consuming, laboriousness and large error in traditional artificial water resources measurement.At present, scholars have proposed many methods of image segmentation and edge extraction using adaptive morphology[1-3].Adaptive morphology can construct structuring elements adaptively according to the target features in the image, thus overcoming the shortcoming that the edge of the target area is changed by fixed structural elements with some single shapes and sizes in traditional morphology.There are also many scholars who apply mathematical morphology to remote sensing images[4-6].In Ref.[7], a plantation is extracted by performing a threshold on the multi-scale and multi-direction structure index feature map[8], which combines morphological operators to refine the extraction results.Lian et al.proposed an adaptive circular template algorithm for extracting the road information in a high-resolution remote sensing image, which solves the problem that the existing template matching algorithms need to manually set template sizes[9].Mylonas et al.realized the segmentation of agricultural and urban remote sensing images by combining the properties of the genetic sequential image segmentation framework with the principles of the region growing segmentation algorithms[10].Wang et al.proposed a new level set method for coastline detection in high-resolution SAR images based on the generalized Gamma distribution[11-13].In Refs.[14-15], a method of multispectral remote sensing image segmentation based on Markov random field is proposed, which calculated feature vectors for every frequency band, estimated contextual parameters for every band, using local smoothing, and finally merged the feature vectors of the frequency bands to obtain final segmentation.Han et al.proposed a hybrid active contour model based on regional information fusion to improve the river extraction accuracy in remote sensing images, which is suitable for river remote sensing image segmentation with certain contrast[16].A novel water segmentation algorithm combining multi-scale level set method with Otsu algorithm was proposed in Ref.[17], considering both global information and local information of the image, eliminating the influence of farmland and road, and improving the accuracy and efficiency of water body segmentation.
Due to the large specific heat of the water in the infrared remote sensing image, there are obvious characteristics during the day and night.The water heats up less in the daytime, showing dark colors, and cools down more slowly at night, showing bright colors.There is less dark detail noise(building shadows, trees, etc.), which cannot reflect the performance of the proposed algorithm to suppress dark detail noise.Therefore, infrared remote sensing images are not studied in our work.The terrain of remote sensing images is complex and diverse, and the shapes, sizes and directions of the targets in the images are different.Therefore, using fixed structuring elements to perform morphological operations will lead to the change of water information in remote sensing images, including creating new targets, changing the edge position of larger targets, destroying the boundary of transition zone between original targets, losing small targets, and so on.These have an impact on the accuracy of water segmentation.To solve these problems, we first define adaptive morphological dilation and erosion by constructing adaptive elliptical structuring elements, and then combines adaptive morphological close operaton.This close operation enhances and connects the bright detail features of the image, and reduces the interference of dark detail noise in the remote sensing images, without not overstretching the target edge.
In our work, the adaptive morphological close operation is performed on the remote sensing image, and then the gray slice is used to segment the water area.Compared with the traditional segmentation methods, this method can improve the water area segmentation accuracy of remote sensing images.
One of the key steps in the segmentation is to perform adaptive morphological operations on remote sensing images, therefore it is necessary to construct adaptive elliptical structuring elements.
The structure tensorT[18]of any pixel(i,j)in an image is defined as
(1)
whereTx(i,j)andTy(i,j)are gradients inxandydirections, respectively.Since the structure tensor is sensitive to noise, Gaussian blur processing is required to enhance the robustness of structure tensor, called as linear structure tensorST, namely
(2)
whereGσis a Gaussian kernel function with a standard deviation ofσ, and * denotes convolution.
The eigenvaluesλ1andλ2as well as eigenvectorsγ1andγ2of the linear structure tensor are defined as
(3)
(4)
whereλ2≥λ1;γ1represents the gradient direction of the image andγ2is the edge direction of the image.Whenλ2≈λ1≫0, the gray value changes greatly inγ2andγ1directions(image corner); whenλ2≫λ1≈0, the change of gray value inγ2direction is larger than inγ1direction(strong edge of image); whenλ2≈λ1≈0, the gray value changes inγ2andγ1directions are small(image flat area).
The shape of the elliptical structuring elements are between disk and line structuring elements.As shown in Fig.1, the elliptical structuring element of any pixel(i,j)in the image isN[a(i,j),b(i,j),θ(i,j)], wherea(i,j)represents the semi-major axis length of the ellipse,b(i,j)represents the semi-minor axis length of the ellipse, andθ(i,j)is the angle betweena(i,j)andxaxis.And their expressions are
Fig.1 Elliptical structuring elements
(5)
(6)
(7)
whereγ2,x1(i,j)andγ2,x2(i,j)are the components of the eigenvectorγ2(i,j), andMis the largest semi-major axis of the ellipses.Whenλ2≈λ1≫0, the structuring element is an ellipse ofa(i,j)≈b(i,j)≈M/2; whenλ2≫λ1≈0, the structuring element is ellipse ofa(i,j)≈Mandb(i,j)≈0; whenλ2≈λ1≈0, the structuring element is an ellipse ofa(i,j)≈b(i,j)≈M.
In summary, when the structuring element is at the corner of the image, the shape is similar to the disk with the radius ofM/2; when the structuring element is at the edge of the image, the shape is similar to a line with the length ofM; when the structuring element is at the weak edge of the image, the shape is an ellipse, the length values of semi-major and semi-minor axes are calculated by Eqs.(5)and(6), respectively; when the structuring element is in the flat area of the image, the shape is similar to a disk with the radius ofM.
The elliptical structuring elements are used to construct morphological dilation and erosion, and the close operation is to remove the dark details of the remote sensing image and maintain the water edge.
Dilation and erosion are the basic operations of morphology.The elliptical structuring elements of all pixels in the image are calculated by Eqs.(1)-(7).Dilationαand erosionβcan be performed on imagef(i,j)and defined as
(8)
(9)
where ∨ and ∧ are the maximum and the minimum operators, respectively;φ(i,j)represents a pixel point andN[a(i,j),b(i,j),θ(i,j)]is the area in the imagef(i,j)at which the structuring element is located.
Fig.2 shows a visible remote sensing image(512×512 pixels)of a satellite, which is processed by adaptive morphological dilation and erosion.In Fig.2(b), with the increase ofM, the dilation reduces or the dark details such as the water area in the lower corner are deleted.Erosion, on the contrary, reduces or the bright details are deleted.In Fig.2(c), with the increase ofM, the larger water area in the upper right area is reduced or even eliminated.
Fig.2 Dilation and erosion
The adaptive morphological close operationηhas the same definition as the classical morphological close operation.The image undergoes first dilation, then erosion, and finally closing operation.The close operaton of elliptical structuring elements can enhance and connect the bright detail features of the image, reduce the interference of dark details on water without stretching the edge excessively, and maintain the edge of water area.The close operationηis defined as
η(i,j)=β[α(i,j)] (i,j)∈α,β.
(10)
In order to verify the anti-noise performance of the elliptical structuring elements close operation on the dark detail, a visible remote sensing image(512×512 pixels)with more interference of dark details is selected(see Fig.3).In Fig.3, with the increase ofM, the dark details of the image decrease gradually, thus the bushes and shadows of buildings can be seen more clearly.
Fig.3 Close operation comparison of remote sensing images
Since the water pixel value in the remote sensing image is generally low, the dark detail noise has a great influence on the water body segmentation.For this reason, the closing is used to suppress most of the dark detail noise of the remote sensing image and thus the water edge details are preserved.Then, the gray slice is used to segment the water of the remote sensing image.Flow chart is as follows.
Fig.4 Flow chart of remote sensing image water segmentation based on elliptical structuring elements
In order to verify the performance of the proposed method, three visible remote sensing images with 512×512 pixels,I1,I2andI3(see Fig.5(a)), were selected and simulated under Matlab R2017.There is a fluctuation in the pixel value of the target water inI1(radius or length of structuring elements is 5).InI2(radius or length of structuring elements is 3), the edge details of target water are more.I3(radius or length of structuring elements is 5)has multiple target water bodies.
Fig.5(b)uses disk structuring elements to perform morphological close operation.In the first picture, it can be seen that the fluctuation of the pixel value caused by the flow of water leads to the inaccurate segmentation of water.In the second and third images, the fixed structuring elements are used to perform morphological operations on the image to make the water details lost, and the water edges are not accurately segmented.Fig.5(c)uses the direction-adaptive line structuring elements to perform the morphological close operation.It can be seen from the segmentation result that the shape of the line structuring element is too extreme, therefore the water edge in the first and third images is not smooth enough.At the same time, when the morphological close operation is performed on the second picture, dark noise is introduced into the water by the physical feature, which leads to the incorrect segmentation of the segmentation results.Fig.5(d)uses morphological filtering(close operation of disk structuring elements)+ multi-seed region growth.In the first image, the water still can not be segmented accurately after properly increasing the threshold value.The second and third images are similar to Fig.5(b), with water edge details missing.Fig.5(e)is the marker-controlled watershed segmentation.From the segmentation results, it can be seen that the marker-controlled watershed segmentation is vulnerable to noise.For example, in the first image, because of the fluctuation of the pixel value, many noises are mixed in the water body, and the segmentation results are obviously over-segmentation.Although the second image is not over-segmentation, the lower and upper edges of the water body are not segmented accurately.In the third image, the water edge location is not accurate enough.Fig.5(f)is the results using the proposed method in this paper.In the first image, the water area with pixel fluctuation can be regarded as a weak edge, and the elliptical structuring elements enhance the bright details of the coastline and reduce the pixel difference of the water area.The coastline can be regarded as a strong edge, and the semi-major axis lengths of the elliptical structuring elements are much larger than their semi-minor axis lengths(similar to the line structuring elements), maintaining the edge of the water.The inner part of the water can be regarded as a flat area, and the semi-major axis lengths of the elliptical structuring elements are approximately equal to their semi-minor axis lengths(similar to the disk structuring elements), eliminating the noise of pixel fluctuation inside the water body.In the second and third images, similar to the first image, the close operation suppresses the dark operation detail noise in the water area, and maintains the water edge.In summary, the method in this paper can segment the remote sensing water more accurately, and the error is lower.
Fig.5 Water segmentation simulation experiment
In order to analyze the segmentation performance of the proposed method, the number of water area pixels is counted.The image segmentation errorEis defined as
(11)
whereSis the number of pixels in the segmentation result image, andS0is the number of pixels in the manual segmentation image.
Table 1 shows the image segmentation errors of the imagesI1,I2andI3.Compared with other methods, the average segmentation error of this method is less than 1.43%.
Table 1 Comparison of segmentation errors
Table 1 shows that the marker-controlled watershed segmentation is over-segmention due to pixel fluctuations of imageI1, and the error is the largest.The morphological filtering + multi-seed region growth does not accurately segment the water area.In the disk structuring elements method, the close operation is first performed on the remote sensing image, and then the water area is segmented by the gray slice, the error being smaller than that of the morphological filtering+multi-seed region growth.Although the shape of the direction-adaptive line structuring element is too extreme, the direction is adaptively changed with the edge of the water.The segmentation accuracy is higher than that of the disk structuring elements method.The proposed method suppresses the dark detail noise of the remote sensing image, enhances and connects the bright details with minimal error.The details of water edge inI2are complex.In marker-controlled watershed segmentation, the upper and lower edges of water are missegmented, and the error is the largest.The disk structuring elements method and the morphological filtering+multi-seed region growth eliminate the lower edge of water area when the close operation is performed on the water body, and the errors are not much different.Dark detail noise is introduced into the water body due to the physical characteristics of the direction-adaptive line structuring elements, resulting in mis-segmentation of the upper left corner in the image.The elliptical structuring elements can change their size and shape adaptively with the edge of the water, which can completely segment the water area with the least error.There are multiple water targets inI3.The marker-controlled watershed segmentation is not accurate enough to locate the edge of water edge, and the error is the maximum.There is little difference between the disk structuring elements and the morphological filtering + multi-seed region growing.From the segmentation result of the direction-adaptive line structuring elements, it can be seen that the water edge is not smooth enough.The elliptical structuring elements method can segment the water body more completely and has the least error.
In order to segment water in remote sensing image accurately and efficiently, a remote sensing image water segmentation method based on adaptive morphology elliptical structuring elements is proposed.Firstly, adaptive elliptical structuring elements are constructed by linear structure tensor.Its shape is between the disk and the line, and it can change size and shape adaptively with the characteristics of the water edge.Then the dilation and erosion are defined, and the adaptive morphological close operation is combined to enhance the bright details of remote sensing images, suppresses the dark details and maintains the position of the water edge.Finally, the gray slice is used to segment the water area.The experimental results show that the proposed method has high universality and can segment the water area in remote sensing images more accurately.
Journal of Measurement Science and Instrumentation2020年3期