图像处理傅里叶变换图像变化

What do Fourier Transforms do? What do the Fourier modes represent? Why are Fourier Transforms notoriously popular for data compression? These are the questions this article aims to address using an interesting analogy to represent images.

傅立叶变换有什么作用? 傅立叶模式代表什么? 为什么众所周知,傅立叶变换在数据压缩方面很受欢迎? 这些是本文旨在使用有趣的类比表示图像来解决的问题。

Images are digital paintings. They are made up of different features. Some features require really precise control of the brush like drawing whiskers on a dog. Others can be quickly filled in with a thick brush, like a clear blue sky. All images are a combination of fine and dull features to varying degrees, i.e. high-frequency and low-frequency features.

图像是数字绘画。 它们由不同的功能组成。 一些功能需要真正精确地控制画笔,例如在狗上绘制胡须。 其他人可以用浓密的刷子快速填充,例如湛蓝的天空。 所有图像在不同程度上都是精细特征和暗淡特征的组合,即高频和低频特征。

let’s take a moment to understand how frequencies crept up into our analysis. Imagine the sine wave over half a period. It slowly goes up reaches a maximum and then slowly diminishes. The higher the frequency of the sine, the narrower the wave.

让我们花一点时间来了解频率是如何爬升到我们的分析中的。 想象一下半个周期的正弦波。 它缓慢上升达到最大值,然后缓慢减小。 正弦频率越高,波形越窄。

Photo by William Felker on Unsplash
威廉·费尔克在Unsplash上的照片

Imagine a cursed painter, who can only paint with brushes whose tips are half-wave sines. If he were to draw a delicately fine feature like the whiskers on a dog, he would choose a brush with a sine which has high frequency i.e. a narrowly pointed brush. Similarly, if he were to paint a clear sky that is devoid of any finer details, he would choose a brush with low frequency i.e. a fat thicker one.

想象一个被诅咒的画家,他只能用笔尖是半波正弦的画笔进行绘画。 如果要在狗身上画出细微的特征(如胡须),他会选择频率较高的正弦画笔,即窄尖的画笔。 同样,如果他要绘制没有任何精细细节的晴朗天空,则他会选择频率较低的画笔,即较厚的脂肪。

Higher the frequency, narrower the peaks.
频率越高,峰越窄。

Surprisingly, all the images to ever exist are just like the artwork of the cursed painter. Notably, Fourier showed that every image (signal) can be decomposed into a range of sinuous terms where each term has a magnitude. The magnitudes are called Fourier coefficients. The whole process of decomposing an image into various sine terms and concomitantly their magnitudes is called Fourier decomposition. Fourier series is a much more general scenario, where the signals to be decomposed are periodic. Fourier Transforms are special cases where signals have an infinite time-period, i.e. non-periodic.

令人惊讶的是,所有存在的图像都像被诅咒的画家的作品一样。 值得注意的是,傅立叶(Fourier)表明,每个图像(信号)都可以分解为一系列正弦项,其中每个项都有一个大小。 幅度称为傅里叶系数。 将图像分解为各种正弦项及其幅度的整个过程称为傅里叶分解。 傅立叶级数是一种更为通用的方案,其中要分解的信号是周期性的。 傅立叶变换是信号具有无限时间周期(即非周期性)的特殊情况。

One elegant and fast algorithm to do the above decomposition is the Fast Fourier Transform, which is arguably the most important algorithm to be developed in the 21st century. It has far-reaching applications in cellular communications, satellites, films, televisions, and much more.

快速傅立叶变换是完成上述分解的一种优雅而快速的算法,它可以说是21世纪最重要的算法。 它在蜂窝通信,卫星,电影,电视等领域具有广泛的应用。

To visualize the sinuous nature of images, it would be interesting to plot the magnitude of an image as if it were a surface plot and observe the top view of the contours. This idea was developed by Dr. Steven Brunton at the University of Washington.

为了可视化图像的弯曲性质,将图像的大小绘制为表面图并观察轮廓的俯视图将很有趣。 这个想法是华盛顿大学的史蒂文·布伦顿博士提出的。

The plot uses a photo by Jakob Kac on Unsplash.
剧情使用雅各布• 凯克 ( Jakob Kac)在“ Unsplash”上的照片 。

The sinuous nature of the image is clearly visible. the high-frequency features are sharply visible as narrow peaks. These include the eyes, the outlines of the facial structure, and the outline of the human hand. The low-frequency features, which are usually huge stretches of uniform color, are observed in the background. These include large regions of black colored fur and the background.

