CINNICstatsRun Class Reference

Collaboration diagram for CINNICstatsRun:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CINNICstatsRun ()
 default constructor
 ~CINNICstatsRun ()
 default destructor
void setConfig (readConfig &config, readConfig &config2)
 sets the config and loads files
void setStuff (readConfig &fileList)
 sets a bunch of parameters and junk
void setStuff ()
 single file option
void runStandardStats (readConfig &fileList)
 run standard stats battery on images with contour traces
void runPointAndFlood (readConfig &fileList, const char *param)
 run salience point analysis on image data
void randomMatch (float *likelyhood, long *posRegionCount, long *totalCount)
 Run through the input image. Find likelyhood of a random match.
void preProcess ()
 method for comp image pre-processing
void checkSize ()
 checks what to do about images that are of different size
PixRGB< float > colorTable (int i)
 this is a table of colors to be used for circles
void pointAndFloodImage (Image< float > test_image, Image< float > sal_map, int points, char *filename, float floodv, float floodt)
 pointAndFlood on one image, no stats
void pointAndFloodImage (Image< float > test_image, Image< float > sal_map, char *filename)
 pointAndFlood on one image, no stats
void pointAndFlood (const char *filename, int i, bool standalone)
 this is the core to point and flood
float polatSagi2AFC (Image< float > targetImage, Image< float > notargetImage)
 this will take in an image and make a 2AFC, see Itti Thesis 145-149
float getMu1 ()
 Return mu1.
float getMu2 ()
 Return mu2.

Protected Attributes

std::string statsFile
 the output file
int ii
 used for something
int jj
int decSize
 variables that used to be defined, but are now in stats.conf
int unEvenDec
int lowThresh
int highThresh
int chopVal
int imageCount
 This is the number of images to be compaired.
int zeroCount
int qualityImage
 these are used for high quality comparison images
int qChop
int doResize
 this is true if the image is to be resized
int pointsNum
 the number of salience points to find
int circRad
 width of circles to draw out in sal map
int rankThresh
 threshold at which to consider a point
int preProcessPNF
 this tells if point and flood should pre-process image #
int useDrawDisk
 this is set if you want to use draw disk rather then flood. Use w caution
int diskSize
 the size of the disk to be drawn (r)
int monoColor
 use this to produce thick mono color circle plots in figure
int centerOffset
 offset for center of image element in output image
int edgeAtten
 how much to attenuate borders for edge effects
float totalErrorRatio
 the total error ratio, mean Chamfer34 value
float meanChamfer
float totalMeanError
 the mean error ratio, other stats
float totalStdError
float maxMean
float minMean
float totEucDist
 The total euclidian distance.
float meanEucDist
 the mean euclidian distance, other stats
float stdEucDist
float maxEuc
float minEuc
float totReg
 total regression
float meanReg
 mean regression, other stats
float stdReg
float maxReg
float minReg
float floodThresh
 flood variabels for image flooding
float floodVal
float foundTotal
 stats values for point and flood
float foundMean
float foundSTD
float rankTotal
float rankMean
float rankSTD
float PSError
 values for Polat and Sagi
float mu1
 mu1 and mu2 as the population mean
float mu2
Image< float > testImage
 Image to test.
Image< float > compImage
 Image to compare against.
Image< float > salMap
 sal map for PointAndFlood
Image< bytetempImage1
 Temp image 1.
Image< bytetempImage2
 Temp image 2.
Image< PixRGB< byte > > tempImage1c
 Temp image 1c.
Image< PixRGB< float > > tempImage1cf
 temp image 1cf
Image< PixRGB< float > > outImageTemplate
 output image of points
Image< PixRGB< float > > outImageSource
 output image of points
Image< float > maskImage
 track the mask image for stats
std::vector< int > errorCount
 the count of error pixels in each image
std::vector< int > totCount
 the count of total positive pixels in each image
std::vector< float > totalVal
 The total pixel value (/n = average pixel value).
std::vector< float > errorRatio
 The ratio of error pixels to non-error pixels.
std::vector< float > testImageVector
 place holder for vectored images
std::vector< float > compImageVector
 place holder for vectored images
std::vector< float > testMean
 More stats.
std::vector< float > testStd
 More stats.
std::vector< float > compMean
 More stats.
std::vector< float > compStd
 More stats.
std::vector< float > regression
 Regression.
std::vector< double > eucDist
 Eucliduan Distance between images.
