随笔分类 -  机器视觉

摘要:Halcon 多用于工业视觉处理,机器学习等,经常要和其他库联合使用。此例说明字符串数组如何转换输出。 for (int i = 0;i < codeLen;i++) { HString str = hv_DecodedDataStrings[i].S(); char* code = const_c 阅读全文
posted @ 2020-10-28 10:31 sunyheart 阅读(2914) 评论(0) 推荐(1)
摘要:/// 转化Mat为QImage QImage scan::Mat2QImage(const cv::Mat& mat) { QImage img; int chana = mat.channels(); /// 依据通道数不同,改变不同的装换方式 if (chana > 1) { //img = 阅读全文
posted @ 2020-10-28 10:30 sunyheart 阅读(532) 评论(0) 推荐(0)
摘要://初始化模型 CreateBarCodeModel(HTuple(), HTuple(), &hv_BarCodeHandle); //设置最小对象面积大小 SetBarCodeParam(hv_BarCodeHandle, "element_size_min", 3200); //设置校验开启 阅读全文
posted @ 2020-10-28 10:29 sunyheart 阅读(997) 评论(0) 推荐(0)
摘要:#pragma execution_character_set("utf-8") #include <opencv2/opencv.hpp> #include <opencv2/core/core.hpp> int main() { cv::VideoCapture capDevice(0); ca 阅读全文
posted @ 2020-10-28 10:25 sunyheart 阅读(1240) 评论(0) 推荐(0)
摘要:单相机标定通常是相机使用的第一步,只有通过标定才能准确的获得相机的内参,以便于进行消除畸变、1D/2D测量等后续操作。 1、生成标定板描述文件 gen_caltab (7, 7, 0.0125, 0.5, 'caltab.descr', 'caltab.ps') 参数含义可以查手册(f1),运行后会 阅读全文
posted @ 2020-10-28 10:23 sunyheart 阅读(1321) 评论(0) 推荐(0)
摘要:高斯模糊拟合激光条法: dev_close_window () * 设置颜色 dev_set_color ('green') * 读取图像 read_image (Image, 'images3/1') * 获得图像尺寸 get_image_size (Image, Width, Height) * 阅读全文
posted @ 2020-09-22 16:08 sunyheart 阅读(1380) 评论(0) 推荐(0)