Relationship between frequency and spatial in digital images

今天又复习了一遍<<Digital Image Processing>>的第四章,为了加深对频域的理解,我自己用PS画了一张图。如下:

然后做FFT,得到频谱图如下:

从左到右依次表示:图像的频谱、频谱图往横轴的投影、频谱图往纵轴的投影。原图与频谱图的关系可以从两个角度来理解:

1、从横向来看,从中间的白线切一刀下来(其余部分为全零),得到一维图像是常数。根据时域和频域的对偶性,频域的图像相当于单位脉冲。

2、从纵向来看,相当于从图像纵向切一刀下来,得到的一维图像显然是单位脉冲,而单位脉冲的频谱无限宽。

本文对应的matlab代码如下:

function two_dim_fft()
f_src = imread(‘test2.bmp‘);
f_fft = fft2(double(f_src));
f_shift = fftshift(f_fft);

amplitude = log(1+abs(f_shift));
subplot(1,3,1),imshow(amplitude,[]),title(‘Spectrum‘);

dim1 = sum(amplitude,1);
subplot(1,3,2),plot(dim1),title(‘Horizontal project‘);

dim2 = sum(amplitude,2);
subplot(1,3,3),plot(dim2),title(‘Vertical project‘);
时间: 2024-10-03 13:33:19

Relationship between frequency and spatial in digital images的相关文章

计算机视觉算法与代码集锦

计算机视觉算法与代码集锦 计算机视觉是结合了传统摄影测量,现代计算机信息技术.人工智能等多学科的一个大学科,是一片开垦不足的大陆,路很远,但很多人都在跋涉! 本文转自CSDN(地址http://blog.csdn.net/whucv/article/details/7907391),是一篇很好的算法与代码总结文档,转载在此供大家学习参考. 原文如下: UIUC的Jia-Bin Huang同学收集了很多计算机视觉方面的代码,链接如下: https://netfiles.uiuc.edu/jbhua

MIT课程

8.02  Physics II (电磁学基础) Introduction to electromagnetism and electrostatics: electric charge, Coulomb's law, electric structure of matter; conductors and dielectrics. Concepts of electrostatic field and potential, electrostatic energy. Electric curr

计算机视觉与模式识别代码合集第二版three

计算机视觉与模式识别代码合集第二版three     Topic Name Reference code Optical Flow Horn and Schunck's Optical Flow   code Optical Flow Black and Anandan's Optical Flow   code Pose Estimation Training Deformable Models for Localization Ramanan, D. "Learning to Parse I

android audio开发的一些专用术语(待翻译)

Audio Terminology IN THIS DOCUMENT Generic Terms Digital Audio Hardware and Accessories Audio Signal Path Android-Specific Terms Sample Rate Conversion This document provides a glossary of audio-related terminology, including a list of widely used, g

Matlab filter常用函数

Filtering and Analysis Functions Filtering Function Description fftfilt Filters a signal with a digitalFilter using an FFT-based overlap-add method filter Filters a signal using a digitalFilter filtfilt Performs zero-phase filtering of a signal with

RFID Reader for the 125 kHz frequency

RFID Reader Basics The RFID reader continuously transmits a 125 kHz carrier signal using its antenna. The passive RFID tag, embedded in an id card for example, powers on from the carrier signal. Once powered on, the tag transmits, back to the reader,

[译]A Bayesian Approach to Digital Matting

最近在看关于Matting的文章,这篇论文算是比较经典的老论文了,所以翻译过来,阅读更加方便些. 文章翻译大部使用谷歌在线翻译,对其中小部分错误进行了修正. A Bayesian Approach to Digital Matting 1.Introduction In digital matting, a foreground element is extracted from a background image by estimating a color and opacity for t

ECE 425/525 Digital Signal Processing

ECE 425/525 Digital Signal ProcessingSpring 2019Dept. of Electrical and Computer Engineering Miami University1Homework 11 AssignmentWeights: 60ptsDue Date: May 10, 2019.Turn in Method: Turn in your report with your Matlab? program and other supportin

Digital Filter Design

Digital Filter Design Introduction The purpose of this book is to provide you with different theorethical and practical approaches to digital filter design. The book covers design of both finite and infinite impulse response filters. In addition, it