stats< float > Stats
 General stats object.
stats< double > dStats
 Another stats object.
std::vector< Point2D< int > > pointVec
 holds max n points from image
std::vector< std::vector
< Point2D< int > > > 
maxPointList
 holds max points for all images
std::vector< float > postChamferVal
 holds max val for all chamfer34 processed images
std::vector< float > pointsFound
 holds the count of correct salient points
std::vector< int > pointsFoundNum
 how many images found this number of salient points
std::vector< float > pointRank
 holds the rank of the most salient point on the object
std::vector< int > pointRankNum
 how many images are at this rank
Point2D< int > * point2D
PixRGB< float > pixRGB
 a lovelly pixRGB instance
std::vector< long > candPixels
 std::vector for number of candidate pixels for point and flood
std::vector< long > realPixels
 std::vector for the number of real pixels on the contour
std::vector< double > strikeP
 Vector to hold p for striking a pixel.
std::vector< double > bernoulliP
 Bernoulli distribution P for the nth strike.

Detailed Description

Definition at line 51 of file CINNICstatsRun.H.


Constructor & Destructor Documentation

CINNICstatsRun::CINNICstatsRun (  ) 

default constructor

Definition at line 54 of file CINNICstatsRun.C.

CINNICstatsRun::~CINNICstatsRun (  ) 

default destructor

Definition at line 58 of file CINNICstatsRun.C.


Member Function Documentation

void CINNICstatsRun::checkSize (  ) 

checks what to do about images that are of different size

Definition at line 452 of file CINNICstatsRun.C.

References ASSERT, doResize, Image< T >::getHeight(), Image< T >::getWidth(), rescale(), tempImage1c, and tempImage2.

Referenced by runPointAndFlood(), and runStandardStats().

PixRGB< float > CINNICstatsRun::colorTable ( int  i  ) 

this is a table of colors to be used for circles

Definition at line 476 of file CINNICstatsRun.C.

References PixRGB< T >::setBlue(), PixRGB< T >::setGreen(), and PixRGB< T >::setRed().

Referenced by pointAndFlood().

float CINNICstatsRun::getMu1 (  ) 

Return mu1.

Definition at line 645 of file CINNICstatsRun.C.

References mu1.

Referenced by main().

float CINNICstatsRun::getMu2 (  ) 

Return mu2.

Definition at line 650 of file CINNICstatsRun.C.

Referenced by main().

void CINNICstatsRun::pointAndFlood ( const char *  filename,
int  i,
bool  standalone 
)
void CINNICstatsRun::pointAndFloodImage ( Image< float >  test_image,
Image< float >  sal_map,
char *  filename 
)
void CINNICstatsRun::pointAndFloodImage ( Image< float >  test_image,
Image< float >  sal_map,
int  points,
char *  filename,
float  floodv,
float  floodt 
)

pointAndFlood on one image, no stats

Definition at line 513 of file CINNICstatsRun.C.

References circRad, floodThresh, monoColor, pointsNum, and useDrawDisk.

Referenced by main().

float CINNICstatsRun::polatSagi2AFC ( Image< float >  targetImage,
Image< float >  notargetImage 
)

this will take in an image and make a 2AFC, see Itti Thesis 145-149

This takes in an image and performs a simulation of Polat and Sagi 1994 two alternative forced choice. It takes in an image and defines an error in judgement based upon the 2AFC paradigm. It returns the error. This should be compaired to the staircase method described by Polat and Sagi in obtaining threshold.

Definition at line 631 of file CINNICstatsRun.C.

References ASSERT, centerOffset, stats< T >::getErrorGGC_2AFC(), Image< T >::getHeight(), Image< T >::getVal(), Image< T >::getWidth(), mu1, PSError, sqrt(), and Stats.

Referenced by main().

void CINNICstatsRun::preProcess (  ) 
void CINNICstatsRun::randomMatch ( float *  likelyhood,
long *  posRegionCount,
long *  totalCount 
)

Run through the input image. Find likelyhood of a random match.

This method will take the compare image and find what is the p that a random pixel will land on a pixel that is a contour candidate pixel. Takes in pointers that return p, the number of candidate pixels and the total number of pixels

Parameters:
likelyhood This is the p that a random pixel will fall on a candidate contour
posRegionCount This is the number of candidate pixels in the image
totalCount This is the total number of pixels in the image

Definition at line 381 of file CINNICstatsRun.C.

