mexopencv  0.1
mex interface for opencv library
mexopencv_ml.hpp
Go to the documentation of this file.
1 
11 #ifndef __MEXOPENCV_ML_HPP__
12 #define __MEXOPENCV_ML_HPP__
13 
14 #include "mexopencv.hpp"
15 #include "opencv2/ml.hpp"
16 
17 
18 // ==================== XXX ====================
19 
24 MxArray toStruct(const std::vector<cv::ml::DTrees::Node>& nodes);
25 
30 MxArray toStruct(const std::vector<cv::ml::DTrees::Split>& splits);
31 
32 
33 // ==================== XXX ====================
34 
42 cv::Ptr<cv::ml::TrainData> createTrainData(
43  const cv::Mat& samples, const cv::Mat& responses,
44  std::vector<MxArray>::const_iterator first,
45  std::vector<MxArray>::const_iterator last);
46 
53 cv::Ptr<cv::ml::TrainData> loadTrainData(
54  const std::string& filename,
55  std::vector<MxArray>::const_iterator first,
56  std::vector<MxArray>::const_iterator last);
57 
58 #endif
MxArray toStruct(const std::vector< cv::ml::DTrees::Node > &nodes)
Convert tree nodes to struct array.
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.
mxArray object wrapper for data conversion and manipulation.
Definition: MxArray.hpp:123
Global constant definitions.
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.