# Study on Multi-Scale Coral Reef Pore Structure Identification and Characterization
## 3 Multi-Scale Pore Structure Identification Method  
### Image Preprocessing  
The main task of extracting multi-scale pore structure characteristic parameters of coral reefs is to effectively separate the pore structure from the background. However, the multi-scale pore structure image usually contains noise interference caused by multiple factors without processing. For example, in the process of logging, the illumination in the borehole is uneven, the camera conditions are bad and there is gradual interference caused by the test system in the acquisition process. These interferences greatly affect the image quality and can easily have a great impact on the subsequent feature recognition of the pore structure. Therefore, it is necessary to smooth the pore image of the coral reef to reduce the interference to the recognition as much as possible. In this paper, the multi-scale pore structure of the coral reef is preprocessed by the combination of image enhancement and filtering. The effect of traditional image enhancement methods is not obvious, the peak signal-to-noise ratio is not high, the applicability is not strong and the global information is not well used to enhance the image details. In view of the unsatisfactory image enhancement effect, caused by a variety of degradation factors and which can be applied to multi-scale pore structure images from different information sources, an image enhancement method based on power-law transformation with a changing gamma value is proposed on the basis of the combination of global and local, that is, the improved gamma correction image enhancement method. Different images have different information and features. In the same image, the overall information is also closely related to the detailed information of the region. According to this information, we can better enhance the image. In order to determine the enhancement function more accurately, each pixel in the image needs to be classified. When the gray value of a pixel is greater than the average brightness, it is considered as a bright spot. When the gray value of a pixel is less than the average brightness, it is considered as a dark point. When the gray value of a pixel is equal to the average brightness, it is considered as a smooth point. Each pixel of the image is analyzed  
Figure 3: SEM image of coral reef. and processed to determine the enhancement function more accurately. The average brightness of the extracted image is the characteristic component, and the expression of the average brightness \(v\) is:  
\[v=\sum_{g=1}^{L}\frac{g}{L}\cdot\frac{i_{g}}{M\cdot N} \tag{1}\]  
where \(L\) represents the image gray level and \(g\) represents the pixel gray value. \(i_{g}\) is the number of pixels of the image gray level \(g\), and \(M\) and \(N\) are the total number of rows and columns of the image matrix, respectively. In order to reduce the enhancement amplitude of pixels with high brightness or darkness and increase the enhancement amplitude of relatively smooth pixels, this paper quantifies the enhancement amplitude of light and dark pixels unevenly, so that there is no ringing phenomenon in image enhancement. In this paper, the nonlinear transformation function is used to quantify the enhancement amplitude of pixels, and the expression of the enhancement function \(Z(g)\) is:  
\[Z(g)=\frac{1}{1+\left(v\cdot\frac{g}{L}\right)^{E}} \tag{2}\]  
where, the value range of \(Z(g)\) is \((0,1)\), and \(E\) controls the slope of the function. When the gray value is closer to the average value \(v\), \(Z(g)\) is closer to \(0.5\), indicating that the pixel is relatively smooth and the contrast is relatively small; when the gray value is farther away from the average value \(v\) and \(Z(g)\) is closer to \(0\) or \(1\), it indicates that the darker or brighter the pixel, the greater the contrast. The traditional gamma correction has a certain gamma index value, which can only expand or compress a certain gray range.