References compImage, Image< T >::getHeight(), Image< T >::getVal(), Image< T >::getWidth(), maskImage, and rankThresh.

Referenced by pointAndFlood().

void CINNICstatsRun::runPointAndFlood ( readConfig fileList,
const char *  param 
)

run salience point analysis on image data

This method will attempt to find the most salient points in an input image, then it will compair thos points to points that are expected. It does this by first finding a point, then finding its distance to a contour using champher, then the point are is flooded to prevent it from being found again. This is repeated n times

Parameters:
fileList This is the list of input images

Definition at line 292 of file CINNICstatsRun.C.

References bernoulliP, candPixels, checkSize(), compImage, edgeAtten, stats< T >::findS(), foundTotal, Image< T >::getHeight(), Image< T >::getWidth(), inplaceAttenuateBorders(), maskImage, outImageSource, outImageTemplate, pointAndFlood(), pointRank, pointRankNum, pointsFound, pointsFoundNum, pointsNum, preProcess(), preProcessPNF, RASFMT_PNM, readConfig::readFileTrue(), readConfig::readFileValueC(), readConfig::readFileValueNameC(), Raster::ReadGray(), Raster::ReadRGB(), realPixels, Image< T >::resize(), salMap, Stats, statsFile, strikeP, tempImage1c, tempImage1cf, tempImage2, and testImage.

Referenced by main().

void CINNICstatsRun::runStandardStats ( readConfig fileList  ) 

run standard stats battery on images with contour traces

this method finds how similar an image is to another image based upon its corralation, euclidian distance and mean error. It takes in two image files and does the compairison. It can run a whole batch of images (what its made to do) by setting up the file names in a config file

Parameters:
fileList This is the parsed list of files

point2D object

Definition at line 146 of file CINNICstatsRun.C.

References Image< T >::begin(), checkSize(), compImage, compImageVector, compMean, compStd, dStats, edgeAtten, Image< T >::end(), errorCount, errorRatio, eucDist, stats< T >::findS(), Image< T >::getHeight(), Image< T >::getVal(), Image< T >::getWidth(), imageCount, inplaceAttenuateBorders(), readConfig::itemCount(), stats< T >::mean(), meanEucDist, meanReg, preProcess(), RASFMT_PNM, readConfig::readFileTrue(), readConfig::readFileValueC(), readConfig::readFileValueNameC(), Raster::ReadGray(), Raster::ReadRGB(), regression, stats< T >::rRegression(), Image< T >::setVal(), sqrt(), Stats, tempImage1c, tempImage1cf, tempImage2, testImage, testImageVector, testMean, testStd, totalErrorRatio, totalMeanError, totCount, totEucDist, and totReg.

Referenced by main().

void CINNICstatsRun::setConfig ( readConfig config,
readConfig config2 
)

sets the config and loads files

Read in the configuration file values

Parameters:
config the parsed config file

Definition at line 64 of file CINNICstatsRun.C.

References centerOffset, circRad, decSize, diskSize, doResize, edgeAtten, floodThresh, readConfig::getItemValueF(), readConfig::getItemValueS(), monoColor, pointsNum, preProcessPNF, PSError, qualityImage, rankThresh, statsFile, and useDrawDisk.

Referenced by main().

void CINNICstatsRun::setStuff (  ) 
void CINNICstatsRun::setStuff ( readConfig fileList  ) 

sets a bunch of parameters and junk

called automatically by constructor, but needs to be called if one of the methods such as runStandardStats or runPointAndFlood is called more then once.

Definition at line 94 of file CINNICstatsRun.C.

References bernoulliP, candPixels, compMean, compStd, errorCount, errorRatio, eucDist, foundTotal, readConfig::itemCount(), maxPointList, pointRank, pointRankNum, pointsFound, pointsFoundNum, pointsNum, pointVec, postChamferVal, realPixels, regression, Image< T >::resize(), salMap, strikeP, tempImage1c, tempImage2, testMean, testStd, totalErrorRatio, totalVal, totCount, totEucDist, and totReg.

Referenced by main().


Member Data Documentation

Bernoulli distribution P for the nth strike.

Definition at line 178 of file CINNICstatsRun.H.

Referenced by runPointAndFlood(), and setStuff().

std::vector for number of candidate pixels for point and flood

Definition at line 172 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), runPointAndFlood(), and setStuff().

offset for center of image element in output image

Definition at line 81 of file CINNICstatsRun.H.

