get points track and visualize
parent
1094739680
commit
f4da1f874b
|
@ -77,17 +77,30 @@ graph.print(sprintf('\nFactor graph:\n'));
|
||||||
|
|
||||||
marginals = Marginals(graph, initialEstimate);
|
marginals = Marginals(graph, initialEstimate);
|
||||||
|
|
||||||
%% get all the 2d points track information
|
%% get all the points track information
|
||||||
% currently throws the Indeterminant linear system exception
|
% currently throws the Indeterminant linear system exception
|
||||||
ptx = 0;
|
ptx = 0;
|
||||||
for i = 1:pointsNum
|
for k = 1:cameraPosesNum
|
||||||
ptx = ptx + 1;
|
|
||||||
if isempty(pts3d.pts{i})
|
for i = 1:length(cylinders)
|
||||||
continue;
|
for j = 1:length(cylinders{i}.Points)
|
||||||
end
|
if isempty(pts3d.pts{k}.index{i}{j})
|
||||||
% cylinder index and measurements
|
continue;
|
||||||
pts2dTracksMono.Points{ptx} = pts3d.pts{i};
|
end
|
||||||
pts2dTracksMono.cov{ptx} = marginals.marginalCovariance(symbol('p',i));
|
ptx = ptx + 1;
|
||||||
end
|
|
||||||
|
idx = pts3d.pts{k}.index{i}{j};
|
||||||
|
pts2dTracksMono.pt3d{ptx} = pts3d.pts{k}.data{idx};
|
||||||
|
pts2dTracksMono.Z{ptx} = pts3d.pts{k}.Z{idx};
|
||||||
|
pts2dTracksMono.cov{ptx} = marginals.marginalCovariance(symbol('p',idx));
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
%% plot the result with covariance ellipses
|
||||||
|
hold on;
|
||||||
|
plot3DPoints(initialEstimate, [], marginals);
|
||||||
|
plot3DTrajectory(initialEstimate, '*', 1, 8, marginals);
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue