Isis 3 Programmer Reference
|
Maximum correlation pattern matching. More...
#include <MaximumCorrelation.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 | |
MaximumCorrelation (Pvl &pvl) | |
Chip * | PatternChip () |
Return pointer to pattern chip. More... | |
Chip * | SearchChip () |
Return pointer to search chip. More... | |
Chip * | FitChip () |
Return pointer to fit chip. More... | |
Chip * | RegistrationPatternChip () |
Return pointer to pattern chip used in registration. More... | |
Chip * | RegistrationSearchChip () |
Return pointer to search chip used in registration. More... | |
Chip * | ReducedPatternChip () |
Return pointer to reduced pattern chip. More... | |
Chip * | ReducedSearchChip () |
Return pointer to reduced search chip. More... | |
Chip * | ReducedFitChip () |
Return pointer to reduced fit chip. More... | |
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. More... | |
void | SetPatternValidPercent (const double percent) |
Set the amount of data in the pattern chip that must be valid. More... | |
void | SetSubsearchValidPercent (const double percent) |
Set the amount of data in the search chip's subchip that must be valid. More... | |
void | SetTolerance (double tolerance) |
Set the tolerance for an acceptable goodness of fit. More... | |
void | SetChipInterpolator (const QString &interpolator) |
Sets the Chip class interpolator type to be used to load pattern and search chips. More... | |
void | SetSurfaceModelWindowSize (int size) |
Set the surface model window size. More... | |
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. More... | |
void | SetReductionFactor (int reductionFactor) |
Set the reduction factor used to speed up the pattern matching algorithm. More... | |
void | SetPatternZScoreMinimum (double minimum) |
Set the minimum pattern zscore. More... | |
void | SetGradientFilterType (const QString &gradientFilterType) |
Set the gradient filter type to be applied to the search and pattern chips. More... | |
QString | GradientFilterString () const |
bool | SubPixelAccuracy () |
Return whether this object will attempt to register to whole or sub-pixel accuracy. More... | |
int | ReductionFactor () |
Return the reduction factor. More... | |
double | PatternValidPercent () const |
Return pattern chip valid percent. The default value is. More... | |
double | SubsearchValidPercent () const |
Return subsearch chip valid percent. More... | |
double | Tolerance () const |
Return match algorithm tolerance. More... | |
double | WindowSize () const |
Return window size. More... | |
double | DistanceTolerance () const |
Return distance tolerance. More... | |
void | Distance (double &sampDistance, double &lineDistance) |
Return the distance point moved. More... | |
AutoReg::RegisterStatus | Register () |
Walk the pattern chip through the search chip to find the best registration. More... | |
bool | Success () const |
Return whether the match algorithm succeeded or not. More... | |
double | GoodnessOfFit () const |
Return the goodness of fit of the match algorithm. More... | |
bool | IsIdeal (double fit) |
Returns true if the fit parameter is arbitrarily close to the ideal fit value. More... | |
double | ChipSample () const |
Return the search chip sample that best matched. More... | |
double | ChipLine () const |
Return the search chip line that best matched. More... | |
double | CubeSample () const |
Return the search chip cube sample that best matched. More... | |
double | CubeLine () const |
Return the search chip cube line that best matched. More... | |
double | MinimumZScore () const |
Return minimumPatternZScore. More... | |
void | ZScores (double &score1, double &score2) const |
Return the ZScores of the pattern chip. More... | |
Pvl | RegistrationStatistics () |
This returns the cumulative registration statistics. More... | |
virtual double | MostLenientTolerance () |
Minimum tolerance specific to algorithm. More... | |
PvlGroup | RegTemplate () |
This function returns the keywords that this object was created from. More... | |
PvlGroup | UpdatedTemplate () |
Returns a PvlGroup containing the PvlKeywords of the parameters this object was most recently run with. More... | |
Protected Member Functions | |
virtual double | MatchAlgorithm (Chip &pattern, Chip &subsearch) |
Given two identically sized chips return a double that indicates how well they match. More... | |
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. More... | |
virtual double | IdealFit () const |
Returns the ideal (perfect) fit that could be returned by the MatchAlgorithm. More... | |
virtual QString | AlgorithmName () const |
Returns the name of the algorithm. More... | |
void | SetChipSample (double sample) |
Sets the search chip subpixel sample that matches the pattern tack sample. More... | |
void | SetChipLine (double line) |
Sets the search chip subpixel line that matches the pattern tack line. More... | |
void | SetGoodnessOfFit (double fit) |
Sets the goodness of fit for adaptive algorithms. More... | |
virtual AutoReg::RegisterStatus | Registration (Chip &sChip, Chip &pChip, Chip &fChip, int startSamp, int startLine, int endSamp, int endLine, int bestSamp, int bestLine) |
Performs matching between the pattern and search at both whole-pixel and subpixel levels. More... | |
void | Parse (Pvl &pvl) |
Initialize parameters in the AutoReg class using a PVL specification. More... | |
bool | SetSubpixelPosition (Chip &window) |
Set the search chip sample and line to subpixel values if possible. More... | |
Chip | Reduce (Chip &chip, int reductionFactor) |
This method reduces the given chip by the given reduction factor. More... | |
virtual Pvl | AlgorithmStatistics (Pvl &pvl) |
Provide (adaptive) algorithms a chance to report results. More... | |
Protected Attributes | |
PvlObject | p_template |
AutoRegistration object that created this projection. More... | |
Private Member Functions | |
void | Match (Chip &sChip, Chip &pChip, Chip &fChip, int startSamp, int endSamp, int startLine, int endLine) |
Empty copy constructor. More... | |
bool | ComputeChipZScore (Chip &chip) |
This method computes the given Chip's Z-Score. More... | |
void | Init () |
Initialize AutoReg object private variables. More... | |
void | ApplyGradientFilter (Chip &chip) |
Run a gradient filter over the chip. More... | |
void | SobelGradient (Buffer &in, double &v) |
Compute a Sobel gradient based on an input buffer. More... | |
Private Attributes | |
Chip | p_patternChip |
Chip to be matched. More... | |
Chip | p_searchChip |
Chip to be searched for best registration. More... | |
Chip | p_fitChip |
Results from MatchAlgorithm() method. More... | |
Chip | p_gradientSearchChip |
Chip to be searched for best registration with gradient applied. More... | |
Chip | p_gradientPatternChip |
Chip to be matched with gradient applied. More... | |
Chip | p_reducedPatternChip |
Pattern Chip with reduction factor. More... | |
Chip | p_reducedSearchChip |
Search Chip with reduction factor. More... | |
Chip | p_reducedFitChip |
Fit Chip with reduction factor. More... | |
bool | p_subpixelAccuracy |
Indicates whether sub-pixel accuracy is enabled. Default is true. More... | |
int | p_totalRegistrations |
Registration Statistics Total keyword. More... | |
int | p_pixelSuccesses |
Registration statistics Success keyword. More... | |
int | p_subpixelSuccesses |
Registration statistics Success keyword. More... | |
int | p_patternChipNotEnoughValidDataCount |
Registration statistics PatternNotEnoughValidData keyword. More... | |
int | p_patternZScoreNotMetCount |
Registration statistics PatternZScoreNotMet keyword. More... | |
int | p_fitChipNoDataCount |
Registration statistics FitChipNoData keyword. More... | |
int | p_fitChipToleranceNotMetCount |
Registration statistics FitChipToleranceNotMet keyword. More... | |
int | p_surfaceModelNotEnoughValidDataCount |
Registration statistics SurfaceModelNotEnoughValidData keyword. More... | |
int | p_surfaceModelSolutionInvalidCount |
Registration statistics SurfaceModelSolutionInvalid keyword. More... | |
int | p_surfaceModelDistanceInvalidCount |
Registration statistics SurfaceModelDistanceInvalid keyword. More... | |
double | p_zScoreMin |
First Z-Score of pattern chip. More... | |
double | p_zScoreMax |
Second Z-Score of pattern chip. More... | |
double | p_minimumPatternZScore |
Minimum pattern Z-Score. More... | |
double | p_patternValidPercent |
Percentage of data in pattern chip that must be valid. More... | |
double | p_subsearchValidPercent |
Percentage of data in subsearch chip that must be valid. More... | |
double | p_chipSample |
Chip sample. More... | |
double | p_chipLine |
Chip line. More... | |
double | p_cubeSample |
Cube sample. More... | |
double | p_cubeLine |
Cube line. More... | |
double | p_goodnessOfFit |
Goodness of fit of the match algorithm. More... | |
double | p_tolerance |
Tolerance for acceptable goodness of fit in match algorithm. More... | |
int | p_windowSize |
Surface model window size. More... | |
double | p_distanceTolerance |
Maximum distance the surface model solution may be from the best whole pixel fit in the fit chip. More... | |
double | p_bestFit |
Goodness of fit for adaptive algorithms. More... | |
int | p_bestSamp |
Sample value of best fit. More... | |
int | p_bestLine |
Line value of best fit. More... | |
double | p_sampMovement |
The number of samples the point moved. More... | |
double | p_lineMovement |
The number of lines the point moved. More... | |
int | p_reduceFactor |
Reduction factor. More... | |
Isis::AutoReg::RegisterStatus | p_registrationStatus |
Registration status to be returned by Register(). More... | |
AutoReg::GradientFilterType | p_gradientFilterType |
Type of gradient filter to use before matching. More... | |
Maximum correlation pattern matching.
This class is used to construct a maximum correlation pattern matching algorith. That is, given a search chip and a pattern chip, the pattern chip is walked through the search chip. At each position the a sub-search chip is extracted which is the same size as the pattern chip. Then the correlation between the two is computed. The best fit = 1.0 which means the pattern chip and sub-search chip are identical
Definition at line 36 of file MaximumCorrelation.h.
|
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.
|
inlineprotectedvirtual |
Returns the name of the algorithm.
Implements Isis::AutoReg.
Definition at line 47 of file MaximumCorrelation.h.
Provide (adaptive) algorithms a chance to report results.
Provide Adaptive objects the opportunity to report behavior. It is called at the final step prior to program termination.
pvl | Pvl structure to add report to |
Reimplemented in Isis::Gruen.
|
privateinherited |
Run a gradient filter over the chip.
The type of filter is determined by the Gradient keyword in the Algorithm group.
chip | the chip to be filtered |
iException::Programmer | - "Invalid Gradient type." |
Definition at line 927 of file AutoReg.cpp.
References Isis::Buffer::DoubleBuffer(), Isis::Chip::Extract(), Isis::Chip::GetValue(), Isis::Chip::Lines(), Isis::Chip::Samples(), and Isis::Chip::SetValue().
|
inlineinherited |
Return the search chip line that best matched.
Definition at line 335 of file AutoReg.h.
References Isis::AutoReg::p_chipLine.
|
inlineinherited |
Return the search chip sample that best matched.
Definition at line 330 of file AutoReg.h.
References Isis::AutoReg::p_chipSample.
|
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.
Definition at line 41 of file MaximumCorrelation.cpp.
|
privateinherited |
This method computes the given Chip's Z-Score.
If this value is less than the minimum pattern Z-Score or greater than the negative of the minimum pattern Z-Score, the method will return false. Otherwise, it returns true.
chip | Chip object whose Z-Score is calculated |
Definition at line 895 of file AutoReg.cpp.
References Isis::Statistics::AddData(), Isis::Chip::GetValue(), Isis::Chip::Lines(), Isis::Statistics::Maximum(), Isis::Statistics::Minimum(), Isis::Chip::Samples(), and Isis::Statistics::ZScore().
|
inlineinherited |
Return the search chip cube line that best matched.
Definition at line 345 of file AutoReg.h.
References Isis::AutoReg::p_cubeLine.
Referenced by Isis::SmtkMatcher::makeRegisteredPoint(), Isis::ControlMeasureEditWidget::registerPoint(), and Isis::ControlPointEdit::registerPoint().
|
inlineinherited |
Return the search chip cube sample that best matched.
Definition at line 340 of file AutoReg.h.
References Isis::AutoReg::p_cubeSample.
Referenced by Isis::SmtkMatcher::makeRegisteredPoint(), Isis::ControlMeasureEditWidget::registerPoint(), and Isis::ControlPointEdit::registerPoint().
|
inlineinherited |
Return the distance point moved.
sampDistance | Sample movement |
lineDistance | Line movement |
Definition at line 310 of file AutoReg.h.
References Isis::AutoReg::p_lineMovement, and Isis::AutoReg::p_sampMovement.
Referenced by Isis::ControlMeasureEditWidget::registerPoint(), and Isis::ControlPointEdit::registerPoint().
|
inlineinherited |
Return distance tolerance.
Definition at line 300 of file AutoReg.h.
References Isis::AutoReg::p_distanceTolerance.
Referenced by Isis::ControlMeasureEditWidget::registerPoint(), and Isis::ControlPointEdit::registerPoint().
|
inlineinherited |
Return pointer to fit chip.
Definition at line 212 of file AutoReg.h.
References Isis::AutoReg::p_fitChip.
Referenced by Isis::ControlMeasureEditWidget::saveChips(), and Isis::ControlPointEdit::saveChips().
|
inlineinherited |
Return the goodness of fit of the match algorithm.
Definition at line 323 of file AutoReg.h.
References Isis::AutoReg::p_goodnessOfFit.
Referenced by Isis::ControlMeasureEditWidget::registerPoint(), Isis::ControlPointEdit::registerPoint(), Isis::ControlMeasureEditWidget::saveMeasure(), and Isis::ControlPointEdit::saveMeasure().
|
inlineprotectedvirtual |
Returns the ideal (perfect) fit that could be returned by the MatchAlgorithm.
Implements Isis::AutoReg.
Definition at line 44 of file MaximumCorrelation.h.
|
privateinherited |
Initialize AutoReg object private variables.
Fill fit chip, reduced pattern chip and reduced search chip with nulls.
Definition at line 114 of file AutoReg.cpp.
References Isis::Null.
|
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 |
Definition at line 1162 of file AutoReg.cpp.
|
privateinherited |
Empty copy constructor.
Here we walk from start sample to end sample and start line to end line, and compare the pattern chip against the search chip to find the best line/sample.
original | AutoReg object |
sChip | Search chip |
pChip | Pattern chip |
fChip | Fit chip |
startSamp | Start sample |
endSamp | End sample |
startLine | Start line |
endLine | End line |
iException::Programmer | - "StartSample = EndSample and StartLine = EndLine." |
Definition at line 1031 of file AutoReg.cpp.
References Isis::Chip::Extract(), Isis::Chip::IsValid(), Isis::Chip::Lines(), Isis::Null, Isis::Chip::Samples(), Isis::Chip::SetSize(), and Isis::Chip::SetValue().
|
protectedvirtual |
Given two identically sized chips return a double that indicates how well they match.
For example, a correlation match algorithm would return a correlation coefficient ranging from -1 to 1.
pattern | Pattern chip to match against |
subsearch | Subchip of the search chip to match with |
Implements Isis::AutoReg.
Definition at line 12 of file MaximumCorrelation.cpp.
References Isis::MultivariateStatistics::AddData(), Isis::MultivariateStatistics::Correlation(), Isis::Chip::GetValue(), Isis::Chip::Lines(), Isis::Null, Isis::AutoReg::PatternValidPercent(), Isis::Chip::Samples(), and Isis::MultivariateStatistics::ValidPixels().
|
inlineinherited |
Return minimumPatternZScore.
Definition at line 350 of file AutoReg.h.
References Isis::AutoReg::p_minimumPatternZScore.
Referenced by Isis::ControlMeasureEditWidget::registerPoint(), and Isis::ControlPointEdit::registerPoint().
|
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." |
Definition at line 194 of file AutoReg.cpp.
References Isis::PvlContainer::fileName(), Isis::PvlObject::findGroup(), Isis::PvlObject::findObject(), Isis::PvlObject::hasGroup(), Isis::PvlContainer::hasKeyword(), Isis::ValidMaximum, and Isis::ValidMinimum.
|
inlineinherited |
Return pointer to pattern chip.
Definition at line 202 of file AutoReg.h.
References Isis::AutoReg::p_patternChip.
Referenced by Isis::ControlMeasureEditWidget::registerPoint(), and Isis::ControlPointEdit::registerPoint().
|
inlineinherited |
Return pattern chip valid percent. The default value is.
Definition at line 280 of file AutoReg.h.
References Isis::AutoReg::p_patternValidPercent.
Referenced by MatchAlgorithm(), Isis::Gruen::MinValidPoints(), Isis::ControlMeasureEditWidget::registerPoint(), and Isis::ControlPointEdit::registerPoint().
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. |
Definition at line 539 of file AutoReg.cpp.
References Isis::Statistics::AddData(), Isis::Statistics::Average(), Isis::Chip::GetValue(), Isis::Chip::Lines(), Isis::Null, Isis::Statistics::Reset(), Isis::Chip::Samples(), and Isis::Chip::SetValue().
|
inlineinherited |
Return pointer to reduced fit chip.
Definition at line 247 of file AutoReg.h.
References Isis::AutoReg::p_reducedFitChip.
|
inlineinherited |
Return pointer to reduced pattern chip.
Definition at line 237 of file AutoReg.h.
References Isis::AutoReg::p_reducedPatternChip.
|
inlineinherited |
Return pointer to reduced search chip.
Definition at line 242 of file AutoReg.h.
References Isis::AutoReg::p_reducedSearchChip.
|
inlineinherited |
Return the reduction factor.
Definition at line 275 of file AutoReg.h.
References Isis::AutoReg::p_reduceFactor.
|
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" |
Prep for walking the search chip by computing the starting and ending sample and line positions of the search chip to extract a sub-search chip to compare with the pattern chip.
Because the sub-search chip needs to have the same pixel dimensions as the pattern chip, and will be composed from its center pixel outwards, buffer the start and end boundaries so an area the size of the pattern chip can always be extracted around the current position.
For example, consider trying to extract a 5x5 sub-search chip from some search chip. If one starts at sample 1 and line 1, then because the "current position" is treated as the center of the sub-search chip, the algorithm could not form a 5x5 chip because there is nothing up and to the left of the current position. Consequently, for this example, there needs to be a two-pixel buffer from the edge of the search chip as the algorithm walks through it to make sure a 5x5 sub-search chip can always be extracted with the current position as its center.
Definition at line 587 of file AutoReg.cpp.
References Isis::Chip::CubeLine(), Isis::Chip::CubeSample(), Isis::Chip::IsValid(), Isis::Chip::Lines(), Isis::Null, Isis::Chip::Samples(), Isis::Chip::SetChipPosition(), Isis::Chip::TackLine(), and Isis::Chip::TackSample().
Referenced by Isis::SmtkMatcher::makeRegisteredPoint(), Isis::ControlMeasureEditWidget::registerPoint(), and Isis::ControlPointEdit::registerPoint().
|
protectedvirtualinherited |
Performs matching between the pattern and search at both whole-pixel and subpixel levels.
For adaptive algorithms, only subpixel matching occurs. Such algorithms override this method to use their alternative matching procedures.
For those algorithms that need it, the best sample and line in the search chip is provided. This is either the initial tack sample and line in the search chip or it is the centered sample and line after the reduction algorithm is applied (KJB, 2009-08-26).
sChip | Search chip |
pChip | Pattern chip |
fChip | Fit chip |
startSamp | Defines the starting sample of the window the algorithm should remain inside this boundary. |
startLine | Defines the starting line of the window the algorithm should remain inside this boundary. |
endSamp | Defines the ending sample of the window the algorithm should remain inside this boundary. |
endLine | Defines the ending line of the window the algorithm should remain inside this boundary. |
bestSamp | Best sample |
bestLine | Best line |
Reimplemented in Isis::Gruen.
Definition at line 811 of file AutoReg.cpp.
References Isis::Chip::Extract(), Isis::Chip::IsValid(), Isis::Null, and Isis::Chip::SetChipPosition().
|
inlineinherited |
Return pointer to pattern chip used in registration.
Definition at line 217 of file AutoReg.h.
References Isis::AutoReg::None, Isis::AutoReg::p_gradientFilterType, Isis::AutoReg::p_gradientPatternChip, and Isis::AutoReg::p_patternChip.
Referenced by Isis::ControlMeasureEditWidget::saveChips(), and Isis::ControlPointEdit::saveChips().
|
inlineinherited |
Return pointer to search chip used in registration.
Definition at line 227 of file AutoReg.h.
References Isis::AutoReg::None, Isis::AutoReg::p_gradientFilterType, Isis::AutoReg::p_gradientSearchChip, and Isis::AutoReg::p_searchChip.
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
Definition at line 1177 of file AutoReg.cpp.
References Isis::PvlObject::addGroup(), and Isis::toString().
|
inherited |
This function returns the keywords that this object was created from.
Definition at line 1216 of file AutoReg.cpp.
References Isis::PvlContainer::hasKeyword().
|
inlineinherited |
Return pointer to search chip.
Definition at line 207 of file AutoReg.h.
References Isis::AutoReg::p_searchChip.
Referenced by Isis::ControlMeasureEditWidget::registerPoint(), and Isis::ControlPointEdit::registerPoint().
|
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." |
Definition at line 440 of file AutoReg.cpp.
|
inlineprotectedinherited |
Sets the search chip subpixel line that matches the pattern tack line.
line | Value to set for search chip subpixel line |
Definition at line 404 of file AutoReg.h.
References Isis::AutoReg::p_chipLine.
Referenced by Isis::Gruen::Registration().
|
inlineprotectedinherited |
Sets the search chip subpixel sample that matches the pattern tack sample.
sample | Value to set for search chip subpixel sample |
Definition at line 393 of file AutoReg.h.
References Isis::AutoReg::p_chipSample.
Referenced by Isis::Gruen::Registration().
|
inlineprotectedinherited |
Sets the goodness of fit for adaptive algorithms.
fit | Fit value to set |
Definition at line 413 of file AutoReg.h.
References Isis::AutoReg::p_bestFit.
Referenced by Isis::Gruen::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." |
Definition at line 273 of file AutoReg.cpp.
|
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." |
Definition at line 339 of file AutoReg.cpp.
|
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." |
Definition at line 394 of file AutoReg.cpp.
|
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." |
Definition at line 521 of file AutoReg.cpp.
|
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 |
Definition at line 312 of file AutoReg.cpp.
|
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 |
Definition at line 1087 of file AutoReg.cpp.
References Isis::Chip::ChipLine(), Isis::Chip::ChipSample(), Isis::Chip::GetValue(), Isis::Chip::Lines(), Isis::Chip::Samples(), Isis::Centroid::select(), Isis::Centroid::setDNRange(), and Isis::Chip::SetValue().
|
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." |
Definition at line 367 of file AutoReg.cpp.
|
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." |
Definition at line 501 of file AutoReg.cpp.
|
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." |
Definition at line 480 of file AutoReg.cpp.
|
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 |
Definition at line 416 of file AutoReg.cpp.
|
privateinherited |
Compute a Sobel gradient based on an input buffer.
TODO: Remove this method as it already exists in the gradient application.
in | the input buffer |
v | the value of the gradient computed from the buffer |
Definition at line 1000 of file AutoReg.cpp.
References Isis::IsSpecial(), Isis::Null, and Isis::Buffer::size().
|
inlineinherited |
Return whether this object will attempt to register to whole or sub-pixel accuracy.
Definition at line 270 of file AutoReg.h.
References Isis::AutoReg::p_subpixelAccuracy.
|
inlineinherited |
Return subsearch chip valid percent.
Definition at line 285 of file AutoReg.h.
References Isis::AutoReg::p_subsearchValidPercent.
|
inlineinherited |
Return whether the match algorithm succeeded or not.
Definition at line 318 of file AutoReg.h.
References Isis::AutoReg::p_registrationStatus, Isis::AutoReg::SuccessPixel, and Isis::AutoReg::SuccessSubPixel.
Referenced by Isis::ControlMeasureEditWidget::registerPoint(), and Isis::ControlPointEdit::registerPoint().
|
inlineinherited |
Return match algorithm tolerance.
Definition at line 290 of file AutoReg.h.
References Isis::AutoReg::p_tolerance.
Referenced by Isis::Gruen::CheckConstraints(), Isis::ControlMeasureEditWidget::registerPoint(), and Isis::ControlPointEdit::registerPoint().
|
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().
Definition at line 1289 of file AutoReg.cpp.
References Isis::Chip::Lines(), Isis::Chip::Samples(), and Isis::toString().
|
inlineinherited |
Return window size.
Definition at line 295 of file AutoReg.h.
References Isis::AutoReg::p_windowSize.
|
inlineinherited |
Return the ZScores of the pattern chip.
score1 | First Z Score |
score2 | Second Z Score |
Definition at line 360 of file AutoReg.h.
References Isis::AutoReg::p_zScoreMax, and Isis::AutoReg::p_zScoreMin.
Referenced by Isis::ControlMeasureEditWidget::registerPoint(), Isis::ControlPointEdit::registerPoint(), Isis::ControlMeasureEditWidget::saveMeasure(), and Isis::ControlPointEdit::saveMeasure().
|
privateinherited |
Goodness of fit for adaptive algorithms.
Definition at line 523 of file AutoReg.h.
Referenced by Isis::AutoReg::SetGoodnessOfFit().
|
privateinherited |
|
privateinherited |
|
privateinherited |
Chip line.
Definition at line 514 of file AutoReg.h.
Referenced by Isis::AutoReg::ChipLine(), and Isis::AutoReg::SetChipLine().
|
privateinherited |
Chip sample.
Definition at line 513 of file AutoReg.h.
Referenced by Isis::AutoReg::ChipSample(), and Isis::AutoReg::SetChipSample().
|
privateinherited |
|
privateinherited |
|
privateinherited |
Maximum distance the surface model solution may be from the best whole pixel fit in the fit chip.
Definition at line 521 of file AutoReg.h.
Referenced by Isis::AutoReg::DistanceTolerance().
|
privateinherited |
Results from MatchAlgorithm() method.
Definition at line 485 of file AutoReg.h.
Referenced by Isis::AutoReg::FitChip().
|
privateinherited |
|
privateinherited |
|
privateinherited |
Goodness of fit of the match algorithm.
Definition at line 517 of file AutoReg.h.
Referenced by Isis::AutoReg::GoodnessOfFit().
|
privateinherited |
Type of gradient filter to use before matching.
Definition at line 530 of file AutoReg.h.
Referenced by Isis::AutoReg::RegistrationPatternChip(), and Isis::AutoReg::RegistrationSearchChip().
|
privateinherited |
Chip to be matched with gradient applied.
Definition at line 487 of file AutoReg.h.
Referenced by Isis::AutoReg::RegistrationPatternChip().
|
privateinherited |
Chip to be searched for best registration with gradient applied.
Definition at line 486 of file AutoReg.h.
Referenced by Isis::AutoReg::RegistrationSearchChip().
|
privateinherited |
The number of lines the point moved.
Definition at line 527 of file AutoReg.h.
Referenced by Isis::AutoReg::Distance().
|
privateinherited |
Minimum pattern Z-Score.
Definition at line 509 of file AutoReg.h.
Referenced by Isis::AutoReg::MinimumZScore().
|
privateinherited |
Chip to be matched.
Definition at line 483 of file AutoReg.h.
Referenced by Isis::AutoReg::PatternChip(), and Isis::AutoReg::RegistrationPatternChip().
|
privateinherited |
|
privateinherited |
Percentage of data in pattern chip that must be valid.
Definition at line 510 of file AutoReg.h.
Referenced by Isis::AutoReg::PatternValidPercent().
|
privateinherited |
|
privateinherited |
|
privateinherited |
Fit Chip with reduction factor.
Definition at line 490 of file AutoReg.h.
Referenced by Isis::AutoReg::ReducedFitChip().
|
privateinherited |
Pattern Chip with reduction factor.
Definition at line 488 of file AutoReg.h.
Referenced by Isis::AutoReg::ReducedPatternChip().
|
privateinherited |
Search Chip with reduction factor.
Definition at line 489 of file AutoReg.h.
Referenced by Isis::AutoReg::ReducedSearchChip().
|
privateinherited |
Reduction factor.
Definition at line 528 of file AutoReg.h.
Referenced by Isis::AutoReg::ReductionFactor().
|
privateinherited |
Registration status to be returned by Register().
Definition at line 529 of file AutoReg.h.
Referenced by Isis::AutoReg::Success().
|
privateinherited |
The number of samples the point moved.
Definition at line 526 of file AutoReg.h.
Referenced by Isis::AutoReg::Distance().
|
privateinherited |
Chip to be searched for best registration.
Definition at line 484 of file AutoReg.h.
Referenced by Isis::AutoReg::RegistrationSearchChip(), and Isis::AutoReg::SearchChip().
|
privateinherited |
Indicates whether sub-pixel accuracy is enabled. Default is true.
Definition at line 492 of file AutoReg.h.
Referenced by Isis::AutoReg::SubPixelAccuracy().
|
privateinherited |
|
privateinherited |
Percentage of data in subsearch chip that must be valid.
Definition at line 511 of file AutoReg.h.
Referenced by Isis::AutoReg::SubsearchValidPercent().
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
protectedinherited |
|
privateinherited |
Tolerance for acceptable goodness of fit in match algorithm.
Definition at line 518 of file AutoReg.h.
Referenced by Isis::AutoReg::Tolerance().
|
privateinherited |
Registration Statistics Total keyword.
|
privateinherited |
Surface model window size.
Definition at line 520 of file AutoReg.h.
Referenced by Isis::AutoReg::WindowSize().
|
privateinherited |
Second Z-Score of pattern chip.
Definition at line 507 of file AutoReg.h.
Referenced by Isis::AutoReg::ZScores().
|
privateinherited |
First Z-Score of pattern chip.
Definition at line 506 of file AutoReg.h.
Referenced by Isis::AutoReg::ZScores().