图片腐蚀效果

#include"highgui.h"
#include"cv.h"
int main(int argc, char*argv[])
{
	IplImage *img = cvLoadImage("d:\\3.jpg");
	cvNamedWindow("window");
	cvShowImage("window", img);

	IplImage *t = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 3);
	cvDilate(img, t, NULL, 1);腐蚀
//	cvErode(img, t, NULL, 1);

	cvNamedWindow("win2");
	cvShowImage("win2",t);

	cvWaitKey(0);
	cvReleaseImage(&img);
	cvDestroyWindow("window");
	cvReleaseImage(&t);
	cvDestroyWindow("win2");
	return 0;
}

你可能感兴趣的:(图片腐蚀效果)