随笔分类 -  c++/c

使用c++/c语言实现的代码
摘要:c++复现数据集预处理过程,参考源码: https://github.com/genbing99/SoftNet-SpotME extraction_preprocess.py #include <opencv2/opencv.hpp> #include <direct.h> #include <i 阅读全文
posted @ 2021-07-29 15:58 快乐码小农 阅读(283) 评论(0) 推荐(0)
摘要:计算optical flow以及strain,作为微表情识别的输入 #include <iostream> #include <opencv2/opencv.hpp> class OptFlowStrain { public: typedef struct _flow_strain { cv::Ma 阅读全文
posted @ 2021-07-29 02:38 快乐码小农 阅读(279) 评论(0) 推荐(0)
摘要:根据landmark,标记出人脸左右眼,和嘴巴, 环境windows7 64位。 根据测试,左眼的点为:36至41,最左边位36,上面37,38,右边39,下边41,40 右眼,最左边42,上面43,44,右边45,下边47,46 嘴巴,最左边48,右边54,上边 49至53,下边,55至58. # 阅读全文
posted @ 2021-07-18 20:08 快乐码小农 阅读(904) 评论(0) 推荐(0)
摘要:matlab sub2ind利用c语言重写 #include <stdio.h> #include <assert.h> #include <stdlib.h> #include <string.h> #include <time.h> typedef struct _sub2ind_res { u 阅读全文
posted @ 2021-01-18 16:06 快乐码小农 阅读(127) 评论(0) 推荐(0)
摘要:模型简化: python3 -m onnxsim input_onnx_model output_onnx_model 转换完成后,需要注意: 1.图像归一化方式: 如果训练过程中,图像归一化为: preprocess_transform = transforms.Compose([ transfo 阅读全文
posted @ 2020-12-18 18:31 快乐码小农 阅读(899) 评论(0) 推荐(0)
摘要:linux c语言解压zip格式文件 #include <stdio.h> #include <stdlib.h> int unzipFile(const char* fileName) { char command[256] = {0}; sprintf(command, "unzip %s", 阅读全文
posted @ 2020-11-22 14:16 快乐码小农 阅读(798) 评论(0) 推荐(0)
摘要:创建线程后,添加的回调函数中,如果加入了引用符号,编译时会报如下错误: 错误 C2893 未能使函数模板“unknown-type std::invoke(_Callable &&,_Types &&...)” #include <thread> #include <iostream> #inclu 阅读全文
posted @ 2020-11-03 08:57 快乐码小农 阅读(246) 评论(0) 推荐(0)