Spatial search and a three level model based water layer extraction from C-band SAR image

ABSTRACT This paper describes a spatial search and a three-level model-based approach for automatic extraction of surface water layers from Sentinel-1 C-band SAR images at 10 m spatial resolution. The technique incorporates a connected component spatial search for segmenting low backscatter regions and uses the segmented image object for characterizing the segments. The water body is described here as a collection of different spatially connected segments. A three-level model is used to describe the connected segments of a water body in SAR data. Noise tolerance is achieved in this method by incorporating a speckle noise level into the model. The segmentation process further calculates contextual information which includes shadow estimated from DEM, polarization angle of the segment, and a boundary co-occurrence in both polarization to qualify the detected segments as a water body. The proposed method is found to have an accuracy of 94% in terms of f1 score. The algorithm, estimation of different parameters, and the results obtained in selected regions are explained in this paper.


Introduction
Information regarding surface water is a very significant parameter in resource planning. Estimation, monitoring, and conservation of water bodies are essential for human development. Water bodies are more dynamic and experience large wastage as surface run-off during rainy season often affecting transport lines and community hygiene. Information regarding spatially and temporally dynamic water bodies is essential for water resource management, planning and hydrology studies.
Clouds often make the observation from space using optical sensors obscure mainly during the rainy season. Since SAR is an active mode of remote sensing and is least affected by cloud and illumination, water body estimation from SAR data is essential for hydrology studies. To find sporadic water bodies, the algorithm must be constrained to detect all significant water bodies independent of its past occurrences.
Delineation of sea ice and open water from dual pol SAR images using decision tree is described in (Geldsetzer and Yackel 2009). The different thresholds for the decision tree are estimated statistically from the Horizontal and Vertical polarized data and their ratio. Methods using Active contours used to delineate water bodies from land are described in Heleno 2008, 2009). Region-based methods require an initial region to be defined manually over the area of interest which makes automatic detection of water bodies difficult. Monitoring of surface water with Neural Network is described in (Pham-Duc, Prigent, and Aires 2017). Most of the feature extraction algorithms for SAR data employ a de-speckling filter which reduces the effect of speckle noise on the image preserving essential features (Lee et al. 2009;Lee 1983;Wang and Li 2015). The performance of widely used de-speckling filters is analysed in (Anand, Marappan, and Sethumadhavan 2018;Sun et al. 2016). In the proposed methodology. The requirement of a speckle filter is avoided by incorporating speckle as part of the SAR water model.
Object Based Image Analysis (OBIA) brought in a paradigm shift from pixel to segment-based image processing (Blaschke 2010). It is extensively used in many remote sensing applications, mostly in multispectral, hyper spectral and thermal remote sensing (Bechtel, Ringeler, and Bohner 2008). Region Growing algorithms are widely used for image segmentation. These methods segment images based on a similarity condition to properly find the boundary between two segments. These algorithms are tailored to work under varying lighting conditions, which is common in optical images.
Unlike optical sensors, a SAR sensor always looks at the scene in the off-nadir direction. This imaging geometry results in geometric and radiometric distortions CONTACT C. Bipin vu3bpn@gmail.com National Remote Sensing Centre, Indian Space Research Organisation, Hyderabad, India.
like foreshortening, layover, shadow etc caused by the topographical variations in a scene. SAR being an active mode of remote sensing, the sensitivity of the image formed varies across the scene due to the gain variation of the antenna system (Loew and Mauser 2007). Radar backscatter from the target is a function of its dielectric constant, orientation (incidence angle), shape and distribution. For a distributed target like the surface of the earth, it is the coherent summation of backscatter from each target added with noise. For a target like water body, the backscattered power can be considered as the sum of noise and low backscatter due to specular reflection over the calm area and coherent summation of scattering from waves on the surface of the water. Speckle noise is characteristic of SAR data due to the limited bandwidth and coherent imaging technique. Speckle by its nature is random and uniformly distributed in space. A detailed study of speckle and its properties was carried out using laser speckle (Goodman 1975). Speckle noise is found to be dependent on system parameters like aperture size, shape and bandwidth of the electromagnetic wave (Zhang and Zhensen 2010). In SBIA the speckle power is estimated from its spatial characteristics and used to refine the three-level water body model parameters. The effect of speckle is reduced by detecting it and merging it with the segmented water layer. The speckle is detected in the water region by defining a speckle level and initiating an area limited search on connected speckle level (section 2.3). This avoids the need for filtering the data with de-speckling filters, and its spatial spread is used to effectively coalesce the fragmented segments.
Radar being an active mode of imaging, data are having minimal effect on extraneous factors like sun illumination and atmospheric conditions. This property of SAR images allows us to reliably explore the data with fixed or predictable thresholds. In this paper, we propose a new approach where the segmentation algorithm is aware of speckle and is part of the water body model. The algorithm is inspired by region growing technique, where the segmented region grows from a seed point adding connected neighbours to the segments. Instead of a dynamically estimated similarity condition, the membership functions are based on pre-estimated intensity levels.
At microwave frequencies, the backscattered power from a target is characteristic of its surface roughness and the dielectric constant. Due to high dielectric constant, low surface roughness, and imaging geometry, water bodies appear as dark (low backscatter) regions in C-band SAR images. The proposed SBIA uses a multilevel search along with a three-level model for the water body to segment neighbour connected low backscatter region, taking into account the radiometric and spatial spread of speckle. The method avoids the use of any spatial or temporal filtering and it uses the speckle noise to estimate water model parameters. It uses a combined OBIA and an expert system for better noise immunity and class separability. SBIA detects all possible candidates for a water body and eliminates those segments which do not qualify for water body inferred from observations of the segmented pixels and its context.
An expert system-based mapping and study of longterm changes in surface water at a global scale for 35 years at 30 m resolution from Landsat satellite images is explained in (Pekel et al. 2016). The system provides various parameters for the long-term dynamics of water bodies. SBIA is validated against the Global water layer for comparable water bodies. Segmentation accuracy is estimated using manually digitized water body from optical satellite imagery.
This paper is organized as follows. SBIA algorithm, the three-level model for a water body, and parameter estimation for the proposed method is described in section 2. Details about the data used are explained in 3. Details about the implementation of Sentinel-1 data are explained in section 4. The results and validation of the algorithm are discussed in section 5.

