E-Archive
VOL. 25 July ISSUE YEAR 2024
Science Update
in Vol. 25 - July Issue - Year 2024
Coverage Determinations Through Fuzzy C-Means Clustering
Figure 1: Shot peened areas from shot (a) S110, and (b) S330. The dark regions are the dimples which accounts for the coverage.
Figure 2:Segmented image utilising two clusters. Shot type S110 and intensity 7A
Figure 3:Segmented image utilising two clusters. Shot type S330 and intensity 25A
Table 1: Coverage determinations for each coverage areas
Introduction
Controlled shot peening is a cold working treatment in which small balls (usually of cast steel, but sometimes of ceramic glass, casting or cut steel wire) collide with the material surface to be treated at high speed. The particles plastically deform and indent the surface. In this sense, shot peening requires the measurement and control of several variables such as diameter of the shot and material to be impacted; the nozzle movement, that includes massic flow of the shot, angle and speed of the balls and lastly, the indents and exposure time. This later, are usually considered as shot coverage and intensity, respectively. Coverage is defined as a measure of the fraction of a surface area that has been impacted in given peening time, usually expressed as a percentage of obliteration of the original surface. Coverage also represents a measure of the uniformity of the residual stresses in the subsurface layer. These residual stresses strengthen the metallic surface to prevent fatigue and corrosion failure. Accordingly, less than complete coverage is ineffective since the unpeened portion of the surface would contribute to an uneven distribution of the residual stresses and consequently, significant reductions in fatigue performance. Coverage, is conventionally evaluated after peening by inspecting a particular location with a microscope, replicas, fluorescent tracers and/or specimens as reference. Nonetheless, this approach is prone to inconsistencies and errors in the results. To determine coverage more efficiently and reliably, the development of procedures based on computer techniques deem promising. Lubna Shahid, et. al, [1] developed an algorithm for vision-based surface coverage measurement. The images were pre-processed by filtering and afterwards a morphological closing was employed. Clustering was carried out using the algorithm K-means and then data was sent for segmentation. However, the machining streaks of the peened area were not eliminated by the pre-processing and the algorithm did not work well when camera resolution decreased. Determination of coverage by using two image segmentation methods applicable to images of aluminium alloy peened plates was proposed by L.C. Vieira, et. al, [2]. They adopted an inductive algorithm to generate robust decision-making segmentation rules and a multiagent system (MAS), to solve some of the remaining segmentation problems. This research closely managed to discriminate peened from unpeened areas of plates submitted to coverage peening process. Many other research works on coverage through image analysis is found in the literature [3-5]. Despite their advances on the treated images, those procedures either lack of more robust image segmentation techniques due to the reflective and non-uniform illumination aspects of the peened surfaces or involve quite complex processing algorithms. On the other hand, shot peening coverage has not been addressed by data clustering algorithms yet. In particular, to our knowledge, there is no work on the algorithm Fuzzy C-Means (FCM) for estimating coverage. In the present study, the FCM algorithm is utilised for discriminating peened from unpeened areas of a 2024-T351 aluminium alloy.
Methodology
Shot peening was conducted on 2024-T351 aluminium alloy (AA) specimens (widely used material in aerospace applications) with dimensions 25 by 19 by (5-7) mm. The width of 19 mm was similar to the width of the Almen strips in order for facilitate the clamping on the holding fixture. A thickness greater than 5 mm was utilised to minimise the typical double deformation after peening as well as to avoid the end effects. The image processing FCM algorithm performed with images captured from an optical microscope. Figure 1 shows surface images of the peened AA, captured under non-uniform illumination conditions. Different types of shot and with 90° incidence angle between the nozzle and the horizontal surface were used. Intensity for each peened AA was 7A(a) and 25A(b), respectively.
FCM is a method for clustering widely used in various fields of engineering, image segmentation, decision-making and data mining [6]. Let consider that is the set of n objects to be partitioned according to a similarity criterion, where is the number of clusters, for . The FCM clustering algorithm is based on the minimization of an objective function called C-means functional [7]:
Where, is the membership matrix of each object i to each cluster j; is the set of centroids and is the centroid of the cluster j; m is the weighting exponent or the fuzzy factor that expresses how much the cluster overlap, indicates the Euclidean distance between the object xi and the centroid vj for i=1,…,n and j=1,…,c. Minimizing Jm, an estimated model of U and V is obtained as
The constraints of fuzzy clustering are formalised as:
In those constraints, the relation indicates that the degree of membership of an object i to a cluster j must be between 0 and 1. defines that the sum of the degrees of membership of an object i to different clusters must be equal to 1. considers that the sum of all the degrees of membership in a cluster must be greater than 0 and less than n, i.e. there must be no empty clusters and only one cluster. The pseudocode of the standard FCM algorithm is as follows:
The FCM algorithm consists of four phases: initialization, centroids calculation, membership matrix calculation, and convergence. After processing an image and applying FCM algorithm that segments the image to identify shotted areas, the execution is then carried out. FCM was implemented in Phyton programming language. The following parameters were tuned into Phyton to modify the performance of FCM:
- n_clusters = 2
- cmeans_result = fuzz.cluster.cmeans(pixels.reshape(1, -1), # Data set (image) treated as a 2D matrix (1, n_pixels)
- c=n_clusters,
- m=2,
- ε=0.001,
- T=100,
- init=None
Results and discussion
Applying the FCM rules to all the pixels of the pre-processed image of Figure 1, a segmented image is obtained as shown in Figure 2. After several programme executions, it was found no difference when selecting more than two clusters. Thus, c = 2 was considered as best in terms of processing times and quality. Nevertheless, comparison of this image with that of Figure 1, some discrepancies are exposed due to the illumination conditions. There appear many screened light spots in the shotted areas, which directly affect the evaluation of coverage. To reduce or even eliminate that issue, a colour-manipulation technique such as Hue Saturation Value (HSV) could be used. This method is a three-dimensional representation of a colour space where the central axis represents intensity. Its usefulness to this case is due to the fact that it separates the colour information (Hue) from the intensity information (Value). Accordingly, HSV facilitates image segmentation, improves colour and objects detection. Application of HSV will be presented in another Science Update column.
For another, when it comes to larger dimples (Figure 3), it seems that FCM algorithm responds better. This later is because the image displays lower background complexity in the impacted areas. Clustering was kept to c = 2 as it behaved alike S110.
To determine coverage for the above peening conditions to each image (Figure 2-3), the FCM allows for each pixel being associated to numerous clusters with different degrees of membership. Due to the fact two clusters were employed for the image segmenting, Phyton code can find the cluster index with maximum membership for each pixel delegating each pixel to the cluster that most belongs. In terms of Phyton´s code, the command used for the above action is: cluster_membership = np.argmax(cmeans_result[1], axis=0). The resulted number of memberships had to be saved to a csv file according to the following code:
cluster_membership = cluster_membership. Flatten( )
df = pd.DataFrame(cluster_membership, columns=[´Cluster´])
df.to_csv(r+´membership_filename.csv´, index=False)
Therefore, the calculated number of pixels for each dimpled area in each one of the selected images are shown in Table 1.
The above percentage of coverage for each type of shot seems to be a little bit lower if it is compared with either Avrami and/or Holdgate model (see Science Update column, Vol. 13-January Issue-Year 2012). Specifically, for S110 shot, % coverage using Holdgate´s model results in 94 and for S330 shot, results in 50. However, for Holdgate´s calculations, it is necessary to take into account as noisy factors, overlapping, irregularities in the shot size and variations of the peening process itself like pressure, flow rate, and fluctuations in the oscillating movement of the nozzle.
Conclusion
Determination of coverage of a shot peened area was carried out using Fuzzy C-means algorithm. The segmented images rendered a good quality with a substantial decrement in processing time. This algorithm proves a high viability and reliability to process shot peened images. It is certainly necessary to improve the process including management of colours, which is our next goal.
References
[1] L. Shahid, F. Janabi-Sharifi, and P. Keenan, "A hybrid vision-based surface coverage measurement method for robotic inspection," Robotics and Computer-Integrated Manufacturing, vol. 57, pp. 138-145, 2019. DOI: °https://doi.org/10.1016/j.rcim.2018.11.009.
[2] L. C. Vieira, R. H. Z. d. Almeida, F. P. R. Martins, and A. T. Fleury, "Application of computer vision methods to estimate the coverage of peen formed plates," Journal of Achievements in Materials and Manufacturing Engineering, vol. 43, no. 2, 2010.
[3] L. Shahid, F. Janabi-Sharifi, and P. Keenan, "Image segmentation techniques for real-time coverage measurement in shot peening processes," The International Journal of Advanced Manufacturing Technology, vol. 91, no. 1, pp. 859-867, 2017. DOI: °10.1007/s00170-016-9756-0.
[4] M. Handa, Y. Watanabe, and K. Hattori, "Suggestion of Image Processing System for Measurement of Coverage," The shot peener, pp. 30-34, 2005.
[5] T. Wang, J. Zhang, S. Zhang, X. Zhang, and J. Wang, "A combined computer vision and image processing method for surface coverage measurement of shot peen forming," Journal of Manufacturing Processes, vol. 91, pp. 137-148, 2023. DOI: °https://doi.org/10.1016/j.jmapro.2023.02.035.
[6] K. G. Dhal, A. Das, B. Sasmal, S. Ray, R. Rai, and A. Garai, "Fuzzy C-Means for image segmentation: challenges and solutions," Multimedia Tools and Applications, vol. 83, no. 9, pp. 27935-27971, 2024. DOI: °10.1007/s11042-023-16569-2.
[7] J. C. Bezdek, R. J. Hathaway, M. J. Sabin, and W. T. Tucker, "Convergence theory for fuzzy c-means: Counterexamples and repairs," IEEE Transactions on Systems, Man, and Cybernetics, vol. 17, no. 5, pp. 873-877, 1987. DOI: °10.1109/TSMC.1987.6499296.
E-mail: jose.sr1@tlalnepantla.tecnm.mx
Jeannette Torres Cervantes
PhD Sandra Silvia Roblero Aguilar
PhD Víctor A. Castellanos Escamilla
Eng. Celia Jeannette Torres Cervantes
MSc. Allan Balam Rueda Gutierrez
Affiliation:
Public Education Secretary of Mexico
Tecnológico Nacional de México/IT de
Tlalnepantla
Postgraduate Office