Abstract:To address the spectral distortion of printed circuit board assembly (PCBA) transparent coatings caused by differences in substrate reflection characteristics, as well as issues such as missed detection, peak shift, and inaccurate measurement in traditional algorithms, this article investigates the problem based on the chromatic confocal measurement principle. The influence of substrate material and surface appearance on the reflected spectrum is clarified, and the mechanism of peak-position shift under multi-substrate reflection conditions is analyzed. A robust dual-interface localization framework for transparent coatings is proposed to suppress peak-position drift. First, sliding quantile baseline correction is used to suppress residual baseline drift and negative values at the noise floor. Then, the Savitzky-Golay (SG) filtering is used to reduce high-frequency noise while maintaining the peak shape and peak position stability. Combined with local Gaussian fitting under dual-peak segmentation constraints, the method accurately locates the two peak positions even when spectral shapes differ significantly. Finally, the geometric thickness is obtained through distance-pixel mapping and refractive index correction. Repeatability tests are conducted on five types of typical substrate samples. The experimental results show that the relative standard deviations (RSD) of thickness results at each measuring point range from 0.34% to 1.18%. Among them, the RSD of all measuring points of sample 3 and sample 4 is lower than 0.6%, with average RSD values of 0.46% and 0.36%, respectively. The average RSD values of sample 1, sample 2, and sample 5 are 0.89%, 0.83%, and 0.93%, respectively. The repeated-measurement range of all measurement points is 0.82~3.59 μm, indicating overall micron-level repeatability. Compared with the LS225 coating thickness gauge, the absolute error of all measurement points is less than 5 μm, and the relative error is less than 5%. This study shows that the proposed method achieves micron-level accuracy and high repeatability, providing reliable technical support for online thickness measurement of PCBA transparent coatings under multi-substrate reflection.