Isis Developer Reference
|
Gruen pattern matching algorithm. More...
#include <Gruen.h>
Public Types | |
enum | RegisterStatus { SuccessPixel , SuccessSubPixel , PatternChipNotEnoughValidData , FitChipNoData , FitChipToleranceNotMet , SurfaceModelNotEnoughValidData , SurfaceModelSolutionInvalid , SurfaceModelDistanceInvalid , PatternZScoreNotMet , AdaptiveAlgorithmFailed } |
Enumeration of the Register() method's return status. More... | |
enum | GradientFilterType { None , Sobel } |
Enumeration of the different types of gradient filters that can be applied to the pattern and search chips before matching them. More... | |
Public Member Functions | |
Gruen () | |
Default constructor. | |
Gruen (Pvl &pvl) | |
Construct a Gruen search algorithm. | |
virtual | ~Gruen () |
Destructor. | |
BigInt | CallCount () const |
Returns the current call count. | |
void | WriteSubsearchChips (const QString &pattern="SubChip") |
Set up for writing subsearch for a a given registration call. | |
AffineTolerance | getAffineTolerance () const |
Return set of tolerances for affine convergence. | |
double | getSpiceConstraint () const |
Returns the SPICE tolerance constraint as read from config file. | |
double | getAffineConstraint () const |
Returns the Affine tolerance constraint as read from config file. | |
void | setAffineRadio (const AffineRadio &affrad) |
Sets initial chip transformation. | |
void | setAffineRadio () |
Set affine parameters to defaults. | |
const AffineRadio & | getDefaultAffineRadio () const |
Returns default settings for Affine/Radiometric parameters. | |
const AffineRadio & | getAffineRadio () const |
Return current state of Affine/Radio state | |
MatchPoint | getLastMatch () const |
Returns the register state of the last successful Gruen match. | |
Chip * | PatternChip () |
Return pointer to pattern chip. | |
Chip * | SearchChip () |
Return pointer to search chip. | |
Chip * | FitChip () |
Return pointer to fit chip. | |
Chip * | RegistrationPatternChip () |
Return pointer to pattern chip used in registration. | |
Chip * | RegistrationSearchChip () |
Return pointer to search chip used in registration. | |
Chip * | ReducedPatternChip () |
Return pointer to reduced pattern chip. | |
Chip * | ReducedSearchChip () |
Return pointer to reduced search chip. | |
Chip * | ReducedFitChip () |
Return pointer to reduced fit chip. | |
void | SetSubPixelAccuracy (bool on) |
If the sub-pixel accuracy is enabled, the Register() method will attempt to match the pattern chip to the search chip at sub-pixel accuracy, otherwise it will be registered at whole pixel accuracy. | |
void | SetPatternValidPercent (const double percent) |
Set the amount of data in the pattern chip that must be valid. | |
void | SetSubsearchValidPercent (const double percent) |
Set the amount of data in the search chip's subchip that must be valid. | |
void | SetTolerance (double tolerance) |
Set the tolerance for an acceptable goodness of fit. | |
void | SetChipInterpolator (const QString &interpolator) |
Sets the Chip class interpolator type to be used to load pattern and search chips. | |
void | SetSurfaceModelWindowSize (int size) |
Set the surface model window size. | |
void | SetSurfaceModelDistanceTolerance (double distance) |
Set a distance the surface model solution is allowed to move away from the best whole pixel fit in the fit chip. | |
void | SetReductionFactor (int reductionFactor) |
Set the reduction factor used to speed up the pattern matching algorithm. | |
void | SetPatternZScoreMinimum (double minimum) |
Set the minimum pattern zscore. | |
void | SetGradientFilterType (const QString &gradientFilterType) |
Set the gradient filter type to be applied to the search and pattern chips. | |
QString | GradientFilterString () const |
bool | SubPixelAccuracy () |
Return whether this object will attempt to register to whole or sub-pixel accuracy. | |
int | ReductionFactor () |
Return the reduction factor. | |
double | PatternValidPercent () const |
Return pattern chip valid percent. The default value is. | |
double | SubsearchValidPercent () const |
Return subsearch chip valid percent. | |
double | Tolerance () const |
Return match algorithm tolerance. | |
double | WindowSize () const |
Return window size. | |
double | DistanceTolerance () const |
Return distance tolerance. | |
void | Distance (double &sampDistance, double &lineDistance) |
Return the distance point moved. | |
AutoReg::RegisterStatus | Register () |
Walk the pattern chip through the search chip to find the best registration. | |
bool | Success () const |
Return whether the match algorithm succeeded or not. | |
double | GoodnessOfFit () const |
Return the goodness of fit of the match algorithm. | |
bool | IsIdeal (double fit) |
Returns true if the fit parameter is arbitrarily close to the ideal fit value. | |
double | ChipSample () const |
Return the search chip sample that best matched. | |
double | ChipLine () const |
Return the search chip line that best matched. | |
double | CubeSample () const |
Return the search chip cube sample that best matched. | |
double | CubeLine () const |
Return the search chip cube line that best matched. | |
double | MinimumZScore () const |
Return minimumPatternZScore. | |
void | ZScores (double &score1, double &score2) const |
Return the ZScores of the pattern chip. | |
Pvl | RegistrationStatistics () |
This returns the cumulative registration statistics. | |
virtual double | MostLenientTolerance () |
Minimum tolerance specific to algorithm. | |
PvlGroup | RegTemplate () |
This function returns the keywords that this object was created from. | |
PvlGroup | UpdatedTemplate () |
Returns a PvlGroup containing the PvlKeywords of the parameters this object was most recently run with. | |
Protected Member Functions | |
virtual QString | AlgorithmName () const |
Returns the default name of the algorithm as Gruen. | |
int | algorithm (Chip &pattern, Chip &subsearch, const Radiometric &radio, BigInt &ptsUsed, double &resid, GMatrix &atai, AffineRadio &affrad) |
Real workhorse of the computational Gruen algorithm. | |
Analysis | errorAnalysis (const BigInt &npts, const double &resid, const GMatrix &atai) |
Compute the error analysis of convergent Gruen matrix. | |
virtual double | MatchAlgorithm (Chip &pattern, Chip &subsearch) |
Minimization of data set using Gruen algorithm. | |
virtual bool | CompareFits (double fit1, double fit2) |
This virtual method must return if the 1st fit is equal to or better than the second fit. | |
virtual double | IdealFit () const |
Returns the ideal fit for a perfect Gruen result. | |
virtual AutoReg::RegisterStatus | Registration (Chip &sChip, Chip &pChip, Chip &fChip, int startSamp, int startLine, int endSamp, int endLine, int bestSamp, int bestLine) |
Applies the adaptive Gruen algorithm to pattern and search chips. | |
virtual Pvl | AlgorithmStatistics (Pvl &pvl) |
Create Gruen error and processing statistics Pvl output. | |
void | SetChipSample (double sample) |
Sets the search chip subpixel sample that matches the pattern tack sample. | |
void | SetChipLine (double line) |
Sets the search chip subpixel line that matches the pattern tack line. | |
void | SetGoodnessOfFit (double fit) |
Sets the goodness of fit for adaptive algorithms. | |
void | Parse (Pvl &pvl) |
Initialize parameters in the AutoReg class using a PVL specification. | |
bool | SetSubpixelPosition (Chip &window) |
Set the search chip sample and line to subpixel values if possible. | |
Chip | Reduce (Chip &chip, int reductionFactor) |
This method reduces the given chip by the given reduction factor. | |
Protected Attributes | |
PvlObject | p_template |
AutoRegistration object that created this projection. | |
Gruen pattern matching algorithm.
This class provides adaptive image (chip) registration using the AutoReg factory architecture. This algorithm uses an Affine transform to iteratively adjust the search chip at each iteration. Each iteration solves for new adjustments to the Affine transform until the 6 affine parameters fall below the tolerances as specified in AffineThreshHold1 and AffineThreshHold2.
This class minimizes the 6 specifiable Affine transform components of a 3x3 matrix. The three Affine components for X (sample) and Y (line) are scale, shear and translation. Gruen provides control over the maximum values these three components should attain in order for the registration to converge to a successful match. These limits are specified by AffineScaleTolerance, AffineShearTolerance and AffineTranslationTolerance. AffineShearTolerance is optional and if not specified, it defaults to the value of AffineScaleTolerance. These tolerances specify the maximum amount of translation pixels can be shifted between one Gruen iteration and another. For example, AffineTranslationTolerance = 0.2 means that a subsearch chip cannot move in sample or line direction more than 0.2 pixels in order to satisfy convergence. AffineScaleTolerance constrains the sample and line scale elements of the Affine transformation. And AffineShearTolerance constrains the sample and line shear elements of the Affine transformation. The scale and shear parameters are scaled by size of the Chip. The sample scale and shear Affine components maximum limit is computed as AffineScaleTolerance/((#Samples-1)/2) and AffineShearTolerance/((#Samples-1)/2). Likewise, the line scale and shear maximums are computed using #Lines in the preceding equation.
|
inherited |
|
inherited |
Enumeration of the Register() method's return status.
All of the enumerations describe a failure to register except "Success". These status values can be used to provide the user with more specific feedback on why registration did not succeed.
Isis::Gruen::Gruen | ( | ) |
Default constructor.
Default constructor sets up default Gruen parameters.
Isis::Gruen::Gruen | ( | Pvl & | pvl | ) |
Construct a Gruen search algorithm.
This will construct a minimum difference search algorith. It is recommended that you use a AutoRegFactory class as opposed to this constructor. Direct construction is used commonly in stereo matching.
pvl | A Pvl object that contains a valid automatic registration definition |
|
inlinevirtual |
Destructor.
|
protected |
Real workhorse of the computational Gruen algorithm.
This method is called for all registration requests and actually performs the registration of two chips.
The pattern chip is deemed constant. The subsearch chip is generally an extraction from the search chip that has had an affine transform applied to fill it.
At each iteration of the Gruen algorithm, the affine transform is incrementally updated based upon the results from this method. There are six affine parameters and two radiometric (shift and gain) parameters that are solved/computed here.
The algorithm itself is a first derivative computation of the subsearch chip with small radiometric adjustments applied to better tone match the two chips. This is intended to minimize the affine variability.
pattern | Fixed pattern chip which subsearch is trying to match |
subsearch | Affined extraction of the search chip |
Referenced by MatchAlgorithm(), and Registration().
|
inlineprotectedvirtual |
Returns the default name of the algorithm as Gruen.
Implements Isis::AutoReg.
Reimplemented in Isis::AdaptiveGruen.
Referenced by AlgorithmStatistics().
Create Gruen error and processing statistics Pvl output.
This method generates two groups specific to the Gruen algorithm: The GruenFailures group which logs all the errors enountered during processing and the GruenStatistics group which logs selected statistics gathered during a registration run.
These groups are added to the AutoReg log output Pvl container for reporting to user/log files.
Reimplemented from Isis::AutoReg.
References AlgorithmName(), Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::getNth(), Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::size(), and Isis::toString().
|
inline |
Returns the current call count.
|
inlineinherited |
Return the search chip line that best matched.
|
inlineinherited |
Return the search chip sample that best matched.
|
protectedvirtual |
This virtual method must return if the 1st fit is equal to or better than the second fit.
fit1 | 1st goodness of fit |
fit2 | 2nd goodness of fit |
Reimplemented from Isis::AutoReg.
|
inlineinherited |
Return the search chip cube line that best matched.
|
inlineinherited |
Return the search chip cube sample that best matched.
|
inlineinherited |
Return the distance point moved.
sampDistance | Sample movement |
lineDistance | Line movement |
|
inlineinherited |
Return distance tolerance.
Referenced by Isis::AutoReg::UpdatedTemplate().
|
protected |
Compute the error analysis of convergent Gruen matrix.
npts | |
resid | |
atai |
References Isis::Analysis::m_npts.
Referenced by MatchAlgorithm(), and Registration().
|
inlineinherited |
Return pointer to fit chip.
Referenced by Isis::ControlMeasureEditWidget::saveChips(), and Isis::ControlPointEdit::saveChips().
|
inline |
Returns the Affine tolerance constraint as read from config file.
|
inline |
Return current state of Affine/Radio state
AffineTolerance Isis::Gruen::getAffineTolerance | ( | ) | const |
Return set of tolerances for affine convergence.
Referenced by Registration().
|
inline |
Returns default settings for Affine/Radiometric parameters.
Referenced by setAffineRadio().
|
inline |
Returns the register state of the last successful Gruen match.
This method returns the full match condition of the last call to Gruen Register function that was successful.
BEWARE: This is only valid if Register returns successfully! This is due to AutoReg returning conditions that occur prior to the actual Gruen algorithm being called.
|
inline |
Returns the SPICE tolerance constraint as read from config file.
|
inlineinherited |
Return the goodness of fit of the match algorithm.
|
inherited |
References _FILEINFO_, Isis::AutoReg::None, Isis::IException::Programmer, and Isis::AutoReg::Sobel.
Referenced by Isis::AutoReg::UpdatedTemplate().
|
inlineprotectedvirtual |
Returns the ideal fit for a perfect Gruen result.
Implements Isis::AutoReg.
|
inlineinherited |
Returns true if the fit parameter is arbitrarily close to the ideal fit value.
fit | Fit value to be compared to the ideal fit |
References Isis::AutoReg::IdealFit().
Referenced by Isis::AutoReg::Registration().
Minimization of data set using Gruen algorithm.
This is a very minimal application of the Gruen algorithm that provides the ability to use it in a non-adaptive capacity. This method processes two chips of the same size, pattern and subsearch. The subsearch has typically been extracted in the same manner as the MinimumDifference or MaximumCorrelation routines are utilized.
It simply applies the algorithm to the current state of the two chips, computes the error analysis on it and returns the eigen vector solution as an indication of chip registration integrity.
Note that in this mode, most all the parameters found in the definition file that apply to the adaptive mode are ignored when utilizing the algorithm in this fashion.
pattern | [in] A Chip object usually containing an nxm area of a cube. Must be the same diminsions as subsearch. |
subsearch | [in] A Chip object usually containing an nxm area of a cube. Must be the same dimensions as pattern. This is normally a subarea of a larger portion of the image. |
Implements Isis::AutoReg.
References algorithm(), errorAnalysis(), and Isis::Null.
|
inlineinherited |
Return minimumPatternZScore.
Referenced by Isis::AutoReg::UpdatedTemplate().
|
inlinevirtualinherited |
Minimum tolerance specific to algorithm.
Reimplemented in Isis::MinimumDifference.
|
protectedinherited |
Initialize parameters in the AutoReg class using a PVL specification.
An example of the PVL required for this is:
There are many other options that can be set via the pvl and are described in other documentation (see below).
pvl | The pvl object containing the specification |
iException::User | "Improper format for AutoReg PVL." |
References _FILEINFO_, Isis::PvlObject::findObject(), Isis::AutoReg::PatternChip(), Isis::AutoReg::SearchChip(), Isis::AutoReg::SetChipInterpolator(), Isis::AutoReg::SetGradientFilterType(), Isis::AutoReg::SetPatternValidPercent(), Isis::AutoReg::SetPatternZScoreMinimum(), Isis::AutoReg::SetReductionFactor(), Isis::Chip::SetSize(), Isis::AutoReg::SetSubPixelAccuracy(), Isis::AutoReg::SetSubsearchValidPercent(), Isis::AutoReg::SetSurfaceModelDistanceTolerance(), Isis::AutoReg::SetSurfaceModelWindowSize(), Isis::AutoReg::SetTolerance(), Isis::Chip::SetValidRange(), Isis::PvlObject::Traverse, Isis::IException::User, Isis::ValidMaximum, and Isis::ValidMinimum.
Referenced by Isis::AutoReg::AutoReg().
|
inlineinherited |
Return pointer to pattern chip.
Referenced by Isis::AutoReg::Parse(), and Isis::AutoReg::UpdatedTemplate().
|
inlineinherited |
Return pattern chip valid percent. The default value is.
Referenced by Isis::MaximumCorrelation::MatchAlgorithm(), and Isis::AutoReg::UpdatedTemplate().
This method reduces the given chip by the given reduction factor.
Used to speed up the match algorithm.
chip | Chip to be reduced |
reductionFactor | Factor by which to reduce chip. |
References Isis::Chip::GetValue(), Isis::Chip::Lines(), Isis::Null, Isis::Statistics::Reset(), Isis::Chip::Samples(), and Isis::Chip::SetValue().
Referenced by Isis::AutoReg::Register().
|
inlineinherited |
Return pointer to reduced fit chip.
|
inlineinherited |
Return pointer to reduced pattern chip.
|
inlineinherited |
Return pointer to reduced search chip.
|
inlineinherited |
Return the reduction factor.
Referenced by Isis::AutoReg::UpdatedTemplate().
|
inherited |
Walk the pattern chip through the search chip to find the best registration.
iException::User | - "Search chips samples must be at least N pixels wider than the pattern chip samples for successful surface modeling" |
iException::User | - "Search chips lines must be at least N pixels taller than the pattern chip lines for successful surface modeling" |
iException::User | - "Reduction factor is too large" |
References _FILEINFO_, Isis::AutoReg::FitChipNoData, Isis::Chip::Lines(), Isis::AutoReg::None, Isis::Null, Isis::AutoReg::PatternChipNotEnoughValidData, Isis::AutoReg::PatternZScoreNotMet, Isis::AutoReg::Reduce(), Isis::AutoReg::Registration(), Isis::Chip::Samples(), Isis::Chip::SetChipPosition(), Isis::Chip::SetSize(), Isis::Chip::SetValue(), Isis::AutoReg::Success(), Isis::AutoReg::SuccessSubPixel, and Isis::IException::User.
|
protectedvirtual |
Applies the adaptive Gruen algorithm to pattern and search chips.
This method computes the adaptive Gruen algorithm for a pattern chip and search chip. The search chip is assumed to be of a larger size than the pattern chip as dictated by the contents of the registration definition file.
This algorithm can be used with or without "fast geoming" the search chip. It works quite well where the two images are assumed to be nearly spatially registered. Its real intent is to compute parallax angles between two images taken at different viewing geometry. This provides an efficient process for deriving a digital elevation model (DEM) from two datasets.
The Gruen algorithm is applied to the chips until the algorithm converges (current iteration yields a detla affine within tolerance limits), an error is encountered, or the maximum number of iterations is exceeded.
Note that bestSamp and bestLine may not be the original center of the search chip. It is subject to chip reduction matching as specified by the user. All distance tolerances are compute from this postion. The process of chip reduction processing is handled by AutoReg prior to calling this routine.
sChip | Full search chip as rendered from the search image |
pChip | Full pattern chip as rendered from the pattern/match image |
fChip | Maintains the solution vector at each chip location |
startSamp | Starting sample of the search image range |
startLine | Starting line of the search image range |
endSamp | Ending sample of the search image range |
endLine | Ending line of the search image range |
bestSamp | Best registering sample of search chip |
bestLine | best registering line of search chip |
Reimplemented from Isis::AutoReg.
References algorithm(), errorAnalysis(), getAffineTolerance(), Isis::AutoReg::SetChipLine(), Isis::AutoReg::SetChipSample(), Isis::AutoReg::SetGoodnessOfFit(), and Isis::MatchPoint::setStatus().
|
inlineinherited |
Return pointer to pattern chip used in registration.
References Isis::AutoReg::None.
Referenced by Isis::ControlMeasureEditWidget::saveChips(), and Isis::ControlPointEdit::saveChips().
|
inlineinherited |
Return pointer to search chip used in registration.
References Isis::AutoReg::None.
Referenced by Isis::ControlMeasureEditWidget::saveChips(), and Isis::ControlPointEdit::saveChips().
|
inherited |
This returns the cumulative registration statistics.
That is, the Register() method accumulates statistics regard the errors each time is called. Invoking this method returns a PVL summary of those statisitics
References Isis::AutoReg::AlgorithmStatistics(), and Isis::toString().
|
inherited |
This function returns the keywords that this object was created from.
References Isis::PvlObject::findGroup(), Isis::PvlObject::hasGroup(), Isis::AutoReg::p_template, Isis::AutoReg::SetPatternValidPercent(), Isis::AutoReg::SetSubsearchValidPercent(), and Isis::PvlObject::Traverse.
|
inlineinherited |
Return pointer to search chip.
Referenced by Isis::AutoReg::Parse(), and Isis::AutoReg::UpdatedTemplate().
void Isis::Gruen::setAffineRadio | ( | ) |
Set affine parameters to defaults.
This method differs from the one above in that it uses the defaults as defined at construction. The basic difference is that this call sets the affine portion to the identity and the radiometric parameters to the defaults as provided in the user input auto-regististration parameters. It may have default shift and gain values to use.
References getDefaultAffineRadio().
void Isis::Gruen::setAffineRadio | ( | const AffineRadio & | affrad | ) |
Sets initial chip transformation.
This method can be used with AutoReg registration to set initial affine transform parameters. This initial condition will be applied to the whole search chip extraction for the first subsearch chip. The caller must define the contents of the affine and radiometric parameters. See the AffineRadio construct for details.
affrad | Initial Affine/Radio parameters to apply on registration entry |
|
inherited |
Sets the Chip class interpolator type to be used to load pattern and search chips.
Acceptable values for the interpolator parameter include:
If this method is not called, the chip interpolator type defaults to CubicConvolutionType in the Chip class.
interpolator | Name of interpolator type to be used. This is taken from the Pvl's ChipInterpolator keyword value. |
iException::User | - "Invalid Interpolator type." |
References _FILEINFO_, Isis::Interpolator::BiLinearType, Isis::Interpolator::CubicConvolutionType, Isis::Interpolator::NearestNeighborType, Isis::Chip::SetReadInterpolator(), and Isis::IException::User.
Referenced by Isis::AutoReg::Parse().
|
inlineprotectedinherited |
Sets the search chip subpixel line that matches the pattern tack line.
line | Value to set for search chip subpixel line |
Referenced by Registration().
|
inlineprotectedinherited |
Sets the search chip subpixel sample that matches the pattern tack sample.
sample | Value to set for search chip subpixel sample |
Referenced by Registration().
|
inlineprotectedinherited |
Sets the goodness of fit for adaptive algorithms.
fit | Fit value to set |
Referenced by Registration().
|
inherited |
Set the gradient filter type to be applied to the search and pattern chips.
gradientFilterType | the gradient filter type to use |
iException::User | - "Invalid Gradient type." |
References _FILEINFO_, Isis::AutoReg::None, Isis::AutoReg::Sobel, and Isis::IException::User.
Referenced by Isis::AutoReg::Parse().
|
inherited |
Set the amount of data in the pattern chip that must be valid.
For example, a 21x21 pattern chip has 441 pixels. If percent is 75 then at least 330 pixels pairs must be valid in order for a comparision between the pattern and search sub-region to occur. That is, both the pattern pixel and search pixel must be valid to be counted. Pixels are considered valid based on the min/max range specified on each of the Chips (see Chip::SetValidRange method).
If the pattern chip reduction option is used this percentage will apply to all reduced patterns. Additionally, the pattern sampling effects the pixel count. For example if pattern sampling is 50% then only 220 pixels in the 21x21 pattern are considered so 165 must be valid.
If this method is not called, the PatternChip ValidPercent defaults to 50 in the AutoReg object constructor.
percent | Percentage of valid data between 0 and 100, default is 50% if never invoked |
iException::User | - "Invalid value for PatternChip ValidPercent." |
References _FILEINFO_, and Isis::IException::User.
Referenced by Isis::AutoReg::AutoReg(), Isis::AutoReg::Parse(), and Isis::AutoReg::RegTemplate().
|
inherited |
Set the minimum pattern zscore.
This option is used to ignore pattern chips which are bland (low standard deviation). If the minimum or maximum pixel value in the pattern chip does not meet the minimum zscore value (see a statisitcs book for definition of zscore) then invalid registration will occur.
If this method is not called, the z-score minimum defaults to 1.0 in the AutoReg object constructor.
minimum | The minimum zscore value for the pattern chip. Default is 1.0 |
iException::User | - "Invalid value for PatternChip MinimumZScore." |
References _FILEINFO_, and Isis::IException::User.
Referenced by Isis::AutoReg::AutoReg(), and Isis::AutoReg::Parse().
|
inherited |
Set the reduction factor used to speed up the pattern matching algorithm.
If this method is not called, the reduction factor defaults to 1 in the AutoReg object constructor.
factor | Reduction factor. Must be greater than or equal to 1. |
iException::User | - "Invalid value for Algorithm ReductionFactor." |
References _FILEINFO_, and Isis::IException::User.
Referenced by Isis::AutoReg::AutoReg(), and Isis::AutoReg::Parse().
|
inherited |
If the sub-pixel accuracy is enabled, the Register() method will attempt to match the pattern chip to the search chip at sub-pixel accuracy, otherwise it will be registered at whole pixel accuracy.
If this method is not called, the sub pixel accuracy defaults to on = true in the AutoReg object constructor.
on | Set the state of registration accuracy. The default is sub-pixel accuracy is on |
Referenced by Isis::AutoReg::AutoReg(), and Isis::AutoReg::Parse().
|
protectedinherited |
Set the search chip sample and line to subpixel values if possible.
This method uses a centroiding method to gravitate the whole pixel best fit to a subpixel extremum in the continuous image space. The weights of the centers of gravity in the centroiding algorithm are modeled by goodness of fit values within a discrete search window.
window | The search window extracted from the fit chip |
References Isis::Centroid::setDNRange().
Referenced by Isis::AutoReg::Registration().
|
inherited |
Set the amount of data in the search chip's subchip that must be valid.
If this method is not called, the SearchChip SubchipValidPercent defaults to 50 in the AutoReg object constructor.
percent | Percentage of valid data between 0 and 100, default is 50% if never invoked |
iException::User | - "Invalid value for SearchChip SubchipValidPercent." |
References _FILEINFO_, and Isis::IException::User.
Referenced by Isis::AutoReg::AutoReg(), Isis::AutoReg::Parse(), and Isis::AutoReg::RegTemplate().
|
inherited |
Set a distance the surface model solution is allowed to move away from the best whole pixel fit in the fit chip.
If this method is not called, the distance tolerance defaults to 1.5 in the AutoReg object constructor.
distance | The distance allowed to move in pixels. Must be greater than 0. |
iException::User | - "Invalid value for SurfaceModel DistanceTolerance." |
References _FILEINFO_, and Isis::IException::User.
Referenced by Isis::AutoReg::AutoReg(), and Isis::AutoReg::Parse().
|
inherited |
Set the surface model window size.
The pixels in this window will be used to fit a surface model in order to compute sub-pixel accuracy. In some cases the default (3x3) and produces erroneous sub-pixel accuracy values.
If this method is not called, the window size defaults to 5 in the AutoReg object constructor.
size | The size of the window must be three or greater and odd. |
iException::User | - "Invalid value for SurfaceModel WindowSize." |
References _FILEINFO_, and Isis::IException::User.
Referenced by Isis::AutoReg::AutoReg(), and Isis::AutoReg::Parse().
|
inherited |
Set the tolerance for an acceptable goodness of fit.
If this method is not called, the tolerance value defaults to Isis::Null in the AutoReg object constructor.
tolerance | This tolerance is used to test against the goodness of fit returned by the MatchAlgorith method after a surface model has been fit. See TestGoodnessOfFit |
Referenced by Isis::AutoReg::AutoReg(), and Isis::AutoReg::Parse().
|
inlineinherited |
Return whether this object will attempt to register to whole or sub-pixel accuracy.
Referenced by Isis::AutoReg::UpdatedTemplate().
|
inlineinherited |
Return subsearch chip valid percent.
Referenced by Isis::AutoReg::UpdatedTemplate().
|
inlineinherited |
Return whether the match algorithm succeeded or not.
References Isis::AutoReg::SuccessPixel, and Isis::AutoReg::SuccessSubPixel.
Referenced by Isis::AutoReg::Register().
|
inlineinherited |
Return match algorithm tolerance.
Referenced by Isis::AutoReg::Registration(), and Isis::AutoReg::UpdatedTemplate().
|
inherited |
Returns a PvlGroup containing the PvlKeywords of the parameters this object was most recently run with.
Because of publically accessible mutators, AutoReg's runtime parameters can change, and this version of the template is designed to reflect the paramters it was actually run with, as opposed to simply initialized with. If no mutators were ever called externally, then this PvlGroup should be the same as the one received from RegTemplate().
References Isis::AutoReg::AlgorithmName(), Isis::AutoReg::DistanceTolerance(), Isis::AutoReg::GradientFilterString(), Isis::AutoReg::MinimumZScore(), Isis::AutoReg::PatternChip(), Isis::AutoReg::PatternValidPercent(), Isis::AutoReg::ReductionFactor(), Isis::AutoReg::SearchChip(), Isis::AutoReg::SubPixelAccuracy(), Isis::AutoReg::SubsearchValidPercent(), Isis::AutoReg::Tolerance(), Isis::toString(), and Isis::AutoReg::WindowSize().
|
inlineinherited |
Return window size.
Referenced by Isis::AutoReg::UpdatedTemplate().
void Isis::Gruen::WriteSubsearchChips | ( | const QString & | pattern = "SubChip" | ) |
Set up for writing subsearch for a a given registration call.
This method is provided to request the write of the subsearch chip at each iteration. This must be invoked prior to every call to AutoReg::Register() method. It will only write subchips from the Register() interface as it interates to a solution. Direct calls to Gruen methods don't iterate in the same fashion.
The "pattern" parameter is optional but is provided to direct the location and naming convention of each subsearch chip. The format for the output file name for each subsearch chip is comprised of the pattern parameter, call number, which can be retrieved by the CallCount() method and pertains to the call after the Register() method is invoked and the interation count. Below is a code example:
Note that prior to each call to Register(), it must be called again in order for the subchips to be written. The last part of the parameter above, "subchip", cannot be a directory, but is a filename prefix. Assuming this is the first call to Register(), a series of cube subsearch chips will be written with the pattern "/work1/kbecker/subchipC000001IXXX.cub" where "C" indicates call count and the next 6 digits are the return of CallCount() method, "I" indicates the iteration count "XXX" of the algorithm() method. Note that the chip written for a particular iteration is what is provided as a parameter into the algorithm() method.
pattern | Specifies an optional directory and file pattern to write the subsearch chip at each algorithm iteration. |
|
inlineinherited |
Return the ZScores of the pattern chip.
score1 | First Z Score |
score2 | Second Z Score |
|
protectedinherited |
AutoRegistration object that created this projection.
Referenced by Isis::AutoReg::AutoReg(), and Isis::AutoReg::RegTemplate().