20#include "BundleControlPoint.h"
21#include "BundleLidarControlPoint.h"
22#include "BundleObservationVector.h"
23#include "BundleSettings.h"
24#include "ControlNet.h"
27#include "MaximumLikelihoodWFunctions.h"
29#include "Statistics.h"
30#include "SurfacePoint.h"
35class QXmlStreamWriter;
36class QXmlStreamReader;
96 void readBundleResults(QXmlStreamReader *xmlReader);
97 void readCorrelationMatrix(QXmlStreamReader *xmlReader);
98 void readGenStatsValues(QXmlStreamReader *xmlReader);
99 void readRms(QXmlStreamReader *xmlReader);
100 void readImageResidualsLists(QXmlStreamReader *xmlReader);
101 void readSigmasLists(QXmlStreamReader *xmlReader);
102 void readStatsToList(QList<Statistics> &list, QXmlStreamReader *xmlReader);
103 void readStatsToVector(QVector<Statistics> &vec, QXmlStreamReader *xmlReader);
104 void readMinMaxSigmas(QXmlStreamReader *xmlReader);
105 void readSigma(
Distance &dist, QString &pointId, QXmlStreamReader *xmlReader);
106 void readMaxLikelihoodEstimation(QXmlStreamReader *xmlReader);
124 QString minCoord1PointId, QString maxCoord1PointId);
126 QString minCoord2PointId, QString maxCoord2PointId);
128 QString minCoord3PointId, QString maxCoord3PointId);
130 double rmsFromSigmaCoord2Stats,
131 double rmsFromSigmaCoord3Stats);
133 QList< QPair< MaximumLikelihoodWFunctions::Model, double > > modelsWithQuantiles);
149 double computeRejectionLimit(
ControlNet *p_Cnet,
150 double outlierRejectionMultiplier,
151 int numObservations);
155 double computeResiduals(
157 std::vector< boost::numeric::ublas::bounded_vector< double, 3 > > pointWeights,
158 std::vector< boost::numeric::ublas::bounded_vector< double, 3 > > pointCorrections,
160 std::vector< double > imageParameterWeights,
161 int numImagePartials,
230 double rmsRx()
const;
231 double rmsRy()
const;
265 QList< QPair< MaximumLikelihoodWFunctions, double > > maximumLikelihoodModels()
const;
276 void save(QXmlStreamWriter &stream,
const Project *project)
const;
320 QVector<BundleLidarControlPointQsp> m_bundleLidarPoints;
350 QVector<Statistics> m_rmsImageXSigmas;
414 QString m_xmlHandlerCharacters;
415 int m_xmlHandlerResidualsListSize;
416 int m_xmlHandlerSampleResidualsListSize;
417 int m_xmlHandlerLineResidualsListSize;
418 int m_xmlHandlerXSigmasListSize;
419 int m_xmlHandlerYSigmasListSize;
420 int m_xmlHandlerZSigmasListSize;
421 int m_xmlHandlerRASigmasListSize;
422 int m_xmlHandlerDECSigmasListSize;
423 int m_xmlHandlerTWISTSigmasListSize;
424 QList<Statistics *> m_xmlHandlerStatisticsList;
427 QString m_xmlHandlerCorrelationImageId;
429 QMap<QString, QStringList> m_xmlHandlerCorrelationMap;
This class is a container class for BundleObservations.
A container class for statistical results from a BundleAdjust solution.
void addProbabilityDistributionObservation(double obsValue)
Adds an observation to the cumulative probability distribution of |R^2 residuals|.
void incrementNumberConstrainedImageParameters(int incrementAmount)
Increase the number of constrained image parameters.
~BundleResults()
Destroys this BundleResults object.
QString m_minSigmaCoord1PointId
The minimum sigma coordinate 1 point id.
QVector< Statistics > m_rmsImageTWISTSigmas
< The root mean square image twist sigmas.
double elapsedTimeErrorProp() const
Returns the elapsed time for error propagation.
int numberRejectedObservations() const
Returns the number of observation that were rejected.
int m_numberUnknownParameters
total number of parameters to solve for
QString minSigmaCoord2PointId() const
Returns the minimum sigma point id for coordinate 2.
void setSigma0(double sigma0)
Sets the sigma0.
double rejectionLimit() const
Returns the rejection limit.
int m_degreesOfFreedom
degrees of freedom
QList< Statistics > m_rmsLidarImageResiduals
RMS image lidar sample & line residual stats for each image in the bundle
int m_numberFixedPoints
number of 'fixed' (ground) points (define)
void incrementNumberConstrainedPointParameters(int incrementAmount)
Increase the number of contrained point parameters.
double rmsRxy() const
Returns the RMS of the x and y residuals.
QList< Statistics > rmsImageSampleResiduals() const
Returns the list of RMS image sample residuals statistics.
QList< Statistics > m_rmsLidarImageSampleResiduals
List of RMS lidar sample residual stats for each image in the bundle
int m_numberConstrainedTargetParameters
number of constrained target parameters
BundleObservationVector m_observations
The vector of BundleObservations from BundleAdjust.
BundleResults(QObject *parent=0)
Constructs a BundleResults object.
ControlNetQsp outputControlNet() const
Returns a shared pointer to the output control network.
int numberObservations() const
Returns the number of observations.
void setElapsedTime(double time)
Sets the elapsed time for the bundle adjustment.
Distance m_maxSigmaCoord3Distance
The maximum sigma radius distance.
MaximumLikelihoodWFunctions maximumLikelihoodModelWFunc(int modelIndex) const
Returns the maximum likelihood model at the given index.
void incrementHeldImages()
Increases the number of 'held' images.
int m_numberLidarImageObservations
lidar image coords. (2 per measure)
double m_maximumLikelihoodMedianR2Residuals
Median of R^2 residuals.
double sigmaCoord3StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 3.
double m_rmsXResiduals
rms of x residuals
double m_rmsSigmaCoord3Stats
rms of adjusted Radius sigmas
void initializeProbabilityDistribution(unsigned int nodes=20)
Initializes or resets the cumulative probability distribution of |R^2 residuals|.
void incrementIgnoredPoints()
Increase the number of ignored points.
void incrementFixedPoints()
Increase the number of 'fixed' (ground) points.
void setBundleControlPoints(QVector< BundleControlPointQsp > controlPoints)
Sets the bundle control point vector.
void setNumberConstrainedPointParameters(int numberParameters)
Set number of contrained point parameters.
void setBundleLidarPoints(QVector< BundleLidarControlPointQsp > lidarPoints)
Sets the bundle lidar point vector.
double sigma0() const
Returns the Sigma0 of the bundle adjustment.
QVector< Statistics > m_rmsImageZSigmas
< The root mean square image z sigmas.
void setIterations(int iterations)
Sets the number of iterations taken by the BundleAdjust.
bool converged() const
Returns whether or not the bundle adjustment converged.
Distance m_maxSigmaCoord1Distance
The maximum sigma latitude distance.
double maximumLikelihoodModelQuantile(int modelIndex) const
Returns the quantile of the maximum likelihood model at the given index.
int m_numberImageObservations
photogrammetry image coords. (2 per measure)
void setSigmaCoord1Range(Distance minCoord1Dist, Distance maxCoord1Dist, QString minCoord1PointId, QString maxCoord1PointId)
Sets the min and max sigma distances and point ids for coordinate 1.
void incrementMaximumLikelihoodModelIndex()
Increases the value that indicates which stage the maximum likelihood adjustment is currently on.
QVector< Statistics > rmsImageDECSigmas() const
Returns the list of RMS image declination sigma statistics.
QString m_maxSigmaCoord1PointId
The maximum sigma coordinate 1 point id.
QVector< Statistics > m_rmsImageYSigmas
< The root mean square image y sigmas.
QList< Statistics > rmsLidarImageSampleResiduals() const
Returns the list of RMS image lidar sample residuals statistics.
void setOutputControlNet(ControlNetQsp outNet)
Sets the output ControlNet.
int m_iterations
The number of iterations taken by BundleAdjust.
double m_rmsXYResiduals
rms of all x and y residuals
int m_numberLidarRangeConstraintEquations
void setSigmaCoord2Range(Distance minCoord2Dist, Distance maxCoord2Dist, QString minCoord2PointId, QString maxCoord2PointId)
Sets the min and max sigma distances and point ids for coordinate 2.
int numberConstrainedPointParameters() const
Returns the number of constrained point parameters.
double rmsRy() const
Returns the RMS of the y residuals.
void resetNumberConstrainedImageParameters()
Resets the number of constrained image parameters to 0.
int m_numberIgnoredPoints
number of ignored points
void computeDegreesOfFreedom()
Computes the degrees of freedom of the bundle adjustment and stores it internally.
Distance m_minSigmaCoord2Distance
The minimum sigma longitude distance.
int iterations() const
Returns the number of iterations taken by the BundleAdjust.
CorrelationMatrix correlationMatrix() const
Returns the Correlation Matrix.
void setNumberRejectedObservations(int numberObservations)
Sets the number of rejected observations.
QString minSigmaCoord1PointId() const
Returns the minimum sigma point id for coordinate 1.
double m_rejectionLimit
current rejection limit
QVector< Statistics > rmsImageYSigmas() const
Returns the list of RMS image y sigma statistics.
QString m_minSigmaCoord2PointId
The minimum sigma coordinate 2 point id.
void maximumLikelihoodSetUp(QList< QPair< MaximumLikelihoodWFunctions::Model, double > > modelsWithQuantiles)
This method steps up the maximum likelihood estimation solution.
void save(QXmlStreamWriter &stream, const Project *project) const
Saves the BundleResults object to an XML file.
int m_numberConstrainedImageParameters
number of constrained image parameters
int numberIgnoredPoints() const
Returns the number of ignored points.
QVector< BundleControlPointQsp > & bundleControlPoints()
Returns a reference to the BundleControlPoint vector.
void setCorrMatImgsAndParams(QMap< QString, QStringList > imgsAndParams)
Set the images and their associated parameters of the correlation matrix.
Distance maxSigmaCoord2Distance() const
Returns the maximum sigma distance for coordinate 2.
QString m_minSigmaCoord3PointId
The minimum sigma coordinate 3 point id.
int numberUnknownParameters() const
Returns the number of unknown parameters.
void addResidualsProbabilityDistributionObservation(double obsValue)
Adds an observation to the cumulative probability distribution of residuals used for reporting.
QVector< BundleLidarControlPointQsp > & bundleLidarControlPoints()
Returns a reference to the BundleLidarControlPoint vector.
int m_numberImageParameters
number of image parameters
double m_sigma0
std deviation of unit weight
int numberImageParameters() const
Returns the total number of image parameters.
QList< Statistics > rmsLidarImageLineResiduals() const
Returns the list of RMS image lidar line residuals statistics.
int m_maximumLikelihoodIndex
This count keeps track of which stage of the maximum likelihood adjustment the bundle is currently on...
QList< Statistics > m_rmsImageLineResiduals
List of RMS image line residual statistics for each image in the bundle
int numberMaximumLikelihoodModels() const
Returns how many maximum likelihood models were used in the bundle adjustment.
StatCumProbDistDynCalc * m_cumProRes
This class keeps track of the cumulative probability distribution of residuals (in unweighted pixels)...
void setNumberLidarRangeConstraints(int numberLidarRangeConstraints)
Sets the total number of lidar range constraints.
int maximumLikelihoodModelIndex() const
Returns which step the bundle adjustment is on.
LidarDataQsp outputLidarData() const
Returns a shared pointer to the output LidarData object.
int m_numberConstrainedPointParameters
number of constrained point parameters
int m_numberConstrainedLidarPointParameters
lidar points
int m_numberRejectedObservations
number of rejected image coordinate observations
int numberHeldImages() const
Returns the number of 'held' images.
double sigmaCoord2StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 2.
StatCumProbDistDynCalc * m_cumPro
This class will be used to calculate the cumulative probability distribution of |R^2 residuals|,...
int m_numberObservations
number of image coordinate observations
void setRejectionLimit(double rejectionLimit)
Sets the rejection limit.
Distance minSigmaCoord3Distance() const
Returns the minimum sigma distance for coordinate 3.
int numberLidarImageObservations() const
Returns the number of lidar observations.
void incrementNumberConstrainedTargetParameters(int incrementAmount)
Increases the number of constrained target parameters.
QVector< BundleControlPointQsp > m_bundleControlPoints
The vector of BundleControlPoints from BundleAdjust.
void setOutputLidarData(LidarDataQsp outLidarData)
Sets the output LidarData object.
double m_rmsSigmaCoord2Stats
rms of adjusted Longitude sigmas
void setNumberImageObservations(int numberObservations)
Sets the number of photogrammetric image observations.
void setRmsImageResidualLists(QList< Statistics > rmsImageLineResiduals, QList< Statistics > rmsImageSampleResiduals, QList< Statistics > rmsImageResiduals)
Sets the root mean square image residual Statistics lists.
double maximumLikelihoodMedianR2Residuals() const
Returns the median of the |R^2 residuals|.
int numberFixedPoints() const
Returns the number of 'fixed' (ground) points.
QString maxSigmaCoord1PointId() const
Returns the maximum sigma point id for coordinate 1.
int numberImageObservations() const
Returns the number of observations.
LidarDataQsp m_outLidarData
Output lidar data from BundleAdjust.
void setNumberLidarImageObservations(int numberLidarObservations)
Sets the number of lidar observations.
void resetNumberConstrainedPointParameters()
Resets the number of contrained point parameters to 0.
void setNumberImageParameters(int numberParameters)
Sets the number of image parameters.
int numberConstrainedTargetParameters() const
Return the number of constrained target parameters.
StatCumProbDistDynCalc residualsCumulativeProbabilityDistribution() const
Returns the cumulative probability distribution of the residuals used for reporting.
double elapsedTime() const
Returns the elapsed time for the bundle adjustment.
QList< Statistics > m_rmsLidarImageLineResiduals
List of RMS lidar line residual stats for each image in the bundle
QList< Statistics > rmsImageResiduals() const
Returns the list of RMS image residuals statistics.
Distance m_maxSigmaCoord2Distance
The maximum sigma longitude distance.
QVector< Statistics > m_rmsImageRASigmas
< The root mean square image right ascension sigmas.
const BundleObservationVector & observations() const
Returns a reference to the observations used by the BundleAdjust.
Distance m_minSigmaCoord3Distance
The minimum sigma radius distance.
ControlNetQsp m_outNet
The output control net from BundleAdjust.
void initialize()
Initializes the BundleResults to a default state where all numeric members are set to 0 or another de...
Distance minSigmaCoord1Distance() const
Returns the minimum sigma distance for coordinate 1.
void setNumberUnknownParameters(int numberParameters)
Sets the total number of parameters to solve for.
void setSigmaCoord3Range(Distance minCoord3Dist, Distance maxCoord3Dist, QString minCoord3PointId, QString maxCoord3PointId)
Sets the min and max sigma distances and point ids for coordinate 3.
QString minSigmaCoord3PointId() const
Returns the minimum sigma point id for coordinate 3.
void setNumberConstrainedLidarPointParameters(int numberParameters)
Set number of contrained point parameters.
double rmsRx() const
Returns the RMS of the x residuals.
void setObservations(BundleObservationVector observations)
Sets the vector of BundleObservations.
void initializeResidualsProbabilityDistribution(unsigned int nodes=20)
Initializes or resets the cumulative probability distribution of residuals used for reporting.
void setRmsFromSigmaStatistics(double rmsFromSigmaCoord1Stats, double rmsFromSigmaCoord2Stats, double rmsFromSigmaCoord3Stats)
Sets the root mean square values of the adjusted sigmas for all three coordinates.
void setRmsXYResiduals(double rx, double ry, double rxy)
Sets the root mean square of the x and y residuals.
QList< Statistics > rmsImageLineResiduals() const
Returns the list of RMS image line residuals statistics.
double m_elapsedTime
elapsed time for bundle
double m_elapsedTimeErrorProp
elapsed time for error propagation
QVector< Statistics > rmsImageRASigmas() const
Returns the list of RMS image right ascension sigma statistics.
void setNumberObservations(int numberObservations)
Sets the number of observations.
int numberLidarRangeConstraintEquations() const
Return the number of lidar range constraint equations.
QVector< Statistics > rmsImageXSigmas() const
Returns the list of RMS image x sigma statistics.
void printMaximumLikelihoodTierInformation()
Prints out information about which tier the solution is in and the status of the residuals.
BundleResults & operator=(const BundleResults &src)
Assignment operator for BundleResults.
void resizeSigmaStatisticsVectors(int numberImages)
Resizes all image sigma vectors.
CorrelationMatrix * m_correlationMatrix
The correlation matrix from the BundleAdjust.
void setDegreesOfFreedom(double degreesOfFreedom)
Sets the degrees of freedom.
Distance m_minSigmaCoord1Distance
The minimum sigma latitude distance.
Distance maxSigmaCoord3Distance() const
Returns the maximum sigma distance for coordinate 3.
Distance maxSigmaCoord1Distance() const
Returns the maximum sigma distance for coordinate 1.
double m_rmsYResiduals
rms of y residuals
QString m_maxSigmaCoord2PointId
The maximum sigma coordinate2 point id.
QList< QPair< MaximumLikelihoodWFunctions, double > > m_maximumLikelihoodFunctions
< The maximum likelihood models and their quantiles.
void setCorrMatCovFileName(FileName name)
Set the covariance file name for the matrix used to calculate the correlation matrix.
QString m_maxSigmaCoord3PointId
The maximum sigma coordinate 3 point id.
QList< Statistics > m_rmsImageSampleResiduals
List of RMS image sample residual statistics for each image in the bundle
QVector< Statistics > rmsImageTWISTSigmas() const
Returns the list of RMS image twist sigma statistics.
void setRmsLidarImageResidualLists(QList< Statistics > rmsLidarImageLineResiduals, QList< Statistics > rmsLidarImageSampleResiduals, QList< Statistics > rmsLidarImageResiduals)
Sets the root mean square lidar image residual Statistics lists.
QString maxSigmaCoord3PointId() const
Returns the maximum sigma point id for coordinate 3.
void computeSigma0(double dvtpv, BundleSettings::ConvergenceCriteria criteria)
Computes the sigma0 and stores it internally.
QList< Statistics > m_rmsImageResiduals
RMS image sample and line residual statistics for each image in the bundle
QString maxSigmaCoord2PointId() const
Returns the maximum sigma point id for coordinate 2.
int numberConstrainedImageParameters() const
Returns the number of constrained image parameters.
void setElapsedTimeErrorProp(double time)
Sets the elapsed time for error propegation.
QVector< Statistics > rmsImageZSigmas() const
Returns the list of RMS image z sigma statistics.
QList< Statistics > rmsLidarImageResiduals() const
Returns the list of RMS image lidar residuals statistics.
int m_numberHeldImages
number of 'held' images (define)
double sigmaCoord1StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 1.
void setConverged(bool converged)
Sets if the bundle adjustment converged.
Distance minSigmaCoord2Distance() const
Returns the minimum sigma distance for coordinate 2.
void resetNumberConstrainedTargetParameters()
Resets the number of constrained target parameters to 0.
double m_rmsSigmaCoord1Stats
rms of adjusted Latitude sigmas
StatCumProbDistDynCalc cumulativeProbabilityDistribution() const
Returns the cumulative probability distribution of the |R^2 residuals|.
int degreesOfFreedom() const
Returns the degrees of freedom.
QVector< Statistics > m_rmsImageDECSigmas
< The root mean square image declination sigmas.
ConvergenceCriteria
This enum defines the options for the bundle adjustment's convergence.
This is a container for the correlation matrix that comes from a bundle adjust.
Distance measurement, usually in meters.
File name manipulation and expansion.
boost::numeric::ublas::vector< double > Vector
Definition for an Isis::LinearAlgebra::Vector of doubles.
Class provides maximum likelihood estimation functions for robust parameter estimation,...
The main project for ipce.
Contains Pvl Groups and Pvl Objects.
Serial Number list generator.
This class is used to approximate cumulative probibility distributions of a stream of observations wi...
CoordinateType
Defines the coordinate typ, units, and coordinate index for some of the output methods.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.