OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
Base class for all automatic tiepoints. More...
#include <AutoTiePoint.h>
Public Member Functions | |
AutoTiePoint () | |
AutoTiePoint (const AutoTiePoint ©_me) | |
AutoTiePoint (std::shared_ptr< AtpGenerator > generator, const std::string &id) | |
Constructs given two images and a point on the REF image. More... | |
AutoTiePoint (const Json::Value &tp_json_node) | |
Creates new tiepoint from JSON object formatted as: { "id": <unsigned int>="">, // may be ignored if not valid "type": "M"|"A"|"G" For “manual”, “auto”, or “GCP-associated” "imagePoints: [ { "imageId": <string>, "x": <double>, "y": <double>, "covariance": [ cxx, cyy, cxy ], "gcpId": <string> Only if associated with a GCP } ] }. More... | |
virtual | ~AutoTiePoint () |
void | setRefImagePt (const ossimDpt &imagePt) |
Sets the reference image's image point (in image space) for this tiepoint. More... | |
void | setRefViewPt (const ossimDpt &viewPt) |
Sets the reference image's view point (in view space) for this tiepoint. More... | |
bool | getVectorResidual (ossimDpt &residual) const |
Returns the vector residual (CMP-REF) of current active peak (in view space) via argument. More... | |
bool | getRefImagePoint (ossimDpt &image_pt) const |
Returns the center location of the reference patch (the feature) in image-space. More... | |
bool | getCmpImagePoint (ossimDpt &image_pt) const |
Fetches the comparison image point for current best peak. Returns false if no valid peak. More... | |
virtual std::ostream & | print (std::ostream &out) const |
Stream output dump of object. More... | |
std::vector< MatchPoint > & | matchPoints () |
Access to peaks list for GUI debug display. More... | |
void | addImageMatch (const ossimDpt &cmpPt, double confidenceValue=1.0) |
Inserts match in image space by confidence in descending order. More... | |
void | addViewMatch (const ossimDpt &cmpViewPt, double confidenceValue=1.0) |
Inserts match in image space by confidence in descending order. More... | |
unsigned int | getNumMatches () const |
Returns the total number of peaks in the list. More... | |
bool | hasValidMatch () const |
Returns true if there is a valid peak in the list. More... | |
bool | getConfidenceMeasure (double &confidence) const |
Returns the correlation value of current active peak via argument. Returns true if valid. More... | |
bool | getRefViewPoint (ossimDpt &view_pt) const |
Returns the center location of the reference patch (the feature) in view-space. More... | |
bool | getRefGroundPoint (ossimGpt &gpt) const |
Returns the center location of the reference patch (the feature) in geographic. More... | |
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. More... | |
bool | bumpActiveMatch () |
Removes the active match and sets the next peak as active. More... | |
virtual void | saveJSON (Json::Value &json) const |
![]() | |
TiePoint () | |
TiePoint (const TiePoint ©) | |
TiePoint (const Json::Value &tp_json_node) | |
Creates new tiepoint from JSON object formatted as: { "id": <unsigned int>="">, // may be ignored if not valid "type": "M"|"A"|"G" For “manual”, “auto”, or “GCP-associated” "imagePoints: [ { "imageId": <string>, "x": <double>, "y": <double>, "covariance": [ cxx, cyy, cxy ], "gcpId": <string> Only if associated with a GCP } ] }. More... | |
virtual | ~TiePoint () |
unsigned int | getImageCount () const |
const std::string & | getTiePointId () const |
void | setTiePointId (const std::string &id) |
void | getImagePoint (unsigned int index, std::string &imageId, ossimDpt &imagePoint, NEWMAT::SymmetricMatrix &cov) const |
Fetches the image point coordinates along with image ID and GCP ID if available. More... | |
void | setImagePoint (std::shared_ptr< Image > image, const ossimDpt &imagePoint, const NEWMAT::SymmetricMatrix &cov) |
Sets image point value and associated measurement covariance for specified image ID. More... | |
Type | getType () const |
void | setType (Type t) |
const std::string & | getGcpId () const |
void | setGcpId (const std::string &id) |
virtual void | loadJSON (const Json::Value &json) |
![]() | |
JsonInterface () | |
virtual | ~JsonInterface () |
Protected Member Functions | |
virtual void | recomputeResidual () |
Recomputes active peak's residual after a model adjustment or change in peak. More... | |
Protected Attributes | |
std::shared_ptr< AtpGenerator > | m_generator |
std::vector< MatchPoint > | m_matchPoints |
ossimDpt | m_refViewPt |
ossimDpt | m_cmpViewPt |
ossimDpt | m_residual |
double | m_relativeError |
Uncertainty in position of feature in CMP image. More... | |
![]() | |
Type | m_type |
std::string | m_tiePointId |
std::vector< std::shared_ptr< Image > > | m_images |
std::vector< ossimDpt > | m_imagePoints |
std::vector< NEWMAT::SymmetricMatrix > | m_covariances |
double | m_gsd |
std::string | m_gcpId |
Additional Inherited Members | |
![]() | |
enum | Type { UNASSIGNED, MANUAL, AUTO, GCP } |
![]() | |
static int | s_runningId = 1 |
Base class for all automatic tiepoints.
These differ from tiepoint base class in that it is guarantied to represent a single image pair. Therefore, residuals between the pair can be computed without referencing image ids, etc. TODO: Eventually need to generalize to permit N-way auto-tiepoints, at which point it should merge with TiePoint base class.
Definition at line 30 of file AutoTiePoint.h.
ATP::AutoTiePoint::AutoTiePoint | ( | ) |
Definition at line 18 of file AutoTiePoint.cpp.
ATP::AutoTiePoint::AutoTiePoint | ( | const AutoTiePoint & | copy_me | ) |
Definition at line 24 of file AutoTiePoint.cpp.
References m_matchPoints.
ATP::AutoTiePoint::AutoTiePoint | ( | std::shared_ptr< AtpGenerator > | generator, |
const std::string & | id | ||
) |
Constructs given two images and a point on the REF image.
The matching is still to be established.
overlap | The combiner source representing the overlap between REF and CMP images. Tie point ID |
ATP::AutoTiePoint::AutoTiePoint | ( | const Json::Value & | tp_json_node | ) |
Creates new tiepoint from JSON object formatted as: { "id": <unsigned int>="">, // may be ignored if not valid "type": "M"|"A"|"G" For “manual”, “auto”, or “GCP-associated” "imagePoints: [ { "imageId": <string>, "x": <double>, "y": <double>, "covariance": [ cxx, cyy, cxy ], "gcpId": <string> Only if associated with a GCP } ] }.
Definition at line 55 of file AutoTiePoint.cpp.
|
virtual |
Definition at line 62 of file AutoTiePoint.cpp.
References m_matchPoints.
void ATP::AutoTiePoint::addImageMatch | ( | const ossimDpt & | cmpPt, |
double | confidenceValue = 1.0 |
||
) |
Inserts match in image space by confidence in descending order.
Definition at line 154 of file AutoTiePoint.cpp.
References ossim::TiePoint::m_imagePoints, m_matchPoints, m_residual, ossimDpt::makeNan(), and recomputeResidual().
Referenced by addViewMatch().
void ATP::AutoTiePoint::addViewMatch | ( | const ossimDpt & | cmpViewPt, |
double | confidenceValue = 1.0 |
||
) |
Inserts match in image space by confidence in descending order.
Definition at line 207 of file AutoTiePoint.cpp.
References addImageMatch(), m_cmpViewPt, m_generator, and m_matchPoints.
bool ATP::AutoTiePoint::bumpActiveMatch | ( | ) |
Removes the active match and sets the next peak as active.
Returns TRUE unless there are no more active matches.
Definition at line 192 of file AutoTiePoint.cpp.
References m_matchPoints, and recomputeResidual().
bool ATP::AutoTiePoint::getCmpImagePoint | ( | ossimDpt & | image_pt | ) | const |
Fetches the comparison image point for current best peak. Returns false if no valid peak.
Definition at line 73 of file AutoTiePoint.cpp.
References ossim::TiePoint::m_imagePoints.
bool ATP::AutoTiePoint::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.
Returns false if no valid peak.
Definition at line 229 of file AutoTiePoint.cpp.
References m_cmpViewPt.
bool ATP::AutoTiePoint::getConfidenceMeasure | ( | double & | confidence | ) | const |
Returns the correlation value of current active peak via argument. Returns true if valid.
Definition at line 178 of file AutoTiePoint.cpp.
References hasValidMatch(), and m_matchPoints.
|
inline |
Returns the total number of peaks in the list.
Definition at line 95 of file AutoTiePoint.h.
References m_matchPoints.
bool ATP::AutoTiePoint::getRefGroundPoint | ( | ossimGpt & | gpt | ) | const |
Returns the center location of the reference patch (the feature) in geographic.
Returns false if point not yet defined. Note that there may not be any valid peak.
Definition at line 258 of file AutoTiePoint.cpp.
References ossimDpt::isNan(), m_generator, m_refViewPt, and ossimGpt::makeNan().
bool ATP::AutoTiePoint::getRefImagePoint | ( | ossimDpt & | image_pt | ) | const |
Returns the center location of the reference patch (the feature) in image-space.
Returns false if point not yet defined. Note that there not be any valid peak.
Definition at line 81 of file AutoTiePoint.cpp.
References ossim::TiePoint::m_imagePoints.
bool ATP::AutoTiePoint::getRefViewPoint | ( | ossimDpt & | view_pt | ) | const |
Returns the center location of the reference patch (the feature) in view-space.
Returns false if point not yet defined. Note that there may not be any valid peak.
Definition at line 221 of file AutoTiePoint.cpp.
References ossimDpt::isNan(), and m_refViewPt.
bool ATP::AutoTiePoint::getVectorResidual | ( | ossimDpt & | residual | ) | const |
Returns the vector residual (CMP-REF) of current active peak (in view space) via argument.
Returns true if valid.
Definition at line 67 of file AutoTiePoint.cpp.
References m_residual.
bool ATP::AutoTiePoint::hasValidMatch | ( | ) | const |
Returns true if there is a valid peak in the list.
Definition at line 202 of file AutoTiePoint.cpp.
References m_matchPoints.
Referenced by getConfidenceMeasure().
|
inline |
Access to peaks list for GUI debug display.
Definition at line 86 of file AutoTiePoint.h.
References m_matchPoints.
|
virtual |
Stream output dump of object.
Reimplemented from ossim::TiePoint.
Definition at line 129 of file AutoTiePoint.cpp.
References DEG_PER_RAD, ossim::TiePoint::m_imagePoints, m_matchPoints, m_residual, ossim::TiePoint::m_tiePointId, ossim_hdf5::print(), ossimDpt::x, and ossimDpt::y.
|
protectedvirtual |
Recomputes active peak's residual after a model adjustment or change in peak.
Residuals are in view space for this type.
Definition at line 240 of file AutoTiePoint.cpp.
References m_cmpViewPt, m_generator, ossim::TiePoint::m_imagePoints, m_refViewPt, m_residual, and ossimDpt::makeNan().
Referenced by addImageMatch(), and bumpActiveMatch().
|
virtual |
Reimplemented from ossim::TiePoint.
Definition at line 109 of file AutoTiePoint.cpp.
References ossimGpt::azimuthTo(), ossimGpt::distanceTo(), m_cmpViewPt, m_generator, m_matchPoints, and m_refViewPt.
void ATP::AutoTiePoint::setRefImagePt | ( | const ossimDpt & | imagePt | ) |
Sets the reference image's image point (in image space) for this tiepoint.
Definition at line 89 of file AutoTiePoint.cpp.
References m_generator, ossim::TiePoint::m_imagePoints, and m_refViewPt.
void ATP::AutoTiePoint::setRefViewPt | ( | const ossimDpt & | viewPt | ) |
Sets the reference image's view point (in view space) for this tiepoint.
Definition at line 98 of file AutoTiePoint.cpp.
References m_generator, ossim::TiePoint::m_imagePoints, and m_refViewPt.
|
protected |
Definition at line 132 of file AutoTiePoint.h.
Referenced by addViewMatch(), getCmpViewPoint(), recomputeResidual(), and saveJSON().
|
protected |
Definition at line 129 of file AutoTiePoint.h.
Referenced by addViewMatch(), getRefGroundPoint(), recomputeResidual(), saveJSON(), setRefImagePt(), and setRefViewPt().
|
protected |
Definition at line 130 of file AutoTiePoint.h.
Referenced by addImageMatch(), addViewMatch(), AutoTiePoint(), bumpActiveMatch(), getConfidenceMeasure(), getNumMatches(), hasValidMatch(), matchPoints(), print(), saveJSON(), and ~AutoTiePoint().
|
protected |
Definition at line 131 of file AutoTiePoint.h.
Referenced by getRefGroundPoint(), getRefViewPoint(), recomputeResidual(), saveJSON(), setRefImagePt(), and setRefViewPt().
|
protected |
Uncertainty in position of feature in CMP image.
Definition at line 134 of file AutoTiePoint.h.
|
protected |
Definition at line 133 of file AutoTiePoint.h.
Referenced by addImageMatch(), getVectorResidual(), print(), and recomputeResidual().