Search-based image analysis
A search is an iterative algorithm to collect all points which are connected by a neighbour (Section 2.1). The search is supplemented with a boolean membership function with which it collects all connected pixels satisfying the boolean membership condition. Due to speckle noise and other disturbances in water bodies, it is practically difficult to reliably segment the entire water body region with a single search. The water body is split into different connected segments with a three-level model as described in section 2.3. The different considerations and analysis used in estimating constraints for the three levels are described in section 2.4 A multilevel search iteratively collects results from spatially connected searches using different membership conditions. The segments collected using multilevel search are combined based on conditions described in section 2.5.

Search by levels
A search starts from a seed point and propagates to its neighbours recursively with a Boolean membership function M li ðxÞ on a radiometric interval l i . The search algorithm produces two lists of pixels. One list that satisfies M li ðxÞ and which don't satisfy in the neighbour connected region as result list and neighbour list respectively. For a scene S, with starting point p 0 and radiometric interval l i the search algorithm can be expressed in a pseudo-code as follows.
procedure SEARCH(S;

Searching with multiple levels
A search with single interval l i will give connected region satisfying the membership condition M li ðxÞ. Noise makes the whole region fragmented making it impossible for a single search to cover the whole region. In order to address this, the search is extended to more levels as explained in section 2.3. The segments at each level are merged as explained in section 2.5. The search is conducted on a contiguous set of disjoined intervals L (equation 1). The interval boundaries are represented by a level boundary list L (equation 2). The boolean membership condition for a given radiometric value x is given by a relational operation as in equation 3. The interval boundary index can be estimated as in equation 4.
L ¼ f½0; l 0 Þ; ½l 0 ; l 1 Þ; ½l 1 ; l 2 Þ::½l nÀ 1 ; l n Þg (1) Where LðxÞ in the level index of a scalar backscatter value x. The neighbours of point p x;y at coordinate ðx; yÞ in a scene S is given by Where L 1 is the Chebyshev distance or maximum metric (Cantrell 2000) given as the greatest of difference along any coordinate dimension (Abello, Pardalos, and Resende 2013) Children for a single iteration in search are given by equation 7 and the excluded neighbour list is given by equation 8.
A recursive Neighbourhood search with M li as the search criteria at p 1 collect all points which have neighbourhood connectivity and support for the parent level. A search gives two lists, a segmented region belonging to the current level and a list of adjacent points which do not belong to the current level but are connected to the current segment (neighbours). The algorithm for multiple-level search can be described as Work list fp 0 g Initialize Work list with seed point 3.
Result list ϕ Initialize result with empty list 4.
return Result list 11. end procedure M-Search gives result and neighbour lists corresponding to each connected segment found in the region.

Three level model for water in SAR images
To describe the water body in the search paradigm and to estimate different parameters for the search algorithm, a model for a water body in SAR data is devised. A water body in SAR image can be represented spatially by the model as shown in Figure 1. The model consists of segments belonging to three levels which can be delineated using level-based search. The levels and their significance are described as follows.
• Level 1 a low backscatter region which is radiometrically disjointed with background. This level acts as the seed point for initiating the search.
• Level 2 low backscatter regions which have radiometric overlap and spatially disjointed with background. This level is expected to cover the major part of the water body.
• Level 3 (speckle) High backscatter speckle level with numerous and spatially small segments. This level is essential to connect the fragmented level 2 segments.

Level design
The levels were designed by studying the nature and spread of the search over known regions at different incident angles. For this study, various AOIs were manually drawn around different water bodies. The distribution of the AOIs in the image is shown in figs 4b and 4a. Figures 2a, 2b, and 2a show three AOIs among 27 water bodies chosen for the study.

Level 1 seed point level
Since the search algorithm starts with this level. For reliable detection of all water bodies, every water body in a scene should contain at least one segment with this level. For estimating the level 1 boundaries, many water bodies are manually selected from different regions of the data set. AOI is drawn over selected water bodies and histogram of pixels is calculated inside and outside the water body and the total rectangular AOI. The histograms for three selected water bodies are shown in Figure 2. Level boundary l 0 is estimated from the histograms as the minimum of all pixel levels in the selected AOIs. l 1 is estimated as the minimum of the histogram where the total histogram is equal to the histogram of AOI and satisfying the condition in equation 9. In a region R with n water body and s i number of pixels in each water body p i , l 1 should satisfy the minimum condition.
"p ij 2 R l 1 is practically chosen to a point where histograms of pixels inside water body are close (difference less than 1%) to histogram of the rectangular AOI. This gives a level which is disjoined with other pixels in the AOI.

Level 2 water segment level
This level is expected to segment the water body ideally into a single segment. The upper-level boundary of this level can be fixed by taking into account the properties of speckle noise. Speckles appear as randomly distributed small patterns. Value for l 2 is estimated by sweeping the l 2 and conducting search in with the modified l 2 . Figures 2g, 2 h and 2i give the variation of number of segments in L 2 and L 3 with l 2 . The optimum value of l 2 is characterized by the maximum number of segments in the speckle level(L 3 ) and minimum segments in the water segment level(L 2 ). l 2 is fixed to mean of all l 2 yielding maximum segments in L 3 .

Level 3 speckle level
The function of this segment is to bridge two separated water segments due to the effect of speckle and other noises. This level is estimated with water bodies having high backscatter due to waves and low incidence angle. Level boundary l 3 is fixed to the maximum of backscatter in selected AOIs. The level is searched with an area constraint which is estimated from the spread of speckle in the selected AOIs. Segments and children of level 3 search having area greater than the estimated constraint are discarded from the result.

Merging of segments
The different segments collected by a multilevel search are combined to form a single segment. Level-2 segments which are collected which have Level 1 segment as parent or have Level 1 segments as neighbours are combined. As Level 3 in the model is expected to segment only the speckle which is characterized by small spatial spread. Level 3 segments and segments which are children of a Level 3 search are combined with constraints.

Area constrains
The speckle level (Level 3) segments are characterized by small area per segment and have large radiometric overlap with the background. In order to prevent background from merging into water segment, Level 3 searches are combined with an area constraint. The number of pixels that can be considered is estimated from the distribution of segment size in l 2 parameter sweep explained in Sec. 2.4.2. Area constraint is fixed to a value that is grater than the majority of segment size of segments in L 3 level at the point where number of segments in L 3 is high. For segments having size greater than the area constraint, the segment and its children collected are discarded from results and further searches.

. Conditions based on neighbours
At the boundary of water bodies, speckle levels tend to include non-water pixels into water segment. The segmented image using search is shown in Figure 3. In order to eliminate this effect, the segments were merged using an expert system based on levels of the neighbours. For each segment, level of the region(l r ), minimum of level among neighbours(n min ) and maximum of level among neighbours(n max ) are estimated as.
Where min and max are minimum and maximum respectively. For a region having n subregions, a logical rule on these observations is used to merge the sections to form a single region.
The water segments R w are combined to form the water region.  Figure 5 gives the block diagram of the algorithm. The input data is calibrated, applied antenna and terrain   1). Pre-processed image is then searched systematically (every pixel) for Level 1 points to start a search-based segmentation (section 4.2). In searchbased segmentation instead of mapping each pixel, a cluster of locally connected pixels is grouped as a segment and is then processed by a rule-based expert system (section 2.5). Context information of the segment is also estimated in the process of segmentation from the neighbour pixels which were excluded from the segment. The expert system characterizes the segment based on secondary observations from the segment like shore support, Polarization, shadow and grazing angle (section 4.4.3). The estimated algorithm parameters for the given data are summarized in Table 2.

