w2kmeans::ObjectImageComparator Class Reference

Inheritance diagram for w2kmeans::ObjectImageComparator:

w2img::ImageComparator List of all members.

Detailed Description

Aligns the objects in the forecast to the verification field, reports on the alignment required, and then does an image comparision.

Author:
Lakshman
Version:
Id
w2kmeans_ObjectImageComparator.h,v 1.4 2009/06/02 20:17:59 lakshman Exp


Public Types

typedef std::vector< PixelRegion

Public Member Functions

 ObjectImageComparator (double minValue, double maxValue, bool maxIsBetter, const std::vector< code::Image< float > > &kernels, size_t searchDistance=0, bool includeNulls=false)
virtual ~ObjectImageComparator ()
virtual Score scoreFiltered (const code::Image< float > &orig, const code::Image< float > &fcst) const
 aligns the objects in the forecast to the original, and then calls ImageComparator::scoreFiltered
void align (const code::Image< float > &orig, const code::Image< float > &forecast, code::Image< float > &result, float &mean_ux, float &mean_uy, float &mean_impr, int &N) const
std::vector< Scorescore (const code::CartesianGrid2D &orig, const code::CartesianGrid2D &fil) const
 the two images should be of identical sizes.
std::vector< Scorescore (const code::LatLonGrid &orig, const code::LatLonGrid &fil) const
 the two images should be of identical sizes.
std::vector< Scorescore (const code::PolarGrid &orig, const code::PolarGrid &fil) const
 the two images should be of identical sizes.
std::vector< Scorescore (const code::Image< float > &orig, const code::Image< float > &fil) const
void updateScore (double orig, double filtered, ImageComparator::Score *score) const
 Updates this score based on the orig and filtered values if findError returns true.
bool findError (double orig, double filtered, double &error, bool &origValid, bool &estValid) const
 Find the error.

Protected Attributes

std::vector< code::SmartPtr<
KernelFilter > > 
filters
double minValue
double maxValue
bool maxIsBetter
int searchRadius
bool includeNulls

Classes

struct  Movement
struct  Pixel


Member Typedef Documentation

typedef std::vector<Pixel> w2kmeans::ObjectImageComparator::Region


Constructor & Destructor Documentation

w2kmeans::ObjectImageComparator::ObjectImageComparator ( double  minValue,
double  maxValue,
bool  maxIsBetter,
const std::vector< code::Image< float > > &  kernels,
size_t  searchDistance = 0,
bool  includeNulls = false 
) [inline]

virtual w2kmeans::ObjectImageComparator::~ObjectImageComparator (  )  [inline, virtual]


Member Function Documentation

void w2kmeans::ObjectImageComparator::align ( const code::Image< float > &  orig,
const code::Image< float > &  forecast,
code::Image< float > &  result,
float &  mean_ux,
float &  mean_uy,
float &  mean_impr,
int &  N 
) const [inline]

bool w2img::ImageComparator::findError ( double  orig,
double  filtered,
double &  error,
bool origValid,
bool estValid 
) const [inherited]

Find the error.

The error is (filtered - orig) if both numbers are valid.

Returns:
true if the error returned is a usable number The error will be flagged as Constants::MissingData if both orig and filtered are invalid unless includeNulls was set in the constructor. Definition: An invalid value is a value equal to Constants::MISSING_DATA or less than minValue (if maxIsBetter).

std::vector<Score> w2img::ImageComparator::score ( const code::Image< float > &  orig,
const code::Image< float > &  fil 
) const [inherited]

std::vector<Score> w2img::ImageComparator::score ( const code::PolarGrid &  orig,
const code::PolarGrid &  fil 
) const [inherited]

the two images should be of identical sizes.

std::vector<Score> w2img::ImageComparator::score ( const code::LatLonGrid &  orig,
const code::LatLonGrid &  fil 
) const [inherited]

the two images should be of identical sizes.

std::vector<Score> w2img::ImageComparator::score ( const code::CartesianGrid2D &  orig,
const code::CartesianGrid2D &  fil 
) const [inherited]

the two images should be of identical sizes.

the return is the Score for each of the given kernels.

virtual Score w2kmeans::ObjectImageComparator::scoreFiltered ( const code::Image< float > &  orig,
const code::Image< float > &  fcst 
) const [inline, virtual]

aligns the objects in the forecast to the original, and then calls ImageComparator::scoreFiltered

Reimplemented from w2img::ImageComparator.

void w2img::ImageComparator::updateScore ( double  orig,
double  filtered,
ImageComparator::Score score 
) const [inherited]

Updates this score based on the orig and filtered values if findError returns true.

See also:
findError


Member Data Documentation

std::vector< code::SmartPtr<KernelFilter> > w2img::ImageComparator::filters [protected, inherited]

bool w2img::ImageComparator::includeNulls [protected, inherited]

bool w2img::ImageComparator::maxIsBetter [protected, inherited]

double w2img::ImageComparator::maxValue [protected, inherited]

double w2img::ImageComparator::minValue [protected, inherited]

int w2img::ImageComparator::searchRadius [protected, inherited]


Generated on Fri May 4 13:40:24 2012 for WDSS-IIw2algs by  doxygen 1.4.7