Curvature-aware 3D length estimation of greenhouse cucumbers using RGB-D imaging and cubic spline arc-length integration

📅 2026-06-21
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the challenge of scalable, automated length measurement for commercial grading of greenhouse cucumbers, which traditionally relies on manual assessment. The authors propose CucumberVision, a novel framework that leverages SAM-generated masks for 3D medial axis fitting of slender vegetables. By integrating cubic splines with trapezoidal integration, the method accurately estimates arc length, and aligning depth maps using color stream intrinsic parameters reduces length underestimation error by 12–18%. The system combines YOLOv8n instance segmentation, SAM (ViT-B) mask refinement, five length estimation algorithms, and a multi-frame depth averaging strategy. Among these, the M5 algorithm achieves a mean absolute percentage error (MAPE) of 4.13% across 48 multi-size cucumber samples, significantly outperforming baseline methods (p < 0.0125), while operating in real time on a single consumer-grade GPU. The code is publicly released.
📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

3D length estimation
greenhouse cucumbers
non-contact measurement
RGB-D imaging
curvature-aware
Innovation

Methods, ideas, or system contributions that make the work stand out.

medial arc spline
RGB-D imaging
cubic spline arc-length integration
instance segmentation
non-contact length estimation