Skip to content

Commit

Permalink
[software] triangulate: do not load landmarks when reading input
Browse files Browse the repository at this point in the history
  • Loading branch information
mugulmd authored and mh0g committed Dec 22, 2022
1 parent 6d32632 commit d85f7a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/software/pipeline/main_triangulate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ int aliceVision_main(int argc, char** argv)
return EXIT_FAILURE;
}

// set maxThreads
HardwareContext hwc = cmdline.getHardwareContext();
omp_set_num_threads(hwc.getMaxThreads());

const double defaultLoRansacLocalizationError = 4.0;
if (!robustEstimation::adjustRobustEstimatorThreshold(sfmParams.localizerEstimator, sfmParams.localizerEstimatorError, defaultLoRansacLocalizationError))
{
Expand All @@ -154,7 +158,7 @@ int aliceVision_main(int argc, char** argv)

// load input SfMData scene
sfmData::SfMData sfmData;
if (!sfmDataIO::Load(sfmData, sfmDataFilename, sfmDataIO::ESfMData::ALL))
if (!sfmDataIO::Load(sfmData, sfmDataFilename, sfmDataIO::ESfMData(sfmDataIO::VIEWS | sfmDataIO::EXTRINSICS | sfmDataIO::INTRINSICS)))
{
ALICEVISION_LOG_ERROR("The input SfMData file '" + sfmDataFilename + "' cannot be read.");
return EXIT_FAILURE;
Expand Down Expand Up @@ -208,6 +212,7 @@ int aliceVision_main(int argc, char** argv)
sfmEngine.setMatches(&pairwiseMatches);

//run the triangulation
sfmEngine.fuseMatchesIntoTracks();
std::set<IndexT> reconstructedViews = sfmData.getValidViews();
sfmEngine.triangulate({}, reconstructedViews);

Expand Down

0 comments on commit d85f7a3

Please sign in to comment.