10 #include "../AtpCommon.h" 14 using namespace ossim;
18 AutoTiePoint::AutoTiePoint()
26 m_generator(copy.m_generator),
27 m_refViewPt(copy.m_refViewPt),
28 m_cmpViewPt(copy.m_cmpViewPt),
29 m_residual(copy.m_residual),
30 m_relativeError(copy.m_relativeError)
37 : m_generator(generator),
44 CFATAL <<
"AutoTiePoint Constructor ERROR: Null overlap chain passed." << endl;
102 m_generator->getRefIVT()->viewToImage(viewPt, imagePt);
111 TiePoint::saveJSON(json_node);
114 json_node[
"confidence"] =
m_matchPoints[0].getConfidenceMeasure();
116 auto geom =
m_generator->getRefIVT()->getViewGeometry();
122 Json::Value residual;
123 residual[
"range"] = refGpt.
distanceTo(cmpGpt);
124 residual[
"azimuth"] = refGpt.
azimuthTo(cmpGpt);
125 json_node[
"residual"] = residual;
138 out <<
"\n azimuth deg = " << azimuth;
142 out<<
"\n No matches.";
211 m_generator->getCmpIVT()->viewToImage(cmpViewPt, cmpImagePt);
void setRefViewPt(const ossimDpt &viewPt)
Sets the reference image's view point (in view space) for this tiepoint.
double azimuthTo(const ossimGpt &arg_gpt) const
METHOD: azimuthTo(ossimGpt) Computes the great-circle starting azimuth (i.e., at this gpt) to the arg...
bool getRefImagePoint(ossimDpt &image_pt) const
Returns the center location of the reference patch (the feature) in image-space.
bool getVectorResidual(ossimDpt &residual) const
Returns the vector residual (CMP-REF) of current active peak (in view space) via argument.
bool getRefGroundPoint(ossimGpt &gpt) const
Returns the center location of the reference patch (the feature) in geographic.
Base class for all automatic tiepoints.
bool getConfidenceMeasure(double &confidence) const
Returns the correlation value of current active peak via argument. Returns true if valid...
This code was derived from https://gist.github.com/mshockwave.
std::ostream & print(H5::H5File *file, std::ostream &out)
Print method.
bool hasValidMatch() const
Returns true if there is a valid peak in the list.
std::vector< ossimDpt > m_imagePoints
void setTiePointId(const std::string &id)
double distanceTo(const ossimGpt &arg_gpt) const
METHOD: distanceTo(ossimGpt) Computes straight-line distance in meters between this and arg gpt: ...
void setRefImagePt(const ossimDpt &imagePt)
Sets the reference image's image point (in image space) for this tiepoint.
bool bumpActiveMatch()
Removes the active match and sets the next peak as active.
std::vector< MatchPoint > m_matchPoints
Class representing an Image as used by ossim-msp services.
std::shared_ptr< AtpGenerator > m_generator
virtual void recomputeResidual()
Recomputes active peak's residual after a model adjustment or change in peak.
void addImageMatch(const ossimDpt &cmpPt, double confidenceValue=1.0)
Inserts match in image space by confidence in descending order.
THESE FUNCTIONS REQUIRE OPENCV.
virtual void saveJSON(Json::Value &json) const
std::vector< std::shared_ptr< Image > > m_images
void addViewMatch(const ossimDpt &cmpViewPt, double confidenceValue=1.0)
Inserts match in image space by confidence in descending order.
bool getRefViewPoint(ossimDpt &view_pt) const
Returns the center location of the reference patch (the feature) in view-space.
virtual std::ostream & print(std::ostream &out) const
Stream output dump of object.
bool getCmpViewPoint(ossimDpt &view_pt, unsigned int peak_idx=0) const
Fetches the comparison view point for current best peak, or for the peak indicated if provided...
bool getCmpImagePoint(ossimDpt &image_pt) const
Fetches the comparison image point for current best peak. Returns false if no valid peak...
Class for representing a single tiepoint on two or more images.
Maintains quantities associated with single matchpoint peak.
std::basic_ostream< char > ostream
Base class for char output streams.