SAM2融合RGB-D坐标转换的工件几何参数测量
DOI:
CSTR:
作者:
作者单位:

1.重庆理工大学光纤传感与光电检测重庆市重点实验室重庆400054; 2.重庆机床集团有限责任公司重庆401336; 3.重庆理工大学机械工程学院重庆400054

作者简介:

通讯作者:

中图分类号:

TH161

基金项目:

重庆市自然科学基金创新发展联合基金(CSTB2023NSCQ-LZX0068)、科研创新团队光电检测与视觉感知(2023TDZ014)项目资助


Measurement of workpiece geometric parameters using SAM2 integrated RGB-D coordinate transformation
Author:
Affiliation:

1.Chongqing Key Laboratory of Fiber Optic Sensing and Optoelectronic Detection, Chongqing University of Technology, Chongqing 400054, China; 2.Chongqing Machine Tool Group Corporation, Chongqing 401336, China; 3.School of Mechanical Engineering, Chongqing University of Technology, Chongqing 400054, China

Fund Project:

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

    尺寸测量是工业产品外观质检的重要环节,传统接触式测量效率低、受主观因素影响大。而视觉测量需针对不同对象设计对应的尺寸边界提取方案,高精度三维测量更是开发难度大,适用性不足。针对以上问题,故提出一种基于零样本分割大模型(SAM2)融合RGBD坐标转换的非接触式工件主体参数测量方法。首先,评估阈值分割、边缘分割、颜色空间分割、 GrabCut分割这4类传统图像分割算法的掩膜分割效果,选取其中最优者GrabCut分割,与主流深度学习分割算法及SAM2进行对比,以证明SAM2的优越性;然后,搭建双目立体视觉实验平台,采集工件高精度点云,并对点云进行滤波、平滑、空洞填补等处理,然后采集目标工件深度图和RGB图,利用SAM2的零样本泛化分割能力,通过正负点交互引导,在RGB图上实现高精度目标分割,得到初始掩膜;接着采用形态学优化和连通域分析生成拓扑闭合的平滑掩膜,并通过主成分分析(PCA)提取其特征骨架;最后沿骨架生成垂线段并融合对齐的深度图三维坐标计算几何参数。通过对比数显游标卡尺和点云的测量结果,对所提方法测量结果进行分析。实验结果表明,在套筒、钳具和电机这3类工件测量中,套筒直径测量平均绝对误差为0.0175 mm,钳具与电机参数测量平均绝对误差分别为0.028 3和0.023 7 mm,均满足精度要求。

    Abstract:

    Dimensional measurement is a critical step in the visual inspection of industrial products. Traditional contact-based measurement methods suffer from low efficiency and significant susceptibility to subjective factors. Meanwhile, vision-based measurement requires tailored dimensional boundary extraction schemes for different objects, and high-precision 3D measurement techniques often involve high development complexity and limited applicability. To address these challenges, this study proposes a non-contact method for measuring main workpiece parameters based on the segment anything model 2 (SAM2) with RGB-D coordinate transformation. First, the mask segmentation performance of four traditional image segmentation algorithms—threshold segmentation, edge segmentation, color space segmentation, and GrabCut segmentation—is evaluated. Among them, GrabCut segmentation, identified as the optimal traditional method, is compared with mainstream deep learning segmentation algorithms and SAM2 to demonstrate the superiority of SAM2. Subsequently, a binocular stereo vision experimental platform is constructed to capture high-precision point clouds of workpieces. The point clouds undergo processing steps such as filtering, smoothing, and hole filling. Depth maps and RGB images of the target workpieces are then acquired. Leveraging SAM2′s zero-shot generalization capability, high-precision target segmentation is achieved on RGB images through positive and negative point interaction guidance, yielding initial masks. These masks are further refined via morphological optimization and connected component analysis to generate topologically closed smooth masks. A feature skeleton is extracted using principal component analysis (PCA). Finally, perpendicular segments are generated along the skeleton, and geometric parameters are calculated by integrating 3D coordinates from the aligned depth maps. The measurement results of the proposed method are analyzed by comparing them with those obtained using digital calipers and point cloud data. Experimental results demonstrate that, in measurements of sleeves, pliers, and motors, the mean absolute error for sleeve diameter is 0.0175 mm, while the mean absolute errors for plier and motor parameters are 0.028 3 and 0.023 7 mm, respectively, all meeting the required precision standards.

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

宋涛,王泓竣,简圣前,汤斌,邹政. SAM2融合RGB-D坐标转换的工件几何参数测量[J].仪器仪表学报,2025,46(10):331-344

复制
分享
相关视频

文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2026-01-13
  • 出版日期:
文章二维码