核心函数:cvPyrDown,cvCanny
程序:
#include "cv.h" #include "cxcore.h" #include "highgui.h" #include <iostream> #include "function.h" int FindBorder_Canny(int argc,char** argv) { IplImage* src=cvLoadImage("e:\\picture\\11.jpg",0); cvNamedWindow("src"); cvShowImage("src",src); IplImage* HalfSizeDst=HalfSize(src); HalfSizeDst=HalfSize(HalfSizeDst); IplImage* CannyDst=cvCreateImage(cvGetSize(HalfSizeDst),HalfSizeDst->depth,HalfSizeDst->nChannels); cvCanny(HalfSizeDst,CannyDst,50,150,3); cvNamedWindow("CannyDst"); cvShowImage("CannyDst",CannyDst); cvWaitKey(0); cvDestroyWindow("src"); cvDestroyWindow("CannyDst"); cvReleaseImage(&src); cvReleaseImage(&CannyDst); return 0; }
本文出自 “flyclc” 博客,请务必保留此出处http://flyclc.blog.51cto.com/1385758/1540034
原文地址:http://flyclc.blog.51cto.com/1385758/1540034