## 2 Materials and Methods
### Segmentation
Finally, the function for computing the weights depends on the centroid function. It comprises a division of the numerator by the denominator, wherein the numerator calculates the absolute differences of the powered intensity and computed cluster centroids, and the denominator calculates the summation of absolute differences powered to the degree of fuzziness. ```
Step 1: Initialize the following parameters: - Number of bits. Number of clusters. - Degree of fuzziness. - Maximum iteration count. - Epsilon threshold for convergence check. Step 2: Image Filtering Procedure: - Generate a padded image using a sliding window with dimensions (kernel_size/2, kernel_size/2). - Compute the mean based on the padded mask. - Pad the resulting mean image to create borders. - Utilize a sliding window to account for neighbor effects and kernel size. - Determine center coordinates using the spatial distance window with (Minkowski distance): - Des_win = ((abs (win_size_y-center_coordinate_y)) \"\" p + abs ((win_size_y-center_coordinate_y) \"\" p)) \"\" (1/p), where p = 2. - Identify the stable group matrix using a Gaussian filter. - Obtain the final filtered image using the formula: - Final_image = sum (weighted_coefficients * old_window)/sum (weighted_coefficients) - Perform Contrast Limited Adaptive Histogram Equalization (CLAHE). Step 3: Weight Initialization: Initialize a two-dimensional matrix based on the number of clusters and gray levels to compute weights. Step 4: Compute Cluster Centroids: - Calculate the X and Y values as follows: - X = sum (histogram * number of gray levels) * power (weight * number of fuzziness) - Y = sum (histogram) * power (weight * number of fuzziness) - Z = X/Y Step 5: Weight Computation Method: - Set power = \(-2\)/number of fuzziness. - Calculate the X value using the formula: X = (gray levels-centroid values) * power. - Compute Y as: Y = sum (gray levels-centroid values) * power. - Determine Z as: Z = X/Y. Step 6: Check Convergence: Determine whether the absolute maximum value of (step 5-step 2) is less than the epsilon threshold. If so, stop; otherwise, proceed to step 4. ```  
**Algorithm 4**ImFCm  
Step 7: Initialize the number of clusters and the number of clusters and the number of clusters. - Calculate the number of clusters and the number of clusters and the number of clusters. - Calculate the number of clusters and the number of clusters and the number of clusters and the number of clusters. - Calculate the number of clusters and the number of The block diagram depicted in Figure 2 outlines the procedure for conducting the Improved Fuzzy C-means clustering. 1. Watershed Segmentation: Watershed segmentation relies on image morphology and operates as a region-based technique. It necessitates selecting at least one marker, often called a \"seed\" point, within each object in the image, with the background being treated as a distinct entity. These markers are typically chosen either by an operator using application-specific knowledge or automatically through an automated process. Once these markers are identified, they undergo growth via morphological watershed transformation, allowing for accurate delineation and segmentation of distinct regions within the image. One significant method in this domain relies on the concept of morphological watersheds. In the context of watershed segmentation, an image is depicted in three dimensions, with the (x, y) coordinates representing the x- and y-axes, and the intensity depicted along the z-axis. This approach conceptualizes an image as a topographical surface, where pixel intensities correspond to peak elevations. Each intensity level represents a distinct elevation plane. The topographical analogy categorizes image points into three groups: regional minima, catchment basins, and watershed lines. The catchment basin group encompasses locations where a hypothetical water droplet would ultimately converge to a single regional minimum.