OpenCV——高斯模糊与毛玻璃特效
来源:互联网 发布:php编写软件 编辑:程序博客网 时间:2024/06/04 19:24
// define head function#ifndef PS_ALGORITHM_H_INCLUDED#define PS_ALGORITHM_H_INCLUDED#include <iostream>#include <string>#include "cv.h"#include "highgui.h"#include "cxmat.hpp"#include "cxcore.hpp"#include "math.h"using namespace std;using namespace cv;void Show_Image(Mat&, const string &);#endif // PS_ALGORITHM_H_INCLUDED/*This program will generategaussian blur and glass effect*/#include "PS_Algorithm.h"#include <time.h>using namespace std;using namespace cv;int main(){ string Img_name("9.jpg"); Mat Img_in; Img_in=imread(Img_name); Show_Image(Img_in, Img_name); Mat Img_out(Img_in.size(), CV_32FC3); Img_in.convertTo(Img_out, CV_32FC3); Mat temp; temp=Img_out.rowRange(100, 300); cv::GaussianBlur(temp, temp, Size(21,21), 0, 0); cv::GaussianBlur(temp, temp, Size(21,21), 0, 0); Img_out=Img_out/255.0; Show_Image(Img_out, "out"); imwrite("Out.jpg", Img_out*255); waitKey();}// define the show image#include "PS_Algorithm.h"#include <iostream>#include <string>using namespace std;using namespace cv;void Show_Image(Mat& Image, const string& str){ namedWindow(str.c_str(),CV_WINDOW_AUTOSIZE); imshow(str.c_str(), Image);}
原图
效果图
0 0
- OpenCV——高斯模糊与毛玻璃特效
- OpenCV——PS滤镜,毛玻璃特效
- Unity 毛玻璃效果(UGUI)—高斯模糊
- 实现图片高斯模糊以及高斯模糊布局 (毛玻璃特效)
- 高斯模糊 毛玻璃效果
- iOS图片高斯模糊 毛玻璃效果
- android 实时高斯模糊 毛玻璃效果
- 自定义的毛玻璃效果,高斯模糊
- IOS_毛玻璃效果、图片高斯模糊
- Unity GrabPass 实现高斯模糊毛玻璃
- 高斯模糊实现毛玻璃效果
- 高斯模糊 毛玻璃 可以调节模糊度
- OpenCV 高斯模糊
- iOS8中用UIVisualEffectView实现高斯模糊视图(毛玻璃效果)
- HTML5 JS实现毛玻璃效果(高斯模糊)
- Android实现高斯模糊(也叫毛玻璃效果)
- IOS 高斯模糊 (毛玻璃效果 UIVisualEffect)
- Android毛玻璃效果 获取系统截屏 高斯模糊
- 菜鸟nginx源码剖析数据结构篇(六) 哈希表 ngx_hash_t(上)
- 快速排序Java实现
- java数据类型
- 《unix高级环境编程》进程控制——进程时间
- lucene之 MMAnalyzer 中文分词组件
- OpenCV——高斯模糊与毛玻璃特效
- WEB服务器端口更改后Wordpress访问自动跳转老端口
- 菜鸟nginx源码剖析数据结构篇(七) 哈希表 ngx_hash_t(下)
- UVA - 10245 The Closest Pair Problem 分治法
- UML类图关系
- 2015互联网校招总结—一路走来
- VmWare 与 宿主主机通信 STEP BY STEP (适用于初学者)
- 多个线程访问共享对象和数据的方式
- C++类对象内存模型与成员函数调用分析(上)