A New 2 D Otsu for Water Extraction from SAR Image

SAR image segmentation is a crucial step that heavily influences the performance of image interpretation. The texture factor to replace the neighborhood mean dimension in the traditional Otsu method is proposed in this work, aiming at the problem that the SAR image has unique characteristics and the original 2D Otsu method only considers the pixel neighborhood mean information. In this paper, TerraSAR image with the single band and single polarization is used to water extraction. Firstly, the semantic function is used to analyze the structural characteristics of the sample image to determine the optimal parameters of the texture information extraction. Then, calculate the textural measures such as contrast, entropy, homogeneity, mean and second moment based on gray level co-occurrence matrix(GLCM) method. The results are compared with the artificially marked images and the results of the original 2D Otsu.The experimental results achieve higher objective values, which shows the proposed algorithm using texture factor has a high practical value for SAR Image water segmentation.


INTRODUCTION
With the rapid development of remote sensing technology, it is of great significance to recognize water rapidly and accurately in the field of flood disaster management, environmental monitoring, transportation and urban planning .
At present, water segmentation methods for SAR image have been relatively abundant, including threshold segmentation, which is more general, fast and easy to implementation.1D Otsu threshold segmentation algorithm only considers the gray information of source image, but for the image which is greatly influenced by the noise, the gray information can not show structure and detail information completely.Therefore, J.Z. Liu took advantage of neighborhood spatial information and extended one dimension algorithm to two-dimensional space.The algorithm not only ensures accuracy and speed of the remote sensing image segmentation, but also resists some noise.However, if the 2D Otsu method is applied directly to SAR image segmentation, the segmentation results will be not satisfactory due to the multiplicative noise in SAR image and the pixel neighborhood mean information in the original 2D Otsu.
Compared with the optical image, SAR image has rich texture information which can distinguish some targets by the perception and description of the area and surface.As a powerful edge detection means, it can also improve the classification accuracy.Therefor, this paper propose a new 2D Otsu method, which redefines the gray scale as one dimension and the texture feature as the other dimension, respectively, directly introducing the texture factors.This method uses the advantages of the 2D Otsu and the texture information, and enables real time and accurate water extraction.

TRADITIONAL 2D OTSU
Let the pixels of a given image be represented in L gray levels, the local average gray level is also divided into the same L values.Let fij be the total number of frequency of the pair (i, j) which represents the gray value and its average value, then the joint probability mass function pij is given by

Where
N= the total pixels of the image The between-class variance matrix is defined as Where ω0 , ω1 = the probabilities of class occurrence μ0 , μ1= the corresponding class mean levels The threshold vector (s,t) is selected by maximizing: Although the traditional 2D Otsu takes into account the influence of noise, occurrence-based texture factor is not enough comprehensive for SAR image, and produces more mistakes.Therefore, this paper takes full account of the spatial characteristics, and introduce co-occurrence-based texture factors in order to improve the segmentation accuracy.

GLCM
The texture of the image shows the common intrinsic property of the surface of objects, and includes important information about the organization of objects and its connection to the surrounding environment.The gray level co-occurrence matrix is a generally used method to describe the texture by studying the spatial correlation of gray scale.It is a relative frequency matrix that the pixel i corresponds to the occurrence frequency of the pixel j in the processing window at a specific distance d and the direction θ.It follows: Where d = (dr, dc) dr, dc= the row and the column direction displacement x, y= coordinate of the pixel i, j= gray level θ= 0 °, 45 °, 90 °, 135 °, the direction of the statistical pixels.

Structre values
Haralick et al. defined 14 texture features according to the gray level co-occurrence matrices.In this paper, Contrast, Entropy, Homogeneity, Mean and Second Moment are used.Here follow the calculations: This feature reflects the clarity of the image and the degree of the texture depth.The deeper the texture is, the bigger the contrast is, with a clear visual effect.

2) Entropy
This feature reflects the complexity of the texture in the image.The more uniform the image is, the smaller the entropy is, while the more complex the texture of the image is, the greater the entropy is.What's more, the entropy can also measure the randomness of the texture of the image, there is, the greater entropy indicating larger noise in the image.

