diff --git a/matlab/+gtsam/cylinderSampleProjectionStereo.m b/matlab/+gtsam/cylinderSampleProjectionStereo.m index 51cda12ac..6512231e8 100644 --- a/matlab/+gtsam/cylinderSampleProjectionStereo.m +++ b/matlab/+gtsam/cylinderSampleProjectionStereo.m @@ -42,6 +42,11 @@ for i = 1:cylinderNum continue; end + % too small disparity may call indeterminant system exception + if Z.du < 0.6 + continue; + end + % ignore points occluded % use a simple math hack to check occlusion: % 1. All points in front of cylinders' surfaces are visible