Skip to content

Commit 6daf0c0

Browse files
committed
clean up test code
1 parent 91c2d02 commit 6daf0c0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/multiview_manifolds.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,19 @@ w_T_c2 = ArrayPartition([0;-0.1;0.],[0 0 1; -1 0 0; 0 -1 0.])
4343

4444
##
4545

46-
function projectPointFromWorld(cam, c_H_w, w_Ph)
46+
function projectPointFrom(cam, c_H_w, w_Ph)
4747
c_Ph = c_H_w*w_Ph |> SVector{4}
4848
CameraModels.projectHomogeneous(cam,c_Ph)
4949
end
5050

5151
function cameraResidual(cam, meas, M, w_T_c, w_Ph, κ=1000)
52-
pred = projectPointFromWorld(cam, inv(affine_matrix(M,w_T_c)), w_Ph)
52+
pred = projectPointFrom(cam, inv(affine_matrix(M,w_T_c)), w_Ph)
5353
# experimental cost function to try force bad reprojects in front of the camera during optimization
5454
κ*(abs(pred.depth) - pred.depth)^2 + (meas[1]-pred[1])^2 + (meas[2]-pred[2])^2
5555
end
5656

5757
function cost(w_Ph)
5858
cameraResidual(cam, obs1, M, w_T_c1, w_Ph) + cameraResidual(cam, obs2, M, w_T_c2, w_Ph)
59-
# pre1 = projectPointFromWorld(cam, inv(affine_matrix(M,w_T_c1)), w_Ph)
60-
# pre2 = projectPointFromWorld(cam, inv(affine_matrix(M,w_T_c2)), w_Ph)
61-
# (obs1[1]-pre1[1])^2 + (obs1[2]-pre1[2])^2 + (obs2[1]-pre2[1])^2 + (obs2[2]-pre2[2])^2
6259
end
6360

6461
##

0 commit comments

Comments
 (0)