|
Isis 3.0 Object Programmers' Reference |
Home |

Definition at line 72 of file BundleAdjust.h.
Public Types | |
| None | |
| AnglesOnly | |
| AnglesVelocity | |
| AnglesVelocityAcceleration | |
| All | |
| Nothing | |
| PositionOnly | |
| PositionVelocity | |
| PositionVelocityAcceleration | |
| enum | CmatrixSolveType { None, AnglesOnly, AnglesVelocity, AnglesVelocityAcceleration, All } |
| enum | SpacecraftPositionSolveType { Nothing, PositionOnly, PositionVelocity, PositionVelocityAcceleration } |
Public Member Functions | |
| BundleAdjust (const std::string &cnetFile, const std::string &cubeList, bool printSummary=true) | |
| BundleAdjust (const std::string &cnetFile, const std::string &cubeList, const std::string &heldList, bool printSummary=true) | |
| BundleAdjust (Isis::ControlNet &cnet, Isis::SerialNumberList &snlist, bool printSummary=true) | |
| BundleAdjust (Isis::ControlNet &cnet, Isis::SerialNumberList &snlist, Isis::SerialNumberList &heldsnlist, bool printSummary=true) | |
| ~BundleAdjust () | |
| double | Solve (double tol, int maxIterations) |
| The solve method is an least squares solution for updating the camera pointing. | |
| Isis::ControlNet * | ControlNet () |
| Isis::SerialNumberList * | SerialNumberList () |
| int | Images () const |
| Return the number of cubes in list given to the constructor. | |
| int | Observations () const |
| Return the number of observations in list given to the constructor. | |
| std::string | Filename (int index) |
| Return the ith filename in the cube list file given to constructor. | |
| Table | Cmatrix (int index) |
| constructor | |
| Table | SpVector (int index) |
| constructor | |
| void | SetSolveTwist (bool solve) |
| Should we solve for the twist in each image? | |
| void | SetSolveRadii (bool solve) |
| Should we solve for the radii at each point? | |
| void | SetSolveCmatrix (CmatrixSolveType type) |
| For which camera angle coefficients do we solve? | |
| void | SetSolveSpacecraftPosition (SpacecraftPositionSolveType type) |
| Should we solve for the spacecraft position, velocity, and acceleration. | |
| void | SetCkDegree (int degree) |
| Set the degree of the polynomial to fit to the camera angles. | |
| void | SetSolveCamDegree (int degree) |
| Set the degree of the polynomial to adjust in the solution. | |
| int | BasisColumns () const |
| Determine the number of columns we will need for the least squares. | |
| double | Error () const |
| double | Iteration () const |
| int | HeldPoints () const |
| int | IgnoredPoints () const |
| int | GroundPoints () const |
| void | SetObservationMode (bool observationMode) |
| This method turns on observation mode and creates the observation number list. | |
| void | SetSolutionMethod (std::string solutionMethod) |
| Set the solution method to use for solving the matrix. | |
Private Types | |
| WRT_Latitude | |
| WRT_Longitude | |
| WRT_Radius | |
| enum | PartialDerivative { WRT_Latitude, WRT_Longitude, WRT_Radius } |
Private Member Functions | |
| void | Init (Progress *progress=0) |
| void | ComputeNumberPartials () |
| This method determines the number of partials per image and per point. | |
| void | AddPartials (LeastSquares &lsq, int point) |
| Populate the least squares matrix with measures for a point. | |
| void | Update (BasisFunction &basis) |
| This method uses the basis function after the matrix has been solved. | |
| int | PointIndex (int i) const |
| Return index to basis function for ith point. | |
| int | ImageIndex (int i) const |
| Return index to basis function for ith image. | |
| void | CheckHeldList () |
| This method finds all the measurements on held images and holds the control point they are on. | |
| void | ApplyHeldList () |
| This method finds all the measurements on held images, finds their lat/lon/radius(m), sets the control point they are on to that lat/lon/radius, and makes the control point a held point. | |
| double | LowDHigh (std::vector< double > &lookC, std::vector< double > &dlookC, int index) |
| Convenience method for quotient rule. | |
| std::vector< double > | PointPartial (Isis::ControlPoint &point, PartialDerivative wrt) |
| void | IterationSummary (double avErr, double sigmaXY, double sigmaHat, double sigmaX, double sigmaY) |
| This method creates a iteration summary and creates an iteration group for the BundleAdjust summary. | |
Private Attributes | |
| Isis::ControlNet * | p_cnet |
| Isis::SerialNumberList * | p_snlist |
| Isis::SerialNumberList * | p_heldsnlist |
| Isis::ObservationNumberList * | p_onlist |
| double | p_error |
| int | p_iteration |
| bool | p_printSummary |
| int | p_numImagePartials |
| int | p_numPointPartials |
| bool | p_solveTwist |
| bool | p_solveRadii |
| bool | p_observationMode |
| CmatrixSolveType | p_cmatrixSolveType |
| SpacecraftPositionSolveType | p_spacecraftPositionSolveType |
| int | p_heldPoints |
| int | p_groundPoints |
| int | p_ignoredPoints |
| int | p_heldImages |
| int | p_heldObservations |
| std::vector< int > | p_pointIndexMap |
| std::vector< int > | p_imageIndexMap |
| bool | p_cleanUp |
| Statistics | p_statx |
| Statistics | p_staty |
| std::string | p_solutionMethod |
| int | p_ckDegree |
| int | p_solveCamDegree |
| int | p_numberCameraCoefSolved |
| The number of camera angle coefficients in the solution. | |
| void Isis::BundleAdjust::AddPartials | ( | LeastSquares & | lsq, | |
| int | point | |||
| ) | [private] |
Populate the least squares matrix with measures for a point.
Definition at line 576 of file BundleAdjust.cpp.
References Isis::Statistics::AddData(), Isis::LeastSquares::AddKnown(), BasisColumns(), Isis::Spice::BodyRotation(), cam, Isis::SpicePosition::CoordinatePartial(), Isis::Camera::DistortionMap(), Isis::ControlPoint::Ground, Isis::SerialNumberList::HasSerialNumber(), Isis::ControlPoint::Held(), Isis::ControlPoint::Ignore(), ImageIndex(), Isis::Spice::InstrumentPosition(), Isis::Spice::InstrumentRotation(), LowDHigh(), p_cmatrixSolveType, p_heldImages, p_heldsnlist, p_numberCameraCoefSolved, p_snlist, p_solveRadii, p_solveTwist, p_spacecraftPositionSolveType, p_statx, p_staty, Isis::PI(), PointIndex(), PointPartial(), Isis::ControlPoint::Radius(), Isis::SerialNumberList::SerialNumberIndex(), Isis::Camera::SetImage(), Isis::ControlPoint::Size(), Isis::ControlPoint::Type(), Isis::CameraDistortionMap::UndistortedFocalPlaneZ(), Isis::ControlPoint::UniversalLatitude(), and Isis::ControlPoint::UniversalLongitude().
Referenced by Solve().
| void Isis::BundleAdjust::ApplyHeldList | ( | ) | [private] |
This method finds all the measurements on held images, finds their lat/lon/radius(m), sets the control point they are on to that lat/lon/radius, and makes the control point a held point.
Definition at line 186 of file BundleAdjust.cpp.
References _FILEINFO_, cam, Isis::Camera::Camera(), Isis::SerialNumberList::HasSerialNumber(), Isis::Sensor::LocalRadius(), Isis::iException::Message(), p_cnet, p_heldsnlist, Isis::Camera::SetImage(), Isis::ControlNet::Size(), Isis::Sensor::UniversalLatitude(), and Isis::Sensor::UniversalLongitude().
Referenced by Init().
| int Isis::BundleAdjust::BasisColumns | ( | ) | const |
Determine the number of columns we will need for the least squares.
When we create a row of data we will store all the image partials first and then the point partials
Definition at line 367 of file BundleAdjust.cpp.
References Observations(), p_cnet, p_groundPoints, p_heldPoints, p_ignoredPoints, p_numImagePartials, p_numPointPartials, and Isis::ControlNet::Size().
Referenced by AddPartials(), and Solve().
| void Isis::BundleAdjust::CheckHeldList | ( | ) | [private] |
This method finds all the measurements on held images and holds the control point they are on.
The lat/lon/radius are determined by mapping the line/sample measurement on the held image to the surface.
Definition at line 170 of file BundleAdjust.cpp.
References _FILEINFO_, Isis::SerialNumberList::HasSerialNumber(), Isis::iException::Message(), p_heldsnlist, p_snlist, Isis::SerialNumberList::SerialNumber(), and Isis::SerialNumberList::Size().
Referenced by Init().
| Table Isis::BundleAdjust::Cmatrix | ( | int | index | ) |
constructor
Definition at line 982 of file BundleAdjust.cpp.
References Isis::ControlNet::Camera(), Isis::Spice::InstrumentRotation(), and p_cnet.
| void Isis::BundleAdjust::ComputeNumberPartials | ( | ) | [private] |
This method determines the number of partials per image and per point.
It is based on the variables to be solved for (e.g., twist, radii, cmatrix velocity, cmatrix acceleration, etc)
Definition at line 224 of file BundleAdjust.cpp.
References p_cmatrixSolveType, p_numberCameraCoefSolved, p_numImagePartials, p_numPointPartials, p_solveRadii, p_solveTwist, and p_spacecraftPositionSolveType.
Referenced by Init(), SetSolveCmatrix(), SetSolveRadii(), SetSolveSpacecraftPosition(), and SetSolveTwist().
| std::string Isis::BundleAdjust::Filename | ( | int | index | ) |
Return the ith filename in the cube list file given to constructor.
Definition at line 974 of file BundleAdjust.cpp.
References Isis::SerialNumberList::Filename(), and p_snlist.
| int Isis::BundleAdjust::ImageIndex | ( | int | i | ) | const [private] |
Return index to basis function for ith image.
Definition at line 963 of file BundleAdjust.cpp.
References Isis::ObservationNumberList::ObservationNumberMapIndex(), p_imageIndexMap, p_numImagePartials, p_observationMode, and p_onlist.
Referenced by AddPartials(), and Update().
| int Isis::BundleAdjust::Images | ( | ) | const |
Return the number of cubes in list given to the constructor.
Definition at line 993 of file BundleAdjust.cpp.
References p_snlist, and Isis::SerialNumberList::Size().
Referenced by PointIndex(), Solve(), and Update().
| void Isis::BundleAdjust::IterationSummary | ( | double | avErr, | |
| double | sigmaXY, | |||
| double | sigmaHat, | |||
| double | sigmaX, | |||
| double | sigmaY | |||
| ) | [private] |
This method creates a iteration summary and creates an iteration group for the BundleAdjust summary.
| it | Iteration number | |
| avErr | Average error or iteration (pixels) | |
| sigmaXY | Standard deviation of coordinates (mm) | |
| sigmaHat | Aposteriori standard deviation of unit weight (mm) | |
| sigmaX | Standard deviation of deltax (mm) | |
| sigmaY | Standard deviation of deltay (mm) |
Definition at line 1054 of file BundleAdjust.cpp.
References Isis::Application::Log(), p_error, and p_iteration.
Referenced by Solve().
| double Isis::BundleAdjust::LowDHigh | ( | std::vector< double > & | lookC, | |
| std::vector< double > & | dlookC, | |||
| int | index | |||
| ) | [private] |
Convenience method for quotient rule.
Definition at line 820 of file BundleAdjust.cpp.
Referenced by AddPartials().
| int Isis::BundleAdjust::Observations | ( | ) | const |
Return the number of observations in list given to the constructor.
Definition at line 998 of file BundleAdjust.cpp.
References Isis::ObservationNumberList::ObservationSize(), p_heldImages, p_observationMode, p_onlist, p_snlist, and Isis::SerialNumberList::Size().
Referenced by BasisColumns(), PointIndex(), and Solve().
| int Isis::BundleAdjust::PointIndex | ( | int | i | ) | const [private] |
Return index to basis function for ith point.
Definition at line 948 of file BundleAdjust.cpp.
References Images(), Observations(), p_heldImages, p_numImagePartials, p_numPointPartials, p_observationMode, and p_pointIndexMap.
Referenced by AddPartials(), and Update().
| void Isis::BundleAdjust::SetCkDegree | ( | int | degree | ) | [inline] |
Set the degree of the polynomial to fit to the camera angles.
Definition at line 117 of file BundleAdjust.h.
References p_ckDegree.
| void Isis::BundleAdjust::SetObservationMode | ( | bool | observationMode | ) |
This method turns on observation mode and creates the observation number list.
It also checks to make sure the held image list is consistent for all images in an observation
Definition at line 273 of file BundleAdjust.cpp.
References _FILEINFO_, Isis::SerialNumberList::Filename(), Isis::SerialNumberList::HasSerialNumber(), Isis::iException::Message(), Isis::SerialNumberList::ObservationNumber(), p_heldImages, p_heldsnlist, p_observationMode, p_onlist, p_snlist, Isis::ObservationNumberList::Remove(), Isis::SerialNumberList::SerialNumber(), and Isis::SerialNumberList::Size().
| void Isis::BundleAdjust::SetSolutionMethod | ( | std::string | solutionMethod | ) | [inline] |
Set the solution method to use for solving the matrix.
Definition at line 133 of file BundleAdjust.h.
References p_solutionMethod.
| void Isis::BundleAdjust::SetSolveCamDegree | ( | int | degree | ) | [inline] |
Set the degree of the polynomial to adjust in the solution.
Definition at line 120 of file BundleAdjust.h.
References p_solveCamDegree.
| void Isis::BundleAdjust::SetSolveCmatrix | ( | CmatrixSolveType | type | ) |
For which camera angle coefficients do we solve?
Definition at line 323 of file BundleAdjust.cpp.
References _FILEINFO_, ComputeNumberPartials(), Isis::iException::Message(), p_cmatrixSolveType, p_numberCameraCoefSolved, and p_solveCamDegree.
| void Isis::BundleAdjust::SetSolveRadii | ( | bool | solve | ) |
Should we solve for the radii at each point?
Definition at line 315 of file BundleAdjust.cpp.
References ComputeNumberPartials(), and p_solveRadii.
| void Isis::BundleAdjust::SetSolveSpacecraftPosition | ( | SpacecraftPositionSolveType | type | ) |
Should we solve for the spacecraft position, velocity, and acceleration.
Definition at line 357 of file BundleAdjust.cpp.
References ComputeNumberPartials(), and p_spacecraftPositionSolveType.
| void Isis::BundleAdjust::SetSolveTwist | ( | bool | solve | ) |
Should we solve for the twist in each image?
Definition at line 307 of file BundleAdjust.cpp.
References ComputeNumberPartials(), and p_solveTwist.
| double Isis::BundleAdjust::Solve | ( | double | tol, | |
| int | maxIterations | |||
| ) |
The solve method is an least squares solution for updating the camera pointing.
It is iterative as the equations are non-linear. If it does not iterate to a solution in maxIterations it will throw an error. During each iteration it is updating portions of the control net, as well as the instrument pointing in the camera. An error is thrown if it does not converge in the maximum iterations. However, even if an error is thrown the control network will contain the errors at each control measure.
| tol | Maximum pixel error for any control network measurement | |
| maxIterations | Maximum iterations, if tolerance is never met an iException will be thrown. |
Definition at line 395 of file BundleAdjust.cpp.
References _FILEINFO_, AddPartials(), Isis::ControlNet::AverageError(), BasisColumns(), cam, Isis::ControlNet::Camera(), Isis::ControlNet::ComputeApriori(), Isis::ControlNet::ComputeErrors(), e, Isis::SpicePosition::GetBaseTime(), Isis::SpicePosition::GetPolynomial(), Isis::SerialNumberList::HasSerialNumber(), Images(), Isis::Spice::InstrumentPosition(), Isis::Spice::InstrumentRotation(), IterationSummary(), Isis::LeastSquares::Knowns(), Isis::ControlNet::MaximumError(), Isis::iException::Message(), Isis::ControlNet::NumValidMeasures(), Isis::ObservationNumberList::ObservationNumberMapIndex(), Observations(), Isis::ObservationNumberList::ObservationSize(), p_ckDegree, p_cmatrixSolveType, p_cnet, p_error, p_heldImages, p_heldsnlist, p_iteration, p_numImagePartials, p_observationMode, p_onlist, p_printSummary, p_snlist, p_solutionMethod, p_solveCamDegree, p_spacecraftPositionSolveType, p_statx, p_staty, Isis::Camera::PixelPitch(), pos, Isis::LeastSquares::QRD, Isis::Statistics::Reset(), Isis::SerialNumberList::SerialNumber(), Isis::ControlNet::Size(), Isis::LeastSquares::Solve(), Isis::LeastSquares::SPARSE, Isis::Statistics::SumSquare(), Isis::LeastSquares::SVD, Isis::Statistics::TotalPixels(), and Update().
| Table Isis::BundleAdjust::SpVector | ( | int | index | ) |
constructor
Definition at line 988 of file BundleAdjust.cpp.
References Isis::ControlNet::Camera(), Isis::Spice::InstrumentPosition(), and p_cnet.
| void Isis::BundleAdjust::Update | ( | BasisFunction & | basis | ) | [private] |
This method uses the basis function after the matrix has been solved.
The coefficients of the basis function represent the new right ascension, declination, and twist values of the camera. Each is a polynomial based on time. For example, ra = A + B * (t - t0) + C * (t - t0)^2. However, as the function we were solving was non-linear we had to take the dervative to linearize. Therefore we have the change in ra, dec, and twist. Really we have the change in A, B, and C.
Definition at line 837 of file BundleAdjust.cpp.
References cam, Isis::ControlNet::Camera(), Isis::BasisFunction::Coefficient(), Isis::ControlPoint::Ground, Isis::SerialNumberList::HasSerialNumber(), ImageIndex(), Images(), Isis::Spice::InstrumentPosition(), Isis::Spice::InstrumentRotation(), p_cmatrixSolveType, p_cnet, p_heldImages, p_heldsnlist, p_numberCameraCoefSolved, p_snlist, p_solveRadii, p_solveTwist, p_spacecraftPositionSolveType, Isis::PI(), PointIndex(), pos, Isis::SerialNumberList::SerialNumber(), and Isis::ControlNet::Size().
Referenced by Solve().
int Isis::BundleAdjust::p_numberCameraCoefSolved [private] |
The number of camera angle coefficients in the solution.
Definition at line 197 of file BundleAdjust.h.
Referenced by AddPartials(), ComputeNumberPartials(), Init(), SetSolveCmatrix(), and Update().