AForge学习笔记(9):AForge.Imaging.ComplexFilters
来源:互联网 发布:python 3.6中文教程 编辑:程序博客网 时间:2024/04/30 11:30
FrequencyFilter:频率过滤器,顾名思义,过滤器将图像一定范围内的频率通过,去除范围以外的部分。示例程序如下:
Bitmap bt = new Bitmap(@"C:\Users\GAOXIANG\Desktop\1.jpg");
int a = (Int32)Math.Log(bt.Width, 2);
int b = (Int32)Math.Log(bt.Height, 2);
Size size = new System.Drawing.Size((Int32)Math.Pow(2,a),(Int32)Math.Pow(2,b));
Bitmap bt1 = bt.Clone(new Rectangle(new System.Drawing.Point(0,0),size),PixelFormat.Format8bppIndexed);
// 创建复杂图像
ComplexImage complexImage = ComplexImage.FromBitmap(bt1);
// 进行正向傅立叶变换,即将图像从空间域向频率域转换
complexImage.ForwardFourierTransform();
// 通过频率范围创建过滤器
AForge.Imaging.ComplexFilters.FrequencyFilter filter = new AForge.Imaging.ComplexFilters.FrequencyFilter(new IntRange(20, 128));
// 频率过滤
filter.Apply(complexImage);
// 逆向频率域操作
complexImage.BackwardFourierTransform();
运行结果:
- AForge学习笔记(9):AForge.Imaging.ComplexFilters
- AForge学习笔记(9):AForge.Imaging.ComplexFilters
- AForge学习笔记(5):AForge.Imaging(上)
- AForge学习笔记(5):AForge.Imaging(下)
- AForge学习笔记(8):AForge.Imaging.ColorReduction
- AForge学习笔记(11):AForge.Imaging.Textures
- AForge学习笔记(8):AForge.Imaging.ColorReduction
- AForge学习笔记(10):AForge.Imaging.Filters
- AForge学习笔记(11):AForge.Imaging.Textures
- AForge学习笔记(2):AForge.Controls
- AForge学习笔记(4):AForge.Genetic
- AForge学习笔记(1):AForge
- AForge学习笔记(2):AForge.Controls
- AForge学习笔记(4):AForge.Genetic
- AForge学习笔记(3):AForge.Fuzzy
- AForge学习笔记(3):AForge.Fuzzy
- aforge.net
- AForge.Net
- SpringMVC 表单数据绑定
- 哪些手机用windows系统
- Android BluetoothProfile之A2dp
- C#接口详细解释和用法(通俗易懂)
- 阅读一款3D引擎的方法备忘
- AForge学习笔记(9):AForge.Imaging.ComplexFilters
- 关于acm的种种
- poj 1860
- Android的图片压缩类ThumbnailUtils,供源码研究 .
- Oracle_服务器客户端乱码问题.
- 函数对象
- 关于如何读代码
- 定制VIM
- 二分法查询数组元素