Preprocessing
The SAR image is calibrated to backscattering coefficient (σ 0 ) using calibration constants available in the metadata. Due to topographical variations on earth and the tilt of the satellite sensor, distances can be distorted in the SAR images. Terrain corrections compensate for these distortions so that the geometric representation of the image will be as close as possible to the real world. Calibrated and geocoded SAR image is converted into a geometrically corrected image by Range Doppler Terrain Correction operator available in SNAP tool, provided by ESA. It uses Range Doppler orthorectification method (Small and Schubert 2008). It uses available orbit state vector information in the metadata like radar timing annotations and slant to ground range conversion parameters together with SRTM DEM as reference DEM data to derive the precise geolocation information. The orthorectified image is geo-referenced to WGS-84 coordinate reference system so that each pixel can be mapped to the corresponding geographic coordinates.

Search Initialization (searching seed points)
First Step in the algorithm is to find the seed points where the search can be initialized. Seed points are collected by systematically searching the whole area of interest line by line. Systematic search gives seed points where it finds a low backscattered pixel (pixel value < l 0 ) as explained in section 2.4. A multilevel search is started at the seed point. Multilevel search (section 2.2) will segment all points which have connectivity to the seed point using the search. A search algorithm searches the image with discrete predefined intervals (L) as described in Section 2.4.

