celeste Namespace Reference


Classes

class  ContrastFilter
class  GaborFilter
class  GaborJet
class  ImageFile
class  LogPolar
class  PGMImage
class  Cache
class  QMatrix
class  Kernel
class  Solver
class  Solver_NU
class  SVC_Q
class  ONE_CLASS_Q
class  SVR_Q
struct  decision_function
struct  svm_model
struct  svm_node
struct  svm_problem
struct  svm_parameter
struct  tmp

Typedefs

typedef vigra::BRGBImage::PixelType RGB
typedef float Qfloat
typedef signed char schar

Enumerations

enum  { kChars = 0x01, kFloats = 0x02, kRGB = 0x04 }
enum  {
  C_SVC, NU_SVC, ONE_CLASS, EPSILON_SVR,
  NU_SVR
}
enum  {
  LINEAR, POLY, RBF, SIGMOID,
  PRECOMPUTED
}
enum  { kLeft = 0, kRight }

Functions

bool loadSVMmodel (struct svm_model *&model, string &model_file)
 loads the SVM model from file
void destroySVMmodel (struct svm_model *&model)
 frees the resource of model
void prepareCelesteImage (vigra::UInt16RGBImage &rgb, vigra::UInt16RGBImage &luv, int &resize_dimension, double &sizefactor, bool verbose)
void prepareGaborImage (vigra::UInt16RGBImage &luv, float **&pixels)
vector< double > classifySVM (struct svm_model *model, int gNumLocs, int **&gLocations, int width, int height, int vector_length, float *&response, int gRadius, vigra::UInt16RGBImage &luv, bool needsMoreIndex=false)
void createGrid (int &gNumLocs, int **&gLocations, int gRadius, int width, int height)
void generateMask (vigra::BImage &mask, int &gNumLocs, int **&gLocations, std::vector< double > svm_responses, int gRadius, double threshold)
vigra::BImage getCelesteMask (struct svm_model *model, vigra::UInt16RGBImage &input, int radius, float threshold, int resize_dimension, bool adaptThreshold=false, bool verbose=true)
 calculates the mask using SVM
HuginBase::UIntSet getCelesteControlPoints (struct svm_model *model, vigra::UInt16RGBImage &input, HuginBase::CPointVector cps, int radius, float threshold, int resize_dimension, bool verbose)
template<class SrcIMG>
void convertToUInt16 (SrcIMG &src, const std::string &origType, vigra::UInt16RGBImage &dest)
 converts the given image to UInt16RGBImage only this image is correctly processed by celeste