3) Homogeneity
This feature reflects the homogeneity of the image, measuring the changes in the local image.Large value indicates that the texture of the local image is very uniform.
This feature measures the overall gray of the image.
This feature shows the uniformity of the gray distribution and the thickness of the texture in the image.The bigger value indicates the more uniform texture.
All of the texture values are calculated from the co-occurrence matrix.The matrix is a function of both the angular relationship and distance between neighboring pixels.It shows the number of occurrences of the relationship between a pixel and its specified neighbor.The co-occurrence matrix statistics are better for SAR image than the occurrence matrix.

Semi-variogram
The GLCM is affected by the direction θ, the step δ, and the window size w, indirectly affecting the texture factor values.
Since the semi-variogram can reflect the randomness and structure of the image, and the objects also exhibits good spatial correlation and texture features, the above parameters can be calculated by the semi-variogram γ.
Where δ = the distance n = the sample image size Z(i, j) = the gray value of the pixel (i, j) M= the number of calculated data pairs, determined by direction and steps.

A NEW 2D OTSU
An image with size M × N can be represented by a 2D level is the gray level, ranging from 0 to L-1.In a new 2D thresholding method, the gray level of a pixel and its textural factor are both used.The textural gray level is also divided into the same L values, let   y x g , be the function of the textural gray level.Let fij be the total number frequency of the pair (i, j) which and ,then the joint probability mass function pij is given by The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLII-2/W7, 2017 ISPRS Geospatial Week 2017, 18-22 September 2017, Wuhan, China Now suppose that the pixels are partitioned into two classes C0 and C1(background and objects) by a threshold pair (s, t), then the probability of class occurrence are given by and the corresponding class mean levels are The total mean level vector of the 2D histogram is In most cases, the probability of diagonals away from the histogram is negligible, so it can be reasonably assumed that the two regions pij = 0, it is easy to prove that the following relationship holds: Define a variance matrix: A threshold vector(s,t) is selected when the matrix is the maximum value:  From the Figure 2, the water targets are slightly affected by the obvious road in the left of the SAR image.Compared with the traditional 2D Otsu method, the proposed method well erases the road using using entropy, homogeneity and mean texture factors.That shows the new method can well optimize the commission.
An accuracy evaluation for the traditional 2D Otsu and the proposed method according to the artificially marked image is shown in Table 1.As reflected in Table 1, the commission of the water is declined, but the magnitude for the different texture factors is different.
Compared with the traditional 2D Otsu method, after using the homogeneity factor, the OA of data set D3 is increased by 3.05%, and the commission is declined by 7.75%.That is, the proposed method shows the best improvement.This shows that the proposed method is more effective for areas with texture features.

CONCLUSION
This paper deduces a new 2D Otsu method for water extraction from SAR image, which calculates the texture factors such as contrast, entropy, homogeneity, mean and second moment based on gray level co-occurrence matrix(GLCM) method and introduces them into the traditional 2D Otsu, optimizing the denoising capability of the original 2D Otsu .The results show the the better effect than the traditional 2D Otsu, which provides support for the further extraction of water bodies and show a new basic step for disaster emergency monitoring.
This experiment selected the TerraSAR image of a region of Hebei Province on July 26, 2016, with HH polarization and the resolution of 16m.The samples of the water samples were randomly selected in the image, and then the distribution of the semi-variogram in the different directions (θ = 0 °, 45 °, 90 °, 135 °) is shown in Figure 1.

Figure 1 .Figure 2 .
Figure 1.Semi-variogram of water sample in different directions From the figure, we can see that not only the water body has structure, but the structure in different directions is inconsistent.The sill value of γ1 and γ2 is higher than γ3 and γ4, and the range of γ 3 and γ 4 are basically consistent, relatively smooth at 9 pixels, indicating that the sample reach the most significant space dependency within the window.Thus, the window size of the texture information extraction is selected as 9 × 9, δ = 1, θ = 135 °, and the five texture measures are extracted.In order to verify the validity and practicability of the proposed new 2D Otsu method, the following three tests are designed: A. Artificially marked image B. Segmentation based on traditional 2D Otsu algorithm C. The proposed method The results are shown in Figure 2.

Table 1 .
Comparison of the results of the two Otsu method