Boundary extraction
For the generation of output as a shapefile and shore support estimation, the boundary of each segmented region is to be estimated. For each searched region, the boundary pixels are calculated by geometry union operation of triangles formed by Delaunay triangulation (Lee and Schachter 1980) of search points. The Delaunay triangulation converts a set of finite points P in a plane into a triangulation DTðPÞ in which no point on P that is inside the circumcircle of any triangle in DTðPÞ. The boundary of the region can be calculated by geometric union operation of all the triangles to form a polygon. Inclusion of large triangles result in removal of concave edges and islands in the polygon. For each triangle in DTðPÞ, Chebyshev distance of each edge is calculated and those triangles whose edge length is less than 2 pixels are selected in order to preserve the shape of the region. The selected triangles are merged into a polygon by geometry union operation (Hua-Xin et al. 2011). The  where ' is geometry union of polygons.

Characterization of segments
It is assumed that all detectable water bodies are segmented by the search algorithm. Apart from water bodies, many lookalikes get segmented in the process. For each segmented list of points, properties viz. shore support, polarization angle, shadow and grazing angle is calculated to qualify the segmented region as a water body. Rule-based filtering is done to filter out lookalikes from water bodies based on properties in the segmented region.

Shore support
The shoreline of water bodies is expected to have a strong discontinuity in terms of dielectric and roughness. This makes sharp edges consistent in both polarization at the boundary of water bodies. The consistency in both polarization can be exploited to distinguish water bodies from low backscatter areas like fallow land, open areas etc. This feature is estimated using the shore support measure. For water bodies, both co-polarized and cross-polarized images have minimum backscatter on water and will abruptly change at the edge. This change is steep and co-exists in both polarization images. The magnitude of steepness is measured as the maximum of grey level change from its immediate eight neighbours for every point along the boundary of the segment. Shore support (Supp s ) is measured as the maximum of cross-correlation coefficient between the steepness (ΔI pol ðpÞ) observed in both polarizations.
ðjN i ðp pol Þ À p pol jÞ (16) Where � represent signal cross-correlation between the sequences and b x is the zero mean shifted signal of x. Water segments are filtered by comparing the calculated shore support with an estimated threshold. Agricultural fields appear barren during summer. Data near the Ananthapur region, which is mostly dry during summer analysed for estimating threshold for shore support. For the selected area of interest, the generated polygons were validated against global water layer (Pekel et al. 2016). The optimum value is fixed by sweeping the parameter against F1 Score. Figure 7a shows the variation of accuracy parameters (Precision, Recall and F1 score) against shore support for filtering the segments.

