双边滤波
2010-07-14 17:19
197 查看
// 5_5.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <cv.h>
#include <cvcam.h>
#include <cxcore.h>
#include <highgui.h>
#pragma comment(lib,"cv.lib")
#pragma comment(lib,"cvcam.lib")
#pragma comment(lib,"cxcore.lib")
#pragma comment(lib,"highgui.lib")
int main(int argc, char* argv[])
{
//载入图像
IplImage *pSourceImage = cvLoadImage(argv[1]);
assert(pSourceImage != NULL);
IplImage *pDestionImage = cvCloneImage(pSourceImage);
assert(pDestionImage != NULL);
//简单无缩放模糊,不支持 in place
cvSmooth(pSourceImage,pDestionImage,CV_BILATERAL);
//显示图像
cvNamedWindow("Show_Source");
cvNamedWindow("Show_Destion");
cvShowImage("Show_Source",pSourceImage);
cvShowImage("Show_Destion",pDestionImage);
cvWaitKey();
//释放资源
cvReleaseImage(&pSourceImage);
cvReleaseImage(&pDestionImage);
cvDestroyWindow("Show_Source");
cvDestroyWindow("Show_Destion");
return 0;
}
//
#include "stdafx.h"
#include <cv.h>
#include <cvcam.h>
#include <cxcore.h>
#include <highgui.h>
#pragma comment(lib,"cv.lib")
#pragma comment(lib,"cvcam.lib")
#pragma comment(lib,"cxcore.lib")
#pragma comment(lib,"highgui.lib")
int main(int argc, char* argv[])
{
//载入图像
IplImage *pSourceImage = cvLoadImage(argv[1]);
assert(pSourceImage != NULL);
IplImage *pDestionImage = cvCloneImage(pSourceImage);
assert(pDestionImage != NULL);
//简单无缩放模糊,不支持 in place
cvSmooth(pSourceImage,pDestionImage,CV_BILATERAL);
//显示图像
cvNamedWindow("Show_Source");
cvNamedWindow("Show_Destion");
cvShowImage("Show_Source",pSourceImage);
cvShowImage("Show_Destion",pDestionImage);
cvWaitKey();
//释放资源
cvReleaseImage(&pSourceImage);
cvReleaseImage(&pDestionImage);
cvDestroyWindow("Show_Source");
cvDestroyWindow("Show_Destion");
return 0;
}
相关文章推荐
- 6.5OpenCV双边滤波
- 数字图像处理之均值滤波,高斯滤波,中值滤波,双边滤波
- 用双边滤波图像平滑
- 学习【OpenCV入门教程之九】 非线性滤波专场:中值滤波、双边滤波---思维导图笔记
- 图像滤波---双边滤波和导向滤波的推导与实践
- 图片漫画效果(DoG算子和双边滤波)
- Opencv cvSmooth 双边滤波 参数设置未解决问题
- Bilateral Filtering(双边滤波) for SSAO
- 【OpenCV】邻域滤波:方框、高斯、中值、双边滤波
- OpenCV 邻域滤波:方框、高斯、中值、双边滤波
- 双边滤波(二)
- Bilateral Filtering(双边滤波) for SSAO
- opencv bilateral filter vs matlab bilateral filter 双边滤波
- 【OpenCV入门教程之九】 非线性滤波专场:中值滤波、双边滤波
- [学习opencv]高斯、中值、均值、双边滤波
- Bilateral Filtering(双边滤波)
- 【OpenCV】5种图像滤波辨析:方框、均值、高斯、中值、双边
- 域滤波:方框、高斯、中值、双边滤波
- 图像处理之双边滤波介绍与源码实现
- [学习opencv]高斯、中值、均值、双边滤波