# A Benchmark for Water Surface Jet Segmentation with MobileHDC Method
## 3 Benchmark Description
### Metrics
#### 3.3.2 Continuity Evaluation Metrics  
Furthermore, we introduce two new metrics, the number of connected components and the connected component pixel ratio, to evaluate the continuity of jet segmentation.  
Prior to computing these continuity metrics, we first apply a uniform \(3\times 3\) morphological closing operation to all segmentation results. This step is intended to eliminate smallnoise and fill internal gaps within the targets, thereby making the connected components more compact and continuous. The closing operation is composed of dilation followed by erosion:  
\[I\cdot B=(I\oplus B)\ominus B \tag{6}\]  
where \(I\) represents the binary segmentation image, and \(B\) is the structuring element, typically a \(3\times 3\) square kernel. Dilation expands the target regions while erosion reduces the regions. The closing operation, achieved by performing dilation followed by erosion, smooths the boundaries of the targets and suppresses noise.  
A connected component is defined as a group of pixels that are connected through adjacency relations (e.g., 4-connectivity or 8-connectivity), with 8-connectivity being used in this study. The number of connected components measures the count of independent target regions (connected components) within the image. By calculating the number of connected components, we can assess whether the targets appear as multiple dispersed regions, which is particularly useful for revealing the sparsity and fragmentation of targets in images where the jet occupies a small proportion. For a binary segmentation image, \(I\in 0\), \(1^{H\times W}\), where 0 represents the background and 1 represents the jet region. The number of connected components is defined as the total count of all connected components in the image:  
\[N_{cc}(I)=|\mathcal{C}(I)| \tag{7}\]  
where \(\mathcal{C}(I)\) denotes the set of all connected components and \(|\mathcal{C}(I)|\) represents the cardinality of this set (the number of connected components). A higher \(N_{cc}\) value indicates a stronger discontinuity and fragmentation in the segmented jet whereas a lower \(N_{cc}\) value suggests a more continuous segmentation with less noise interference.  
The connected component pixel ratio measures the proportion of pixels belonging to all connected components relative to the total number of pixels in the image. It is used to evaluate the coverage of connected components within the image. This metric reflects the overall integrity and concentration of the connected components, thereby quantifying whether the jet target appears as a large, continuous region in the image, and provides an effective basis for assessing the structural coherence and regional concentration of the jet. For a segmented image \(I\in 0\), \(1^{H\times W}\), let \(S_{cc}\) denote the sum of pixels within all connected components and \(S_{total}\) represent the total number of pixels in the image. The connected component pixel ratio is defined as follows:  
\[R_{cc}(I)=\frac{S_{cc}(I)}{S_{total}} \tag{8}\]  
where \(S_{cc}(I)\) is the number of pixels belonging to the connected components, and \(S_{total}=H\times W\) is the total number of pixels in the image \(I\). A lower \(R_{cc}\) value indicates a smaller actual coverage of the target while a higher \(R_{cc}\) value suggests a denser and more coherent segmentation result.