Skip to content

Commit

Permalink
Fix intrinsic group usage for H,W retrieval. openMVG#145
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoulon committed Jul 8, 2014
1 parent dd98cfd commit 264f9a1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/software/SfM/main_exportKeypoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ int main(int argc, char ** argv)
iterFilename);

const std::pair<size_t, size_t>
dimImage = std::make_pair(vec_focalGroup[I].m_w, vec_focalGroup[I].m_h);
dimImage = std::make_pair(vec_focalGroup[iterFilename->m_intrinsicId].m_w,
vec_focalGroup[iterFilename->m_intrinsicId].m_h);

svgDrawer svgStream( dimImage.first, dimImage.second);
svgStream.drawImage(stlplus::create_filespec(sImaDirectory,iterFilename->m_sImageName),
Expand Down
8 changes: 5 additions & 3 deletions src/software/SfM/main_exportMatches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ int main(int argc, char ** argv)
const size_t I = iter->first.first;
const size_t J = iter->first.second;

const std::pair<size_t, size_t>
dimImage0 = std::make_pair(vec_focalGroup[I].m_w, vec_focalGroup[I].m_h),
dimImage1 = std::make_pair(vec_focalGroup[J].m_w, vec_focalGroup[J].m_h);
std::vector<SfMIO::CameraInfo>::const_iterator camInfoI = vec_camImageName.begin() + I;
std::vector<SfMIO::CameraInfo>::const_iterator camInfoJ = vec_camImageName.begin() + J;

const std::pair<size_t, size_t>
dimImage0 = std::make_pair(vec_focalGroup[camInfoI->m_intrinsicId].m_w, vec_focalGroup[camInfoI->m_intrinsicId].m_h),
dimImage1 = std::make_pair(vec_focalGroup[camInfoJ->m_intrinsicId].m_w, vec_focalGroup[camInfoJ->m_intrinsicId].m_h);

svgDrawer svgStream( dimImage0.first + dimImage1.first, max(dimImage0.second, dimImage1.second));
svgStream.drawImage(stlplus::create_filespec(sImaDirectory,vec_camImageName[I].m_sImageName),
Expand Down
7 changes: 5 additions & 2 deletions src/software/SfM/main_exportTracks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,12 @@ int main(int argc, char ** argv)
for (size_t I = 0; I < vec_camImageName.size(); ++I) {
for (size_t J = I+1; J < vec_camImageName.size(); ++J, ++my_progress_bar) {

std::vector<SfMIO::CameraInfo>::const_iterator camInfoI = vec_camImageName.begin() + I;
std::vector<SfMIO::CameraInfo>::const_iterator camInfoJ = vec_camImageName.begin() + J;

const std::pair<size_t, size_t>
dimImage0 = std::make_pair(vec_focalGroup[I].m_w, vec_focalGroup[I].m_h),
dimImage1 = std::make_pair(vec_focalGroup[J].m_w, vec_focalGroup[J].m_h);
dimImage0 = std::make_pair(vec_focalGroup[camInfoI->m_intrinsicId].m_w, vec_focalGroup[camInfoI->m_intrinsicId].m_h),
dimImage1 = std::make_pair(vec_focalGroup[camInfoJ->m_intrinsicId].m_w, vec_focalGroup[camInfoJ->m_intrinsicId].m_h);

//Get common tracks between view I and J
tracks::STLMAPTracks map_tracksCommon;
Expand Down

0 comments on commit 264f9a1

Please sign in to comment.