
机器学习
文章平均质量分 79
梦游城市
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
利用HOG+SVM训练自己的人脸检测XML文件
1、生成xml训练文件 #include<iostream> #include<opencv2/opencv.hpp> #include<vector> using namespace std; using namespace cv; using namespace cv::ml; #define HOG_VECTOR 900 #define TRAIN_IMG_NUM 800 int main() { //创建HOG描述子 HOGDescriptor hog(Siz原创 2020-08-16 21:35:49 · 467 阅读 · 0 评论 -
机器学习:朴素贝叶斯分类器(NormalBayesClassifier)
#include<opencv2/opencv.hpp> #include<iostream> using namespace cv; using namespace std; using namespace cv::ml; int main(int argc, char** argv) { float trainingData[10][3] = { {34, 1, 1}, {35, 2, 2}, {36, 3,3},{37,8,4},{38,9,5}, {39,10,6},原创 2020-05-08 23:50:38 · 347 阅读 · 0 评论 -
机器学习:基于mnist的svm手写字体识别
SVM训练MNIST过程: #include<iostream> #include<opencv2/opencv.hpp> #include <fstream> using namespace cv; using namespace cv::ml; using namespace std; //大端转小端 int reverseInt(int i); void main() { //读取训练样本集 ifstream if_trainImags("E:\\机器学习原创 2020-08-16 21:35:38 · 681 阅读 · 0 评论 -
机器学习:SVM分割数据点(线性不可分多分类)
#include <iostream> #include<opencv2/opencv.hpp> #include<ctype.h> #define NTRAINING_SAMPLES 100 // Number of training samples per class #define FRAC_LINEAR_SEP 0.9f // Fract...原创 2020-08-16 21:36:11 · 560 阅读 · 0 评论 -
机器学习:SVM分割数据点(线性不可分数据)
与上一篇的区别在于参数setc()的设置。 #include <iostream> #include<opencv2/opencv.hpp> #define NTRAINING_SAMPLES 100 // Number of training samples per class #define FRAC_LINEAR_SEP 0.9f // Fractio...原创 2020-08-16 21:37:11 · 432 阅读 · 0 评论 -
机器学习:SVM分割数据点(线性可分数据)
#include<iostream> #include<opencv2/opencv.hpp> using namespace std; using namespace cv; using namespace cv::ml; int main() { //创建显示分割的图片 const int width = 512; const int height = 512; ...原创 2020-05-08 21:43:51 · 540 阅读 · 0 评论 -
机器学习:kmeans算法用于图像分割(注释很多在kmenas数据分割中)
#include<iostream> #include<opencv2/opencv.hpp> using namespace std; using namespace cv; int main() { //初始化数据 Mat src = imread("C:\\Users\\tudejiang\\Desktop\\简历\\xiao.jpg"); int width ...原创 2020-04-21 13:12:49 · 506 阅读 · 1 评论 -
机器学习:K-Means分割数据(添加了详细注释)
#include<iostream> #include<opencv2/opencv.hpp> using namespace std; using namespace cv; int main() { Mat img(500, 500, CV_8UC3); img = Scalar::all(255); RNG rng(12345);//随机数发生器 Scalar...原创 2020-04-21 13:14:22 · 483 阅读 · 0 评论 -
机器学习:基本数学概念
机器学习:基本概念 鉴于机器学习和深度学习都是离散的数据,所以所有的数学公式基本上都按照离散计算。 1、均值 样本均值描述的是集合的中间点、平均值、均值的信息是有限的,有时候甚至是完全没有参考意义的。 2、标准差 标准差描述的是样本集合中的各个样本点到均值的距离的平均值。以集合[2,8,12,18]和集合[7,9,11,13]为例,两者的均值都是10,但显然后都较为集中,故其标准差小一些。所以标...原创 2020-04-20 14:07:29 · 356 阅读 · 1 评论