# A Multi-Step Image Pre-Enhancement Strategy for a Fish Feeding Behavior Analysis Using Efficientnet
## 2 Methodology
### Multi-Step Image Pre-Enhancement Strategy
#### 2.3.3 Image Sharpening  
Image sharpening is applied to meticulously accentuate the edges and textural details of underwater images, particularly in deep water or low-visibility conditions. This technique critically enhances the discernibility of the contrast between the fish contours and the background. The application of image sharpening techniques can enhance the contrast in local regions, making the boundaries between fish and their background more distinct. Image sharpening can highlight these details, making them easier to analyze and understand. Such processing aids in improving the accuracy of model classification.  
To address the issue of low-contrast images lacking clarity and detail, especially in dark or overexposed areas, the Unsharp Masking (USM) sharpening algorithm is introduced on top of the CLAHE algorithm based on the LAB color space. Unsharp Masking (USM) is a sharpening technique, the core idea of which involves subtracting a blurred (low-pass filtered) version of the original image and then adding the result back to the original to enhance the edges and details. The sharpening process can be represented as  
\[g(x,y)=f(x,y)+k\cdot(f(x,y))-f_{blur}(x,y) \tag{3}\]  
wherein \(g(x,y)\) corresponds to the sharpened image, \(f(x,y)\) represents the original image, \(f_{blur}(x,y)\) is the image after blurring, and \(k\) signifies the enhancement coefficient. The specific algorithm design process is illustrated in Figure 5.  
The specific operations are as follows:  
1. Unsharp Masking: This is a common image sharpening technique used to enhance the visual clarity of an image. In this step, if the quality of the image, after CLAHE processing (based on PSNR and SSIM indices), is considered to be sufficiently good, Unsharp Masking is employed to further enhance the image's details and edges. This sharpening is achieved by amplifying the high-frequencywhich can make the image appear crisper; however, overuse may lead to noise or an over-sharpened effect in the image.
2. LPIPS < 0.4: Learned Perceptual Image Patch Similarity (LPIPS) is an advanced metric used to evaluate the perceptual similarity of images. This metric takes into account the characteristics of the human visual system to assess the perceptual similarity between the enhanced and original images. An LPIPS value of less than 0.4 indicates that the enhanced image is visually close enough to the original image, and the perceptual quality is deemed acceptable. This step ensures that the image enhancement does not deviate excessively, thus losing the perceptual characteristics and texture of the original image.
3. LAB to BGR conversion: After completing image sharpening and quality assessment, the image is converted from the LAB color space back to the BGR color space. This step is intended to translate the results of image processing into a more universally applicable color format for display and use across various devices and applications.  
Through this series of processing steps, the adaptive enhancement of the image brightness and contrast is achieved while maintaining the authenticity of colors and minimizing the impact of noise. While enhancing the details and sharpness, the LPIPS ensures the perceptual quality of the post-processed image, preventing over-processing.