A New Simple Procedure for Extracting Coastline from SAR Image Based on Low Pass Filter and Edge Detection Algorithm

This study proposes a new simple procedure for extracting coastline from Synthetic Aperture Radar (SAR) images by utilizing a low-pass filter and edge detection algorithm. The low-pass filter improves the histogram of the pixel value of the SAR data. It provides better distribution of pixel value and makes it easy to separate between sea and land surfaces. This study provides the processing steps using open-source software, i.e., SNAP SAR processor and QGIS application. This procedure has been tested using a dual-polarization Sentinel-1 (10x10 meters resolution) and single polarization ALOS-2 (3x3 meters resolution) dataset. The results show that using Sentinel-1 with dual polarization (VH) provides a better result than single polarization (VV). In the ALOS-2 case, only single polarization (HH) is available. However, even using only HH polarization, ALOS-2 provides a good result. In terms of resolution, ALOS-2 provides a better coastline than Sentinel-1 data due to ALOS-2 having better resolution. This procedure is expected to be helpful to detect coastline changes and for coastal area management.


Introduction
Remote sensing technologies (passive and active sensors) are useful in monitoring and modeling Earth's various bio-physical components. The evaluation of shoreline changes is widely used in coastal management. It shows a significant factor in evaluating beach conditions [1], [2].
Remote sensing can be used to monitor the Earth and its phenomena periodically. The coastal area is well known as a dynamic system. It causes changes in shoreline position. Thus, timeseries monitoring data of coastline changes is important, and remote sensing technology has a high possibility to overcome this requirement. Furthermore, remote sensing provides an extensive area coverage of monitored Earth's surface at relatively cost-effective and high accuracy.
The coastal zone is the area located in between land and water. It is bordered by a "line" called shoreline [3]. The concept of a coastal zone is straightforward. However, due to the temporal variability of the shoreline itself, this concept becomes complex in the actual case. The wave motion, tides, and winds are the main factor of shoreline temporal variability. It means that coastal area is dynamic, and continued monitoring is important. remote sensing (mainly using the optical sensor) and active remote sensing (primarily using radar sensor) [5]. Both methods can be used to extract coastline.
Coastline detection by using optical sensors has been presented well by [6]- [12]. Those works mentioned above mainly utilize optical satellite imageries from the Landsat series and SPOT satellite. Coastline extraction by using Synthetic Aperture Radar (SAR) is presented by [13]- [22].
Unlike optical sensors, the SAR sensor can be used in day and night observation and penetrate cloud cover. In practice, the optical sensor has limitations that cannot be used in night-time observation (sun illumination dependent) and cannot penetrate the cloud covers. However, in the case of coastline extraction, SAR data commonly required special knowledge in terms of object identification and SAR data interpretation. It causes complex image processing and data analysis to extract coastline from SAR data, for example, using the polarimetric method [15]. In some cases, image processing of SAR data to extract coastline is time-consuming and requires highend computing power [17].
In this study, a new simple procedure for extracting coastline from SAR images is proposed. It utilizes a low-pass filter and edge detection algorithm. The processing steps are straightforward, and it does not require high-end computing power. The comprehensive processing steps of this procedure are explained in detail and can be applied to the other coastal area.

Research Methods
The method in this study utilizes processing steps provided by open-source software, i.e., SNAP SAR processor and QGIS application, as shown in Figure 1. The SNAP SAR processor is built using the JAVA programming language, and QGIS application modules are mostly built using Python.
Each processing step is explained as follows: a. Pre-processing steps for Sentinel-1 SAR data using SNAP software 1. Read SAR data This step opens the Sentinel-1 SAR data in the SNAP application.

Image subset
Image subset is for cutting the whole scene to the region of interest of the study area. It is done by giving the longitude and latitude of the research area 3. Apply orbit file For Sentinel-1, applying the orbit file is an essential process because the precise orbit file is applied to SAR dataset at this step. This step is downloading the appropriate orbit information, such as the date and time of satellite flight, flight direction, satellite speed, satellite position, etc. 4. Thermal noise removal Thermal noise is caused by the thermal variability of the SAR sensor. Thermal noise correction should be applied to Sentinel-1 SAR data to reduce such noise from sensor temperature. This process can be done by using the information of sensor temperature for each dataset. Then, such as thermal noise can be estimated and removed from the original dataset.

