用RGB-D相机和样条拟合,精准估算温室黄瓜长度。
Curvature-aware 3D length estimation of greenhouse cucumbers using RGB-D imaging and cubic spline arc-length integration

- 基于SAM分割与三次样条拟合中轴线,计算弧长估计长度。
- 最优方法误差仅4.13% MAPE,优于传统方法。
- 适合农业自动化中的非接触式果蔬测量场景。
商用温室黄瓜生产按果实长度分级,影响采收调度、人力分配与物流。人工测量虽准但难以规模化。本文提出CucumberVision系统,使用Intel RealSense D435 RGB-D相机实现非接触长度估计。先用YOLO26n实例分割定位黄瓜,再以SAM(ViT-B骨干)精修至像素级掩码。对比五种方法:(M1) 主轴骨架扫描线基线;(M2) 框内深度点云主成分分析;(M3) SAM掩码+中轴骨架化;(M4) YOLO26-pose模型预测五个解剖地标并分段计算3D弧长;(M5) 新型中轴样条法:在SAM掩码的3D中轴上拟合三次样条,并通过梯形积分求弧长——首次应用于长形蔬菜测量。所有方法共享五帧深度流平均、彩色流内参对齐及级联降级的自适应选择机制,确保100%覆盖率。在7根黄瓜共48组采集数据(小~8cm,中~13cm,大~25cm)上,以线测为真值,建立显著精度排序:M1(MAPE 9.68%)> M2(5.31%)> M4(5.51%)> M3(5.82%)> M5(4.13%)。M5在贝叶斯校正后α=0.0125下显著领先。另发现使用深度流内参而非彩色流内参(经rs.align(rs.stream.color)后)导致12–18%长度低估,这一误差源常被忽视。系统开源,单消费级GPU可实时运行。
原文摘要 · Abstract (English)
Commercial greenhouse cucumber production is graded by fruit length, which drives harvest scheduling, labour allocation, and logistics. Manual measurement with thread or caliper is accurate but infeasible at commercial scale. This paper presents CucumberVision, a non-contact length estimation framework using an Intel RealSense D435 RGB-D camera. A YOLO26n instance segmentation model locates cucumbers, and SAM (ViT-B backbone) refines each detection to a pixel-precise mask. Five methods are evaluated under matched conditions: (M1) a dominant-axis skeleton scan-line baseline; (M2) PCA on the bounding-box depth point cloud; (M3) SAM mask with medial-axis skeletonisation; (M4) a hybrid keypoint-guided approach using a YOLO26-pose model predicting five anatomical landmarks (KP0--KP4) with piecewise 3D arc-length; and (M5) a novel medial arc spline method fitting a cubic spline through the 3D medial axis of the SAM mask and computing arc length by trapezoidal integration -- the first such application to elongated vegetable measurement. All methods share five-frame burst depth averaging, colour-stream intrinsic alignment, and adaptive method selection with cascading fallbacks ensuring 100% coverage. A benchmark of 48 captures across seven cucumbers in three size categories (small ~8 cm, medium ~13 cm, large ~25 cm) with thread-based ground truth establishes a significant accuracy hierarchy: M1 (MAPE 9.68%) > M2 (5.31%) > M4 (5.51%) > M3 (5.82%) > M5 (4.13%). M5 significantly outperforms all competitors at Bonferroni-corrected alpha=0.0125. A secondary contribution is identifying a 12--18% length underestimation caused by using depth-stream rather than colour-stream intrinsics after rs.align(rs.stream.color) -- an under-reported error source. The complete system is released open source and runs in real time on a single consumer-grade GPU.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。