图像的弯曲性质清晰可见。 高频特征清晰可见为窄峰。 这些包括眼睛,面部结构轮廓和人手轮廓。 通常在背景中观察到低频特征,通常是巨大的均匀颜色延伸。 其中包括黑色毛皮和背景的大区域。

Here, is the simple code to replicate the prior results.

这是复制先前结果的简单代码。

The source code to animate the surface plot is included in my Github, here!

我的Github中包含了动画曲面图的源代码, 在这里 !

This is called as the bed sheet view of the image. The idea behind the name is that if four people were holding each side of a bedsheet and begin oscillating it at one of the Fourier frequency with the corresponding magnitude and a similar setup with four people exists for each of the infinite Fourier modes, then the superposition of all the bedsheets would result physically in creases which look like the above image. Hence, the name, bed sheet view!

这称为图像的床单视图。 该名称背后的想法是,如果四个人拿着床单的每一侧,并开始以相应的幅度以傅立叶频率之一进行振荡,并且对于每个无限傅立叶模式都存在四个人的相似设置,则该叠加所有的床单都会在物理上导致皱纹,看起来像上面的图像。 因此,名称,床单视图!

Okay, now that a good intuition is developed to understand what Fourier transforms can do, its a good exercise to go over these ideas formally. The Fourier decomposition equation for a discrete signal looks like:

好的,现在已经发展出一种很好的直觉来理解傅立叶变换可以做什么,这是一个很好的练习,可以正式地研究这些想法。 离散信号的傅立叶分解方程如下:

Here, xn is the value of the signal at time n. Xk is the Fourier coefficient for each frequency k. N is the total number of samples of the signal (i.e. the number of discrete time steps over which the signal was recorded). The FFT algorithm returns the Xk values for each frequency. The complex exponential can be decomposed into sines and cosines using the Euler’s formula. This provides a sanity check to the intuitions developed so far.

在此,xn是时间n处的信号值。 Xk是每个频率k的傅立叶系数。 N是信号采样的总数(即记录信号的离散时间步长)。 FFT算法返回每个频率的Xk值。 可以使用欧拉公式将复指数分解为正弦和余弦。 这为到目前为止开发的直觉提供了健全的检查。

For example, let’s build a sinuous signal out of multiple frequencies. Say a combination of sines with 50, 100, and 200 hertz as frequencies and at different proportions. The periodic nature is still visible, but it is really hard to understand the original frequency components by visualizing the signal in the time domain.

例如,让我们从多个频率构建一个正弦信号。 说出频率分别为50、100和200赫兹的正弦组合。 周期性仍然是可见的,但是通过在时域中可视化信号很难理解原始频率分量。

The Fourier Transform helps to intuitively visualize the signals in the frequency domain. So, applying the Fourier decomposition on the above signal gives us the following plot.

傅立叶变换有助于直观地可视化频域中的信号。 因此,对上述信号进行傅立叶分解可得出以下曲线。

The true frequencies of the mixture at 50, 100, and 200 Hz show peaks in the frequency domain as expected. Notably, the FFT algorithm can also give the weightage of each frequency component, without having any prior knowledge of the signal.

混合物在50、100和200 Hz的真实频率如预期的那样在频域中显示出峰值。 值得注意的是,FFT算法还可以给出每个频率分量的权重,而无需事先了解信号。

Ah, yes! the notorious one line FFT command. In MATLAB, it’s even simpler, just fft() without any imports.
是的! 臭名昭著的单行FFT命令。 在MATLAB中,它甚至更简单,只是没有任何导入的fft()。

Now going back to the bedsheet view of images, every picture is a 2-dimensional signal on which the Fourier decomposition can be applied. If a slice of the image is taken, it would resemble the time domain signal from our example, however with its own frequency components. The bedsheet views are powerful to develop intuition behind how an image can be a simple signal in the time domain, with multiple dimensions.

现在回到图像的床单视图,每张图片都是一个二维信号,可以对其进行傅立叶分解。 如果拍摄图像的一部分,它将类似于我们示例中的时域信号,但是具有自己的频率分量。 床单视图功能强大,可以直观地理解图像在时域中如何成为具有多个维度的简单信号。