Radiometric calibration
The pixel values of the SAR scene may not relate directly to the radar backscatter. To overcome this error, a radiometric calibration should be applied. In this step, the calibrated SAR dataset is converted as Sigma zero. The equation to calculate Sigma Zero is: where: 0 = sigma zero = original digital number of datasets = scattering area 6. Speckle filtering Speckle noises are caused by random or granule interference (constructive or destructive) that inherently exists. Speckle noises degrade the quality of the SAR image. In this step, the single product speckle filter is applied using the Lee-Sigma algorithm. Lee-Sigma algorithm utilizes the sigma probability of the Gaussian distribution. It smooths the noise by evaluating the intensities within a fixed sigma range of the center pixel. Then, it took averaging process only the neighborhood pixels. In general, Lee sigma uses two conditions as described as follows: Where: ̂, = intensity of the pixel at ( , ) image coordinate = the number of pixels within intensity range = the prespecified values 7. Linear to decibel (dB) conversion This step is to convert linear pixel value to decibel (dB) format. It can be done by this equation: = pixel value in decibel (dB) format = original digital number of datasets in a linear format 8. Low-pass image filtering The objective low-pass filter is to smooth the original image by decreasing the disparity between pixel values by averaging nearby pixels. In step, a low-pass filter with a 3x3 window size is employed. It is an array of ones divided by the number of elements within the kernel. In this case, it is 3 by 3 kernel: [ 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 ] The low-pass filter is achieved in the frequency domain by dropping out the highfrequency components.

Geometric correction
Original SAR image is projected into radar coordinate system (azimuth and range). In a GIS system, the image geographical coordinate projection is required. The process to project an image from radar coordinate to the geographical coordinate system is called Geocoding. Geocoding is part of the geometric correction. The other process of geometric correction is called ortho-rectification. In this step, the Digital Elevation Model of the studied area is required, and DEM provided by SRTM-1 is selected.

Write raster data
This is the final step of pre-processing for the Sentinel-1 SAR dataset. Then, the product is saved in raster format and used for post-processing in the QGIS application.
b. Pre-processing steps for ALOS-2 SAR data using SNAP software 1. Read SAR data This step opens the ALOS-2 SAR data in the SNAP application.

Image subset
The process and explanation are the same as pre-processing in Sentinel-1 SAR data (point a. number 2).

Radiometric calibration
The process and explanation are the same as pre-processing in Sentinel-1 SAR data (point a. number 5).

Speckle filtering
The process and explanation are the same as pre-processing in Sentinel-1 SAR data (point a. number 6). 5. Linear to decibel (dB) conversion The process and explanation are the same as pre-processing in Sentinel-1 SAR data (point a. number 7). 6. Low-pass filtering The process and explanation are the same as pre-processing in Sentinel-1 SAR data (point a. number 8).

Geometric correction
The process and explanation are the same as pre-processing in Sentinel-1 SAR data (point a. number 9).

Write raster data
This is the final step of pre-processing for the ALOS-2 SAR dataset. Then, the product is saved in raster format and used for post-processing in the QGIS application.
c. Post-processing steps for Sentinel-1 and ALOS-2 raster data using QGIS software 1. Read raster data This step reads the pre-processed raster data.

Apply image thresholding
This is the first step to exclude the pixel of the water surface. The threshold value can be defined from the histogram of the raster image after the low-pass filter is applied. This histogram is explained later.

Edge detection
An edge detection algorithm detects the pixel edge or border between the water surface and the ground surface. It produces an image with pixel values 0 and 255. Simply speaking, 0 is a pixel of the water surface, and 255 is the pixel from the land surface. The result of edge detection is saved at 8-bit unsigned pixel dept.

Create contour lines
This step generates contour lines from an 8-bit unsigned image. The interval of the contour line is set at 255. It produces many contour lines, and the contour line of the coastline can be easily identified because it is located in the border of the water surface and land surface and connected along the coastal area.

Delete non-coastline contour lines
After the contour line of the coastline is identified, then the other contour lines are deleted.

Study Area
The study area is Noheji, Kamikita district, Aomori prefecture, Japan, as shown in Figure 2. It is a coastal area located in the inland sea (Mutsu Bay).

