7#include "MaximumCorrelation.h"
9#include "MultivariateStatistics.h"
14 std::vector <double> pdn, sdn;
15 pdn.resize(pattern.Samples());
16 sdn.resize(pattern.Samples());
18 for(
int l = 1; l <= pattern.Lines(); l++) {
19 for(
int s = 1; s <= pattern.Samples(); s++) {
20 pdn[s-1] = pattern.GetValue(s, l);
21 sdn[s-1] = subsearch.GetValue(s, l);
23 mv.
AddData(&pdn[0], &sdn[0], pattern.Samples());
25 double percentValid = (double) mv.ValidPixels() /
26 (pattern.Lines() * pattern.Samples());
29 double r = mv.Correlation();
42 return (fit1 >= fit2);
double PatternValidPercent() const
Return pattern chip valid percent. The default value is.
A small chip of data used for pattern matching.
Maximum correlation pattern matching.
virtual double MatchAlgorithm(Chip &pattern, Chip &subsearch)
Given two identically sized chips return a double that indicates how well they match.
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.
Container of multivariate statistics.
void AddData(const double *x, const double *y, const unsigned int count)
Add two arrays of doubles to the accumulators and counters.
Container for cube-like labels.
This is free and unencumbered software released into the public domain.
const double Null
Value for an Isis Null pixel.