Commit f4860230 authored by Matt Clarkson's avatar Matt Clarkson

Issue #61: Fix KWStyle errors.

parent 3bc4c13c
......@@ -981,8 +981,6 @@ double ComputeRMSReprojectionError(
{
double rms = 0;
unsigned int pointCounter = 0;
unsigned int pointCounterLeft = 0;
unsigned int pointCounterRight = 0;
unsigned int viewCounter = 0;
if (listOfLeftHandPointSets.size() != listOfRightHandPointSets.size())
......@@ -1057,8 +1055,6 @@ double ComputeRMSReprojectionError(
}
pointCounter += (2 * (numberOfPointsInLeft + numberOfPointsInRight));
pointCounterLeft += 2*numberOfPointsInLeft;
pointCounterRight += 2*numberOfPointsInRight;
viewCounter++;
}
......@@ -1709,8 +1705,8 @@ void CheckAgainstConvergencePoint(const std::list<PointSet>& leftDistortedPoints
rightIter = rightDistortedPoints.begin();
leftIter != leftDistortedPoints.end() &&
rightIter != rightDistortedPoints.end();
leftIter++,
rightIter++
++leftIter,
++rightIter
)
{
cv::Mat leftToRightRotationMatrix = cvCreateMat(3, 3, CV_64FC1);
......@@ -1739,7 +1735,7 @@ void CheckAgainstConvergencePoint(const std::list<PointSet>& leftDistortedPoints
niftk::Model3D::const_iterator modelIter;
for (modelIter = triangulatedPoints.begin();
modelIter != triangulatedPoints.end();
modelIter++
++modelIter
)
{
if (modelIter->second.point.z > depth)
......
......@@ -251,7 +251,8 @@ cv::Matx21d StereoCameraCalibration(const Model3D& model,
cvFlags
);
std::cout << "niftkStereoCameraCalibration:OpenCV optimisation finished, cvFlags=" << cvFlags << ", rms2D=" << projectedRMS << std::endl;
std::cout << "niftkStereoCameraCalibration:OpenCV optimisation finished, cvFlags="
<< cvFlags << ", rms2D=" << projectedRMS << std::endl;
// Ensure rhs extrinsics are set from lhs and left-to-right transform.
niftk::ComputeStereoExtrinsics(rvecsLeft,
......@@ -321,10 +322,6 @@ cv::Matx21d StereoCameraCalibration(const Model3D& model,
<< ", rightRMS=" << rightRMS
<< std::endl;
// Tried Ceres in mono, not much difference really.
// double leftRMS = niftk::CeresMonoCameraCalibration(objectPoints, leftImagePoints, intrinsicLeft, distortionLeft, rvecsLeft, tvecsLeft);
// double rightRMS = niftk::CeresMonoCameraCalibration(objectPoints, rightImagePoints, intrinsicRight, distortionRight, rvecsRight, tvecsRight);
double fre = ComputeLeftToRight(model,
rvecsLeft, tvecsLeft,
rvecsRight, tvecsRight,
......@@ -360,30 +357,10 @@ cv::Matx21d StereoCameraCalibration(const Model3D& model,
rmsInEachAxis
);
std::cout << "niftkStereoCameraCalibration:ITK optimisation after registration, fre=" << fre << ", rms2D=" << projectedRMS
std::cout << "niftkStereoCameraCalibration:ITK optimisation after registration, fre=" << fre
<< ", rms2D=" << projectedRMS
<< ", rms3D=" << reconstructedRMS << std::endl;
/*
* Tried Ceres in stereo, not much difference really.
* If the data is bad (e.g. laparoscope is too cross-eyed) then LM fails
* in either ITK or Ceres.
*
niftk::CeresStereoCameraCalibration(objectPoints,
leftImagePoints,
rightImagePoints,
intrinsicLeft,
distortionLeft,
rvecsLeft,
tvecsLeft,
intrinsicRight,
distortionRight,
rvecsRight,
tvecsRight,
leftToRightRotationMatrix,
leftToRightTranslationVector
);
*/
double rmsTolerance = 0.0001;
double previousRMS = projectedRMS + 2 * rmsTolerance;
double currentRMS = projectedRMS;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment