OpenCV  2.4.13.7
Open Source Computer Vision
cv::ocl::CvSVM_OCL Class Reference

#include <ocl.hpp>

Inheritance diagram for cv::ocl::CvSVM_OCL:
CvSVM CvStatModel

Public Member Functions

 CvSVM_OCL ()
 
 CvSVM_OCL (const cv::Mat &trainData, const cv::Mat &responses, const cv::Mat &varIdx=cv::Mat(), const cv::Mat &sampleIdx=cv::Mat(), CvSVMParams params=CvSVMParams())
 
float predict (const int row_index, Mat &src, bool returnDFVal=false) const
 
void predict (cv::InputArray samples, cv::OutputArray results) const
 
float predict (const cv::Mat &sample, bool returnDFVal=false) const
 
float predict (const CvMat *samples, CV_OUT CvMat *results) const
 
- Public Member Functions inherited from CvSVM
 CvSVM ()
 
virtual ~CvSVM ()
 
 CvSVM (const CvMat *trainData, const CvMat *responses, const CvMat *varIdx=0, const CvMat *sampleIdx=0, CvSVMParams params=CvSVMParams())
 
virtual bool train (const CvMat *trainData, const CvMat *responses, const CvMat *varIdx=0, const CvMat *sampleIdx=0, CvSVMParams params=CvSVMParams())
 
virtual bool train_auto (const CvMat *trainData, const CvMat *responses, const CvMat *varIdx, const CvMat *sampleIdx, CvSVMParams params, int kfold=10, CvParamGrid Cgrid=get_default_grid(CvSVM::C), CvParamGrid gammaGrid=get_default_grid(CvSVM::GAMMA), CvParamGrid pGrid=get_default_grid(CvSVM::P), CvParamGrid nuGrid=get_default_grid(CvSVM::NU), CvParamGrid coeffGrid=get_default_grid(CvSVM::COEF), CvParamGrid degreeGrid=get_default_grid(CvSVM::DEGREE), bool balanced=false)
 
virtual float predict (const CvMat *sample, bool returnDFVal=false) const
 
 CvSVM (const cv::Mat &trainData, const cv::Mat &responses, const cv::Mat &varIdx=cv::Mat(), const cv::Mat &sampleIdx=cv::Mat(), CvSVMParams params=CvSVMParams())
 
virtual bool train (const cv::Mat &trainData, const cv::Mat &responses, const cv::Mat &varIdx=cv::Mat(), const cv::Mat &sampleIdx=cv::Mat(), CvSVMParams params=CvSVMParams())
 
virtual bool train_auto (const cv::Mat &trainData, const cv::Mat &responses, const cv::Mat &varIdx, const cv::Mat &sampleIdx, CvSVMParams params, int k_fold=10, CvParamGrid Cgrid=CvSVM::get_default_grid(CvSVM::C), CvParamGrid gammaGrid=CvSVM::get_default_grid(CvSVM::GAMMA), CvParamGrid pGrid=CvSVM::get_default_grid(CvSVM::P), CvParamGrid nuGrid=CvSVM::get_default_grid(CvSVM::NU), CvParamGrid coeffGrid=CvSVM::get_default_grid(CvSVM::COEF), CvParamGrid degreeGrid=CvSVM::get_default_grid(CvSVM::DEGREE), bool balanced=false)
 
void predict (cv::InputArray samples, cv::OutputArray results) const
 
virtual int get_support_vector_count () const
 
virtual const float * get_support_vector (int i) const
 
virtual CvSVMParams get_params () const
 
virtual void clear ()
 
virtual void write (CvFileStorage *storage, const char *name) const
 
virtual void read (CvFileStorage *storage, CvFileNode *node)
 
int get_var_count () const
 
- Public Member Functions inherited from CvStatModel
 CvStatModel ()
 
virtual ~CvStatModel ()
 
virtual void save (const char *filename, const char *name=0) const
 
virtual void load (const char *filename, const char *name=0)
 

Protected Member Functions

float predict (const int row_index, int row_len, Mat &src, bool returnDFVal=false) const
 
void create_kernel ()
 
void create_solver ()
 
- Protected Member Functions inherited from CvSVM
virtual bool set_params (const CvSVMParams &params)
 
virtual bool train1 (int sample_count, int var_count, const float **samples, const void *responses, double Cp, double Cn, CvMemStorage *_storage, double *alpha, double &rho)
 
virtual bool do_train (int svm_type, int sample_count, int var_count, const float **samples, const CvMat *responses, CvMemStorage *_storage, double *alpha)
 
virtual float predict (const float *row_sample, int row_len, bool returnDFVal=false) const
 
virtual void write_params (CvFileStorage *fs) const
 
virtual void read_params (CvFileStorage *fs, CvFileNode *node)
 
void optimize_linear_svm ()
 

Additional Inherited Members

- Public Types inherited from CvSVM
enum  {
  C_SVC =100, NU_SVC =101, ONE_CLASS =102, EPS_SVR =103,
  NU_SVR =104
}
 
enum  { LINEAR =0, POLY =1, RBF =2, SIGMOID =3 }
 
enum  {
  C =0, GAMMA =1, P =2, NU =3,
  COEF =4, DEGREE =5
}
 
- Static Public Member Functions inherited from CvSVM
static CvParamGrid get_default_grid (int param_id)
 
- Protected Attributes inherited from CvSVM
CvSVMParams params
 
CvMatclass_labels
 
int var_all
 
float ** sv
 
int sv_total
 
CvMatvar_idx
 
CvMatclass_weights
 
CvSVMDecisionFuncdecision_func
 
CvMemStoragestorage
 
CvSVMSolversolver
 
CvSVMKernelkernel
 
- Protected Attributes inherited from CvStatModel
const char * default_model_name
 

Detailed Description

*************** SVM *************!

Constructor & Destructor Documentation

§ CvSVM_OCL() [1/2]

cv::ocl::CvSVM_OCL::CvSVM_OCL ( )

§ CvSVM_OCL() [2/2]

cv::ocl::CvSVM_OCL::CvSVM_OCL ( const cv::Mat trainData,
const cv::Mat responses,
const cv::Mat varIdx = cv::Mat(),
const cv::Mat sampleIdx = cv::Mat(),
CvSVMParams  params = CvSVMParams() 
)

Member Function Documentation

§ create_kernel()

void cv::ocl::CvSVM_OCL::create_kernel ( )
protectedvirtual

Reimplemented from CvSVM.

§ create_solver()

void cv::ocl::CvSVM_OCL::create_solver ( )
protectedvirtual

Reimplemented from CvSVM.

§ predict() [1/5]

float cv::ocl::CvSVM_OCL::predict ( const int  row_index,
Mat src,
bool  returnDFVal = false 
) const

§ predict() [2/5]

void cv::ocl::CvSVM_OCL::predict ( cv::InputArray  samples,
cv::OutputArray  results 
) const

§ predict() [3/5]

float cv::ocl::CvSVM_OCL::predict ( const cv::Mat sample,
bool  returnDFVal = false 
) const
virtual

Reimplemented from CvSVM.

§ predict() [4/5]

float cv::ocl::CvSVM_OCL::predict ( const CvMat samples,
CV_OUT CvMat results 
) const
virtual

Reimplemented from CvSVM.

§ predict() [5/5]

float cv::ocl::CvSVM_OCL::predict ( const int  row_index,
int  row_len,
Mat src,
bool  returnDFVal = false 
) const
protected

The documentation for this class was generated from the following file: