标签:name class result res str code logs bsp gray
1、循环读取N张图片进行处理
int i= 1; while (i<= 10) { string imageName = format("%d.jpg", i); image = imread(imageName, IMREAD_GRAYSCALE); namedWindow("Gray_image", CV_WINDOW_AUTOSIZE); imshow("Gray_image", I); i++; while (1){ if (waitKey(1) == ‘ ‘) break; }//等待获取按键“ ”执行下一步 }
2、等待按键事件继续执行
while (1){ if (waitKey(1) == ‘ ‘) break; }//等待获取按键“ ”执行下一步
3、创建全零图片Mat
cv::Mat result(cv::Size(480, 640), CV_8U, Scalar(0));//新建0矩阵
标签:name class result res str code logs bsp gray
原文地址:http://www.cnblogs.com/imzh/p/7611966.html