2023年3月下131AgriculturalMachineryandEquipment农业机械与装备基于曲线拟合与数据相似度的自动对焦算法陈仕旗,李明臻,苏建功(长安大学工程机械学院,陕西西安710064)摘要:开环控制是自动对焦系统中常见的控制方式,但受图像噪声、系统迟滞误差影响,存在对焦精度差甚至对焦失败等问题。为解决这一问题,提出一种基于曲线拟合与数据相似度的自动对焦算法。该算法将曲线拟合与数据相似度算法相结合,准确计算出精准对焦位置。实验结果表明:该算法相比传统自动对焦算法具有更高的精度和抗噪性,可有效避免迟滞误差影响,适用于开环控制的自动对焦系统,适合农用机械的智能化运用。关键词:图像处理;自动对焦;曲线拟合;数据相似度;聚焦测度中图分类号:TP211+.6文献标志码:ADOI:10.3969/j.issn.1672-3872.2023.06.038AutofocusAlgorithmBasedonCurveFittingandDataSimilarityChenShiqi,LiMingzhen,SuJiangong(SchoolofConstructionMachinery,Chang’anUniversity,ShaanxiXi’an710064)Abstract:Open-loopcontrolisacommoncontrolmethodinautofocussystem,butitisaffectedbyimagenoiseandsystemhysteresiserror,soithassomeproblemofpoorfocusingaccuracyorevenfocusingfailure.Tosolvethisproblem,apassiveautofocusalgorithmbasedonthesimilarityoffocusingmeasuredataisproposed.Bycombiningcurvefittingwithdatasimilarityalgorithm,theprecisefocuspositioncanbecalculatedaccurately.Theexperimentalresultsshowthattheproposedalgorithmhashigheraccuracyandnoiseresistancethanthetraditionalauto-focusingalgorithm,andcaneffectivelyavoidtheinfluenceofhysteresiserror.Itissuitablefortheopen-loopcontrolledautofocussystem,andissuitablefortheapplicationofintelligentagriculturalmachinery.Keywords:imageprocessing;autofocus;curvefitting;datasimilarity;focusmeasure0引言随着光学仪器的迅速发展,自动对焦技术显得越来越重要,该技术被广泛用于工业相机、显微镜、农用机械导航等各行各业中[1-3]。依据能否知晓镜头绝对位置,自动对焦系统可分为闭环控制自动对焦系统与开环控制自动对焦系统。与闭环控制自动对焦系统相比,开环控制自动对焦系统无法准确获取镜头绝对位置,对焦精度较低,算法更加复杂,但开环控制自动对焦系统结构简单,成本低,应用范围更广,更适合农用机械。许多学者针对开环控制自动对焦系统进...