|
Hugin trunk 0.1
|
Classes | |
| class | Cache |
| class | ContrastFilter |
| struct | decision_function |
| class | GaborFilter |
| class | GaborJet |
| class | ImageFile |
| class | Kernel |
| class | ONE_CLASS_Q |
| class | PGMImage |
| class | QMatrix |
| class | Solver |
| class | Solver_NU |
| class | SVC_Q |
| struct | svm_model |
| struct | svm_node |
| struct | svm_parameter |
| struct | svm_problem |
| class | SVR_Q |
| 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 } |
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 |
| float | CONTRAST [9][9] |
| int | libsvm_version = LIBSVM_VERSION |
| static void(* | svm_print_string )(const char *) = &print_string_stdout |
| static const char * | svm_type_table [] |
| static const char * | kernel_type_table [] |
| static char * | line = NULL |
| static int | max_line_len |
| std::streamsize | gPrecision |
| std::streamsize | gWidth |
| typedef vigra::BRGBImage::PixelType celeste::RGB |
Definition at line 42 of file Celeste.cpp.
| Enumerator | |
|---|---|
| kChars | |
| kFloats | |
| kRGB | |
Definition at line 40 of file ImageFile.h.
| Enumerator | |
|---|---|
| kLeft | |
| kRight | |
Definition at line 42 of file Utilities.h.
Definition at line 218 of file Utilities.cpp.
References kLeft, and threshold().
| std::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 153 of file Celeste.cpp.
References celeste::svm_node::index, response(), svm_get_nr_class(), svm_predict_probability(), and celeste::svm_node::value.
Referenced by getCelesteControlPoints(), and getCelesteMask().
Definition at line 68 of file svm.cpp.
References threshold().
Referenced by celeste::Kernel::Kernel(), celeste::Solver::Solve(), and celeste::SVC_Q::SVC_Q().
| 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
| src | input image |
| origType | pixel type of input image |
| dest | converted image |
@TODO this convert routine scale the input values range into the full scale of UInt16 this is not fully correct
Definition at line 70 of file Celeste.h.
References vigra_ext::applyMapping(), and vigra_ext::getMaxValForPixelType().
Referenced by loadAndConvertImage().
Definition at line 234 of file Celeste.cpp.
References CreateMatrix().
Referenced by getCelesteMask().
Definition at line 130 of file Utilities.cpp.
References threshold().
Definition at line 101 of file Utilities.cpp.
References threshold().
Referenced by createGrid(), getCelesteControlPoints(), and prepareGaborImage().
| CELESTEIMPEX void celeste::destroySVMmodel | ( | struct svm_model *& | model | ) |
frees the resource of model
| model | SVM model struct to freeing |
Definition at line 60 of file Celeste.cpp.
References svm_free_and_destroy_model().
Referenced by main(), PanoDetector::run(), and MainFrame::~MainFrame().
Definition at line 151 of file Utilities.cpp.
References threshold().
Definition at line 122 of file Utilities.cpp.
References threshold().
Referenced by getCelesteControlPoints(), and getCelesteMask().
Definition at line 191 of file Utilities.cpp.
References threshold().
Definition at line 200 of file Utilities.cpp.
References threshold().
| CELESTEIMPEX HuginBase::UIntSet celeste::getCelesteControlPoints | ( | struct svm_model * | model, |
| vigra::UInt16RGBImage & | input, | ||
| HuginBase::CPointVector | cps, | ||
| int | radius, | ||
| float | threshold, | ||
| int | resize_dimension, | ||
| bool | verbose | ||
| ) |
Definition at line 363 of file Celeste.cpp.
References classifySVM(), CreateMatrix(), DisposeMatrix(), prepareCelesteImage(), prepareGaborImage(), ProcessChannel(), response(), threshold(), HuginBase::ControlPoint::x1, and HuginBase::ControlPoint::y1.
Referenced by PanoOperation::CelesteOperation::GetInternalCommand(), main(), and CPEditorPanel::OnCelesteButton().
| 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
| 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 |
Definition at line 313 of file Celeste.cpp.
References classifySVM(), createGrid(), DisposeMatrix(), generateMask(), prepareCelesteImage(), prepareGaborImage(), ProcessChannel(), and threshold().
Referenced by PanoDetector::AnalyzeImage(), and main().
Definition at line 212 of file Utilities.cpp.
References gPrecision, and gWidth.
Definition at line 75 of file Utilities.cpp.
Definition at line 95 of file svm.cpp.
References threshold().
Referenced by celeste::Solver::do_shrinking(), multiclass_probability(), celeste::Solver::reconstruct_gradient(), sigmoid_train(), celeste::Solver::Solve(), solve_c_svc(), solve_epsilon_svr(), solve_nu_svc(), solve_nu_svr(), svm_svr_probability(), svm_train(), and svm_train_one().
| CELESTEIMPEX bool celeste::loadSVMmodel | ( | struct svm_model *& | model, |
| std::string & | model_file | ||
| ) |
loads the SVM model from file
| model | struct, which stores the SVM information, if you don't need it, call destroySVMmodel |
| model_file | filename of model file to load |
Definition at line 45 of file Celeste.cpp.
References svm_load_model().
Referenced by MainFrame::GetSVMModel(), PanoDetector::LoadSVMModel(), and main().
Definition at line 65 of file svm.cpp.
Referenced by celeste::Cache::Cache(), celeste::Solver::calculate_rho(), celeste::Solver_NU::calculate_rho(), celeste::Solver_NU::do_shrinking(), multiclass_probability(), celeste::Solver_NU::select_working_set(), celeste::Solver::Solve(), svm_predict_probability(), celeste::PGMImage::Write(), and celeste::PGMImage::WriteScaled().
Definition at line 62 of file svm.cpp.
Referenced by celeste::Solver::calculate_rho(), celeste::Solver_NU::calculate_rho(), celeste::Solver::Solve(), solve_nu_svc(), solve_nu_svr(), svm_check_parameter(), svm_predict_probability(), celeste::PGMImage::Write(), and celeste::PGMImage::WriteScaled().
Definition at line 1878 of file svm.cpp.
References info(), Malloc, max(), and threshold().
Referenced by svm_predict_probability().
Definition at line 46 of file Utilities.cpp.
References cmp(), celeste::tmp::r, and threshold().
Definition at line 73 of file svm.cpp.
References threshold().
Referenced by celeste::Kernel::k_function(), and celeste::Kernel::kernel_poly().
| void celeste::prepareCelesteImage | ( | vigra::UInt16RGBImage & | rgb, |
| vigra::UInt16RGBImage & | luv, | ||
| int & | resize_dimension, | ||
| double & | sizefactor, | ||
| bool | verbose | ||
| ) |
Definition at line 66 of file Celeste.cpp.
Referenced by getCelesteControlPoints(), and getCelesteMask().
Definition at line 138 of file Celeste.cpp.
References CreateMatrix().
Referenced by getCelesteControlPoints(), and getCelesteMask().
Definition at line 88 of file svm.cpp.
References threshold().
Referenced by svm_set_print_string_function().
| float * celeste::ProcessChannel | ( | float ** | image, |
| int | w, | ||
| int | h, | ||
| int | gNumLocs, | ||
| int **& | gLocations, | ||
| int | gRadius, | ||
| float * | response, | ||
| int * | len | ||
| ) |
Definition at line 33 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, response(), and celeste::ContrastFilter::Save().
Referenced by getCelesteControlPoints(), and getCelesteMask().
Definition at line 2811 of file svm.cpp.
References celeste::svm_parameter::coef0, celeste::svm_parameter::degree, FSCANF, celeste::svm_parameter::gamma, celeste::svm_parameter::kernel_type, kernel_type_table, Malloc, celeste::svm_parameter::svm_type, svm_type_table, and threshold().
Referenced by svm_load_model().
Definition at line 2787 of file svm.cpp.
References line, max_line_len, and threshold().
Referenced by svm_load_model().
Definition at line 143 of file Utilities.cpp.
References threshold().
Definition at line 114 of file Utilities.cpp.
References threshold().
Definition at line 159 of file Utilities.cpp.
References threshold().
Definition at line 268 of file Utilities.cpp.
Definition at line 244 of file Utilities.cpp.
References threshold().
Definition at line 274 of file Utilities.cpp.
Definition at line 252 of file Utilities.cpp.
References threshold().
Definition at line 280 of file Utilities.cpp.
Definition at line 260 of file Utilities.cpp.
References threshold().
| void celeste::SetStreamDefaults | ( | std::ostream & | os | ) |
Definition at line 233 of file Utilities.cpp.
References gPrecision, and gWidth.
Definition at line 82 of file Utilities.cpp.
References threshold().
Definition at line 90 of file Utilities.cpp.
References threshold().
Definition at line 95 of file Utilities.cpp.
References threshold().
Definition at line 1867 of file svm.cpp.
References threshold().
Referenced by svm_predict_probability().
|
static |
Definition at line 1752 of file svm.cpp.
References info(), log1p, Malloc, sigma, and threshold().
Referenced by svm_binary_svc_probability().
| void celeste::SkipComments | ( | std::ifstream * | infile | ) |
Definition at line 170 of file Utilities.cpp.
References threshold().
|
static |
Definition at line 1487 of file svm.cpp.
References celeste::svm_parameter::eps, info(), celeste::svm_parameter::shrinking, celeste::Solver::Solve(), and threshold().
Referenced by svm_train_one().
|
static |
Definition at line 1609 of file svm.cpp.
References celeste::svm_parameter::C, celeste::svm_parameter::eps, info(), celeste::svm_parameter::p, celeste::svm_parameter::shrinking, celeste::Solver::Solve(), and threshold().
Referenced by svm_train_one().
|
static |
Definition at line 1522 of file svm.cpp.
References celeste::svm_parameter::eps, info(), min(), celeste::svm_parameter::nu, celeste::Solver::SolutionInfo::obj, celeste::Solver::SolutionInfo::r, celeste::Solver::SolutionInfo::rho, celeste::svm_parameter::shrinking, celeste::Solver_NU::Solve(), threshold(), celeste::Solver::SolutionInfo::upper_bound_n, and celeste::Solver::SolutionInfo::upper_bound_p.
Referenced by svm_train_one().
|
static |
Definition at line 1647 of file svm.cpp.
References celeste::svm_parameter::C, celeste::svm_parameter::eps, info(), min(), celeste::svm_parameter::nu, celeste::Solver::SolutionInfo::r, celeste::svm_parameter::shrinking, celeste::Solver_NU::Solve(), and threshold().
Referenced by svm_train_one().
|
static |
Definition at line 1577 of file svm.cpp.
References celeste::svm_parameter::eps, celeste::svm_parameter::nu, celeste::svm_parameter::shrinking, celeste::Solver::Solve(), and threshold().
Referenced by svm_train_one().
|
static |
Definition at line 1942 of file svm.cpp.
References celeste::svm_problem::l, Malloc, celeste::svm_parameter::probability, sigmoid_train(), svm_destroy_param(), svm_free_and_destroy_model(), svm_predict_values(), svm_train(), swap(), and threshold().
Referenced by svm_train().
| const char * celeste::svm_check_parameter | ( | const struct svm_problem * | prob, |
| const struct svm_parameter * | param | ||
| ) |
| const char * celeste::svm_check_parameter | ( | const svm_problem * | prob, |
| const svm_parameter * | param | ||
| ) |
Definition at line 3089 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::gamma, celeste::svm_parameter::kernel_type, 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 threshold().
Definition at line 3210 of file svm.cpp.
References C_SVC, EPSILON_SVR, NU_SVC, NU_SVR, and threshold().
| void celeste::svm_cross_validation | ( | const struct svm_problem * | prob, |
| const struct svm_parameter * | param, | ||
| int | nr_fold, | ||
| double * | target | ||
| ) |
| void celeste::svm_cross_validation | ( | const svm_problem * | prob, |
| const svm_parameter * | param, | ||
| int | nr_fold, | ||
| double * | target | ||
| ) |
Definition at line 2388 of file svm.cpp.
References C_SVC, celeste::svm_problem::l, Malloc, NU_SVC, celeste::svm_parameter::probability, svm_free_and_destroy_model(), svm_get_nr_class(), svm_group_classes(), svm_predict(), svm_predict_probability(), svm_train(), celeste::svm_parameter::svm_type, swap(), and threshold().
Referenced by svm_svr_probability().
| void celeste::svm_destroy_param | ( | svm_parameter * | param | ) |
Definition at line 3083 of file svm.cpp.
References threshold(), celeste::svm_parameter::weight, and celeste::svm_parameter::weight_label.
Referenced by svm_binary_svc_probability().
Definition at line 3073 of file svm.cpp.
References svm_free_model_content(), and threshold().
Referenced by destroySVMmodel(), svm_binary_svc_probability(), and svm_cross_validation().
Definition at line 3038 of file svm.cpp.
References threshold().
Referenced by svm_free_and_destroy_model().
Definition at line 2519 of file svm.cpp.
References threshold().
Definition at line 2514 of file svm.cpp.
References threshold().
Referenced by classifySVM(), and svm_cross_validation().
Definition at line 2533 of file svm.cpp.
References threshold().
Definition at line 2526 of file svm.cpp.
References threshold().
Definition at line 2509 of file svm.cpp.
References threshold().
Definition at line 2538 of file svm.cpp.
References EPSILON_SVR, NU_SVR, and threshold().
|
static |
Definition at line 2063 of file svm.cpp.
References Malloc, swap(), and threshold().
Referenced by svm_cross_validation(), and svm_train().
Definition at line 2933 of file svm.cpp.
References line, Malloc, max_line_len, read_model_header(), readline(), and threshold().
Referenced by loadSVMmodel().
Definition at line 2626 of file svm.cpp.
References EPSILON_SVR, Malloc, NU_SVR, ONE_CLASS, svm_predict_values(), and threshold().
Referenced by svm_cross_validation(), and svm_predict_probability().
| double celeste::svm_predict_probability | ( | const struct svm_model * | model, |
| const struct svm_node * | x, | ||
| double * | prob_estimates | ||
| ) |
| double celeste::svm_predict_probability | ( | const svm_model * | model, |
| const svm_node * | x, | ||
| double * | prob_estimates | ||
| ) |
Definition at line 2641 of file svm.cpp.
References C_SVC, Malloc, max(), min(), multiclass_probability(), NU_SVC, sigmoid_predict(), svm_predict(), svm_predict_values(), and threshold().
Referenced by classifySVM(), and svm_cross_validation().
| double celeste::svm_predict_values | ( | const struct svm_model * | model, |
| const struct svm_node * | x, | ||
| double * | dec_values | ||
| ) |
| double celeste::svm_predict_values | ( | const svm_model * | model, |
| const svm_node * | x, | ||
| double * | dec_values | ||
| ) |
Definition at line 2550 of file svm.cpp.
References EPSILON_SVR, celeste::Kernel::k_function(), Malloc, NU_SVR, ONE_CLASS, and threshold().
Referenced by svm_binary_svc_probability(), svm_predict(), and svm_predict_probability().
Definition at line 2690 of file svm.cpp.
References celeste::svm_parameter::coef0, celeste::svm_parameter::degree, celeste::svm_parameter::gamma, celeste::svm_node::index, celeste::svm_parameter::kernel_type, kernel_type_table, POLY, PRECOMPUTED, RBF, SIGMOID, celeste::svm_parameter::svm_type, svm_type_table, threshold(), and celeste::svm_node::value.
Definition at line 3218 of file svm.cpp.
References print_string_stdout(), svm_print_string, and threshold().
|
static |
Definition at line 2029 of file svm.cpp.
References info(), Malloc, celeste::svm_parameter::probability, svm_cross_validation(), and threshold().
Referenced by svm_train().
| struct svm_model * celeste::svm_train | ( | const struct svm_problem * | prob, |
| const struct svm_parameter * | param | ||
| ) |
| svm_model * celeste::svm_train | ( | const svm_problem * | prob, |
| const svm_parameter * | param | ||
| ) |
Definition at line 2141 of file svm.cpp.
References celeste::decision_function::alpha, celeste::svm_parameter::C, EPSILON_SVR, info(), celeste::svm_problem::l, Malloc, celeste::svm_parameter::nr_weight, NU_SVR, ONE_CLASS, celeste::svm_parameter::probability, celeste::decision_function::rho, svm_binary_svc_probability(), svm_group_classes(), svm_svr_probability(), svm_train_one(), celeste::svm_parameter::svm_type, threshold(), celeste::svm_parameter::weight, and celeste::svm_parameter::weight_label.
Referenced by svm_binary_svc_probability(), and svm_cross_validation().
|
static |
Definition at line 1694 of file svm.cpp.
References celeste::decision_function::alpha, C_SVC, EPSILON_SVR, info(), Malloc, NU_SVC, NU_SVR, celeste::Solver::SolutionInfo::obj, ONE_CLASS, celeste::Solver::SolutionInfo::rho, celeste::decision_function::rho, solve_c_svc(), solve_epsilon_svr(), solve_nu_svc(), solve_nu_svr(), solve_one_class(), celeste::svm_parameter::svm_type, threshold(), celeste::Solver::SolutionInfo::upper_bound_n, and celeste::Solver::SolutionInfo::upper_bound_p.
Referenced by svm_train().
Definition at line 67 of file svm.cpp.
References threshold().
Referenced by celeste::Cache::get_data(), svm_binary_svc_probability(), svm_cross_validation(), svm_group_classes(), celeste::Cache::swap_index(), celeste::Solver::swap_index(), celeste::Kernel::swap_index(), celeste::SVC_Q::swap_index(), celeste::ONE_CLASS_Q::swap_index(), and celeste::SVR_Q::swap_index().
| float celeste::CONTRAST[9][9] |
Definition at line 32 of file ContrastFilter.cpp.
Referenced by celeste::ContrastFilter::ApplyFilter().
| 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().
| std::streamsize celeste::gPrecision |
Definition at line 34 of file Utilities.cpp.
Referenced by GetStreamDefaults(), and SetStreamDefaults().
| float celeste::gS = 18.0 |
Definition at line 34 of file CelesteGlobals.cpp.
Referenced by ProcessChannel().
| float celeste::gU = 1.8f |
Definition at line 46 of file CelesteGlobals.cpp.
Referenced by ProcessChannel().
| std::streamsize celeste::gWidth |
Definition at line 35 of file Utilities.cpp.
Referenced by GetStreamDefaults(), and SetStreamDefaults().
Definition at line 2685 of file svm.cpp.
Referenced by read_model_header(), and svm_save_model().
Definition at line 28 of file CelesteGlobals.cpp.
Referenced by ProcessChannel().
Definition at line 29 of file CelesteGlobals.cpp.
Referenced by celeste::GaborJet::Filter().
| int celeste::libsvm_version = LIBSVM_VERSION |
Definition at line 2784 of file svm.cpp.
Referenced by readline(), and svm_load_model().
|
static |
Definition at line 2785 of file svm.cpp.
Referenced by readline(), and svm_load_model().
Definition at line 93 of file svm.cpp.
Referenced by svm_set_print_string_function().
Definition at line 2680 of file svm.cpp.
Referenced by read_model_header(), and svm_save_model().