Numerous deformation and processing application scenarios of magnesium alloy sheets require high precision and efficiency in temperature detection. Traditional contact temperature measurement and infrared thermal imaging temperature measurement methods suffer from low accuracy and susceptibility to environmental influences. To this end, a real-time sensing method for determining the average surface temperature of magnesium alloys using visible light images is proposed in this paper. Firstly, real-time surface images of 3 mm thick magnesium alloy sheets were captured as the temperature decreased from 450 °C to 300 °C under varying light intensities. Then, calculate the high-level color features based on the grayscale frequency of the Red Green Blue color space of the image, and select the high-level color features with a strong correlation with temperature by Fisher criterion. Finally, a mapping relationship between the high-level color features of magnesium alloy images and temperature was established using the K-nearest neighbor algorithm. The results show that images in RAW format have a wider grayscale range compared to JPG, which is helpful in determining the mapping relationship between image color features and temperature. After extracting and selecting the high-level color features that have a strong correlation with temperature, the dimensions of input features are reduced. Using the K-nearest neighbor algorithm can fit the complex nonlinear relationship between high-level color features and temperature more accurately.
Read full abstract