# A Method to Accurately Estimate Fish Abundance in Offshore Cages
## 2 Proposed Fish Counting Algorithm
### Algorithm
#### 2.2.3 Fish Counting  
Along with \(s_{v}\) data, the algorithm takes \(R1\), \(R2\), fish species, \(<\)\(S_{a\_net}\)\(>\) (mean \(S_{a\_net}\)), and LFK as inputs and returns the fish count as the output. At first, based on the LFK table provided, the algorithm calculates \(<\)\(\sigma_{bs}\)\(>\). The TS of a fish is well defined in the form as follows:  
\[TS_{L}=Alog(L)+B \tag{7}\]  
where \(A\) and \(B\) are the standard coefficients for a fish species and \(L\) is the length of the fish. The \(TS\) of commonly farmed fish in Korea is shown in Table 2, which is maintained as a lookup table by the algorithm. Assuming \(n\) denotes the number of rows in LFK table, \(n(L)\) denotes the number of fish with length \(L\), \(<\)\(\sigma_{bs}\)\(>\) is calculated as follows:  
\[<\)\(\sigma_{bs}\)\(>\)\(=\)\(\frac{\sum\limits_{i=1}^{n}(\sigma_{Li}\times n(L_{i}))}{\sum\limits_{i=1}^{n}(n(L_{i}))}\) (8)  
where,  
\[\sigma_{Li}=10^{\frac{TS_{Li}}{10}} \tag{9}\]  
The next step of the algorithm is to sum all the \(s_{a}\) values of a ping between \(R1\) and \(R2\). The algorithm reads \(s_{v}\) data of a ping at a time, and calculates accumulated back-scattering coefficient, \(S_{a\_all}\), as follows,  
\[S_{a\_all}=\sum_{r=R1}^{R2}s_{v}(r)\times z \tag{10}\]  
The \(S_{a\_all}\) is the accumulated back-scattering coefficient over the sampled range; therefore, it contains the information about fish abundance in the entire range. However, it also contains the signal from the cage. Assuming no echo from the sidewalls, one possible way to remove the net signal is to select \(R2\) just above the net bottom. However, there are two problems with this approach: (i) the net bottom level changes with sea current; therefore, using a fixed value is not suitable and (ii) even if the net bottom is stationary, some signal from the fish exactly at the net bottom will be  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Scientific Name** & **Common Name** & **TS Value** & **Reference** \\ \hline _Sebastes ruberrimus_ & RockFish & 20 log(L) \(-\) 72.80 & [26] \\ _Pagrus major_ & Red sea bream & 20 log(L) \(-\) 74.10 & [25] \\ _Acanthopagrus schlegelii_ & Black porgy & 20 log(L) \(-\) 66.89 & [27] \\ _Planilliza haematochelilus_ & Redlip Mullet & 20 log(L) \(-\) 66.33 & [28] \\ \hline \hline \end{tabular}
\end{table}
Table 2: Target strength (TS) at 200 KHz of some common fish farmed in Korea.  
discarded because of the range resolution of the echosounder. In this study, an alternative approach is employed. The average net signal is subtracted from the total signal using the following equation:  
\[S_{m}=\begin{cases}S_{a\_all}-<\!\!S_{a\_net}\!\!>,&\text{if}\ S_{a\_all}\!\!><\! \!S_{a\_net}\!\!>\\ 0,&\text{otherwise}\end{cases} \tag{11}\]  
Finally, the amount of fish (\(F_{c}\)) per ping is estimated as follows:  
\[F_{c}=\frac{S_{m}}{<\!\!\sigma_{bs}\!\!>}\times A, \tag{12}\]  
where \(A\) is the surface area of the net. Since \(S_{m}\) by \(<\!\!\sigma_{bs}\!\!>\) is the number of fish per m\({}^{2}\), multiplying it with the surface area gives the total number of fish in the cage. The process continues to the next ping and the average fish count over pings is calculated by taking the moving average of \(F_{c}\). We note that the algorithm assumes the uniform distribution of fish in the cage in the form of a parallelepiped.