Referenced by polatSagi2AFC(), and setConfig().

int CINNICstatsRun::circRad [protected]

width of circles to draw out in sal map

Definition at line 69 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), pointAndFloodImage(), and setConfig().

Image<float> CINNICstatsRun::compImage [protected]

Image to compare against.

Definition at line 107 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), preProcess(), randomMatch(), runPointAndFlood(), and runStandardStats().

place holder for vectored images

Definition at line 135 of file CINNICstatsRun.H.

Referenced by runStandardStats().

More stats.

Definition at line 141 of file CINNICstatsRun.H.

Referenced by runStandardStats(), and setStuff().

More stats.

Definition at line 143 of file CINNICstatsRun.H.

Referenced by runStandardStats(), and setStuff().

int CINNICstatsRun::decSize [protected]

variables that used to be defined, but are now in stats.conf

Definition at line 59 of file CINNICstatsRun.H.

Referenced by setConfig().

int CINNICstatsRun::diskSize [protected]

the size of the disk to be drawn (r)

Definition at line 77 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), and setConfig().

int CINNICstatsRun::doResize [protected]

this is true if the image is to be resized

Definition at line 65 of file CINNICstatsRun.H.

Referenced by checkSize(), and setConfig().

stats<double> CINNICstatsRun::dStats [protected]

Another stats object.

Definition at line 151 of file CINNICstatsRun.H.

Referenced by runStandardStats().

int CINNICstatsRun::edgeAtten [protected]

how much to attenuate borders for edge effects

Definition at line 83 of file CINNICstatsRun.H.

Referenced by runPointAndFlood(), runStandardStats(), and setConfig().

the count of error pixels in each image

Definition at line 125 of file CINNICstatsRun.H.

Referenced by runStandardStats(), and setStuff().

The ratio of error pixels to non-error pixels.

Definition at line 131 of file CINNICstatsRun.H.

Referenced by runStandardStats(), and setStuff().

std::vector<double> CINNICstatsRun::eucDist [protected]

Eucliduan Distance between images.

Definition at line 147 of file CINNICstatsRun.H.

Referenced by runStandardStats(), and setStuff().

float CINNICstatsRun::floodThresh [protected]

flood variabels for image flooding

Definition at line 97 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), pointAndFloodImage(), and setConfig().

float CINNICstatsRun::foundTotal [protected]

stats values for point and flood

Definition at line 99 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), runPointAndFlood(), and setStuff().

int CINNICstatsRun::ii [protected]

used for something

Definition at line 57 of file CINNICstatsRun.H.

Referenced by pointAndFlood().

int CINNICstatsRun::imageCount [protected]

This is the number of images to be compaired.

Definition at line 61 of file CINNICstatsRun.H.

Referenced by runStandardStats().

Image<float> CINNICstatsRun::maskImage [protected]

track the mask image for stats

Definition at line 123 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), pointAndFloodImage(), randomMatch(), and runPointAndFlood().

holds max points for all images

Definition at line 155 of file CINNICstatsRun.H.

Referenced by setStuff().

float CINNICstatsRun::meanEucDist [protected]

the mean euclidian distance, other stats

Definition at line 91 of file CINNICstatsRun.H.

Referenced by runStandardStats().

float CINNICstatsRun::meanReg [protected]

mean regression, other stats

Definition at line 95 of file CINNICstatsRun.H.

Referenced by runStandardStats().

int CINNICstatsRun::monoColor [protected]

use this to produce thick mono color circle plots in figure

Definition at line 79 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), pointAndFloodImage(), and setConfig().

float CINNICstatsRun::mu1 [protected]

mu1 and mu2 as the population mean

Definition at line 103 of file CINNICstatsRun.H.

Referenced by getMu1(), and polatSagi2AFC().

output image of points

Definition at line 121 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), pointAndFloodImage(), and runPointAndFlood().

output image of points

Definition at line 119 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), pointAndFloodImage(), and runPointAndFlood().

PixRGB<float> CINNICstatsRun::pixRGB [protected]

a lovelly pixRGB instance

Definition at line 170 of file CINNICstatsRun.H.

Referenced by pointAndFlood().

holds the rank of the most salient point on the object

Definition at line 163 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), runPointAndFlood(), and setStuff().

how many images are at this rank

Definition at line 165 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), runPointAndFlood(), and setStuff().

holds the count of correct salient points

Definition at line 159 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), runPointAndFlood(), and setStuff().

