设计了一种校正算法用于校正双光子荧光显微镜等高速扫描成像系统中共振振镜扫描导致的图像畸变。首先对共振振镜的扫描运动建立模型,推导出非线性扫描的运动公式,进而得到图像畸变公式;然后对一块朗奇光栅样品扫描成像,设计了多峰高斯拟合算法得到光栅所有条纹的宽度变化并通过最小二乘法将条纹宽度数据拟合成一条畸变曲线;最后利用畸变曲线对图像进行校正。结果表明:采用提出的校正算法可使系统最大畸变减小到传统正弦校正方法的1/3,相对畸变减小到1/5,校正效果比传统的正弦校正法提高了2倍。由于提出的曲线拟合校正算法不用增加额外的光路,且不需要切割边缘图像,故显示了极好的图像使用效率和校正效果。
An efficient algorithm was proposed to correct the image distortion caused by a resonant scanner in higher speed scanning and imaging systems of confocal or two-photon laser scanning microscopes.A model of scanning movement for the resonant scanner was established,the movement formula of the nonlinear scanning was deduced,so that the distortion equation of the image was obtained.Then,a Ronchi grating sample was imaged by canning,the multi peak Gauss fitting algorithm was designed to get all grating line widths.Those unequal line-widths were fitted into a distortion curve by least square method.Finally,the image correction was achieved through compressing orstreching original image based on correction coefficients from the distortion curve.Experimental results indicate that the curve fitting correction algorithm reduces the maximum distortion and the relative distortion to 1/3and 1/5those of traditional one and the correction effect is twice as much as that of sinusodal correction method.The fitting correction algorithm does not need to add other light paths and segment edge images,so it shows good image efficiency and correction effect.