Skip to content

Commit

Permalink
local changes
Browse files Browse the repository at this point in the history
  • Loading branch information
snavely committed Aug 30, 2014
1 parent f81096c commit 457b7b8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
15 changes: 8 additions & 7 deletions src/Bundle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down
10 changes: 9 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Makefile for bundler

USE_CERES=true
# USE_CERES=true

CC=gcc
CXX=g++
Expand Down Expand Up @@ -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)
3 changes: 3 additions & 0 deletions src/RelativePose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Keypoint> k1 = m_image_data[i1].UndistortKeysCopy();
std::vector<Keypoint> k2 = m_image_data[i2].UndistortKeysCopy();
Expand Down

0 comments on commit 457b7b8

Please sign in to comment.