fix the plot_projected_landmarks.m project_landmarks.m
parent
fa4bfbfbc5
commit
2371600c63
|
@ -23,7 +23,7 @@ z = zeros(1,nrMeasurements);
|
||||||
for i = 0:measurement_keys.size-1
|
for i = 0:measurement_keys.size-1
|
||||||
key = measurement_keys.at(i);
|
key = measurement_keys.at(i);
|
||||||
key_index = gtsam.symbolIndex(key);
|
key_index = gtsam.symbolIndex(key);
|
||||||
p = landmarks.at(gtsam.symbol('l',key_index));
|
p = landmarks.atPoint3(gtsam.symbol('l',key_index));
|
||||||
|
|
||||||
x(i+1) = p.x;
|
x(i+1) = p.x;
|
||||||
y(i+1) = p.y;
|
y(i+1) = p.y;
|
||||||
|
|
|
@ -8,7 +8,7 @@ function [ measurements ] = project_landmarks( pose, landmarks, K )
|
||||||
measurements = Values;
|
measurements = Values;
|
||||||
|
|
||||||
for i=1:size(landmarks)-1
|
for i=1:size(landmarks)-1
|
||||||
z = camera.project(landmarks.at(symbol('l',i)));
|
z = camera.project(landmarks.atPoint3(symbol('l',i)));
|
||||||
|
|
||||||
% check bounding box
|
% check bounding box
|
||||||
if z.x < 0 || z.x > 1280
|
if z.x < 0 || z.x > 1280
|
||||||
|
|
Loading…
Reference in New Issue