Research Article

Surface Flaw Detection of Plug Valve Material Using Infrared Thermography and Weighted Local Variation Pixel-Based Fuzzy Clustering Technique

Algorithm 1

Initializations.
Step 1: Initialization of the window size, number of clusters, fuzzy membership matrix, and iteration counter.
Step 2: Initialization of centre of the cluster, for enhanced visualization of the segmented image; normally, cluster centre is in the range of cent = [0, 50,120,200].
Step 3: GRBF kernel
where “σ” denotes the kernel width.
Utilize maximum gray level as the kernel width. The kernel width of GRBF kernel is computed for improved accuracy.
Step 4: Computing ”𝜎” depending on the distance variances amidst all pixels:
,
where 𝑑𝑖 = ‖xix'‖ is the distance from the grayscale of pixel 𝑖 to the grayscale mean of all pixels and 𝑑 is the mean of all distances 𝑑𝑖.
Step 5: Computing the novel cluster centres
Step 6: Computing the novel membership matrix
A membership function for a fuzzy set A on the universal set X is denoted as µA : X → [0, 1], where every factor of X is mapped out to a value in the range of 0 and 1. Membership functions enable to render a pictorial representation of a fuzzy set.
.
Step 7: Computing the objective function
.
Step 8: Computing local average of each pixel, local variance of each pixel, local variation coefficient
,
where xk is the grayscale of any pixel present in the local window Ni around the pixel I, NR is the cardinality of Ni, and xi is its average grayscale.
Step 9: Computing local sum of LVC and exponential function
LVC is applied to an exponential function to deduce the weights inside the local window
.
Step 10: Computing weight for each pixel. PixWgt: this function computes the weight for every pixel depending on the local variation coefficient
.
The ultimate weight allotted to each pixel is related to mean grayscale of the local window
The parametric quantity 𝜑𝑖 allots greater values for pixels having high LVC and lesser values for pixels with low LVC. When the local mean grayscale is the same as the central pixel grayscale, 𝜑𝑖 is zero and the algorithm will function similarly to the standard FCM algorithm.
𝑥 can be substituted with the grayscale of the novel weighted image 𝜉:
,
where xr and Ni are the grayscale and neighbourhood of pixel i and NR is the cardinality of Ni. The above formula ensures that the weighted image is free from parametric quantities that are difficult to adjust.
Step 11: Computing the final weights