Polarization angle
The backscattered signal is characterized by its polarization. Microwave radiation undergoes polarization rotation characteristic of the target. Barren lands and other lookalikes are eliminated by considering the polarization rotation incurred during backscattering. The backscattered power received in each polarization (VV & VH) is converted into a polar coordinate system (r; ϕ) using equations 18 & 19 and its mean over the segmented region is used to estimate the polarization angle.   Figure 6 plots the distribution of θ and r estimated from water bodies and look alikes. It is observed that backscatter from water bodies are more confined in polarization angle compared to other features. The polarization angle measured for each segment is compared with n lower threshold below which the segment is discarded. Variation of accuracy by sweeping the threshold value is plotted in Figure 7b.

Shadow and low grazing areas
Due to the side looking nature, shadows are inevitable in SAR images. Low grazing and shadows appear as low backscatter areas. Shadow estimation algorithms using DEM for RADAR images is described in (Prasath and Haddad 2013;Zhu et al. 2016). A slightly modified approach using trigonometric computation, optimized for segment-based processing is used. Since the scenario here is to check whether a given segment is a shadow, the whole image need not be processed. The algorithm does a walk around in the DEM corresponding to the detected low backscatter region to detect a possible shadow casting structure. For the detection of a shadow cast by hills and other structures, DEM is used along with the radar heading angle and look angle (Look angle from geoid, incidence angle and head angle from satellite metadata of the product). The extent of the image is computed and maximum height is calculated perpendicular to the heading angle and DEM is checked against the minimum height that can cast a shadow. If DEM is grater than minimum height, then the segment is flagged as a shadow. For a DEM with pixel size l x � l y let p 0 be the centroid of the segment, δp max be the maximum extent of the segment from p 0 and ϕ be the heading angle and θ be the incidence angle on ellipsoid at p 0 . A line P is drawn from p 0 towards the satellite for a distance of 2 � δp max .
p ¼ ðl x sinðϕÞ; l y cosðϕÞÞ (20) Surfaces having low grazing angle are more likely to give low back scatter. Segments which are formed due to low grazing angle are detected by estimating its average grazing angle over the segmented region. Grazing angle is determined from the local incidence angle generated from DEM using SNAP.

Segment classifier
Assuming each derived parameters are mutually independent, segments are filtered using each estimated parameters. Each connected segment with its calculated shore support, grazing angle, polarization angle and shadow casting is given to a logical classifier to qualify the segment as a water body. The logical classifier is of the form NOT(shadow) AND Grazing angle > 20 AND Shore_support > 0.004 AND theta > 0.37 Where the thresholds are estimated using parameter sweep taking into account the accuracy of classification using F-score as described in section 4.4. The entire algorithm was implemented in python using a multithreaded approach as described in (Bipin et al. 2018).

