mexopencv
3.4.1
MEX interface for OpenCV library
|
Common definitions for the ml module. More...
Go to the source code of this file.
Functions | |
MxArray | toStruct (const std::vector< cv::ml::DTrees::Node > &nodes) |
Convert tree nodes to struct array. More... | |
MxArray | toStruct (const std::vector< cv::ml::DTrees::Split > &splits) |
Convert tree splits to struct array. More... | |
cv::Ptr< cv::ml::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. More... | |
cv::Ptr< cv::ml::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. More... | |
Common definitions for the ml module.
Header file for MEX-functions that use ML module from OpenCV library. This file includes maps for option processing, as well as functions for creating instances of classes from parsed arguments.
Definition in file mexopencv_ml.hpp.
cv::Ptr<cv::ml::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.
cv::Ptr<cv::ml::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.