In general, the information-dense regions are made up of high-frequency terms and plain stretches of uniformity are made up of lower frequency terms. The genius of Fourier is deriving the weighted modes (or frequency — magnitude pair). This gives an idea to understand the most important modes which make up the image. Turns out the Pareto rule holds true here and a really small number of modes contain most of the information about the image. This principle is crucial to data compression. By ignoring the majority of modes, we could reduce the size of the image. However, the quality of the image is only slightly compromised.

通常,信息密集区域由高频项组成,均匀性的平坦范围由低频项组成。 傅立叶的天才在于推导加权模式(或频率-幅度对)。 这给出了一个了解构成图像的最重要模式的想法。 事实证明,帕累托规则在这里成立,很少有模式包含有关图像的大多数信息。 该原理对于数据压缩至关重要。 通过忽略大多数模式,我们可以减小图像的大小。 但是,图像的质量只会略有下降。

If you are interested in going more in-depth on how Fourier Transforms are used for data compression, or to understand why data is compressible, to begin with, check out my previous article. As always, reach out to me to continue the conversation or provide me with some feedback on the content.

如果您想更深入地了解如何使用傅里叶变换进行数据压缩,或者想了解为什么数据是可压缩的,那么请阅读我的上一篇文章 。 与往常一样,请与我联系以继续对话或向我提供有关内容的反馈。

翻译自: https://towardsdatascience.com/fourier-transforms-and-bed-sheet-view-of-images-58ba34e6808a

图像处理傅里叶变换图像变化


http://www.taodudu.cc/news/show-994936.html

相关文章:

  • 滞后分析rstudio_使用RStudio进行A / B测试分析
  • unity3d 可视化编程_R编程系列:R中的3D可视化
  • python 数据科学 包_什么时候应该使用哪个Python数据科学软件包?
  • 熊猫tv新功能介绍_您应该知道的4种熊猫绘图功能
  • vs显示堆栈数据分析_什么是“数据分析堆栈”?
  • 广告投手_测量投手隐藏自己的音高的程度
  • python bokeh_提升视觉效果:使用Python和Bokeh制作交互式地图
  • nosql_探索NoSQL系列
  • python中api_通过Python中的API查找相关的工作技能
  • 欺诈行为识别_使用R(编程)识别欺诈性的招聘广告
  • nlp gpt论文_GPT-3:NLP镇的最新动态
  • 基于plotly数据可视化_[Plotly + Datashader]可视化大型地理空间数据集
  • 划痕实验 迁移面积自动统计_从Jupyter迁移到合作实验室
  • 数据开放 数据集_除开放式清洗之外:叙述是开放数据门户的未来吗?
  • 它们是什么以及为什么我们不需要它们
  • 机器学习 啤酒数据集_啤酒数据集上的神经网络
  • nasa数据库cm1数据集_获取下一个地理项目的NASA数据
  • r语言处理数据集编码_在强调编码语言或工具之前,请学习这3个基本数据概念
  • 数据迁移测试_自动化数据迁移测试
  • 使用TensorFlow概率预测航空乘客人数
  • 程序员 sql面试_非程序员SQL使用指南
  • r a/b 测试_R中的A / B测试
  • 工作10年厌倦写代码_厌倦了数据质量讨论?
  • 最佳子集aic选择_AutoML的起源:最佳子集选择
  • 管道过滤模式 大数据_大数据管道配方
  • 用户体验可视化指南pdf_R中增强可视化的初学者指南
  • sql横着连接起来sql_SQL联接的简要介绍(到目前为止)
  • 如何击败Python的问题
  • 数据冒险控制冒险_劳动生产率和其他冒险
  • knn 邻居数量k的选取_选择K个最近的邻居

