# Coastal Zone Classification Based on U-Net and Remote Sensing
## 2 Experimental Methods
### Image Feature Extraction
The calculation formula for the mean can be described with Equation (4), as follows:  
\[Mean=\sum\
olimits_{i}\mathrm{j}\mathrm{i}\cdot P(i,j) \tag{4}\]  
where i and j mean the row and column indices in the GLCM, respectively, and \(P(i,j)\) means the normalized frequency of the co-occurrence of gray levels i and j in the GLCM. ENT measures the randomness or complexity of the texture within the image, indicating the randomness and the amount of information contained. The calculation formula for ENT can be described with Equation (5), as follows:  
\[ENT=-\sum\
olimits_{i}\mathrm{j}P(i,j)\mathrm{log}P(i,j) \tag{5}\]  
where i and j mean the row and column indices in the GLCM, respectively, and \(P(i,j)\) means the normalized frequency of the co-occurrence of gray levels i and j in the GLCM. Log is the logarithm function, typically base 2 or natural logarithm. (2) Contrast feature extracted with HC algorithm. To simplify the calculation and enhance efficiency, the data values of each channel were quantized into 12 levels. This approach reduces the possible data values in the image to a maximum of 123, which is significantly lower than the original maximum color value of 2563. Additionally, pixels with a frequency of appearance less than 5% were classified into the high-frequency value group with the closest color distance. To further facilitate color perception, the LAB color space was utilized to measure color distance. The calculation formula for the contrast value of a pixel in the image can be described with the following Equation (6):  
\[S(I_{k})=\sum\
olimits_{V\mathrm{I}_{k}\in I}D(I_{k},I_{i}) \tag{6}\]  
where \(S(I_{k})\) is the contrast value of pixel \(I_{k}\), and \(D(I_{k},I_{i})\) is the color distance between pixel \(I_{k}\) and pixel \(I_{i}\) in LAB space. Equation (1) can be expanded as Equation (7), as follows:  
\[S(I_{k})=D(I_{k},I_{1})+D(I_{k},I_{2})+\ldots+D(I_{k},I_{n})\]where \(n\) is the total number of pixels in the image \(I\). Since the color depth is quantized to a certain level, Equation (2) is rearranged to group pixels with the same color value \(c_{j}\) together. The contrast value of a pixel \(l_{k}\) can be expressed as follows with Equation (8):  
\[S(l_{k})=S(C_{l})=\sum_{j=1}^{n}f_{j}D(c_{l},c_{j}) \tag{8}\]  
where \(c_{l}\) is the color value of the pixel \(l_{k}\), \(n\) is the total colors numbers in image, and \(f_{j}\) is the frequency of \(c_{i}\) in the image \(I\). Since color quantization can introduce inaccuracies, a weighted and averaged smoothing operation was applied to refine the contrast value of each color, thereby reducing noise points. The calculation for this operation is represented in Equation (9), as follows:  
\[S^{\prime}(c)=\frac{1}{(m-1)T}\sum_{i=1}^{m}\left(T-D(c,c_{i})\right)S(c_{i}) \tag{9}\]  
where \(m\) is the number of colors to improve the contrast of color \(c\), usually \(1/4\) of the total number of colors, and \(T\) is the sum of the color distances between color \(c\) and its \(m\) nearest neighbors \(c_{i}\). (3) _NDVI_ features. _NDVI_ is used to enhance vegetation in satellite images. To accurately extract vegetation information, _NDVI_ features are computed. The calculation of _NDVI_ is expressed in Equation (10), as follows:  
Figure 3:0  
where \(NIR\) is the reflection value in the near-infrared band, and \(R\) is the reflection value in the red band.