c++
/ycc
这个作者很懒,什么都没留下…
展开
-
[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 · 389 阅读 · 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 · 402 阅读 · 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 · 388 阅读 · 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 · 462 阅读 · 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 · 1207 阅读 · 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 · 82 阅读 · 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 · 553 阅读 · 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 · 69 阅读 · 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 · 255 阅读 · 0 评论 -
[C]连续产生随机数取英文名(不用sleep)
#include <stdio.h>#include <stdlib.h>#include <time.h>int main(){ unsigned char name; /*volatile*/ unsigned seed = (unsigned)time(NULL); for (int i = 0; i < 4; i++) { srand(seed++); name = rand() % ('z' - 'a' + 1) + 'a';原创 2021-06-21 15:10:25 · 454 阅读 · 0 评论 -
[AT指令]ESP8266 连接 百度地图[IP普通定位] 接口,获取定位信息
1.连接一个能上网的wifiAT+CWJAP_CUR="TP-LINK_0141","password"2.设置SSL的buf容量,照做就行AT+CIPSSLSIZE=40963.TCP连接,你有兴趣也可以用SSLAT+CIPSTART="TCP","api.map.baidu.com",804.开启透传AT+CIPMODE=15.发送GET请求AT+CIPSEND发出如下GET请求GET /location/ip?ak=9oeRTAQ0OUATeR6a1XIBU1WvwIf原创 2021-03-19 22:03:52 · 2145 阅读 · 2 评论 -
某小白(楼主)突然想往简历里面加个opencv,于是默默地从0开始搭建了opencv环境,接着测试了某代码
测试代码来源https://blog.csdn.net/u011808673/article/details/78510830#commentBox我是用了如下代码做测试的:#include "/usr/local/opencv4/include/opencv4/opencv2/opencv.hpp"#include "/usr/local/opencv4/include/opencv4/opencv2/core/core.hpp"#include "/usr/local/o...原创 2020-11-28 17:55:19 · 376 阅读 · 0 评论