Results
For estimating the accuracy, the generated water bodies were validated against near time optical satellite images and Global water dynamics data. Global water dynamics data derived from 35 years of Landsat satellite images were provided by Ref. global surface water. The data consist of maximum extent, Occurrence, seasonality, recurrence, transitions and change from 1984 to 2018. RS2A LISS-IV MX and S2A MX data collected at a near date with SAR data is used as reference for segmentation accuracy calculations. The search levels are configured to allow all dark regions across the scene by allowing commissions. The detection accuracy is estimated by segmenting different water bodies spread across all incidence angles (across the scene) and seasons. Twelve data sets for every month in the region near Hyderabad were used for the analysis. Forty-two water bodies which were distributed across the scene were selected and observed on all the data sets. AOIs were drawn using shapefile in geographic latitude and longitude coordinates so as to precisely identify the feature in multiple geo-referenced optical and SAR images. Distribution of AOIs for the selected water bodies is shown in Figure 3 All permanent water bodies (seasonality = 12 inferred from Global water occurrence data) were observed and were consistently detected. Distortions were observed in some water bodies during the rainy season which could be attributed to backscattering from rain cells (Alpers et al. 2016). As water bodies are very dynamic in nature, validation requires reference data which is acquired in near time. For comparing the accuracy of segmentation, the results were compared with near time optical data, the algorithm output was validated against manually vectored water layer from S2A MX and RS2A LISS-IV MX collected near Ananthapur for the month of November. Figures 4 d & 4 cshows the AOIs drawn over identified water bodies using optical data for validation. Results are analysed in terms of F-score and tabulated in Table 3. Results obtained over two selected water bodies is shown in Figure 8. Microwave SAR backscatter is found to be highly sensitive to aquatic vegetation. Presence of traces of aquatic vegetation which is hard to detect in optical images was found to give high backscatter in SAR image.
The performance of SBIA is compared with widely used threshold based and region growing methods. Watershed (Soille and Ansoult 1990;Vincent and Soille 1991) and Random walker (Grady 2006) are two region growing methods for image segmentation. The algorithms which is part of Scipy (Virtanen et al. 2020) library available with python language was used to estimate its performance in segmenting SAR data. Figure 9 gives the comparison of segmenting SAR images using watershed, Random walker, and the proposed level-based search. Manually vectorized layers from S2A MX and RS2A LISS-IV MX collected near  Ananthapur for the month of November are used as reference. It can be observed that the region growing algorithms grow beyond the boundaries in many cases. This could be attributed to the presence of speckle noise which makes it difficult to estimate proper boundaries with a single homogeneous model for the waterbody. For the selected AOIs, water bodies are extracted using Otsu's threshold, random walker and watershed. The accuracy in terms of precision, recall and f1 score for each algorithm is tabulated on Table 4. Comparing the accuracy with Table 3, it is evident that SBIA have better segmentation accuracy.
To estimate the overall accuracy, the region near Bangalore and Hyderabad where numerous water bodies were present was chosen for the month of November. November is chosen as it is the time after the monsoon season (June to September) which accounts for more than 80% of annual rainfall in the region. During monsoon season, a lot of unaccounted surface water bodies could be present, which may pose difficulty in validation with the reference derived from optical data. The results obtained were validated against global water extend data. The results are summarized in terms of the area analysed, precision, recall and F1 score in Table 5. Details about extent, total water bodies, total water body area for each reference area and the validation results are summarized in Table 1. Figure 4f gives the AOI drawn over Bengaluru region for validation and the result obtained.

Conclusion
SBIA is found to be giving promising results in water body extraction from SAR images. The results were compared and found in good agreement with water bodies extracted from optical data of comparable resolution. The algorithm is capable of detecting many temporary and seasonal water bodies enabling studying of shortterm dynamics in water bodies. Aquatic vegetation is found to create large errors in the estimated area at particular times of the year.
Though the algorithm is based on fixed levels estimated from histogram and number of segments estimated from search in selected AOI, SBIA has reliably detected water bodies across the scene over seasons. This could be attributed to the reliable nature of SAR backscatter observation and uniqueness of water bodies at microwave frequencies. Application search using three-level model based on fixed thresholds in single polarization is limited to extraction of water bodies alone. The methodology is found to overcome speckle and low feature dimension which pose major challenges in SAR image processing. The three-level model-based search can be extended to other features and datasets (polarimetric and multi-temporal) using widely used classification algorithms instead of fixed thresholdbased levels.