
c
/ycc
这个作者很懒,什么都没留下…
展开
-
[C]for循环创建多进程execv并waitpid指定子进程退出
#include <stdio.h>#include <stdlib.h>#include <sys/unistd.h>#include <sys/wait.h>#define PROSSESS_NUM 3int main(int argc, char *argv[]){ char * cmd[PROSSESS_NUM][PROSSESS_NUM] = { {"any", "11111111111", 0},原创 2021-09-21 21:52:43 · 279 阅读 · 0 评论 -
[C]转小数
#include <stdio.h>#include <math.h>double to_decimal(unsigned int num32){ double decimal = 0.0; unsigned int len = 0; for (int i = 0; num32 >> i; ++i)len++; for (int i = 1; i < len; ++i) { if (num32 &原创 2021-09-20 01:40:32 · 659 阅读 · 0 评论 -
[opencv][C++][车牌识别]VS2019在opencv2下模仿openmvIDE的阈值编辑器(RGB版本)
#include <iostream>#include <opencv/cv.hpp>#include <opencv2/core/core.hpp>#include <opencv2/highgui/highgui.hpp>//#include <opencv2/imgproc/imgproc.hpp>//#include <opencv2/ml/ml.hpp>using namespace std;...原创 2021-07-06 00:26:09 · 484 阅读 · 0 评论 -
[opencv][C++][车牌识别]VS2019在opencv2下模仿openmvIDE的阈值编辑器
上原图(街边拍摄,仅供学习使用):上目标图:想用VS2017写个阈值编辑器达到这种效果。上效果图:如图所示,效果是出来了,但是好像数值不对劲儿。。。。。。。网友们你们自己看着办吧,我的原则是:“又不是不能用!”。#include <iostream>#include <opencv/cv.hpp>#include <opencv2/core/core.hpp>#include <opencv2/highgui/highgui.hpp>原创 2021-07-05 18:57:23 · 500 阅读 · 0 评论 -
[opencv][C++][车牌识别][切除车牌边框和钉子]车牌识别之分割字符,使用手机相机拍的图验证代码
用此图验证代码,只做学习只用。输出如下:输出如下:#include <iostream>#include <opencv2/highgui/highgui.hpp>#include <opencv2/imgproc.hpp>#include <opencv2/imgproc/types_c.h>#include <cmath>#include <cstdlib>using namespace std;usin原创 2021-07-04 14:40:00 · 579 阅读 · 0 评论 -
[opencv][C++][车牌识别][切除车牌边框和钉子]车牌识别之分割字符
这张车牌是一张网图。opencv2最高版本opencv2.4.13.6到了腐蚀膨胀这一步,结果如下图所示:去除车牌的边框和钉子,结果如下图所示:最后将识别到的图片拼起来,结果如下图所示:间距方面就不调了,能看就行#include <iostream>#include <opencv2/highgui/highgui.hpp>#include <opencv2/imgproc.hpp>#include <opencv2/imgproc/type.原创 2021-07-03 21:15:09 · 1447 阅读 · 0 评论 -
[C]cJSON上手
感谢强大的cJSON感谢:https://blog.youkuaiyun.com/u010647471/article/details/52384220感谢:https://www.cnblogs.com/lodger47/p/14758036.html本工程文件目录 cJSON.c cJSON.h wr_test.c test.json rd_test.c首先生成一个json//wr_test.c#include <stdio.h>#include原创 2021-06-22 16:48:58 · 178 阅读 · 0 评论 -
[C]cJSON入门第一步
https://www.json.org/有两个,json-C和cJSON,选cJSON,这个方便关注那三个文件,用DevCpp打开test.c,注意先加入-std=c99。test.c编译不过加入#include "cJSON.c"如下所示:编译i通过,运行看看:好的,开始玩cJSON吧...原创 2021-06-22 14:38:21 · 147 阅读 · 0 评论 -
[c]从一份男性英文名txt文件中产生随机英文名
#include <stdio.h>#include <string.h>#include <stdlib.h>#include <ctype.h>#include <time.h>#include <math.h>#define RAND(MIN,MAX) (((unsigned long long)rand() * (MAX - MIN + 1)) >> 15 + MIN)int main(){ /原创 2021-06-22 00:51:22 · 800 阅读 · 0 评论 -
[C]把一个字符文件的连续2个大写字母改成1个大写字母
#include <stdio.h>#include <string.h>#include <stdlib.h>#include <ctype.h>#include <errno.h>int main(){ FILE *frp = NULL; char *ibuff=NULL; char *obuff=NULL; frp = fopen("./output_manname.txt", "r"); /*判断文件大小*/ fs原创 2021-06-22 00:39:50 · 119 阅读 · 0 评论 -
[C]把一个字符文件的非字母去掉
#include <stdio.h>#include <string.h>#include <stdlib.h>#include <ctype.h>#include <errno.h>int main(){ FILE *frp = NULL; char *ibuff=NULL; char *obuff=NULL; frp = fopen("./manname.txt", "r"); /*判断文件大小*/ fseek(frp原创 2021-06-22 00:31:11 · 326 阅读 · 0 评论 -
[C]把一堆没有换行的 姓名 字符串文件,改成有换行的
https://wenku.baidu.com/view/a47e7271650e52ea551898ab.html要做工卡了,要取英文名了。百度文库这玩意儿不充钱不能复制就很烦,关掉JS后,复制完没有回车换行。。。。。。。。#include <stdio.h>#include <string.h>#include <stdlib.h>#include <ctype.h>#include <errno.h>int main(){.原创 2021-06-21 16:56:16 · 147 阅读 · 0 评论