Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 9dab33e

Browse files
bobbob
authored andcommitted
fixed iterative LinearLSTriangulation doing the same as the non-iterative one
1 parent 8736df1 commit 9dab33e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Chapter4_StructureFromMotion/Triangulation.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,11 @@ Mat_<double> IterativeLinearLSTriangulation(Point3d u, //homogenous image point
7373
) {
7474
double wi = 1, wi1 = 1;
7575
Mat_<double> X(4,1);
76-
for (int i=0; i<10; i++) { //Hartley suggests 10 iterations at most
77-
Mat_<double> X_ = LinearLSTriangulation(u,P,u1,P1);
78-
X(0) = X_(0); X(1) = X_(1); X(2) = X_(2); X(3) = 1.0;
76+
77+
Mat_<double> X_ = LinearLSTriangulation(u,P,u1,P1);
78+
X(0) = X_(0); X(1) = X_(1); X(2) = X_(2); X(3) = 1.0;
79+
80+
for (int i=0; i<10; i++) { //Hartley suggests 10 iterations at most
7981

8082
//recalculate weights
8183
double p2x = Mat_<double>(Mat_<double>(P).row(2)*X)(0);

0 commit comments

Comments
 (0)