Monitoring climate change effects on coral reefs using edge-based image segmentation

Coral reefs are valuable ecosystems that face vulnerability to climate change impacts. Underwater images often encounter noise from various factors, such as water turbidity, lighting conditions, attenuation, and scattering, which can complicate edge detection and segmentation processes, leading to inaccuracies. However, image processing techniques offer a viable solution to this issue. In this study, an edge-based segmentation approach is proposed that uses multiple contrast techniques to detect and quantify changes in coral reef imagery. The proposed approach effectively identifies changes in coral reef imagery, making it a valuable tool for monitoring climate change's effects on these ecosystems. Furthermore, high-resolution images at different time points and locations were collected, and then an edge-based segmentation approach was utilized to enhance the accuracy of edge detection and segmentation. Comparing the proposed method with traditional segmentation techniques showed a significant improvement in terms of segmentation precision. Subsequently, alterations in the structure and composition of coral reefs are observed, indicating the influence of climate change on these ecosystems. This research highlights the capabilities of image processing techniques using edge-based segmentation in monitoring coral reefs. It offers an effective and precise approach to detecting changes in coral reef images, thereby contributing to conservation endeavors.


INTRODUCTION
Coral reefs are vital for biodiversity and provide essential services to human populations, including food resources, recreation, and protection against natural disasters [1].However, they are under threat from climate change, pollution, overfishing, and habitat degradation [2].Monitoring coral reefs is crucial for understanding climate change impacts and developing conservation strategies.Image processing techniques have emerged as non-destructive tools for assessing coral reef conditions [3], [4].However, underwater image monitoring poses challenges due to the complex underwater environment introducing noise and distortions, making accurate identification and segmentation of coral reefs difficult [5].Traditional methods may struggle with their complex structures.To address these challenges, this research proposes an edge-based image processing approach for monitoring coral reefs.It involves detecting and extracting edges from underwater images, enabling the differentiation of various coral reef regions.Additionally, image enhancement techniques are used to enhance edge detection performance and improve the segmentation process for identifying changes in coral reef structure.The proposed approach enhances the information and detail of underwater images through the combination of multiple contrast approaches with edge-based segmentation.Furthermore, it contains histogram equalization, adaptive histogram equalization, contrast enhancement with linear stretching, preprocessing with median and adaptive filtering for minimizing distortion.A comprehensive flowchart illustrates the proposed method by detailing each stage of optimal contrast enhancement on coral reef images.This shows how the method enhances image quality, providing insights into climate change's coral reef consequences and supporting conservation efforts as shown in Figure 1.This paper provides an overview of research exploring image processing for climate changeimpacted coral reef monitoring.Prior studies used edge detection and the Lab color model to enhance underwater images [12].Some comparative studies used various edge detection techniques for underwater images [13].Furthermore, digital photogrammetry showed higher accuracy than traditional coral sampling designs in characterizing hard coral species composition, abundance, and cover [14].Image-based methods achieved 88.75% accuracy in detecting coral reef changes [15].Semi-automatic drone image processing resulted in substantial substrate classification and live coral cover mapping accuracy [16].Restoring color in single underwater images utilizing Haze-Lines and an innovative quantitative dataset [17].Developing an underwater video segmentation system for target object detection based on pattern analysis [18] Fusion-based techniques using wavelet decomposition enhance underwater images [19].Enhancing underwater images through conventional methods and evaluating quality metrics [20].Novel algorithms like bidirectional empirical mode decomposition (EMD) improve visual clarity [21].Enhancement of underwater images using a histogram matching-based algorithm with logarithmic transformation and spatial equalization [22].
In summary, image enhancement, particularly edge-based segmentation is crucial for predicting climate change effects on coral reefs.Accurate detection of structural and compositional changes is vital as alterations in coral colony shape and size indicate climate-induced stress and damage.Segmenting image regions helps in tracking reef changes, conservation, and marine resource management.Furthermore, image enhancement techniques offer predictive insights into climate change's impact on coral reefs guiding conservation efforts.The paper comprises four sections.Section 1 covers the study's background.Section 2 details materials and methods, including image enhancement, multiple thresholding, edge detection algorithms, data collection, experimental design, and evaluation metrics.Section 3 presents experimental results and discussions and section 4 offers concluding remarks on the research.

MATERIALS AND METHODS
Coral reefs are highly vulnerable to environmental shifts, making precise monitoring essential for assessing climate change impacts.These proposed methods help enhance underwater image quality by enabling precise edge segmentation in coral reef evaluations.The combination of segmentation and edge detection facilitates comprehensive ecosystem analysis with quantitative measurements tracking health changes continuously.Embracing image processing in coral reef monitoring provides valuable insights into climate change's effects on these ecosystems and supports conservation efforts.