how many images found this number of salient points

Definition at line 161 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), runPointAndFlood(), and setStuff().

int CINNICstatsRun::pointsNum [protected]

the number of salience points to find

Definition at line 67 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), pointAndFloodImage(), runPointAndFlood(), setConfig(), and setStuff().

holds max n points from image

Definition at line 153 of file CINNICstatsRun.H.

Referenced by setStuff().

holds max val for all chamfer34 processed images

Definition at line 157 of file CINNICstatsRun.H.

Referenced by setStuff().

this tells if point and flood should pre-process image #

Definition at line 73 of file CINNICstatsRun.H.

Referenced by runPointAndFlood(), and setConfig().

float CINNICstatsRun::PSError [protected]

values for Polat and Sagi

Definition at line 101 of file CINNICstatsRun.H.

Referenced by polatSagi2AFC(), and setConfig().

these are used for high quality comparison images

Definition at line 63 of file CINNICstatsRun.H.

Referenced by preProcess(), and setConfig().

int CINNICstatsRun::rankThresh [protected]

threshold at which to consider a point

Definition at line 71 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), randomMatch(), and setConfig().

std::vector for the number of real pixels on the contour

Definition at line 174 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), runPointAndFlood(), and setStuff().

Regression.

Definition at line 145 of file CINNICstatsRun.H.

Referenced by runStandardStats(), and setStuff().

Image<float> CINNICstatsRun::salMap [protected]

sal map for PointAndFlood

Definition at line 109 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), pointAndFloodImage(), runPointAndFlood(), and setStuff().

stats<float> CINNICstatsRun::Stats [protected]

General stats object.

Definition at line 149 of file CINNICstatsRun.H.

Referenced by polatSagi2AFC(), runPointAndFlood(), and runStandardStats().

the output file

Definition at line 55 of file CINNICstatsRun.H.

Referenced by runPointAndFlood(), and setConfig().

std::vector<double> CINNICstatsRun::strikeP [protected]

Vector to hold p for striking a pixel.

Definition at line 176 of file CINNICstatsRun.H.

Referenced by runPointAndFlood(), and setStuff().

Temp image 1.

Definition at line 111 of file CINNICstatsRun.H.

Temp image 1c.

Definition at line 115 of file CINNICstatsRun.H.

Referenced by checkSize(), runPointAndFlood(), runStandardStats(), and setStuff().

Image<PixRGB <float> > CINNICstatsRun::tempImage1cf [protected]

temp image 1cf

Definition at line 117 of file CINNICstatsRun.H.

Referenced by runPointAndFlood(), and runStandardStats().

Temp image 2.

Definition at line 113 of file CINNICstatsRun.H.

Referenced by checkSize(), runPointAndFlood(), runStandardStats(), and setStuff().

Image<float> CINNICstatsRun::testImage [protected]

place holder for vectored images

Definition at line 133 of file CINNICstatsRun.H.

Referenced by runStandardStats().

More stats.

Definition at line 137 of file CINNICstatsRun.H.

Referenced by runStandardStats(), and setStuff().

More stats.

Definition at line 139 of file CINNICstatsRun.H.

Referenced by runStandardStats(), and setStuff().

the total error ratio, mean Chamfer34 value

Definition at line 85 of file CINNICstatsRun.H.

Referenced by runStandardStats(), and setStuff().

float CINNICstatsRun::totalMeanError [protected]

the mean error ratio, other stats

Definition at line 87 of file CINNICstatsRun.H.

Referenced by runStandardStats().

The total pixel value (/n = average pixel value).

Definition at line 129 of file CINNICstatsRun.H.

Referenced by setStuff().

the count of total positive pixels in each image

Definition at line 127 of file CINNICstatsRun.H.

Referenced by runStandardStats(), and setStuff().

float CINNICstatsRun::totEucDist [protected]

The total euclidian distance.

Definition at line 89 of file CINNICstatsRun.H.

Referenced by runStandardStats(), and setStuff().

float CINNICstatsRun::totReg [protected]

total regression

Definition at line 93 of file CINNICstatsRun.H.

Referenced by runStandardStats(), and setStuff().

int CINNICstatsRun::useDrawDisk [protected]

this is set if you want to use draw disk rather then flood. Use w caution

Definition at line 75 of file CINNICstatsRun.H.

Referenced by pointAndFlood(), pointAndFloodImage(), and setConfig().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:20:51 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3