19,468
社区成员
发帖
与我相关
我的任务
分享
#include "stdafx.h"
#include "iostream"
#include "opencv2/opencv.hpp"
using namespace std;
using namespace cv;
int main(int argc, char const *argv[])
{
Mat im = imread("lena.JPG", 0);
if(im.empty())
{
cout << "Can not load image." << endl;
return -1;
}
Mat result;
Canny(im, result, 50, 150);
imwrite("lena-canny.png", result);
waitKey(0);
return 0;
}