diff --git a/src/Bundle.cpp b/src/Bundle.cpp index 97dffff..9b22a4b 100644 --- a/src/Bundle.cpp +++ b/src/Bundle.cpp @@ -1808,11 +1808,17 @@ int BundlerApp::SetupInitialCameraPair(int i_best, int j_best, int key_idx2 = list[i].m_idx2; - printf(" Adding match %d ==> %d [%d]\n", - key_idx1, key_idx2, pt_count); double x_proj = GetKey(i_best,key_idx1).m_x; double y_proj = GetKey(i_best,key_idx1).m_y; + + double x_proj1 = GetKey(i_best,key_idx1).m_x; + double y_proj1 = GetKey(i_best,key_idx1).m_y; + double x_proj2 = GetKey(j_best,key_idx2).m_x; + double y_proj2 = GetKey(j_best,key_idx2).m_y; + + printf(" Adding match %d ==> %d -- %0.3f %0.3f ==> %0.3f %0.3f [%d]\n", + key_idx1, key_idx2, x_proj1, y_proj1, x_proj2, y_proj2, pt_count); /* Back project the point to a constant depth */ if (!solved_for_extrinsics) { @@ -1822,11 +1828,6 @@ int BundlerApp::SetupInitialCameraPair(int i_best, int j_best, points[pt_count] = v3_new(x_pt, y_pt, z_pt); } else { - double x_proj1 = GetKey(i_best,key_idx1).m_x; - double y_proj1 = GetKey(i_best,key_idx1).m_y; - double x_proj2 = GetKey(j_best,key_idx2).m_x; - double y_proj2 = GetKey(j_best,key_idx2).m_y; - double error; v2_t p = v2_new(x_proj1, y_proj1); diff --git a/src/Makefile b/src/Makefile index aeac5fb..1903c3f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,6 @@ # Makefile for bundler -USE_CERES=true +# USE_CERES=true CC=gcc CXX=g++ @@ -90,6 +90,14 @@ $(RADIALUNDISTORT): RadialUndistort.o LoadJPEG.o -lminpack -ljpeg cp $@ ../bin +SIFTDraw2: SIFTDraw2.o keys_lite.o LoadJPEG.o + $(CXX) -o $@ -g2 $^ $(LIB_PATH) -ljpeg -lz $(BUNDLER_LIBS) + cp $@ ../../bin + +MatchDraw2: MatchDraw2.o keys_lite.o LoadJPEG.o + $(CXX) -o $@ -g2 $^ $(LIB_PATH) -ljpeg -lz $(BUNDLER_LIBS) + cp $@ ../../bin + clean: rm -f *.o *~ $(BUNDLER) $(KEYMATCHFULL) $(BUNDLE2PMVS) \ $(BUNDLE2VIS) $(RADIALUNDISTORT) diff --git a/src/RelativePose.cpp b/src/RelativePose.cpp index 515e17e..4691b69 100644 --- a/src/RelativePose.cpp +++ b/src/RelativePose.cpp @@ -226,6 +226,9 @@ bool BundlerApp::EstimateRelativePose2(int i1, int i2, 512, /* m_fmatrix_rounds, 8 * m_fmatrix_rounds */ 0.25 * m_fmatrix_threshold, // 0.003, // 0.004 /*0.001,*/ // /*0.5 **/ m_fmatrix_threshold, K1, K2, R0, t0); + printf("R,t\n"); + matrix_print(3, 3, R0); + matrix_print(1, 3, t0); } else { std::vector k1 = m_image_data[i1].UndistortKeysCopy(); std::vector k2 = m_image_data[i2].UndistortKeysCopy();