Dataset
This study uses Sentinel-1 and ALOS-2 SAR datasets. The Sentinel-1 data can be downloaded free or at charge from the Copernicus program website (https://scihub.copernicus.eu/dhus/#/home). ALOS-2 data cannot be downloaded for free. The user must purchase the dataset or apply a proposal to get the dataset for free for research usage. The information about the SAR dataset is given in Table 1 The spatial resolution or the size of one pixel of the Sentinel-1 SAR dataset (VV and VH) is 10 x 10 meters, while ALOS-2 is 3 x 3 meters. It means ALOS-2 is three times higher resolution than the Sentinel-1 SAR dataset (VV and VH).  Figure 3 shows the SAR image before and after low-pass filtering for Sentinel-1 VV polarization. Both images did not show much difference visually. However, from the pixel value histogram, there are many improvements between before and after low-pass filtering. The histogram of the filtering image shows a more apparent distribution than the original image. It makes it easier to distinguish between pixels from the water surface and land surface. This filtered histogram is used to decide the threshold value in the image thresholding step. The results of before and after low-pass filtering for Sentinel-VH polarization are presented in Figure 4. Same as in Figure 3, both images did not show much difference visually. From the pixel value histogram, there is much improvement between before and after low-pass filtering. Compared with Sentinel-1 VV polarization, Sentinel-1 VH polarization shows a better histogram. It is because Sentinel-1 VH has a smaller Coefficient of Variation (CV) of pixel value than Sentinel-1 VV. The coefficient of Variation (CV) of the pixel value is one of the parameters to assess SAR data polarization quality. CV can be calculated by:

Results and Discussion
The smaller value of CV is better for coastline extraction. In this case, the CV value for Sentinel-1 VV and VH are 10,78 and 5,24, respectively. Thus, the histogram of the filtered image of Sentinel-1 VH polarization shows an obvious pixel value between water and land surfaces.  Figure 5 shows ALOS-2 HH polarization results before and after low-pass filtering. ALOS-2 has 3 x 3 meters resolution and provides a detailed SAR image (Fig. 5). The histogram of ALOS-2 after low-pass filtering provides a similar pattern as Sentinel-1 VH (Fig. 4). It shows that ALOS-2 has a better result than Sentinel-1 even though ALOS-2 only uses HH polarization. It is expected that this method can be tested to ALOS-2 HV polarization. The final coastlines of Sentinel-1 VV, Sentinel-1 VH, and ALOS-2 HH are shown in Fig. 6. In general, ALOS-2 HH provides the best result among those Sentinel-1 ones. The main reason is that the resolution of ALOS-2 is almost three times better than Sentinel-1. However, ALOS-2 is not provided for free. It means not all users can try this method using the ALOS-2 dataset. Furthermore, using Sentinel-1 VH provides a better coastline than Sentinel-1 VV.
The coastline provided by ALOS-2 and Sentinel-1 is slightly different. It is because the observation times between ALOS-2 and Sentinel-1 are different. Sentinel-1 took the data at 17:26 local time, while ALOS-2 took the data one day after at 23:31 local time. The possibility of a tidal effect is strong.
This research focuses on explaining the proposed procedure, and the tidal correction is not applied, and it has become future work to improve the accuracy of detected coastline.

Conclusions and Future Works
This research demonstrates the proposed procedure for extracting coastline from the SAR dataset. The detail of the processing steps is explained. The proposed procedure is tested using Sentinel-1 VV, Sentinel-1 VH, and ALOS-2 HH SAR datasets. The results show that a low-pass filtering algorithm can improve the histogram of each SAR dataset. In general, ALOS-2 provides the best coastline among Sentinel-1 ones. It is because ALOS-2 has three times better spatial resolution than Sentinel-1. The coastline provided by ALOS-2 and Sentinel-1 is slightly different. It is because the observation times between ALOS-2 and Sentinel-1 are different. Sentinel-1 took the data at 17:26 local time, and ALOS-2 took the data one day after at 23:31 local time. The possibility of a tidal effect is strong.
For future work, it is recommended to conduct a deep analysis of the effect of the resolution of the satellite dataset on the final results of extracted coastline. It can be done by conducting a comparative study using several satellite datasets in different resolutions. In addition, it is a good chance to test this procedure with the ALOS-2 HV SAR dataset. ALOS-2 HV SAR dataset is expected to provide a better result than ALOS-2 HH. For a more advanced comparison between coastline provided by ALOS-2 and Sentinel-1, it is better to apply Digital Shoreline Analysis System (DSAS) for those results. This time DSAS is not applied because DSAS is an add-on of ArcGIS software (commercial license).