摘要: private int m_nBuffSizeForDriver = 0; private int m_nBuffSizeForSaveImage = 0; private IntPtr m_pBuffForDriver = IntPtr.Zero; private IntPtr m_pBuffFo 阅读全文
posted @ 2021-08-26 11:41 陈加爵 阅读(2738) 评论(0) 推荐(1) 编辑
摘要: 使用海康工业彩色面阵相机,实时显示预览视频的时候,抓图到子线程中做图像处理。 public void GrabImage() { UInt32 nPayloadSize = 0; int nRet; int temp = m_pOperator.GetIntValue("PayloadSize", 阅读全文
posted @ 2020-11-24 11:31 陈加爵 阅读(4108) 评论(0) 推荐(1) 编辑
摘要: windows或者ubuntu 都可以运行,post body 参数为:image ,上传图片格式为base64,新建一个static文件夹,图片存储在static文件夹中 package main import ( "fmt" "net/http" "log" "io/ioutil" "time" 阅读全文
posted @ 2019-10-15 17:00 陈加爵 阅读(1437) 评论(0) 推荐(0) 编辑
摘要: python 打包:anaconda 安装pyinstaller 格式:pyinstaller -F -w (-i icofile) filename filename :Python程序文件名 -w 表示隐藏程序运行时的命令行窗口(不加-w会有黑色窗口) -i 表示给程序加上图标,图标必须为.ic 阅读全文
posted @ 2019-10-15 16:50 陈加爵 阅读(169) 评论(0) 推荐(0) 编辑
摘要: int CMyCamera::startGrabImage(Mat &image, string &info){ unsigned int nRecvBufSize = 0; MVCC_INTVALUE stParam; memset(&stParam, 0, sizeof(MVCC_INTVALU 阅读全文
posted @ 2019-10-15 16:44 陈加爵 阅读(5913) 评论(0) 推荐(0) 编辑
摘要: cv::Mat QImageToMat(QImage image) { cv::Mat mat; switch (image.format()) { case QImage::Format_ARGB32: case QImage::Format_RGB32: case QImage::Format_ 阅读全文
posted @ 2019-10-15 16:38 陈加爵 阅读(779) 评论(0) 推荐(0) 编辑
摘要: 读取本地时间,计算本地时间与延时时间的和,当本地时间超过前面之和时,即计时到了,跳出循环 void Delay_MSec(unsigned int msec) { QThread::msleep(100); qDebug() << "start" << msec << endl; qDebug()  阅读全文
posted @ 2019-10-15 16:32 陈加爵 阅读(5064) 评论(0) 推荐(0) 编辑
摘要: 最近写了一个动态链接库提供给C#界面开发的同事调用。为了方便调试输出,用C/C++的标准库API编写了一个Log日志库。 读取本地时间作为Log文件名,一天一个文件,定义一个LOG_LEVEL,一共分为五个级别。 #include <iostream>#include <fstream>#inclu 阅读全文
posted @ 2019-10-15 16:19 陈加爵 阅读(5563) 评论(0) 推荐(0) 编辑
摘要: OpenCV中默认imread函数加载图像文件,加载进来的是三通道彩色图像,色彩空间是RGB色彩空间、通道顺序是BGR(蓝色、绿色、红色)、对于三通道的图像OpenCV中提供了两个API函数用以实现通道分离与合并。 split // 通道分类 merge // 通道合并 #include <open 阅读全文
posted @ 2019-05-08 10:13 陈加爵 阅读(2426) 评论(0) 推荐(0) 编辑
摘要: 基于像素点的算术操作 加add、减subtract、乘multiply、除divide saturate_cast&lt;T&gt;(value) #include <opencv2/opencv.hpp> #include <iostream> using namespace cv; using 阅读全文
posted @ 2019-05-08 10:09 陈加爵 阅读(1353) 评论(0) 推荐(0) 编辑