diff --git a/matlab/+gtsam/plotFlyingResults.m b/matlab/+gtsam/plotFlyingResults.m index 22b6a2de5..c214d948d 100644 --- a/matlab/+gtsam/plotFlyingResults.m +++ b/matlab/+gtsam/plotFlyingResults.m @@ -24,16 +24,17 @@ for i = 0:keys.size - 1 P = marginals.marginalCovariance(key); h_result = gtsam.plotPose3(pose, P, 1); + end %% plot point covariance + + if exist('h_result', 'var') delete(h_result); end - - if ~holdstate hold off end diff --git a/matlab/+gtsam/points2DTrackStereo.m b/matlab/+gtsam/points2DTrackStereo.m index 95f225ea5..3651bff6d 100644 --- a/matlab/+gtsam/points2DTrackStereo.m +++ b/matlab/+gtsam/points2DTrackStereo.m @@ -101,7 +101,7 @@ for i = 1:pointsNum end %% plot the result with covariance ellipses -plotFlyingResults(pts2dTracksStereo.pts3d, pts2dTracksStereo.cov, initialiEstimate, marginals); +plotFlyingResults(pts2dTracksStereo.pt3d, pts2dTracksStereo.cov, initialEstimate, marginals); %plot3DTrajectory(initialEstimate, '*', 1, 8, marginals); %view(3); diff --git a/matlab/gtsam_examples/CameraFlyingExample.m b/matlab/gtsam_examples/CameraFlyingExample.m index 08986f83c..99fe4ca80 100644 --- a/matlab/gtsam_examples/CameraFlyingExample.m +++ b/matlab/gtsam_examples/CameraFlyingExample.m @@ -26,7 +26,7 @@ options.cylinder.cylinderNum = 15; % pls be smaller than 20 options.cylinder.radius = 3; % pls be smaller than 5 options.cylinder.height = 10; % point density on cylinder -options.cylinder.pointDensity = 1; +options.cylinder.pointDensity = 0.05; %% set up the camera % parameters set according to the stereo camera: @@ -162,8 +162,6 @@ else % use Stereo Camera [pts2dTracksStereo, estimateValuesStereo] = points2DTrackStereo(options.camera.stereoK, ... cameraPoses, options.camera.resolution, cylinders); - - plotFlyingResults(pts2dTracksStereo.pt3d, pts2dTracksStereo.cov, estimateValuesStereo, options, figID); end %% plot all the projected points