mexopencv
3.4.1
MEX interface for OpenCV library
|
Implementation of mexopencv_ml. More...
#include "mexopencv_ml.hpp"
Go to the source code of this file.
Functions | |
MxArray | toStruct (const vector< DTrees::Node > &nodes) |
Convert tree nodes to struct array. More... | |
MxArray | toStruct (const vector< DTrees::Split > &splits) |
Convert tree splits to struct array. More... | |
Ptr< TrainData > | createTrainData (const Mat &samples, const Mat &responses, vector< MxArray >::const_iterator first, vector< MxArray >::const_iterator last) |
Create an instance of TrainData using options in arguments. More... | |
Ptr< TrainData > | loadTrainData (const string &filename, vector< MxArray >::const_iterator first, vector< MxArray >::const_iterator last) |
Read a dataset from a CSV file. More... | |
Variables | |
const ConstMap< string, int > | SampleTypesMap |
Option values for sample layouts. More... | |
const ConstMap< string, int > | VariableTypeMap |
Option values for variable types. More... | |
Ptr<TrainData> createTrainData | ( | const cv::Mat & | samples, |
const cv::Mat & | responses, | ||
std::vector< MxArray >::const_iterator | first, | ||
std::vector< MxArray >::const_iterator | last | ||
) |
Create an instance of TrainData using options in arguments.
samples | data samples |
responses | data responses |
first | iterator at the beginning of the vector range |
last | iterator at the end of the vector range |
Definition at line 70 of file mexopencv_ml.cpp.
Ptr<TrainData> loadTrainData | ( | const std::string & | filename, |
std::vector< MxArray >::const_iterator | first, | ||
std::vector< MxArray >::const_iterator | last | ||
) |
Read a dataset from a CSV file.
filename | The input CSV file name |
first | iterator at the beginning of the vector range |
last | iterator at the end of the vector range |
Definition at line 134 of file mexopencv_ml.cpp.
MxArray toStruct | ( | const std::vector< cv::ml::DTrees::Node > & | nodes | ) |
Convert tree nodes to struct array.
nodes | vector of decision tree nodes |
Definition at line 34 of file mexopencv_ml.cpp.
MxArray toStruct | ( | const std::vector< cv::ml::DTrees::Split > & | splits | ) |
Convert tree splits to struct array.
splits | vector of decision tree splits |
Definition at line 51 of file mexopencv_ml.cpp.
Option values for sample layouts.
Definition at line 18 of file mexopencv_ml.cpp.
Option values for variable types.
Definition at line 23 of file mexopencv_ml.cpp.