Image enhancement
In coral reef monitoring, enhancing underwater image quality is essential for improved visibility during continuous analysis [23].This process encompasses multiple images processing techniques, including enhancement, segmentation, edge detection, quantitative measurement, and sensitivity.Among these, image enhancement is pivotal, involving adjustments to digital images for display or further analysis.This study employed standard enhancement methods like contrast stretching, histogram equalization, and contrastlimited adaptive histogram equalization to enhance intensity-level contrast, as shown in (1): where (, ) represents the original image, (, ) represents the output picture after contrast enhancement, and f represents the transformation function.
On the other hand, histogram equalization enhances contrast in images while preserving the grayscale distribution.The formula for histogram equalization involves the computation of the probability density function (PDF), followed by the derivation of the cumulative density function (CDF).The calculation for histogram equalization involves (2).

𝑃𝐷𝐹(𝑥) = 𝑛𝑝/𝑁
(2) The probability density function, denoted as PDF(x), np represents the number of pixels with intensity value , and the variable  represents the total pixel count in the image.Meanwhile, the formula for the cumulative distribution function is (3): where () represents the cumulative distribution function, and the sum is taken over all intensity values i less than or equal to x.In scenarios requiring more than simple histogram equalization, contrast-limited adaptive histogram equalization (CLAHE) offers an optimized solution [24].Unlike global methods, CLAHE focuses on local image areas, enhancing select regions effectively.Its formula is expressed: where (, ) represents the output image after contrast-limited adaptive histogram equalization, (, ) serves as the input image, while using L to symbolize the clip limit and  represents the size of the local histogram region.By combining median filtration and edge sharpening, noise reduction occurs while preserving high spatial frequency content.Adjusting the intensity histogram using the cumulative distribution function can alter an image's contrast and frequency response.Median filtering replaces the center pixel with the median value in a defined area reducing noise and enhancing visual clarity.
(, ) =  {(, ), ( − 1, ), ( + 1, ), (,  − 1), (,  + 1)} where (, ) represents the output pixel after median filtering and  represents the input image.In summary, altering an image's intensity histogram through the cumulative distribution function offers effective control over frequency response and contrast.This technique adjusts pixel intensities which resulting in notable image transformations.Such methods find application in monitoring and protecting coral reefs against climate change impacts which enable researchers to assess reef conditions and mitigate potential threats thus supporting their long-term preservation.

Segmentation
Segmentation in coral reef monitoring is crucial for isolating objects of interest from the background.In the context of climate change impact analysis, various segmentation methods are valuable for detecting changes in coral reefs.The variable T stands for the threshold value, T_max represents the highest intensity value within the image and T_min is associated with the lowest intensity value existing in the image.In the context of local thresholding, threshold values are chosen for individual image segments taking into account the specific statistical properties within those regions.This technique is useful when the illumination and contrast of the image are uneven.The local thresholding formula can be estimated as: T(x,y) stands for the threshold value allocated to pixel (x,y), where k serves as the scaling factor and mean(x,y) corresponds to the local mean intensity in the image within a small neighborhood centered on pixel (x,y).Meanwhile, adaptive thresholding is a variation of local thresholding that adapts the threshold value for each pixel based on the local image statistics.This technique is useful when the illumination and contrast of the image vary widely across the image.The formula for adaptive thresholding can be articulated: where (, ) is the threshold value at pixel (, ), (, ) is the local mean intensity of the image in a small neighborhood centered on pixel (, ) and  is a constant offset.
In coral reef monitoring, various segmentation methods were used such as global, local, and adaptive thresholding which divided images into regions of interest.These regions encompass reef components like healthy coral, dead coral, bleached coral and algae.Segmenting images enables researchers to study climate change effects, enhancing reef health and resilience.

Edge detection
Edge detection plays a vital role in monitoring coral reef health and assessing climate change impacts.It helps identify various elements within coral reefs such as colonies, rocks and sand enabling the quantification of element distribution and ecosystem changes.Researchers aim to improve edge detection algorithms, often utilizing operators like Sobel, Prewitt, Roberts, Log and Canny.These first-order derivatives and second-order derivatives provide precise curvature data but require noise management in practical applications [26].Equation ( 9) and ( 10) correspond to the first-order derivative while (11) illustrates the second-order derivative.
|∇| denotes the magnitude of the gradient and θ represents for orientation.
∇ 2  represents the Laplacian of the image I, and 2 are the second partial derivatives of the image with respect to x and y, respectively.These equations and derivatives find widespread application in edge detection algorithms, including operators like Sobel, Prewitt, Roberts, Laplacian of Gaussian (LoG), and the Canny edge detector.These algorithms are employed to detect and locate edges and transitions within digital images.

MSE and PSNR
Mean squared error (MSE) and peak signal-to-noise ratio (PSNR) are crucial metrics in coral reef monitoring for assessing image enhancements' effectiveness for climate change impact analysis [27].They The original image is denoted by (,), the enhanced image by (,), and  represents the total pixel count in the image in the given formula.The formula for PSNR is given by: The variable MAXI denotes the maximum pixel intensity in the image, while MSE calculates the mean squared error.In the context of coral reef monitoring, the evaluation of image enhancement techniques can be accomplished using MSE and PSNR metrics.These metrics contribute to the enhancement of underwater image quality streamlining the process of detecting and monitoring coral reef changes.By using these metrics, researchers can determine which techniques work best in different conditions and optimize their use for more effective coral reef monitoring.

Sensitivity
Sensitivity analysis in image processing evaluates how changes to input parameters influence results.It ensures precision in determining climate change impacts in coral reef monitoring.Researchers evaluate and test image processing systems using confusion tables to determine the best settings for precise detection.Edge classification accuracy is reflected in sensitivity, which is calculated using the procedure in Table 1.To evaluate the effectiveness of various edge detection techniques, this study uses sensitivity estimation distributions.

Data preparation
The study used images of three different coral species taken in Malaysia's Redang Islands, as illustrated in Figure 2. The sampling site areas are shown in Figure 2

RESULTS AND DISCUSSION
The studies, carried out in MATLAB with the image processing toolbox, enhanced image quality by employing approaches such as contrast stretching, histogram equalization, and contrast-limited adaptive histogram equalization.The Acropora branching (ACB) and Acropora submassive (ACS) datasets were tested with the use of thresholding techniques including adaptive, global, and local histograms.The MSE and PSNR calculations were used to evaluate image quality.Table 2 highlights the MSE and PSNR results for image improvement, which are detailed in the next subtopic.

Experiment 4: Sensitivity Results for image enhancement
This study evaluates the sensitivity of various edge detectors when using different image enhancement techniques.The results indicate that increasing the threshold value results in higher sensitivity, as shown in Table 3.The findings in Table 3 indicate that a threshold value higher than 0.20 may result in the loss of important edges, except when using Canny edge detection, which preserves all edges accurately.Furthermore, the sensitivity graph in Figure 7 illustrates that the Canny operator is the most sensitive, with an average of approximately 96%, while the Prewitt edge detection technique is the least sensitive, averaging 24%.Finally, Figure 8 summarized coral image results using different edge detection.

CONCLUSION
In conclusion, this study highlights the value of edge-based picture segmentation for tracking the effects of climate change on coral reefs.Our method outperforms conventional techniques in precisely identifying reef changes, as shown by comparisons with them.Stretching is one contrast approach that improves precision.This research offers an important tool for environmental monitoring in addition to improvements in underwater science.Reef monitoring accuracy is critical for conservation and targeted efforts.Future work will focus on improving the approach and merging edge-based techniques with machine learning.This study improves coral reef monitoring while emphasizing the importance of technology in solving climate change challenges.The preservation of these ecosystems benefits from a fuller comprehension of reef dynamics.

Figure 1 .
Figure 1.The proposed method for enhancing underwater image contrast & Comp Eng, Vol.14, No. 1, February 2024: 398-408 400 Gx represents the gradient in the x-direction and y-direction, respectively.Terms of the image I with respect to x and y.
& Comp Eng, Vol.14, No. 1, February 2024: 398-408 402 gauge disparities between original and enhanced images improving underwater image quality in climate change-induced coral reef monitoring.The MSE formula is shown in (12). = 1/ * [ = 1  ] ((, ) − (, ))^2 (12) (a) and are denoted by red circles.The dataset used in the study's experiment is shown in Figure 2(b) and the compilation received valuable input and support from the Institute of Oceanography and Environment (INOS) at Universiti Malaysia Terengganu.Transect lines were set up at depths of 3 and 10 meters, and pictures and videos were acquired with a highquality underwater camera.

Figure 8 .
Figure 8.The coral image results using different edge detectors and various threshold values Common techniques like global thresholding, local thresholding, and adaptive thresholding are used to monitor variables like coral health, species composition and distribution[25].Global thresholding involves selecting a threshold value to differentiate objects from the background intensities as expressed in the formula.These segmentation methods provide valuable insights for conservation and management efforts.The global thresholding formula can be calculated as: Monitoring climate change effects on coral reefs using edge-based … (Ezmahamrul Afreen Awalludin) 401 based on pixel

Table 1 .
Explanation of the Sensitivity Variable

Table 2 .
Result of MSE and PSNR measurement

Table 3 .
The sensitivity results of the edge detection