Write and read opencv3.0 ml files(random forest)
来源:互联网 发布:淘宝刷好评兼职靠谱吗 编辑:程序博客网 时间:2024/06/04 15:41
using namespace cv;using namespace std;int main(){ { auto rtrees = cv::ml::RTrees::create(); rtrees->setMaxDepth(10); rtrees->setMinSampleCount(2); rtrees->setRegressionAccuracy(0); rtrees->setUseSurrogates(false); rtrees->setMaxCategories(16); rtrees->setPriors(cv::Mat()); rtrees->setCalculateVarImportance(false); rtrees->setActiveVarCount(0); rtrees->setTermCriteria({ cv::TermCriteria::MAX_ITER, 100, 0 }); // Some dummy stuff here... Mat1f feat(1, 5, 0.f); Mat1f labels = (Mat1f(1, 5) << 1, 0, 1, 0, 1); rtrees->train(feat, cv::ml::ROW_SAMPLE, labels); rtrees->write(cv::FileStorage("smoke_classifier.xml", cv::FileStorage::WRITE)); } { auto rtrees2 = cv::ml::RTrees::create(); cv::FileStorage read("smoke_classifier.xml", cv::FileStorage::READ); rtrees2->read(read.root()); int a = rtrees2->getMinSampleCount(); } return 0;}
0 0
- Write and read opencv3.0 ml files(random forest)
- UTL_FILE - read and write file or Random Access of Files
- read and write files
- Opening Files for Read and Write
- Read and Write files IN PHP
- [OpenCV] Write & Read files
- Java libraries to read and write PDF files
- write to and read from files (读写文件)
- How to read and write JSON files in Java(Gson)
- 小试随机森林(random forest)算法ml
- 小试随机森林(random forest)算法ml
- Read and Write XML
- Read and Write Excel
- file read and write
- write and read
- Python read and write
- Use the SQL Server CLR to Read and Write Text Files
- [CodeProject C#]Read/Write Config files
- C++笔记二
- 单例设计模式 java
- 交叉熵损失函数
- Unity3D移动平台内存优化
- 喜欢穿衬衫的你 真的会选“衬衫”吗?
- Write and read opencv3.0 ml files(random forest)
- haskell笔记(1)
- WebRTC实时音视频技术的整体架构介绍
- C语言中自带的头文件(.h)所包含的函数
- ubuntu下神奇的多线程apt-get
- Android 判断点是否在Path中(含不规则形状的Path)
- Cortex-M3的咬尾中断技术
- android 的DDMS下的data目录权限的方法及攻略(图文)
- 常用的基本数据库语句