1 #ifndef BundleResults_h 2 #define BundleResults_h 43 #include "XmlStackedHandler.h" 48 class QXmlStreamWriter;
116 QString minCoord1PointId, QString maxCoord1PointId);
118 QString minCoord2PointId, QString maxCoord2PointId);
120 QString minCoord3PointId, QString maxCoord3PointId);
122 double rmsFromSigmaCoord2Stats,
123 double rmsFromSigmaCoord3Stats);
141 double computeRejectionLimit(
ControlNet *p_Cnet,
142 double outlierRejectionMultiplier,
143 int numObservations);
147 double computeResiduals(
149 std::vector< boost::numeric::ublas::bounded_vector< double, 3 > > pointWeights,
150 std::vector< boost::numeric::ublas::bounded_vector< double, 3 > > pointCorrections,
152 std::vector< double > imageParameterWeights,
153 int numImagePartials,
212 double rmsRx()
const;
213 double rmsRy()
const;
253 void save(QXmlStreamWriter &stream,
const Project *project)
const;
272 virtual bool startElement(
const QString &namespaceURI,
const QString &localName,
273 const QString &qName,
const QXmlAttributes &atts);
275 virtual bool endElement(
const QString &namespaceURI,
const QString &localName,
276 const QString &qName);
283 QString m_xmlHandlerCharacters;
284 int m_xmlHandlerResidualsListSize;
285 int m_xmlHandlerSampleResidualsListSize;
286 int m_xmlHandlerLineResidualsListSize;
287 int m_xmlHandlerXSigmasListSize;
288 int m_xmlHandlerYSigmasListSize;
289 int m_xmlHandlerZSigmasListSize;
290 int m_xmlHandlerRASigmasListSize;
291 int m_xmlHandlerDECSigmasListSize;
292 int m_xmlHandlerTWISTSigmasListSize;
296 QString m_xmlHandlerCorrelationImageId;
426 #endif // BundleResults_h QString m_maxSigmaCoord3PointId
The maximum sigma coordinate 3 point id.
void setObservations(BundleObservationVector observations)
Sets the vector of BundleObservations.
This class is a container class for BundleObservations.
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
Handle an XML start element.
virtual bool characters(const QString &ch)
Adds a QString to the XmlHandler's internal character data.
BundleObservationVector m_observations
The vector of BundleObservations from BundleAdjust.
Distance m_maxSigmaCoord3Distance
The maximum sigma radius distance.
Distance minSigmaCoord2Distance() const
Returns the minimum sigma distance for coordinate 2.
void incrementFixedPoints()
Increase the number of 'fixed' (ground) points.
void setSigmaCoord1Range(Distance minCoord1Dist, Distance maxCoord1Dist, QString minCoord1PointId, QString maxCoord1PointId)
Sets the min and max sigma distances and point ids for coordinate 1.
QString m_maxSigmaCoord2PointId
The maximum sigma coordinate2 point id.
QString maxSigmaCoord3PointId() const
Returns the maximum sigma point id for coordinate 3.
The main project for ipce.
void setElapsedTime(double time)
Sets the elapsed time for the bundle adjustment.
QVector< Statistics > m_rmsImageYSigmas
< The root mean square image y sigmas.
int numberObservations() const
Returns the number of observations.
void setNumberImageParameters(int numberParameters)
Sets the number of image parameters.
StatCumProbDistDynCalc * m_cumProRes
This class keeps track of the cumulative probability distribution of residuals (in unweighted pixels)...
void setCorrMatCovFileName(FileName name)
Set the covariance file name for the matrix used to calculate the correlation matrix.
const BundleObservationVector & observations() const
Returns a reference to the observations used by the BundleAdjust.
void setSigmaCoord3Range(Distance minCoord3Dist, Distance maxCoord3Dist, QString minCoord3PointId, QString maxCoord3PointId)
Sets the min and max sigma distances and point ids for coordinate 3.
This is a container for the correlation matrix that comes from a bundle adjust.
File name manipulation and expansion.
void resetNumberConstrainedPointParameters()
Resets the number of contrained point parameters to 0.
void save(QXmlStreamWriter &stream, const Project *project) const
Saves the BundleResults object to an XML file.
void printMaximumLikelihoodTierInformation()
Prints out information about which tier the solution is in and the status of the residuals.
double m_rmsSigmaCoord1Stats
rms of adjusted Latitude sigmas
XmlHandler(BundleResults *statistics, Project *project)
Constructs an XmlHandler used to save a BundleResults object.
QVector< Statistics > rmsImageDECSigmas() const
Returns the list of RMS image declination sigma statistics.
void incrementNumberConstrainedImageParameters(int incrementAmount)
Increase the number of constrained image parameters.
Distance m_maxSigmaCoord2Distance
The maximum sigma longitude distance.
ControlNetQsp m_outNet
The output control net from BundleAdjust.
double sigmaCoord1StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 1.
int m_numberHeldImages
number of 'held' images (define)
void setRmsImageResidualLists(QList< Statistics > rmsImageLineResiduals, QList< Statistics > rmsImageSampleResiduals, QList< Statistics > rmsImageResiduals)
Sets the root mean square image residual Statistics lists.
QString m_minSigmaCoord3PointId
The minimum sigma coordinate 3 point id.
int m_numberConstrainedImageParameters
number of constrained image parameters
double sigmaCoord3StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 3.
QList< Statistics > m_rmsImageSampleResiduals
List of RMS image sample residual statistics for each image in the bundle.
QVector< Statistics > rmsImageZSigmas() const
Returns the list of RMS image z sigma statistics.
Distance m_minSigmaCoord1Distance
The minimum sigma latitude distance.
void addProbabilityDistributionObservation(double obsValue)
Adds an observation to the cumulative probability distribution of |R^2 residuals|.
QString minSigmaCoord1PointId() const
Returns the minimum sigma point id for coordinate 1.
void setRmsFromSigmaStatistics(double rmsFromSigmaCoord1Stats, double rmsFromSigmaCoord2Stats, double rmsFromSigmaCoord3Stats)
Sets the root mean square values of the adjusted sigmas for all three coordinates.
double rejectionLimit() const
Returns the rejection limit.
QVector< BundleControlPointQsp > m_bundleControlPoints
The vector of BundleControlPoints from BundleAdjust.
QVector< Statistics > m_rmsImageRASigmas
< The root mean square image right ascension sigmas.
double m_rmsYResiduals
rms of y residuals
Q_DECLARE_METATYPE(Isis::Cube *)
This allows Cube *'s to be stored in a QVariant.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
void resetNumberConstrainedImageParameters()
Resets the number of constrained image parameters to 0.
void maximumLikelihoodSetUp(QList< QPair< MaximumLikelihoodWFunctions::Model, double > > modelsWithQuantiles)
This method steps up the maximum likelihood estimation solution.
double m_rmsSigmaCoord3Stats
rms of adjusted Radius sigmas
int numberFixedPoints() const
Returns the number of 'fixed' (ground) points.
void setOutputControlNet(ControlNetQsp outNet)
Sets the output ControlNet.
void setNumberUnknownParameters(int numberParameters)
Sets the total number of parameters to solve for.
QString m_minSigmaCoord1PointId
The minimum sigma coordinate 1 point id.
void setElapsedTimeErrorProp(double time)
Sets the elapsed time for error propegation.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
int maximumLikelihoodModelIndex() const
Returns which step the bundle adjustment is on.
QString maxSigmaCoord1PointId() const
Returns the maximum sigma point id for coordinate 1.
Distance measurement, usually in meters.
BundleResults & operator=(const BundleResults &src)
Assignment operator for BundleResults.
double m_rejectionLimit
current rejection limit
Distance maxSigmaCoord3Distance() const
Returns the maximum sigma distance for coordinate 3.
ControlNetQsp outputControlNet() const
Returns a shared pointer to the output control network.
int numberHeldImages() const
Returns the number of 'held' images.
StatCumProbDistDynCalc cumulativeProbabilityDistribution() const
Returns the cumulative probability distribution of the |R^2 residuals|.
void computeDegreesOfFreedom()
Computes the degrees of freedom of the bundle adjustment and stores it internally.
QVector< Statistics > m_rmsImageDECSigmas
< The root mean square image declination sigmas.
QVector< BundleControlPointQsp > & bundleControlPoints()
Returns a reference to the BundleControlPoint vector.
double m_rmsXYResiduals
rms of all x and y residuals
StatCumProbDistDynCalc * m_cumPro
This class will be used to calculate the cumulative probability distribution of |R^2 residuals|...
QVector< Statistics > rmsImageYSigmas() const
Returns the list of RMS image y sigma statistics.
MaximumLikelihoodWFunctions maximumLikelihoodModelWFunc(int modelIndex) const
Returns the maximum likelihood model at the given index.
double rmsRx() const
Returns the RMS of the x residuals.
void setRejectionLimit(double rejectionLimit)
Sets the rejection limit.
int m_numberIgnoredPoints
number of ignored points
double m_elapsedTime
elapsed time for bundle
double elapsedTime() const
Returns the elapsed time for the bundle adjustment.
This class is used to approximate cumulative probibility distributions of a stream of observations wi...
boost::numeric::ublas::vector< double > Vector
Definition for an Isis::LinearAlgebra::Vector of doubles.
void setSigmaCoord2Range(Distance minCoord2Dist, Distance maxCoord2Dist, QString minCoord2PointId, QString maxCoord2PointId)
Sets the min and max sigma distances and point ids for coordinate 2.
StatCumProbDistDynCalc residualsCumulativeProbabilityDistribution() const
Returns the cumulative probability distribution of the residuals used for reporting.
int m_numberObservations
number of image coordinate observations
int numberConstrainedImageParameters() const
Returns the number of constrained image parameters.
Distance minSigmaCoord3Distance() const
Returns the minimum sigma distance for coordinate 3.
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
Handle end tags for the BundleResults serialized XML.
void setBundleControlPoints(QVector< BundleControlPointQsp > controlPoints)
Sets the bundle control point vector.
Distance m_minSigmaCoord2Distance
The minimum sigma longitude distance.
double sigmaCoord2StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 2.
int m_numberConstrainedTargetParameters
number of constrained target parameters
void incrementIgnoredPoints()
Increase the number of ignored points.
double m_rmsXResiduals
rms of x residuals
This class is an XmlHandler used to read and write BundleResults objects from and to XML files...
double m_rmsSigmaCoord2Stats
rms of adjusted Longitude sigmas
double maximumLikelihoodModelQuantile(int modelIndex) const
Returns the quantile of the maximum likelihood model at the given index.
void incrementNumberConstrainedPointParameters(int incrementAmount)
Increase the number of contrained point parameters.
QList< Statistics > rmsImageSampleResiduals() const
Returns the list of RMS image sample residuals statistics.
double m_elapsedTimeErrorProp
elapsed time for error propagation
int m_numberConstrainedPointParameters
number of constrained point parameters
CorrelationMatrix correlationMatrix() const
Returns the Correlation Matrix.
double m_maximumLikelihoodMedianR2Residuals
Median of R^2 residuals.
XML Handler that parses XMLs in a stack-oriented way.
void addResidualsProbabilityDistributionObservation(double obsValue)
Adds an observation to the cumulative probability distribution of residuals used for reporting...
int m_numberRejectedObservations
number of rejected image coordinate observations
void resizeSigmaStatisticsVectors(int numberImages)
Resizes all image sigma vectors.
QVector< Statistics > rmsImageRASigmas() const
Returns the list of RMS image right ascension sigma statistics.
void computeSigma0(double dvtpv, BundleSettings::ConvergenceCriteria criteria)
Computes the sigma0 and stores it internally.
Class provides maximum likelihood estimation functions for robust parameter estimation, e.g.
void setNumberRejectedObservations(int numberObservations)
Sets the number of rejected observations.
QString minSigmaCoord2PointId() const
Returns the minimum sigma point id for coordinate 2.
QList< Statistics > rmsImageResiduals() const
Returns the list of RMS image residuals statistics.
BundleResults(QObject *parent=0)
Constructs a BundleResults object.
Distance minSigmaCoord1Distance() const
Returns the minimum sigma distance for coordinate 1.
QVector< Statistics > rmsImageXSigmas() const
Returns the list of RMS image x sigma statistics.
bool converged() const
Returns whether or not the bundle adjustment converged.
double elapsedTimeErrorProp() const
Returns the elapsed time for error propagation.
QList< QPair< MaximumLikelihoodWFunctions, double > > m_maximumLikelihoodFunctions
< The maximum likelihood models and their quantiles.
void initializeResidualsProbabilityDistribution(unsigned int nodes=20)
Initializes or resets the cumulative probability distribution of residuals used for reporting...
int m_iterations
The number of iterations taken by BundleAdjust.
int m_numberUnknownParameters
total number of parameters to solve for
double rmsRxy() const
Returns the RMS of the x and y residuals.
void setCorrMatImgsAndParams(QMap< QString, QStringList > imgsAndParams)
Set the images and their associated parameters of the correlation matrix.
double maximumLikelihoodMedianR2Residuals() const
Returns the median of the |R^2 residuals|.
CoordinateType
Defines the coordinate typ, units, and coordinate index for some of the output methods.
CorrelationMatrix * m_correlationMatrix
The correlation matrix from the BundleAdjust.
void initializeProbabilityDistribution(unsigned int nodes=20)
Initializes or resets the cumulative probability distribution of |R^2 residuals|. ...
Distance m_maxSigmaCoord1Distance
The maximum sigma latitude distance.
int m_numberFixedPoints
number of 'fixed' (ground) points (define)
int numberRejectedObservations() const
Returns the number of observation that were rejected.
QString m_maxSigmaCoord1PointId
The maximum sigma coordinate 1 point id.
QList< Statistics > rmsImageLineResiduals() const
Returns the list of RMS image line residuals statistics.
int numberMaximumLikelihoodModels() const
Returns how many maximum likelihood models were used in the bundle adjustment.
QString minSigmaCoord3PointId() const
Returns the minimum sigma point id for coordinate 3.
double rmsRy() const
Returns the RMS of the y residuals.
void setNumberObservations(int numberObservations)
Sets the number of observations.
int m_maximumLikelihoodIndex
This count keeps track of which stage of the maximum likelihood adjustment the bundle is currently on...
QVector< Statistics > m_rmsImageZSigmas
< The root mean square image z sigmas.
int m_degreesOfFreedom
degrees of freedom
int numberConstrainedTargetParameters() const
Return the number of constrained target parameters.
Distance m_minSigmaCoord3Distance
The minimum sigma radius distance.
QVector< Statistics > rmsImageTWISTSigmas() const
Returns the list of RMS image twist sigma statistics.
QList< Statistics > m_rmsImageLineResiduals
List of RMS image line residual statistics for each image in the bundle.
~XmlHandler()
Destroys an XmlHandler.
void setRmsXYResiduals(double rx, double ry, double rxy)
Sets the root mean square of the x and y residuals.
void initialize()
Initializes the BundleResults to a default state where all numeric members are set to 0 or another de...
void incrementMaximumLikelihoodModelIndex()
Increases the value that indicates which stage the maximum likelihood adjustment is currently on...
~BundleResults()
Destroys this BundleResults object.
Namespace for ISIS/Bullet specific routines.
void incrementHeldImages()
Increases the number of 'held' images.
A container class for statistical results from a BundleAdjust solution.
Distance maxSigmaCoord2Distance() const
Returns the maximum sigma distance for coordinate 2.
void resetNumberConstrainedTargetParameters()
Resets the number of constrained target parameters to 0.
QString m_minSigmaCoord2PointId
The minimum sigma coordinate 2 point id.
void setSigma0(double sigma0)
Sets the sigma0.
int numberConstrainedPointParameters() const
Returns the number of constrained point parameters.
int iterations() const
Returns the number of iterations taken by the BundleAdjust.
QString maxSigmaCoord2PointId() const
Returns the maximum sigma point id for coordinate 2.
int m_numberImageParameters
number of image parameters
void incrementNumberConstrainedTargetParameters(int incrementAmount)
Increases the number of constrained target parameters.
int degreesOfFreedom() const
Returns the degrees of freedom.
void setConverged(bool converged)
Sets if the bundle adjustment converged.
Serial Number list generator.
Contains Pvl Groups and Pvl Objects.
void setIterations(int iterations)
Sets the number of iterations taken by the BundleAdjust.
int numberImageParameters() const
Returns the total number of image parameters.
double m_sigma0
std deviation of unit weight
Manage a stack of content handlers for reading XML files.
QList< Statistics > m_rmsImageResiduals
RMS image sample and line residual statistics for each image in the bundle.
double sigma0() const
Returns the Sigma0 of the bundle adjustment.
Distance maxSigmaCoord1Distance() const
Returns the maximum sigma distance for coordinate 1.
int numberUnknownParameters() const
Returns the number of unknown parameters.
int numberIgnoredPoints() const
Returns the number of ignored points.
ConvergenceCriteria
This enum defines the options for the bundle adjustment's convergence.
void setDegreesOfFreedom(double degreesOfFreedom)
Sets the degrees of freedom.
QVector< Statistics > m_rmsImageTWISTSigmas
< The root mean square image twist sigmas.