OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
Base class for OSSIM-based ATP generators. More...
#include <AtpGenerator.h>
Public Types | |
enum | Algorithm { ALGO_UNASSIGNED =0, CROSSCORR, DESCRIPTOR, NASA } |
Public Member Functions | |
AtpGenerator (Algorithm algo) | |
virtual | ~AtpGenerator () |
void | setRefImage (std::shared_ptr< ossim::Image > ref_image) |
void | setCmpImage (std::shared_ptr< ossim::Image > cmp_image) |
virtual void | initialize () |
Needs to be called after ref and cmp images are set. More... | |
void | setBandWeights (const std::vector< double > weights) |
When the input images are multiband, the bands must be combined into a single-band image. More... | |
virtual bool | generateTiePointList (ossim::TiePointList &tpList) |
This is the main workhorse method. More... | |
ossimRefPtr< ossimImageViewProjectionTransform > | getRefIVT () |
ossimRefPtr< ossimImageViewProjectionTransform > | getCmpIVT () |
ossimRefPtr< ossimImageChain > | getRefChain () |
ossimRefPtr< ossimImageChain > | getCmpChain () |
std::string | getRefImageID () |
std::string | getCmpImageID () |
std::string | getRefFilename () |
std::string | getCmpFilename () |
ossimRefPtr< AtpTileSource > | getAtpTileSource () |
Static Public Member Functions | |
static void | writeTiePointList (ostream &out, const AtpList &tpList) |
For engineering use. More... | |
Public Attributes | |
ossimRefPtr< AtpAnnotatedImage > | m_annotatedRefImage |
ossimRefPtr< AtpAnnotatedImage > | m_annotatedCmpImage |
Protected Member Functions | |
AtpGenerator () | |
virtual ossimRefPtr< ossimImageChain > | constructChain (std::shared_ptr< ossim::Image > image, ossimRefPtr< ossimImageViewProjectionTransform > &ivt) |
Constructs the processing chain for the input image according to the needs of the generator. More... | |
bool | getValidVertices (ossimRefPtr< ossimImageChain > chain, ossimRefPtr< ossimImageViewProjectionTransform > &ivt, std::vector< ossimDpt > &validVertices) |
Establishes valid image vertices in view space for later computing overlap. More... | |
void | layoutSearchTileRects (ossimPolygon &overlapPoly) |
Finds optimum layout of patches within the intersect area for feature search. More... | |
ossimImageHandler * | getImageHandler (ossimRefPtr< ossimImageChain > &chain) |
Protected Attributes | |
Algorithm | m_algorithm |
std::shared_ptr< ossim::Image > | m_refImage |
std::shared_ptr< ossim::Image > | m_cmpImage |
ossimRefPtr< AtpTileSource > | m_atpTileSource |
ossimRefPtr< ossimImageChain > | m_refChain |
ossimRefPtr< ossimImageChain > | m_cmpChain |
ossimRefPtr< ossimImageViewProjectionTransform > | m_refIVT |
ossimRefPtr< ossimImageViewProjectionTransform > | m_cmpIVT |
ossimRefPtr< ossimImageGeometry > | m_viewGeom |
ossimIrect | m_aoiView |
std::vector< double > | m_bandWeights |
double | m_refEllipHgt |
std::vector< ossimIrect > | m_searchTileRects |
Static Protected Attributes | |
static std::shared_ptr< AutoTiePoint > | s_referenceATP |
Friends | |
class | AtpTileSource |
Base class for OSSIM-based ATP generators.
TODO: Currently, ATP generation only works with pair-wise matching. Eventually it should support N-way matching with an arbitrary number of input images. The multiple image case is presently handled by the AutoTiePointService.
Definition at line 33 of file AtpGenerator.h.
Enumerator | |
---|---|
ALGO_UNASSIGNED | |
CROSSCORR | |
DESCRIPTOR | |
NASA |
Definition at line 38 of file AtpGenerator.h.
ATP::AtpGenerator::AtpGenerator | ( | Algorithm | algo | ) |
Definition at line 39 of file AtpGenerator.cpp.
|
virtual |
Definition at line 46 of file AtpGenerator.cpp.
|
inlineprotected |
Definition at line 95 of file AtpGenerator.h.
|
protectedvirtual |
Constructs the processing chain for the input image according to the needs of the generator.
As a convenience, the image-to-common view IVT is initialized
Definition at line 211 of file AtpGenerator.cpp.
References ossimImageChain::add(), ossim::JsonParam::asBool(), ossim::JsonParam::asFloat(), ossim::JsonParam::asString(), ossimImageHandler::buildHistogram(), CINFO, CROSSCORR, ossim::JsonConfig::diagnosticLevel(), ossimString::empty(), ossimRefPtr< T >::get(), ossimImageGeometry::getAsMapProjection(), ossimImageGeometry::getBoundingRect(), ossimImageHandler::getImageGeometry(), ossimImageHandler::getImageHistogram(), ossimImageHandler::getImageID(), ossimImageGeometry::getMetersPerPixel(), ossimImageSource::getNumberOfOutputBands(), ossimImageChain::getOutputScalarType(), ossim::JsonConfig::getParameter(), ossimImageGeometry::getTiePoint(), ossimImageViewProjectionTransform::imageToView(), ATP::AtpConfig::instance(), ossimImageHandlerRegistry::instance(), ossim::isnan(), ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX, m_algorithm, m_viewGeom, ossimImageHandlerRegistry::open(), OSSIM_UINT8, ossimImageHandler::setCurrentEntry(), ossimHistogramRemapper::setHistogram(), ossimImageHandler::setImageID(), ossimImageRenderer::setImageViewTransform(), ossimMapProjection::setMetersPerPixel(), ossimUtmProjection::setOrigin(), ossimBandSelector::setOutputBandList(), ossimScalarRemapper::setOutputScalarType(), ossimImageRenderer::setProperty(), ossimHistogramRemapper::setStretchMode(), ossimMapProjection::setUlTiePoints(), ossimImageViewProjectionTransform::viewToImage(), ossimDpt::x, and ossimDpt::y.
Referenced by initialize().
|
virtual |
This is the main workhorse method.
It launches the auto-tie-point generation process given the REF and CMP images. TODO: Currently, ATP generation only works with pair-wise matching. Eventually it should support N-way matching with an arbitrary number of input images.
Definition at line 450 of file AtpGenerator.cpp.
References CINFO, ossim::JsonConfig::diagnosticLevel(), initialize(), ATP::AtpConfig::instance(), m_annotatedCmpImage, m_annotatedRefImage, m_atpTileSource, m_cmpChain, m_refChain, and m_searchTileRects.
|
inline |
Definition at line 90 of file AtpGenerator.h.
References m_atpTileSource.
|
inline |
Definition at line 83 of file AtpGenerator.h.
References m_cmpChain.
string ATP::AtpGenerator::getCmpFilename | ( | ) |
Definition at line 87 of file AtpGenerator.cpp.
References ossimImageHandler::getFilename(), getImageHandler(), m_cmpChain, and ossimString::string().
string ATP::AtpGenerator::getCmpImageID | ( | ) |
Definition at line 71 of file AtpGenerator.cpp.
References getImageHandler(), ossimImageHandler::getImageID(), m_cmpChain, and ossimString::string().
|
inline |
Definition at line 81 of file AtpGenerator.h.
References m_cmpIVT.
|
protected |
Definition at line 95 of file AtpGenerator.cpp.
References ossimImageChain::accept(), and ossimCollectionVisitor::getObjectAs().
Referenced by getCmpFilename(), getCmpImageID(), getRefFilename(), and getRefImageID().
|
inline |
Definition at line 82 of file AtpGenerator.h.
References m_refChain.
string ATP::AtpGenerator::getRefFilename | ( | ) |
Definition at line 79 of file AtpGenerator.cpp.
References ossimImageHandler::getFilename(), getImageHandler(), m_refChain, and ossimString::string().
string ATP::AtpGenerator::getRefImageID | ( | ) |
Definition at line 63 of file AtpGenerator.cpp.
References getImageHandler(), ossimImageHandler::getImageID(), m_refChain, and ossimString::string().
|
inline |
Definition at line 80 of file AtpGenerator.h.
References m_refIVT.
|
protected |
Establishes valid image vertices in view space for later computing overlap.
Definition at line 370 of file AtpGenerator.cpp.
References ossimImageHandler::createDefaultValidVerticesFilename(), ossimImageHandler::getBoundingRect(), ossimImageHandler::getImageGeometry(), ossimImageChain::getLastSource(), ossimImageGeometry::getProjection(), ossimImageHandler::getValidImageVertices(), ossimImageViewProjectionTransform::imageToView(), and ossimImageHandler::openValidVertices().
Referenced by initialize().
|
virtual |
Needs to be called after ref and cmp images are set.
Definition at line 108 of file AtpGenerator.cpp.
References ALGO_UNASSIGNED, ossim::JsonParam::asString(), ossim::JsonParam::asUint(), CFATAL, CINFO, constructChain(), CROSSCORR, DESCRIPTOR, ossim::JsonConfig::diagnosticLevel(), ossimPolyArea2d::getBoundingRect(), ossimIrect::getCenter(), ossimElevManager::getHeightAboveEllipsoid(), ossimImageChain::getImageGeometry(), ossim::JsonConfig::getParameter(), getValidVertices(), ossimPolyArea2d::getVisiblePolygons(), ossimGpt::height(), ATP::AtpConfig::instance(), ossimElevManager::instance(), layoutSearchTileRects(), ossimImageGeometry::localToWorld(), ossimIrect::lr(), m_algorithm, m_annotatedCmpImage, m_annotatedRefImage, m_aoiView, m_atpTileSource, m_cmpChain, m_cmpImage, m_cmpIVT, m_refChain, m_refEllipHgt, m_refImage, m_refIVT, m_viewGeom, NASA, s_referenceATP, ossimIrect::set_lr(), ossimIrect::set_ul(), ossimElevManager::setDefaultHeightAboveEllipsoid(), ossimImageGeometry::setImageSize(), ossimElevManager::setUseGeoidIfNullFlag(), ossimIrect::size(), ossimIrect::ul(), ossimIpt::x, and ossimIpt::y.
Referenced by generateTiePointList().
|
protected |
Finds optimum layout of patches within the intersect area for feature search.
Definition at line 495 of file AtpGenerator.cpp.
References ossimPolygon::area(), ossim::JsonParam::asUint(), CINFO, CWARN, ossim::JsonConfig::diagnosticLevel(), ossimPolygon::getBoundingRect(), ossimPolygon::getNumberOfVertices(), ossim::JsonConfig::getParameter(), ossimIrect::height(), ATP::AtpConfig::instance(), ossimPolygon::isRectWithin(), ossimIrect::lr(), m_annotatedRefImage, m_aoiView, m_searchTileRects, ossimPolygon::removeVertex(), ossimIrect::ul(), ossimIrect::width(), ossimIpt::x, x, ossimIpt::y, and y.
Referenced by initialize().
|
inline |
When the input images are multiband, the bands must be combined into a single-band image.
weights | Vector of normalized weights (0-1) applied to the input bands for combining. |
Definition at line 54 of file AtpGenerator.h.
References m_bandWeights.
void ATP::AtpGenerator::setCmpImage | ( | std::shared_ptr< ossim::Image > | cmp_image | ) |
Definition at line 57 of file AtpGenerator.cpp.
References m_cmpImage.
void ATP::AtpGenerator::setRefImage | ( | std::shared_ptr< ossim::Image > | ref_image | ) |
Definition at line 51 of file AtpGenerator.cpp.
References m_refImage.
For engineering use.
Renders relevant tiepoint data to disk file(s). Optionally accepts an LUT file for raster-based remapping.
outBaseName | This is the base name of possible multiple outputs, as needed by derived generator. |
lutFile | Optional LUT file formatted as specified in ossimIndexToRgbLutFilter. |
Definition at line 435 of file AtpGenerator.cpp.
|
friend |
Definition at line 35 of file AtpGenerator.h.
|
protected |
Definition at line 116 of file AtpGenerator.h.
Referenced by constructChain(), and initialize().
ossimRefPtr<AtpAnnotatedImage> ATP::AtpGenerator::m_annotatedCmpImage |
Definition at line 92 of file AtpGenerator.h.
Referenced by generateTiePointList(), and initialize().
ossimRefPtr<AtpAnnotatedImage> ATP::AtpGenerator::m_annotatedRefImage |
Definition at line 91 of file AtpGenerator.h.
Referenced by generateTiePointList(), initialize(), and layoutSearchTileRects().
|
protected |
Definition at line 125 of file AtpGenerator.h.
Referenced by initialize(), and layoutSearchTileRects().
|
protected |
Definition at line 119 of file AtpGenerator.h.
Referenced by generateTiePointList(), getAtpTileSource(), and initialize().
|
protected |
Definition at line 126 of file AtpGenerator.h.
Referenced by setBandWeights().
|
protected |
Definition at line 121 of file AtpGenerator.h.
Referenced by generateTiePointList(), getCmpChain(), getCmpFilename(), getCmpImageID(), and initialize().
|
protected |
Definition at line 118 of file AtpGenerator.h.
Referenced by initialize(), and setCmpImage().
|
protected |
Definition at line 123 of file AtpGenerator.h.
Referenced by getCmpIVT(), and initialize().
|
protected |
Definition at line 120 of file AtpGenerator.h.
Referenced by generateTiePointList(), getRefChain(), getRefFilename(), getRefImageID(), and initialize().
|
protected |
Definition at line 127 of file AtpGenerator.h.
Referenced by initialize().
|
protected |
Definition at line 117 of file AtpGenerator.h.
Referenced by initialize(), and setRefImage().
|
protected |
Definition at line 122 of file AtpGenerator.h.
Referenced by getRefIVT(), and initialize().
|
protected |
Definition at line 128 of file AtpGenerator.h.
Referenced by generateTiePointList(), and layoutSearchTileRects().
|
protected |
Definition at line 124 of file AtpGenerator.h.
Referenced by constructChain(), and initialize().
|
staticprotected |
Definition at line 129 of file AtpGenerator.h.
Referenced by initialize().