opencv第三课 Canny边缘检测

opencv第三课 Canny边缘检测

#include<stdio.h>
#include<iostream>
#include<opencv2\opencv.hpp>
using namespace std;
using namespace cv;
IplImage *g_psrcimage,*g_pcannyima;
void on_trackbar(int threshold)
{
cvCanny(g_psrcimage,g_pcannyima,threshold,threshold*,);
cvShowImage("picture",g_pcannyima);
}
int main()
{
g_psrcimage = cvLoadImage("D:\\1.jpg",CV_LOAD_IMAGE_GRAYSCALE);
g_pcannyima = cvCreateImage(cvGetSize(g_psrcimage), IPL_DEPTH_8U, );
int nthresholdedge=;
cvCreateTrackbar("","",&nthresholdedge,,on_trackbar);
cvShowImage("",g_psrcimage);
on_trackbar();
cvWaitKey();
return ;
}
上一篇:跟我一起学opencv 第四课之图像的基本操作


下一篇:【前端】screenX/Y, clientX/Y, pageX/Y 的区别