c语言小技巧
jinggegebuaa
这个作者很懒,什么都没留下…
展开
-
C语言小技巧之怎么找到需要的部分
string stemp = "H://lenovo//视频标注-lenovo//视频标注-lenovo//annotation_haoyu//video1_20161104150102.avi";int last = stemp.find_last_of(".");int begin1 = stemp.find_last_of("\\");int begin2 = stemp.find_l原创 2016-12-25 19:09:10 · 357 阅读 · 0 评论 -
堆栈使用小技巧
要写一个评测人脸识别性能的程序把live 和 sfz 里面所有的图片的特征提取出来,两两计算相似度,这样我们就得到一个相似度矩阵。把live 的特征和sfz 的特征都推到堆栈里面去。 BYTE* pFeature1 = new BYTE[EF_Size()];BYTE* pFeature2 = new BYTE[EF_Size()];EF_Extract(0, img_gallary.dat...原创 2018-04-25 20:18:28 · 624 阅读 · 0 评论 -
读二进制文件
const int MAX_FILE_SIZE = 65536; void* initData = malloc( MAX_FILE_SIZE ); /* enough to fit entire file */ FILE* filedesc = fopen(g_FDPath, "rb"); int initDataSize = fread(initData, 1, MAX原创 2017-12-18 19:59:33 · 305 阅读 · 0 评论 -
error C2440: “类型转换”: 无法从“LPVOID”转换为“double
DWORD WINAPI Fun(LPVOID lpParam){ //liveness double *threaholddd; threaholddd = (double*)lpParam;}lpParam 是个指针类型。所以需要定义一个指针类型的来匹配它。原创 2017-12-18 19:10:15 · 2351 阅读 · 0 评论 -
最近调试人脸问题的总结--命令行+抽取第二级子目录的名称
最近调试人脸识别程序的总结1. 人脸检测 人脸检测的阈值是0.7 在外部不允许更改2. 命令行的程序 有时候出现点击批处理闪退的情况 比较建议的方式是重写一个bat 文件 目前没有找到根本原因 bat 文件里面的路径的方式: facedetect.exe E:\data\guoche_gallay\guoche_gallay E:\data原创 2017-12-17 16:15:15 · 199 阅读 · 0 评论 -
c++ 出现bug
最近老出现:LINK : fatal error LNK1104: 无法打开文件“G:\Face-SDK-x86 V7.0.1-timeout2017_concole\face\Release\face.exe这个问题暂时没有明确的解决方法现在的解决方法 就是把文件复制一份 然后在点开执行原创 2017-11-17 13:30:28 · 206 阅读 · 0 评论 -
c 语言小技巧
在typedef struct tagLiveness{BOOL haveFace;RECT rtFace;float score;int numbereOf_Face;} TLiveness;增加一个变量int numbereOf_Face;初始化的时候为:TLiveness live = {FALSE, {0, 0, 0, 0}, 0.0f,0,};原创 2017-10-25 16:30:49 · 188 阅读 · 0 评论 -
linux 下测速时间分析
测出来的时间为:解决方法为:struct timeval tpstart,tpend; float timeuse; gettimeofday(&tpstart,NULL); int index = HST_ClerkDetect(handle, img.data, img.cols, img.rows);//目标分类 gett原创 2017-11-09 16:46:24 · 374 阅读 · 0 评论 -
opencv 从原始的图像中找出ROI区域
http://blog.csdn.net/chentravelling/article/details/45331225opencv 从原始的图像中找出ROI区域#include #include using namespace std;using namespace cv;int main(){ IplImage *image = cvLoadImage("I:\\OpenC转载 2015-11-27 11:14:59 · 1519 阅读 · 0 评论 -
Ipimage 转mat
http://blog.csdn.net/holybin/article/details/17711013转载 2015-11-27 11:29:46 · 974 阅读 · 0 评论 -
在网上找了一个读取文件夹下面的所有文件到txt的code 已验证
// aaa.cpp : 定义控制台应用程序的入口点。//#include "StdAfx.h"#include #include #include #include #include #include #include using namespace std;void getFiles(string, vector&);int转载 2016-11-28 23:45:30 · 552 阅读 · 0 评论 -
c语言小技巧-之多线程创建
//#include //#include //using namespace std;//DWORD WINAPI Fun(LPVOID lpParamter)////{// while (1) { cout //}//////int main()////{// HANDLE hThread = CreateThread(NULL, 0转载 2017-09-06 10:54:07 · 290 阅读 · 0 评论 -
c 语言小技巧之二 自动创建目录
#include "../FaceDetect/FaceDetect.h"#include "../FaceFeature/FaceFeature.h"#include #include #include #include #include #include #include #include #include #include #include原创 2017-09-04 16:33:25 · 312 阅读 · 0 评论