Magnesium Ingot Stacking Segmentation Algorithm for Industrial Robot Based on the Correction of Image Overexposure Area

Sensors (Basel). 2023 Jul 30;23(15):6809. doi: 10.3390/s23156809.

Abstract

This paper proposes an adaptive threshold segmentation algorithm for the magnesium ingot stack based on image overexposure area correction (ATSIOAC), which solves the problem of mirror reflection on the surface of magnesium alloy ingots caused by external ambient light and auxiliary light sources. Firstly, considering the brightness and chromaticity information of the mapped image, we divide the exposure probability threshold into weak exposure and strong exposure regions. Secondly, the saturation difference between the magnesium ingot region and the background region is used to obtain a mask for the magnesium ingot region to eliminate interference from the image background. Then, the RGB average of adjacent pixels in the overexposed area is used as a reference to correct the colors of the strongly exposed and weakly exposed areas, respectively. Furthermore, in order to smoothly fuse the two corrected images, pixel weighted average (WA) is applied. Finally, the magnesium ingot sorting experimental device was constructed and the corrected top surface image of the ingot pile was segmented through ATSIOAC. The experimental results show that the overexposed area detection and correction algorithm proposed in this paper can effectively correct the color information in the overexposed area, and when segmenting ingot images, complete segmentation results of the top surface of the ingot pile can be obtained, effectively improving the accuracy of magnesium alloy ingot segmentation. The segmentation algorithm achieves a segmentation accuracy of 94.38%.

Keywords: exposure correction; magnesium ingot segmentation; magnesium ingot sorting; the high reflection of magnesium ingot.