float * ProcessChannel (float **image, int w, int h, int gNumLocs, int **&gLocations, int gRadius, float *response, int *len)
template<class T>
min (T x, T y)
template<class T>
max (T x, T y)
template<class T>
void swap (T &x, T &y)
template<class S, class T>
void clone (T *&dst, S *src, int n)
double powi (double base, int times)
void info (const char *fmt,...)
void info_flush ()
static void solve_c_svc (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si, double Cp, double Cn)
static void solve_nu_svc (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
static void solve_one_class (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
static void solve_epsilon_svr (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
static void solve_nu_svr (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
decision_function svm_train_one (const svm_problem *prob, const svm_parameter *param, double Cp, double Cn)
void sigmoid_train (int l, const double *dec_values, const double *labels, double &A, double &B)
double sigmoid_predict (double decision_value, double A, double B)
void multiclass_probability (int k, double **r, double *p)
void svm_binary_svc_probability (const svm_problem *prob, const svm_parameter *param, double Cp, double Cn, double &probA, double &probB)
double svm_svr_probability (const svm_problem *prob, const svm_parameter *param)
void svm_group_classes (const svm_problem *prob, int *nr_class_ret, int **label_ret, int **start_ret, int **count_ret, int *perm)
svm_modelsvm_train (const svm_problem *prob, const svm_parameter *param)
void svm_cross_validation (const svm_problem *prob, const svm_parameter *param, int nr_fold, double *target)
int svm_get_svm_type (const svm_model *model)
int svm_get_nr_class (const svm_model *model)
void svm_get_labels (const svm_model *model, int *label)
double svm_get_svr_probability (const svm_model *model)
void svm_predict_values (const svm_model *model, const svm_node *x, double *dec_values)
double svm_predict (const svm_model *model, const svm_node *x)
double svm_predict_probability (const svm_model *model, const svm_node *x, double *prob_estimates)
int svm_save_model (const char *model_file_name, const svm_model *model)
svm_modelsvm_load_model (const char *model_file_name)
void svm_destroy_model (svm_model *model)
void svm_destroy_param (svm_parameter *param)
const char * svm_check_parameter (const svm_problem *prob, const svm_parameter *param)
int svm_check_probability_model (const svm_model *model)
svm_modelsvm_train (const struct svm_problem *prob, const struct svm_parameter *param)
void svm_cross_validation (const struct svm_problem *prob, const struct svm_parameter *param, int nr_fold, double *target)
int svm_save_model (const char *model_file_name, const struct svm_model *model)
int svm_get_svm_type (const struct svm_model *model)
int svm_get_nr_class (const struct svm_model *model)
void svm_get_labels (const struct svm_model *model, int *label)
double svm_get_svr_probability (const struct svm_model *model)
void svm_predict_values (const struct svm_model *model, const struct svm_node *x, double *dec_values)
double svm_predict (const struct svm_model *model, const struct svm_node *x)
double svm_predict_probability (const struct svm_model *model, const struct svm_node *x, double *prob_estimates)
const char * svm_check_parameter (const struct svm_problem *prob, const struct svm_parameter *param)
int svm_check_probability_model (const struct svm_model *model)
void Permute (int *array, size_t size)
int cmp (const void *s1, const void *s2)
float Heavyside (float a)
float Sigmoid (float act)
float Sigmoid (float beta, float a_pot)
float Sigmoid (float beta, float a_pot, float thresh)
int ** CreateMatrix (int val, int row, int col)
void ResetMatrix (int **matrix, int val, int row, int col)
void DisposeMatrix (int **matrix, int row)
float ** CreateMatrix (float val, int row, int col)
void ResetMatrix (float **matrix, float val, int row, int col)
void DisposeMatrix (float **matrix, int row)
float ReturnDistance (float *pat1, float *pat2, int size)
void SkipComments (ifstream *infile)
void FileCreateError (char *filename)
void FileOpenError (char *filename)
void GetStreamDefaults (void)
void AdjustStream (ostream &os, int precision, int width, int pos, bool trailers)
void SetStreamDefaults (ostream &os)
double SafeAbs (double val1, double val2)
float SafeAbs (float val1, float val2)
int SafeAbs (int val1, int val2)
double SafeAbs (double val)
float SafeAbs (float val)
int SafeAbs (int val)

Variables

bool kSaveFilter = false
bool kVerbosity = false
float gS = 18.0
int gA = 8
int gF = 6
float gL = 0.1f
float gU = 1.8f
bool kSaveFilter
bool kVerbosity
float gS
int gA
int gF
float gL
float gU
float CONTRAST [9][9]
const char * svm_type_table []
const char * kernel_type_table []
long gPrecision
long gWidth


Typedef Documentation

typedef vigra::BRGBImage::PixelType celeste::RGB

Definition at line 47 of file Celeste.cpp.

typedef float celeste::Qfloat

Definition at line 48 of file svm.cpp.

typedef signed char celeste::schar

Definition at line 49 of file svm.cpp.


Enumeration Type Documentation

anonymous enum

Enumerator:
kChars 
kFloats 
kRGB 

Definition at line 40 of file ImageFile.h.

anonymous enum

Enumerator:
C_SVC 
NU_SVC 
ONE_CLASS 
EPSILON_SVR 
NU_SVR 

Definition at line 58 of file svm.h.

anonymous enum

Enumerator:
LINEAR 
POLY 
RBF 
SIGMOID 
PRECOMPUTED 

Definition at line 59 of file svm.h.

anonymous enum

Enumerator:
kLeft 
kRight 

Definition at line 44 of file Utilities.h.


Function Documentation

CELESTEIMPEX bool celeste::loadSVMmodel ( struct svm_model *&  model,
string model_file 
)

loads the SVM model from file

Parameters:
model struct, which stores the SVM informations, if you don't need it, call destroySVMmodel
model_file filename of model file to load
Returns:
true, if loading of SVM file was sucessfull

Definition at line 50 of file Celeste.cpp.

References cout, and svm_load_model().

Referenced by MainFrame::GetSVMModel(), PanoDetector::LoadSVMModel(), and main().

CELESTEIMPEX void celeste::destroySVMmodel ( struct svm_model *&  model  ) 

frees the resource of model

Parameters:
model SVM model struct to freeing

Definition at line 65 of file Celeste.cpp.

References svm_destroy_model().

Referenced by main(), PanoDetector::run(), and MainFrame::~MainFrame().

void celeste::prepareCelesteImage ( vigra::UInt16RGBImage &  rgb,
vigra::UInt16RGBImage &  luv,
int &  resize_dimension,
double &  sizefactor,
bool  verbose 
)

Definition at line 71 of file Celeste.cpp.

References cout, vigra_ext::destImage(), vigra_ext::destImageRange(), vigra_ext::srcImageRange(), and vigra_ext::transformImage().

Referenced by getCelesteControlPoints(), and getCelesteMask().

void celeste::prepareGaborImage ( vigra::UInt16RGBImage &  luv,
float **&  pixels 
)

Definition at line 143 of file Celeste.cpp.

References CreateMatrix().

Referenced by getCelesteControlPoints(), and getCelesteMask().

vector<double> celeste::classifySVM ( struct svm_model *  model,
int  gNumLocs,
int **&  gLocations,
int  width,
int  height,
int  vector_length,
float *&  response,
int  gRadius,
vigra::UInt16RGBImage &  luv,
bool  needsMoreIndex = false 
)

Definition at line 158 of file Celeste.cpp.

References celeste::svm_node::index, svm_get_nr_class(), svm_predict_probability(), and celeste::svm_node::value.

Referenced by getCelesteControlPoints(), and getCelesteMask().

void celeste::createGrid ( int &  gNumLocs,
int **&  gLocations,
int  gRadius,
int  width,
int  height 
)

Definition at line 231 of file Celeste.cpp.

References CreateMatrix().

Referenced by getCelesteMask().

void celeste::generateMask ( vigra::BImage &  mask,
int &  gNumLocs,
int **&  gLocations,
std::vector< double >  svm_responses,
int  gRadius,
double  threshold 
)

Definition at line 287 of file Celeste.cpp.

Referenced by getCelesteMask().

CELESTEIMPEX vigra::BImage celeste::getCelesteMask ( struct svm_model *  model,
vigra::UInt16RGBImage &  input,
int  radius,
float  threshold,
int  resize_dimension,
bool  adaptThreshold = false,
bool  verbose = true 
)

calculates the mask using SVM

Parameters:
model struct svm_model which is used
input input image
radius radius for calculation of mask, smaller value results in higher resolution but longer calculation time
threshold thresold value, lower value will reject more values
resize_dimension the image is resized for calculation that the bigger dimension is small than resize_dimension
adaptThreshold if true then the threshold is changed, if the all values are higher than threshold
Returns:
vigra::BImage, which contains the masks

Definition at line 310 of file Celeste.cpp.

References classifySVM(), createGrid(), vigra_ext::destImageRange(), DisposeMatrix(), generateMask(), min(), prepareCelesteImage(), prepareGaborImage(), ProcessChannel(), and vigra_ext::srcImageRange().

Referenced by PanoDetector::AnalyzeImage(), and main().

CELESTEIMPEX HuginBase::UIntSet celeste::getCelesteControlPoints ( struct svm_model *  model,
vigra::UInt16RGBImage &  input,
HuginBase::CPointVector  cps,
int  radius,
float  threshold,
int  resize_dimension,
bool  verbose = true 
)

Definition at line 360 of file Celeste.cpp.

References classifySVM(), CreateMatrix(), DisposeMatrix(), prepareCelesteImage(), prepareGaborImage(), ProcessChannel(), and response().

Referenced by PanoOperation::CelesteOperation::GetInternalCommand(), main(), and CPEditorPanel::OnCelesteButton().

template<class SrcIMG>
void celeste::convertToUInt16 ( SrcIMG &  src,
const std::string origType,
vigra::UInt16RGBImage &  dest 
)

converts the given image to UInt16RGBImage only this image is correctly processed by celeste

Parameters:
src input image
origType pixel type of input image
dest converted image

this convert routine scale the input values range into the full scale of UInt16 this is not fully correct

Definition at line 72 of file Celeste.h.

References vigra_ext::applyMapping(), vigra_ext::destImage(), vigra_ext::getMaxValForPixelType(), vigra_ext::srcImageRange(), and vigra_ext::transformImage().

Referenced by loadAndConvertImage().

float * celeste::ProcessChannel ( float **  image,
int  w,
int  h,
int  gNumLocs,
int **&  gLocations,
int  gRadius,
float *  response,
int *  len 
)

Definition at line 37 of file Gabor.cpp.

References celeste::GaborJet::Filter(), gA, celeste::ContrastFilter::GetContrast(), celeste::ContrastFilter::GetHeight(), celeste::GaborJet::GetResponse(), celeste::ContrastFilter::GetWidth(), gF, gL, gS, gU, celeste::GaborJet::Initialize(), kSaveFilter, celeste::ContrastFilter::Save(), celeste::GaborJet::SetFileName(), and celeste::ContrastFilter::SetFileName().

Referenced by getCelesteControlPoints(), getCelesteMask(), and main().

template<class T>
T celeste::min ( x,
y 
) [inline]

Definition at line 51 of file svm.cpp.

Referenced by HuginLines::_getVerticalLines(), OptimizePanel::AskApplyResult(), HuginBase::CalculateOptimalROI::autocrop(), celeste::Solver_NU::calculate_rho(), celeste::Solver::calculate_rho(), HuginBase::Photometric::ResponseTransform< VTIn >::calcVigFactor(), HuginLines::ccdist(), HuginBase::convertTo8Bit(), CPEvent::CPEvent(), ProjectionGridTool::createTexture(), DisplayedControlPoint::Draw(), DisplayedControlPoint::DrawLineSegment(), PreviewPanel::DrawPreview(), DisplayedControlPoint::DrawTextMag(), HuginBase::estimateImageAlpha(), HuginBase::CalculateFitPanorama::fitPano(), getCelesteMask(), HuginBase::getCPoutsideLimit(), HuginBase::getCPoutsideLimit_pair(), PossiblePano::GetMaxExposureDifference(), main(), optGetError(), GLPreviewFrame::panoramaChanged(), MaskLoadDialog::ProcessMask(), reduceFilesToHDR(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage(), BatchFrame::RestoreSize(), MaskImageCtrl::SelectPointsInsideMouseRect(), HuginBase::PanoramaOptions::setHFOV(), HuginBase::PanoramaOptions::setVFOV(), celeste::Solver::Solve(), solve_nu_svc(), solve_nu_svr(), svm_check_parameter(), svm_predict_probability(), HuginBase::Nona::traceImageOutline(), vigra_ext::transformImageAlphaGPUIntern(), PreviewPanel::updatePreview(), celeste::PGMImage::Write(), and celeste::PGMImage::WriteScaled().

template<class T>
T celeste::max ( x,
y 
) [inline]

Definition at line 54 of file svm.cpp.

Referenced by HuginLines::_getVerticalLines(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::apply(), vigra_ext::InvLUTFunctor< vigra_ext::ValueTypeTraits< VTIn >::value_type, std::vector< double > >::applyLutInteger(), vigra_ext::LUTFunctor< vigra::NumericTraits< VT1 >::RealPromote, std::vector< dest_type > >::applyLutInteger(), OptimizePanel::AskApplyResult(), celeste::Cache::Cache(), celeste::Solver_NU::calculate_rho(), celeste::Solver::calculate_rho(), HuginBase::Photometric::ResponseTransform< VTIn >::calcVigFactor(), HuginLines::ccdist(), HuginBase::Panorama::centerCropImage(), KDTreeSpace::KDTree< KE, VTYPE >::choosePivot(), HuginBase::convertTo8Bit(), createCtrlPoints(), createCtrlPointsOld(), vigra_ext::EMoR::createEMoRLUT(), vigra_ext::createGammaLUT(), KDTreeSpace::HyperRectangle< KE, TYPE >::display(), celeste::Solver_NU::do_shrinking(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::emitGLSL(), vigra_ext::enforceMonotonicity(), HuginBase::Nona::estScaleFactorForFullFrame(), PanoDetector::FilterMatchesInPair(), HuginBase::getCPoutsideLimit(), HuginBase::getCPoutsideLimit_pair(), HuginBase::PanoramaOptions::getFormatFromName(), vigra_ext::getMaxComponent(), PossiblePano::GetMaxExposureDifference(), vigra_ext::getMinComponent(), hugin_utils::getPathPrefix(), HuginBase::Nona::FileRemapper< ImageType, AlphaType >::getRemapped(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::hdrWeight(), HuginBase::ImageCache::importAndConvertAlphaImage(), HuginBase::ImageCache::importAndConvertImage(), HuginBase::Photometric::ResponseTransform< VTIn >::initWithSrcImg(), PanoDetector::LoadKeypoints(), PanoDetector::loadProject(), main(), multiclass_probability(), vigra_ext::normalizeValue(), vigra_ext::ReduceToHDRFunctor< VALUETYPE >::operator()(), wxTreeListMainWindow::PaintItem(), wxTreeListMainWindow::PaintLevel(), GLPreviewFrame::panoramaChanged(), KDTreeSpace::KDTree< KE, VTYPE >::recurseNearestNeighboursBBF(), enblend::reduce(), reduceFilesToHDR(), vigra_ext::reduceROIImages(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage(), BatchFrame::RestoreSize(), celeste::Solver_NU::select_working_set(), MaskImageCtrl::SelectPointsInsideMouseRect(), GreatCircleArc::squareDistance(), HuginBase::Nona::ReduceStitcher< ImageType, AlphaType >::stitch(), hugin_utils::stripPath(), svm_predict_probability(), HuginBase::Nona::traceImageOutline(), vigra_ext::transformImageAlphaGPUIntern(), PreviewPanel::updatePreview(), celeste::PGMImage::Write(), and celeste::PGMImage::WriteScaled().

template<class T>
void celeste::swap ( T &  x,
T &  y 
) [inline]

Definition at line 56 of file svm.cpp.

Referenced by drawLine(), celeste::Cache::get_data(), loadImagesPyr(), PT::loadImagesPyr(), svm_binary_svc_probability(), svm_cross_validation(), celeste::SVR_Q::swap_index(), celeste::ONE_CLASS_Q::swap_index(), celeste::SVC_Q::swap_index(), celeste::Solver::swap_index(), celeste::Kernel::swap_index(), and celeste::Cache::swap_index().

template<class S, class T>
void celeste::clone ( T *&  dst,
S *  src,
int  n 
) [inline]

Definition at line 57 of file svm.cpp.

Referenced by celeste::Kernel::Kernel(), celeste::Solver::Solve(), and celeste::SVC_Q::SVC_Q().

double celeste::powi ( double  base,
int  times 
) [inline]

Definition at line 62 of file svm.cpp.

Referenced by celeste::Kernel::k_function(), and celeste::Kernel::kernel_poly().

void celeste::info ( const char *  fmt,
  ... 
)

Definition at line 77 of file svm.cpp.

Referenced by HuginBase::PanoramaMakefilelibExport::createItems(), getPTLensCoef(), HuginBase::Nona::FileRemapper< ImageType, AlphaType >::getRemapped(), identifySIFTKeypoints(), HuginBase::SrcPanoImage::isInside(), loadAndConvertImage(), HuginBase::ImageCache::loadImageSafely(), loadImagesPyr(), PT::loadImagesPyr(), PanoDetector::LoadKeypoints(), loadSIFTKeypoints(), main(), mergeWeightedAverage(), multiclass_probability(), optimize_new(), PT::wxAddImagesCmd::processPanorama(), PreviewPanoMaskTool::ReallyAfterDrawImagesEvent(), wxTreeListHeaderWindow::SetColumn(), sigmoid_train(), celeste::Solver::Solve(), solve_c_svc(), solve_epsilon_svr(), solve_nu_svr(), HuginBase::Nona::stitchPanorama(), svm_get_svr_probability(), svm_svr_probability(), svm_train_one(), VertexCoordRemapper::UpdateAndResetIndex(), and ChoosyRemapper::UpdateAndResetIndex().

void celeste::info_flush (  ) 

Definition at line 84 of file svm.cpp.

Referenced by celeste::Solver::Solve().

static void celeste::solve_c_svc ( const svm_problem *  prob,
const svm_parameter *  param,
double *  alpha,
Solver::SolutionInfo *  si,
double  Cp,
double  Cn 
) [static]

Definition at line 1470 of file svm.cpp.

References celeste::svm_parameter::eps, info(), celeste::svm_problem::l, celeste::svm_parameter::shrinking, celeste::Solver::Solve(), and celeste::svm_problem::y.

Referenced by svm_train_one().

static void celeste::solve_nu_svc ( const svm_problem *  prob,
const svm_parameter *  param,
double *  alpha,
Solver::SolutionInfo *  si 
) [static]

Definition at line 1505 of file svm.cpp.

References celeste::svm_problem::l, min(), celeste::svm_parameter::nu, and celeste::svm_problem::y.

Referenced by svm_train_one().

static void celeste::solve_one_class ( const svm_problem *  prob,
const svm_parameter *  param,
double *  alpha,
Solver::SolutionInfo *  si 
) [static]

Definition at line 1560 of file svm.cpp.

References celeste::svm_problem::l, and celeste::svm_parameter::nu.

Referenced by svm_train_one().

static void celeste::solve_epsilon_svr ( const svm_problem *  prob,
const svm_parameter *  param,
double *  alpha,
Solver::SolutionInfo *  si 
) [static]

Definition at line 1592 of file svm.cpp.

References celeste::svm_parameter::C, celeste::svm_parameter::eps, info(), celeste::svm_problem::l, celeste::svm_parameter::p, celeste::svm_parameter::shrinking, celeste::Solver::Solve(), and celeste::svm_problem::y.

Referenced by svm_train_one().

static void celeste::solve_nu_svr ( const svm_problem *  prob,
const svm_parameter *  param,
double *  alpha,
Solver::SolutionInfo *  si 
) [static]

Definition at line 1630 of file svm.cpp.

References celeste::svm_parameter::C, celeste::svm_parameter::eps, info(), celeste::svm_problem::l, min(), celeste::svm_parameter::nu, celeste::Solver::SolutionInfo::r, celeste::svm_parameter::shrinking, celeste::Solver_NU::Solve(), and celeste::svm_problem::y.

Referenced by svm_train_one().

decision_function celeste::svm_train_one ( const svm_problem *  prob,
const svm_parameter *  param,
double  Cp,
double  Cn 
)

Definition at line 1677 of file svm.cpp.

References C_SVC, EPSILON_SVR, info(), celeste::svm_problem::l, Malloc, NU_SVC, NU_SVR, celeste::Solver::SolutionInfo::obj, ONE_CLASS, celeste::Solver::SolutionInfo::rho, solve_c_svc(), solve_epsilon_svr(), solve_nu_svc(), solve_nu_svr(), solve_one_class(), celeste::svm_parameter::svm_type, celeste::Solver::SolutionInfo::upper_bound_n, celeste::Solver::SolutionInfo::upper_bound_p, and celeste::svm_problem::y.

Referenced by svm_train().

void celeste::sigmoid_train ( int  l,
const double *  dec_values,
const double *  labels,
double &  A,
double &  B 
)

Definition at line 1759 of file svm.cpp.

References info(), vigra_ext::log(), Malloc, and sigma.

double celeste::sigmoid_predict ( double  decision_value,
double  A,
double  B 
)

Definition at line 1872 of file svm.cpp.

Referenced by svm_predict_probability().

void celeste::multiclass_probability ( int  k,
double **  r,
double *  p 
)

Definition at line 1882 of file svm.cpp.

References info(), Malloc, and max().

Referenced by svm_predict_probability().

void celeste::svm_binary_svc_probability ( const svm_problem *  prob,
const svm_parameter *  param,
double  Cp,
double  Cn,
double &  probA,
double &  probB 
)

Definition at line 1946 of file svm.cpp.

References celeste::svm_problem::l, celeste::svm_model::label, Malloc, celeste::svm_parameter::probability, svm_destroy_model(), svm_destroy_param(), svm_predict_values(), svm_train(), swap(), celeste::svm_problem::x, and celeste::svm_problem::y.

double celeste::svm_svr_probability ( const svm_problem *  prob,
const svm_parameter *  param 
)

Definition at line 2033 of file svm.cpp.

References info(), celeste::svm_problem::l, Malloc, celeste::svm_parameter::probability, svm_cross_validation(), and celeste::svm_problem::y.

Referenced by svm_train().

void celeste::svm_group_classes ( const svm_problem *  prob,
int *  nr_class_ret,
int **  label_ret,
int **  start_ret,
int **  count_ret,
int *  perm 
)

Definition at line 2067 of file svm.cpp.

References celeste::svm_problem::l, Malloc, and celeste::svm_problem::y.

Referenced by svm_cross_validation().

svm_model* celeste::svm_train ( const svm_problem *  prob,
const svm_parameter *  param 
)

Definition at line 2127 of file svm.cpp.

References celeste::decision_function::alpha, EPSILON_SVR, celeste::svm_model::free_sv, celeste::svm_model::l, celeste::svm_problem::l, celeste::svm_model::label, Malloc, celeste::svm_model::nr_class, celeste::svm_model::nSV, NU_SVR, ONE_CLASS, celeste::svm_model::param, celeste::svm_model::probA, celeste::svm_parameter::probability, celeste::svm_model::probB, celeste::decision_function::rho, celeste::svm_model::rho, celeste::svm_model::SV, celeste::svm_model::sv_coef, svm_svr_probability(), svm_train_one(), celeste::svm_parameter::svm_type, and celeste::svm_problem::x.

Referenced by svm_binary_svc_probability(), and svm_cross_validation().

void celeste::svm_cross_validation ( const svm_problem *  prob,
const svm_parameter *  param,
int  nr_fold,
double *  target 
)

Definition at line 2364 of file svm.cpp.

References C_SVC, celeste::svm_problem::l, Malloc, NU_SVC, celeste::svm_parameter::probability, svm_destroy_model(), svm_get_nr_class(), svm_group_classes(), svm_predict(), svm_predict_probability(), svm_train(), celeste::svm_parameter::svm_type, swap(), celeste::svm_problem::x, and celeste::svm_problem::y.

Referenced by svm_svr_probability().

int celeste::svm_get_svm_type ( const svm_model *  model  ) 

Definition at line 2480 of file svm.cpp.

References celeste::svm_model::param, and celeste::svm_parameter::svm_type.

int celeste::svm_get_nr_class ( const svm_model *  model  ) 

Definition at line 2485 of file svm.cpp.

References celeste::svm_model::nr_class.

Referenced by classifySVM(), and svm_cross_validation().

void celeste::svm_get_labels ( const svm_model *  model,
int *  label 
)

Definition at line 2490 of file svm.cpp.

References celeste::svm_model::label, and celeste::svm_model::nr_class.

double celeste::svm_get_svr_probability ( const svm_model *  model  ) 

Definition at line 2497 of file svm.cpp.

References EPSILON_SVR, info(), NU_SVR, celeste::svm_model::param, celeste::svm_model::probA, and celeste::svm_parameter::svm_type.

void celeste::svm_predict_values ( const svm_model *  model,
const svm_node *  x,
double *  dec_values 
)

Definition at line 2509 of file svm.cpp.

References EPSILON_SVR, celeste::svm_model::l, Malloc, celeste::svm_model::nr_class, celeste::svm_model::nSV, NU_SVR, ONE_CLASS, celeste::svm_model::param, celeste::svm_model::rho, celeste::svm_model::SV, celeste::svm_model::sv_coef, and celeste::svm_parameter::svm_type.

Referenced by svm_binary_svc_probability(), svm_predict(), and svm_predict_probability().

double celeste::svm_predict ( const svm_model *  model,
const svm_node *  x 
)

Definition at line 2564 of file svm.cpp.

References EPSILON_SVR, celeste::svm_model::label, Malloc, celeste::svm_model::nr_class, NU_SVR, ONE_CLASS, celeste::svm_model::param, svm_predict_values(), and celeste::svm_parameter::svm_type.

Referenced by svm_cross_validation(), and svm_predict_probability().

double celeste::svm_predict_probability ( const svm_model *  model,
const svm_node *  x,
double *  prob_estimates 
)

Definition at line 2608 of file svm.cpp.

References C_SVC, celeste::svm_model::label, Malloc, max(), min(), multiclass_probability(), celeste::svm_model::nr_class, NU_SVC, celeste::svm_model::param, celeste::svm_model::probA, celeste::svm_model::probB, sigmoid_predict(), svm_predict(), svm_predict_values(), and celeste::svm_parameter::svm_type.

Referenced by classifySVM(), and svm_cross_validation().

int celeste::svm_save_model ( const char *  model_file_name,
const svm_model *  model 
)

Definition at line 2657 of file svm.cpp.

References celeste::svm_parameter::coef0, celeste::svm_parameter::degree, celeste::svm_parameter::gamma, celeste::svm_parameter::kernel_type, celeste::svm_model::l, celeste::svm_model::label, celeste::svm_model::nr_class, celeste::svm_model::param, POLY, RBF, celeste::svm_model::rho, SIGMOID, and celeste::svm_parameter::svm_type.

struct svm_model * celeste::svm_load_model ( const char *  model_file_name  ) 

Definition at line 2751 of file svm.cpp.

References celeste::svm_parameter::coef0, celeste::svm_parameter::degree, celeste::svm_parameter::gamma, celeste::svm_parameter::kernel_type, celeste::svm_model::l, celeste::svm_model::label, Malloc, celeste::svm_model::nr_class, celeste::svm_model::nSV, out, celeste::svm_model::param, celeste::svm_model::probA, celeste::svm_model::probB, celeste::svm_model::rho, celeste::svm_model::SV, celeste::svm_model::sv_coef, and celeste::svm_parameter::svm_type.

Referenced by loadSVMmodel().

void celeste::svm_destroy_model ( svm_model *  model  ) 

Definition at line 2955 of file svm.cpp.

References celeste::svm_model::free_sv, celeste::svm_model::l, celeste::svm_model::label, celeste::svm_model::nr_class, celeste::svm_model::nSV, celeste::svm_model::probA, celeste::svm_model::probB, celeste::svm_model::rho, celeste::svm_model::SV, and celeste::svm_model::sv_coef.

Referenced by destroySVMmodel(), svm_binary_svc_probability(), and svm_cross_validation().

void celeste::svm_destroy_param ( svm_parameter *  param  ) 

Definition at line 2971 of file svm.cpp.

References celeste::svm_parameter::weight, and celeste::svm_parameter::weight_label.

Referenced by svm_binary_svc_probability().

const char* celeste::svm_check_parameter ( const svm_problem *  prob,
const svm_parameter *  param 
)

Definition at line 2977 of file svm.cpp.

References celeste::svm_parameter::C, C_SVC, celeste::svm_parameter::cache_size, celeste::svm_parameter::degree, celeste::svm_parameter::eps, EPSILON_SVR, celeste::svm_parameter::kernel_type, celeste::svm_problem::l, LINEAR, Malloc, min(), celeste::svm_parameter::nu, NU_SVC, NU_SVR, ONE_CLASS, celeste::svm_parameter::p, POLY, PRECOMPUTED, celeste::svm_parameter::probability, RBF, celeste::svm_parameter::shrinking, SIGMOID, celeste::svm_parameter::svm_type, and celeste::svm_problem::y.

int celeste::svm_check_probability_model ( const svm_model *  model  ) 

Definition at line 3095 of file svm.cpp.

References C_SVC, EPSILON_SVR, NU_SVC, NU_SVR, celeste::svm_model::param, celeste::svm_model::probA, celeste::svm_model::probB, and celeste::svm_parameter::svm_type.

struct svm_model* celeste::svm_train ( const struct svm_problem *  prob,
const struct svm_parameter *  param 
)

void celeste::svm_cross_validation ( const struct svm_problem *  prob,
const struct svm_parameter *  param,
int  nr_fold,
double *  target 
)

int celeste::svm_save_model ( const char *  model_file_name,
const struct svm_model *  model 
)

int celeste::svm_get_svm_type ( const struct svm_model *  model  ) 

int celeste::svm_get_nr_class ( const struct svm_model *  model  ) 

void celeste::svm_get_labels ( const struct svm_model *  model,
int *  label 
)

double celeste::svm_get_svr_probability ( const struct svm_model *  model  ) 

void celeste::svm_predict_values ( const struct svm_model *  model,
const struct svm_node *  x,
double *  dec_values 
)

double celeste::svm_predict ( const struct svm_model *  model,
const struct svm_node *  x 
)

double celeste::svm_predict_probability ( const struct svm_model *  model,
const struct svm_node *  x,
double *  prob_estimates 
)

const char* celeste::svm_check_parameter ( const struct svm_problem *  prob,
const struct svm_parameter *  param 
)

int celeste::svm_check_probability_model ( const struct svm_model *  model  ) 

void celeste::Permute ( int *  array,
size_t  size 
)

Definition at line 48 of file Utilities.cpp.

References cmp(), and celeste::tmp::p.

int celeste::cmp ( const void *  s1,
const void *  s2 
)

Definition at line 68 of file Utilities.cpp.

References celeste::tmp::r.

Referenced by Permute().

float celeste::Heavyside ( float  a  ) 

Definition at line 77 of file Utilities.cpp.

float celeste::Sigmoid ( float  act  ) 

Definition at line 84 of file Utilities.cpp.

float celeste::Sigmoid ( float  beta,
float  a_pot 
)

Definition at line 92 of file Utilities.cpp.

float celeste::Sigmoid ( float  beta,
float  a_pot,
float  thresh 
)

Definition at line 97 of file Utilities.cpp.

int ** celeste::CreateMatrix ( int  val,
int  row,
int  col 
)

Definition at line 103 of file Utilities.cpp.

Referenced by createGrid(), getCelesteControlPoints(), main(), and prepareGaborImage().

void celeste::ResetMatrix ( int **  matrix,
int  val,
int  row,
int  col 
)

Definition at line 116 of file Utilities.cpp.

void celeste::DisposeMatrix ( int **  matrix,
int  row 
)

Definition at line 124 of file Utilities.cpp.

Referenced by getCelesteControlPoints(), and getCelesteMask().

float ** celeste::CreateMatrix ( float  val,
int  row,
int  col 
)

Definition at line 132 of file Utilities.cpp.

void celeste::ResetMatrix ( float **  matrix,
float  val,
int  row,
int  col 
)

Definition at line 145 of file Utilities.cpp.

void celeste::DisposeMatrix ( float **  matrix,
int  row 
)

Definition at line 153 of file Utilities.cpp.

float celeste::ReturnDistance ( float *  pat1,
float *  pat2,
int  size 
)

Definition at line 161 of file Utilities.cpp.

void celeste::SkipComments ( ifstream infile  ) 

Definition at line 172 of file Utilities.cpp.

void celeste::FileCreateError ( char *  filename  ) 

Definition at line 193 of file Utilities.cpp.

References cerr.

void celeste::FileOpenError ( char *  filename  ) 

Definition at line 202 of file Utilities.cpp.

References cerr.

void celeste::GetStreamDefaults ( void   ) 

Definition at line 214 of file Utilities.cpp.

References cout, gPrecision, and gWidth.

void celeste::AdjustStream ( ostream os,
int  precision,
int  width,
int  pos,
bool  trailers 
)

Definition at line 220 of file Utilities.cpp.

References kLeft.

void celeste::SetStreamDefaults ( ostream os  ) 

Definition at line 235 of file Utilities.cpp.

References gPrecision, and gWidth.

double celeste::SafeAbs ( double  val1,
double  val2 
)

Definition at line 246 of file Utilities.cpp.

float celeste::SafeAbs ( float  val1,
float  val2 
)

Definition at line 254 of file Utilities.cpp.

int celeste::SafeAbs ( int  val1,
int  val2 
)

Definition at line 262 of file Utilities.cpp.

double celeste::SafeAbs ( double  val  ) 

Definition at line 270 of file Utilities.cpp.

float celeste::SafeAbs ( float  val  ) 

Definition at line 276 of file Utilities.cpp.

int celeste::SafeAbs ( int  val  ) 

Definition at line 282 of file Utilities.cpp.


Variable Documentation

bool celeste::kSaveFilter = false

Definition at line 28 of file CelesteGlobals.cpp.

Referenced by ProcessChannel(), and celeste::LogPolar::Save().

bool celeste::kVerbosity = false

Definition at line 29 of file CelesteGlobals.cpp.

Referenced by celeste::GaborJet::Filter().

float celeste::gS = 18.0

Definition at line 34 of file CelesteGlobals.cpp.

Referenced by ProcessChannel().

int celeste::gA = 8

Definition at line 37 of file CelesteGlobals.cpp.

Referenced by ProcessChannel().

int celeste::gF = 6

Definition at line 40 of file CelesteGlobals.cpp.

Referenced by ProcessChannel().

float celeste::gL = 0.1f

Definition at line 43 of file CelesteGlobals.cpp.

Referenced by ProcessChannel().

float celeste::gU = 1.8f

Definition at line 46 of file CelesteGlobals.cpp.

Referenced by ProcessChannel().

bool celeste::kSaveFilter

Definition at line 28 of file CelesteGlobals.cpp.

Referenced by ProcessChannel(), and celeste::LogPolar::Save().

bool celeste::kVerbosity

Definition at line 29 of file CelesteGlobals.cpp.

Referenced by celeste::GaborJet::Filter().

float celeste::gS

Definition at line 34 of file CelesteGlobals.cpp.

Referenced by ProcessChannel().

int celeste::gA

Definition at line 37 of file CelesteGlobals.cpp.

Referenced by ProcessChannel().

int celeste::gF

Definition at line 40 of file CelesteGlobals.cpp.

Referenced by ProcessChannel().

float celeste::gL

Definition at line 43 of file CelesteGlobals.cpp.

Referenced by ProcessChannel().

float celeste::gU

Definition at line 46 of file CelesteGlobals.cpp.

Referenced by ProcessChannel().

float celeste::CONTRAST[9][9]

Definition at line 32 of file ContrastFilter.cpp.

Referenced by celeste::ContrastFilter::ApplyFilter().

const char* celeste::svm_type_table[]

Initial value:

{
        "c_svc","nu_svc","one_class","epsilon_svr","nu_svr",NULL
}

Definition at line 2647 of file svm.cpp.

const char* celeste::kernel_type_table[]

Initial value:

{
        "linear","polynomial","rbf","sigmoid","precomputed",NULL
}

Definition at line 2652 of file svm.cpp.

long celeste::gPrecision

Definition at line 36 of file Utilities.cpp.

Referenced by GetStreamDefaults(), and SetStreamDefaults().

long celeste::gWidth

Definition at line 37 of file Utilities.cpp.

Referenced by GetStreamDefaults(), and SetStreamDefaults().


Generated on 1 Nov 2014 for Hugintrunk by  doxygen 1.4.7