- 博客(64)
- 问答 (1)
- 收藏
- 关注
原创 window+anaconda+pytorch+vscode+python调试
在window环境下,从anaconda创建pytorch环境到python在vscode上调试的完整配置过程
2022-11-02 19:07:06 1088 1
原创 Deep Residual Learning for Image Recognition浅读与实现
Deep Residual Learning for Image Recognition浅读与实现
2022-07-27 18:40:30 1635 4
原创 解决QTCreator使用VS编译中文乱码错误
1、错误现象2、错误原因QT采用UTF-8编码,而用vs编译在window上运行需要ANSI编码。3、解决方法使用notepad++将所有cpp文件和头文件转化为ANSI编码。回到QT再次点击锤子已经不会报错了。
2022-03-12 23:21:11 1183
原创 Esp8266的Flash读写操作以及Flash上传文件
1、Flash的读写操作Esp8266的Flash为4M,其中1M用于存储程序,其他的空间有一部分用于系统,3M中剩下的大部分空间可以用来存放文件。#include <FS.h>String file_name = "/Fle/note.txt"; //被读取的文件位置和名称,放在/Fle文件夹下void setup() { Serial.begin(9600); Serial.println(""); Serial.println("SPIFFS format star
2021-11-13 20:46:19 6783 3
原创 解决esp8266无法连接手机和电脑热点的问题
1、硬件平台我使用的是Esp8266 NodeMcu(Esp-12s)2、开发环境Arduino IDE3、开发板型号选择4、AP模式#include <ESP8266WiFi.h> // 本程序使用ESP8266WiFi库 const char *ssid = "Fle"; // esp8266建立的wifi名称 const char *password = "gxd001213";
2021-11-13 00:18:56 13998 4
原创 相机姿态估计
目录一、相机姿态估计原理二、相机姿态估计原理实现一、相机姿态估计原理首先介绍一下什么是世界坐标系和相机坐标系——世界坐标系是自己定义的一个坐标系,这里我定义世界坐标系是X轴垂直屏幕指向人,Y轴水平向右,Z轴竖直向上。相机坐标系有统一的规定,如图所示,x轴平行于相机镜头水平向左,y轴平行于相机镜头向下,z轴垂直于镜头水平指向人。我们求相机在世界坐标系中的姿态的需求往往就是求一个相机坐标下的点在世界坐标系下的坐标,或者是一个世界坐标系下的点在相机坐标系的坐标。首先思考一下为什么能在一个确定的世界坐标系
2021-10-16 17:02:43 6272 8
原创 初识Opencv4.X----方框滤波
//方框滤波#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ //方框滤波,实际上与均值滤波一样,主要用在CV_32F的图像上 Mat img_gaussion = imread("gaussion.jpg"); Mat i
2021-09-16 15:46:32 129
原创 初识Opencv4.X----均值滤波
//均值滤波#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ //均值滤波 Mat img_gaussion = imread("gaussion.jpg"); Mat img_salt = imread("salt.jpg
2021-09-16 15:05:34 133
原创 初识Opencv4.X----为图像添加高斯噪声
//为图像添加高斯噪声#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ //噪声在图像中的分布概率密度满足高斯分布 Mat img = imread("person3.jpeg");//读取的是三通道图像 namedWin
2021-09-15 23:17:26 327
原创 初识Opencv4.X----为图像添加椒盐噪声
//为图像添加椒盐噪声#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;void add_salt(Mat & img);int main(){ //椒盐噪声,顾名思义就是在图像上撒上白色的盐和黑色的小黑椒 Mat img = imread
2021-09-15 21:00:56 205
原创 初识Opencv4.X----图像卷积
//图像卷积原理#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ Mat src = (cv::Mat_<float>(5, 5) << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
2021-09-15 20:23:45 108
原创 初识Opencv4.X----图像模板匹配
图像模板匹配知识://图像模板匹配#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ Mat img = imread("person2.jpeg"); Mat temp = imread("person2_temp.jp
2021-09-14 22:57:39 220
原创 初识Opencv4.X----图像直方图匹配
直方图匹配的原理://图像直方图匹配#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;void drawHist(Mat &hist, int hist_w, int hist_h, int type, string name);int ma
2021-09-14 17:13:46 237
原创 初识Opencv4.X----图像直方图均衡
//图像直方图均衡#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;void drawHist(Mat &hist, int hist_w, int hist_h, int type, string name);int main(){ /*
2021-09-13 22:59:25 98
原创 初识Opencv4.X----图像直方图绘制
//图像直方图绘制#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ Mat img = imread("person1.jpeg", IMREAD_GRAYSCALE); //统计0~255各个灰度值的像素个数 const
2021-09-13 21:15:05 155
原创 初识Opencv4.X----窗口交互操作
//窗口交互操作#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;void callback_width_brush(int,void*);void callback_mouse(int event, int x, int y, int flags, v
2021-09-12 20:50:48 180
原创 初识Opencv4.X----ROI截取
//ROI截取#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ Mat img = Mat::zeros(Size(400, 400), CV_8UC1);//创建一个黑色背景,注意是Size(x,y),即(列,行) put
2021-09-12 15:59:15 255
原创 初识Opencv4.X----在图像上绘制形状
//在图像上绘制形状#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ Mat img = Mat::zeros(Size(500, 500), CV_8UC1);//创建一个黑色背景,注意是Size(x,y),即(列,行)
2021-09-12 15:34:02 97
原创 初识Opencv4.X----图像透视变换
//图像图像透视变换#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ //图像的透视变换,需要3x3的旋转矩阵,总共9个参数,通过原图像和变换后的对应4个点就可以构造12个方程解出9个参数 Mat img = imread(
2021-09-11 12:03:31 129
原创 初识Opencv4.X----图像仿射变换
//图像仿射变换#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ //图像的仿射变换,需要2x3的旋转矩阵,总共6个参数,通过原图像和变换后的对应3个点就可以构造六个方程解出6个参数 Mat img = imread("pe
2021-09-11 11:45:21 139
原创 初识Opencv4.X----图像尺寸变换
//图像沿xy轴翻转#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ Mat img = imread("person3.jpeg"); Mat dst; namedWindow("原图", WINDOW_NORMAL);
2021-09-10 21:17:27 107
原创 初识Opencv4.X----图像尺寸变换
//图像尺寸变换#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ Mat dst; Mat img = imread("person3.jpeg"); Mat img_2 = imread("person1.jpeg");
2021-09-10 21:00:09 89
原创 初识Opencv4.X----图像拼接
//图像拼接#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ Mat person1 = imread("person1.jpeg"); Mat person3 = imread("person3.jpeg"); //纵向
2021-09-10 20:20:50 203
原创 初识Opencv4.X----图像二值化
//图像二值化#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ Mat img_color = imread("picture.jpeg"); Mat img_gray = imread("picture.jpeg", IM
2021-09-10 09:18:43 106
原创 初识Opencv4.X----像素的逻辑运算
//像素的逻辑运算#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ Mat a = Mat(200, 200, CV_8UC1, Scalar(0)); Mat b = Mat(200, 200, CV_8UC1, Scal
2021-09-09 22:24:42 61
原创 两幅图像的像素比较
//两幅图像的像素比较#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ //system("color F0");//改变输出界面的颜色,白色 Mat word_img = cv::imread("word.jpeg");
2021-09-09 19:45:38 1723
原创 初识Opencv4.X----像素均值与标准差
//像素均值与标准差#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ system("color F0");//改变输出界面的颜色,白色 Mat img = cv::imread("picture.jpeg"); //求各
2021-09-09 14:46:23 239
原创 初识Opencv4.X----像素最值寻找
//像素最值寻找#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ system("color F0");//改变输出界面的颜色,白色 float a[10] = { 1,2,3,4,5,6,7,8,9,10 }; Mat
2021-09-09 13:14:55 121
原创 初识Opencv4.X----图像通道分离与合并
//图像通道分离与#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ Mat img, imgs[3]; img = cv::imread("picture.jpeg"); //分离BGR通道并分别显示 cv::split
2021-09-08 11:30:29 92
原创 初识Opencv4.X----图像色彩空间转换
//图像色彩空间转换#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ Mat img,img32f,HSV,gray; img = cv::imread("picture.jpeg"); if (img.empty())
2021-09-07 20:12:46 75
原创 初识Opencv4.X----图像视频的读取与保存
1、图片的读取、显示和保存//图片的读取与保存#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ cv::Mat a; a = cv::imread("picture.jpeg", IMREAD_GRAYSCALE);//以
2021-09-07 15:45:16 197
原创 初识Opencv4.X----Mat类
1、Mat类//Mat的常见构造方法#include <stdio.h>#include <iostream>#include <string>#include <opencv2\opencv.hpp>using namespace std;using namespace cv;int main(){ //Mat类的构造 Mat a = cv::Mat::Mat();//a的属性由所赋的值决定 a = (cv::Mat_<int
2021-09-06 18:32:09 177
原创 C++不同于C的基础语法(三)
1、继承#include "iostream"#include "string"using namespace std;class Person//基类,也称为父类{public: string name; string sex; int age;};//继承语法:子类 : 继承方式 父类class Rich : public Person//子类,也称为派生类{public: string car;};class Beggar : public Person{publ
2021-09-02 15:55:03 118
原创 C++不同于C的基础语法(二)
1、程序的内存模型①代码区:存放函数体的二进制代码,由操作系统进行管理②全局区:存放全局变量和静态变量以及常量③栈区:由编译器自动分配和释放,存放函数的参数值、局部变量等。④堆区:由程序员分配和释放,若程序员不释放,程序结束时有操作系统回收。①代码区:在运行程序之前就已经存在。特点是共享和只读。②全局区:在运行程序之前就已经存在。#include "iostream"#include "string"using namespace std;//全局变量int g_a;//全局常量
2021-08-15 22:41:47 106
原创 FPGA数字钟设计
一、使用说明与整体思路概述1、使用说明:本设计模拟手机时钟实现四个功能,分别为时间显示、秒表、闹钟、计时器。以BUT1~BUT4分别选择这四个功能,四个功能互不冲突,在时间显示时可以继续进行秒表和计时器的工作。实现的各自功能如下:时间显示:以1HZ频率显示时间,按下BUT5实现设置时间,在设置时间的条件下,按下BUT6实现对哪个位进行修改操作,设置的位闪烁示意正在设置该位,按BUT6可以将位循环左移。在按下BUT6的情况下,按BUT7实现加一操作,按BUT8实现减一操作。秒个位设置范围为09,秒十位设
2021-08-12 00:34:28 5114
空空如也
树莓派4b拍照耗时问题,注意不是延迟问题
2022-03-10
TA创建的收藏夹 TA关注的收藏夹
TA关注的人