*2.3. Nonlinear Compensation*

Nonlinear compensation involves dividing the range of 0 to 255 gray levels into many parts, and then to compensate the gray value of different parts with a piecewise function. However, this leads to excessive gray correction in side-scan sonar images, which may distort the original information of the side-scan sonar image [15].

#### *2.4. Function Fitting*

Function fitting method involves using N Ping side-scan sonar data as the selected image. Then, according to the average value of pixels in the column of the selected sonar image, the gray change curve is obtained in the row direction and it is fit with a function. Next, the image is compensated and corrected according to the function obtained by fitting. The representative methods are mixed exponential regression analysis (MIRA) [16] and the method was proposed by Al-Rawi et al. [17]. The MIRA method uses an exponential function, such as Equation (2), to fit the gray level change of the side-scan sonar image, and then compensates the image by normalization.

$$f(z) = a\mathfrak{e}^{bz} + c\mathfrak{e}^{dz} \tag{2}$$

where, *a*, *b*, *c*, and *d* are the four weights representing the echo decay for each ping signal, and *z* is the spatial location (or index) of each sample within the ping. Shippey et al. [14] stated that the gray level distribution of side-scan sonar image per ping is closer to a Rayleigh distribution than exponential distribution. Therefore, the cubic spline model was used to compensate and correct the side-scan sonar image by the fitting polynomial function.
