#include <stdio.h>
#include"opencv2/opencv.hpp"
using namespace cv;
int main()
{
VideoCapture a(0);
Mat edge;
while (1)
{
Mat frame;
a >> frame;
cvtColor(frame,edge,CV_BGR2GRAY);
blur(edge,edge,Size(7,7));
Canny(edge, edge, 0, 30, 3);
imshow("被canny后的视频",edge);
waitKey(2);
}
return 0;
}
本站文章如无特殊说明,均为本站原创,如若转载,请注明出处:实战深度学习OpenCV(三):视频实时canny边缘检测 - Python技术站