2019.11.26 图像变换的学习
美好的一个晚上从视觉工程开始 先来一个 阈值化 的程序和源代码 include "opencv2/video/tracking.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include <iostream> #include <ctype.h> #include<stdlib.h> #include<stdio.h> #include<math.h> #include<opencv2/opencv.hpp> #include<string.h> #include<vector> using namespace cv; using namespace std; #define windowname "程序窗口" Mat picture, img,emm, camera; int main() { VideoCapture capture(0); while (100) { capture >> camera; cvtColor(camera, picture, COLOR_RGB2GRAY);//转换为灰度图像 threshold(picture, img, 130, 255, 1); threshold(picture, emm, 130, 255, 0);