摘要: terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(3.4.2) /root/opencv-3.4.2/modules/core/src/system.cpp:1572: error: (-215 阅读全文
posted @ 2022-03-04 17:06 代码改变世界11 阅读(571) 评论(0) 推荐(0)
摘要: 1、创建一个non_widget的项目,不带界面的工程 2、头文件 #include <iostream> #include <opencv2/opencv.hpp> using namespace std; using namespace cv; int main() { //cout << "H 阅读全文
posted @ 2022-03-04 10:43 代码改变世界11 阅读(295) 评论(0) 推荐(0)
摘要: cv::findContours( ) 这个函数是用来找轮廓的,我经常用,应该能解决你这个问题。 这个函数找到的线存储的数据结构是std::vector<std::vector<cv::Point> > ,这个里面就有你想要的所有的轮廓点的坐标。 阅读全文
posted @ 2022-03-04 04:34 代码改变世界11 阅读(150) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-03-04 04:09 代码改变世界11 阅读(17) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-03-04 03:47 代码改变世界11 阅读(198) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-03-03 19:34 代码改变世界11 阅读(145) 评论(0) 推荐(0)
摘要: 1、ui界面 设置属性 2、代码方式 setEchoMode(QLineEdit::Password); 阅读全文
posted @ 2022-03-03 16:45 代码改变世界11 阅读(222) 评论(0) 推荐(0)
摘要: 1、imread的路径不能是资源文件,带./xxx的,所以先直接把图放在工程路径下 //打开图片 cv::Mat logo = imread("Backline.png"); cv::Mat mask = imread("Backline.png",0); //注意要是灰度图才行 阅读全文
posted @ 2022-03-03 16:22 代码改变世界11 阅读(149) 评论(0) 推荐(0)
摘要: 1、头文件 #include<QDesktopWidget > 2、.cpp文件 QDesktopWidget *deskdop = QApplication::desktop(); move((deskdop->width() - this->width())/2, (deskdop->heigh 阅读全文
posted @ 2022-03-03 16:13 代码改变世界11 阅读(299) 评论(0) 推荐(0)
摘要: 1、network线程连接设置界面 不要用信号和槽 connect(network::getinstance(),xxx,this,xxxx) netwok网络连接后发送信号emit xxx; 但是这样会导致 network已经连接成功,且emit了信号,但是connect连接还没成功,所以界面上的 阅读全文
posted @ 2022-03-03 13:14 代码改变世界11 阅读(86) 评论(0) 推荐(0)