Skip to content

Commit

Permalink
[all] continue updating code to replace principal point with offset
Browse files Browse the repository at this point in the history
  • Loading branch information
servantftechnicolor committed Aug 12, 2021
1 parent 68c5f0c commit f346c9d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ bool ReconstructionEngine_sequentialSfM::makeInitialPair3D(const Pair& currentPa
{
std::set<IndexT> newReconstructedViews = {static_cast<IndexT>(I), static_cast<IndexT>(J)};
const bool isInitialPair = true;
const bool success = true;// bundleAdjustment(newReconstructedViews, isInitialPair);
const bool success = bundleAdjustment(newReconstructedViews, isInitialPair);

if(!success)
{
Expand Down
9 changes: 2 additions & 7 deletions src/aliceVision/sfmDataIO/viewIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ std::shared_ptr<camera::IntrinsicBase> getViewIntrinsic(

camera::EINTRINSIC intrinsicType = defaultIntrinsicType;

double ppx = view.getWidth() / 2.0;
double ppy = view.getHeight() / 2.0;
double ppx = defaultPPx;
double ppy = defaultPPy;

bool isResized = false;

Expand All @@ -165,11 +165,6 @@ std::shared_ptr<camera::IntrinsicBase> getViewIntrinsic(
isResized = true;
}
}
else if(defaultPPx > 0.0 && defaultPPy > 0.0) // use default principal point
{
ppx = defaultPPx;
ppy = defaultPPy;
}


// handle case where focal length (mm) is unset or false
Expand Down
4 changes: 2 additions & 2 deletions src/software/pipeline/main_cameraInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ int aliceVision_main(int argc, char **argv)
}

// read K matrix if valid
double defaultPPx = -1.0;
double defaultPPy = -1.0;
double defaultPPx = 0.0;
double defaultPPy = 0.0;

if(!defaultIntrinsicKMatrix.empty() && !checkIntrinsicStringValidity(defaultIntrinsicKMatrix, defaultFocalLengthPixel, defaultPPx, defaultPPy))
{
Expand Down

0 comments on commit f346c9d

Please sign in to comment.