图像处理傅里叶变换图像变化_傅里叶变换和图像床单视图。相关推荐

  1. python 图像变化检测_霍夫变换检测图像直线算法python实现

    创作不易,如果对您有帮助,帮忙点赞哦! 一. 霍夫变换理解: 二. 霍夫变换简介: 霍夫变换,是将坐标由直角坐标系变换到极坐标系,然后再根据数学表达式检测某些形状(如直线和圆)的方法.当 l1直线 上 ...

  2. Java编写图像浏览器_浏览器下载图像(JAVA代码)

    03-07阅读8103 简介: JavaWeb下载文件通常分为两种类型,一种是浏览器可以识别的文件类型,例如.txt,.excel,.zip等,可以通过使用以下链接来实现标签,但图片下载确实很麻烦. ...

  3. python plot 图像大小_设置matplotlib图像的figsize和dpi

    我们可以通过两个参数来控制matplotlib图像的大小,在创建figure对象的时候,有figsize和dpi. figsize是一个tuple,用来指定width和height的inch: dpi ...

  4. (数字图像处理MATLAB+Python)第四章图像正交变换-第一节:离散傅里叶变换

    文章目录 一:一维离散傅里叶变换 (1)定义 (2)实例 二:一维快速傅里叶变换 (1)定义 (2)实例 三:二维离散傅里叶变换 (1)定义 (2)程序 四:二维离散傅里叶变换的性质 (1)可分性 ( ...

  5. java 图像傅里叶变换_傅里叶变换在图像处理中的作用

    傅立叶变换在图像处理中非常的有用.因为不仅傅立叶分析涉及图像处理的很多方面,傅立叶的改进算法, 比如离散余弦变换,gabor与小波在图像处理中也有重要的分量. 印象中,傅立叶变换在图像处理以下几个话题 ...

  6. 图像处理基础操作三(图像直方图、傅里叶变换)

    目录 一.图像直方图 1.直方图 2.直方图均衡化 二.傅里叶变换 1.Numpy实现傅里叶变换与傅里叶逆变换 2.OpenCV实现傅里叶变换与傅里叶逆变换 3.高通滤波器 4.低通滤波器 一.图像直 ...

  7. 图像的傅里叶变换,二维傅里叶变换的物理意义

    从现代数学的眼光来看,傅里叶变换是一种特殊的积分变换.它能将满足一定条件的某个函数表示成正弦基函数的线性组合或者积分.在不同的研究领域,傅里叶变换具有多种不同的变体形式,如连续傅里叶变换和离散傅里叶变 ...

  8. 【外文翻译】图像中的傅里叶变换

    转载自:[外文翻译]图像中的傅里叶变换 写在前面:这是我在外网看到的一篇较为易懂.详细的介绍了图像中的傅里叶变换的一篇文章,翻译过来给大家分享一下.适读人群为对机器视觉感兴趣的初学者.为了可读性,没有 ...

  9. 3_一幅图像,经过傅里叶变换后,将高频部分删除,再进行反变换,设想一下将会得到什么结果?...

    一幅图像,经过傅里叶变换后,将高频部分删除,再进行反变换,设想一下将会得到什么结果? 在频谱图上,白色的斑点.噪声和边界等会表现为高频部分,所以通过滤去高频,可以降噪(图像的频谱函数统计特征:图像的大 ...

最新文章

  1. 个人重构之一般用户实现
  2. 【Android 性能优化】应用启动优化 ( 启动优化项目 | 界面启动时间 | 启动优化项目 | 方法追踪 MethodTracing )
  3. 三、linux内核驱动裁剪
  4. windows设置右键sublime Text3
  5. pythonwhile循环love_input和while循环——Python编程从入门到实践
  6. 前端学习(713)创建数组
  7. 【转载】interpolation(插值)和 extrapolation(外推)的区别
  8. java8 nio_Java8之 NIO的学习
  9. 解决idea修改html、js、css后,浏览器不能同步加载
  10. 【Python】处理UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0xa2 in position…
  11. ubuntu下mysql整个数据库备份与还原
  12. java实验三多态性_Java实验3 类的多态性和接口
  13. 如何防范和应对Redis勒索,腾讯云教你出招
  14. iOS端im实时音视频功能快速开发实操指导!
  15. oracle中日期格式的注意事项
  16. 北大青鸟python学费_北大青鸟学费贵吗,北大青鸟学费标准_北大青鸟综合校区为您解答...
  17. matlab小波变换,图像处理
  18. C语言——计算单词个数
  19. 502粘到手上变硬了怎么办_急手被502胶水粘住了怎么办?
  20. 猫抓老鼠c语言程序,猫抓老鼠问题C++实现一例(约瑟夫环问题)

热门文章

  1. 不愧是Alibaba技术官,java数组实现单向链表
  2. 搞懂开源框架设计思想真的这么重要吗?终获offer
  3. ES6笔记 -- 字符串拓展
  4. BZOJ4868 Shoi2017期末考试(三分+贪心)
  5. linux—命令汇总
  6. camera驱动框架分析(上)
  7. python基础教程(十一)
  8. 软件工程之系统顺序图
  9. iBatis.Net异步多线程 操作Ibatis报错
  10. linux shell 获取本机ip 写入文件