一种基于空间色散与彩色梯度的聚焦评价算法
DOI:
CSTR:
作者:
作者单位:

1.安徽建筑大学机械与电气工程学院合肥230601;2.合肥工业大学仪器科学与光电工程学院合肥230009

作者简介:

通讯作者:

中图分类号:

TN247;TP391.41

基金项目:

国家重点研发计划:大视场缺陷快速发现和定位技术及模块开发(2023YFF0715502)资助


Focus measure algorithm based on spatial dispersion and color gradient
Author:
Affiliation:

1.School of Mechanical and Electrical Engineering, Anhui Jianzhu University, Hefei 230601, China; 2.School of Instrument Science and Optoelectronics Engineering, Hefei University of Technology, Hefei 230009,China

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    传统聚焦评价算法在处理彩色图像时,通常将其先转化为灰度图像,该过程会造成颜色信息丢失,导致聚焦评价结果不够准确。针对此问题,提出了一种基于空间色散和彩色梯度的聚焦评价算法。首先,在RGB空间中计算局部窗口内相邻像素间颜色向量的欧氏距离,构建像素色差集合,将集合的和与方差的乘积作为空间色散值;其次,利用彩色图像在RGB三通道上的梯度值构建空间相关矩阵,将该矩阵的迹作为彩色梯度值;最后,将空间色散值和彩色梯度值作为先验分布函数和似然函数,利用贝叶斯统计原理计算高斯后验分布函数作为该算法的聚焦评价函数。该算法不仅提高了彩色图像聚焦评价的准确性和峰值响应速度,还提高了弱纹理区域和颜色信息不丰富区域的聚焦分辨能力。实验结果表明,所提算法相较于几种主流方法,聚焦评价曲线的峰值灵敏度、陡峭度、平缓区波动量3项评价指标,在仿真图像和真实图像上分别提升了9%和15%;将所提聚焦评价算法应用于三维重建,仿真图像的重建结果在RMSE和CORR指标上表现最优,恢复的真实图像深度值相对误差不超过4.6%,所提算法聚焦评价性能优越,能显著提升三维重建的精度。

    Abstract:

    Traditional focus measure algorithms typically convert color images into grayscale prior to processing, which inevitably leads to the loss of chromatic information and consequently reduces the accuracy of focus assessment. To address this limitation, this study proposes a focus measure algorithm based on spatial chromatic dispersion and color gradients. First, the Euclidean distances between color vectors of adjacent pixels within a local window in the RGB space are calculated to construct a set of pixel-wise chromatic differences, and the product of the sum and variance of this set is defined as the spatial chromatic dispersion. Second, a spatial correlation matrix is constructed using the gradient values of the RGB channels of the color image, and the trace of this matrix is adopted as the color gradient measure. Finally, the spatial chromatic dispersion and color gradient are modeled as the prior distribution and likelihood function, respectively, and a Gaussian posterior distribution is derived using Bayesian statistics to serve as the focus measure function.The proposed algorithm enhances the accuracy of focus evaluation for color images and accelerates peak response, while also improving discrimination in weak-texture regions and areas with limited color information. Experimental results show that, compared with several mainstream methods, the proposed algorithm achieves improvements of 9% and 15% in peak sensitivity, curve steepness, and flat-region fluctuation on simulated and real images, respectively. When applied to 3D reconstruction, the algorithm attains the best performance in terms of RMSE and CORR on simulated datasets, and the relative depth-value error on real images does not exceed 4.6%. These findings demonstrate that the proposed algorithm exhibits superior focus measurement performance and can significantly improve the accuracy of 3D reconstruction.

    参考文献
    相似文献
    引证文献
引用本文

史艳琼,徐乙喆,杨永辉,卢荣胜.一种基于空间色散与彩色梯度的聚焦评价算法[J].电子测量与仪器学报,2026,40(1):256-268

复制
分享
相关视频

文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2026-03-27
  • 出版日期:
文章二维码
×
《电子测量与仪器学报》
关于防范虚假编辑部邮件的郑重公告