This invention relates to the field of
image processing technology, specifically to an automatic
color correction method for
microscope images. The method includes: extracting the background component of a metallographic
sample image sequence to fit a predicted illumination field; constructing a
thermal stability compensation model that correlates power-on time with real-time temperature; and performing level reference subtraction on the original image to eliminate
black level drift. A constrained normalized division is performed on the initial correction image using the illumination field to obtain an intrinsic reflectance image.
Color shift correction is achieved by statistically analyzing the histograms of the red, green, and blue channels and identifying the matrix's main peak, using the mean of its central pixel value as a reference for
gain scaling. Finally, a piecewise nonlinear mapping transformation is performed based on the local maxima of different
metal phases, followed by slope
smoothing. This invention solves the color
distortion problem caused by the
coupling of uneven illumination and thermal drift in
microscopic imaging, effectively improving the fidelity and contrast of metallographic images, and is applicable to the field of automated metallographic analysis.