数字图像处理实验(6):PROJECT 04-02,Fourier Spectrum and Average Value 标签: 图像处理MATLABfft 2017-05-07 23:1
实验要求:
Objective:
To observe the Fourier spectrum by FFT and the average value of an image.
Main requirements:
Ability of programming with C, C++, or Matlab.
Instruction manual:
(a) Download Fig. 4.18(a) and compute its (centered) Fourier spectrum.
(b) Display the spectrum.
(c) Use your result in (a) to compute the average value of the image.
实验中我们要观察图像进行FFT后的傅里叶频谱图,并且输出其均值。
代码:
%%
close all;
clc;
clear all;
%%
img = imread('gray_image.jpg');
imshow(img);
title('original image');
% 计算傅里叶变换
img_F = fft2(img);
[M, N] = size(img);
s = sum(abs(img_F(1:M, 1:N))); % 行求和
s = sum(s); % 列求和
ave = s / (M * N);
disp(['average value of image is: ',num2str(ave)]);
S = log(1 + abs(img_F));
% figure;
% plot(S);
% title('二维图像显示幅度谱');
x = 0:1:255;
y = 0:1:255;
[x, y] = meshgrid(x, y);
figure;
mesh(S);
title('三维图像显示幅度谱');
img_Q = angle(img_F);
% figure;
% plot(img_Q);
% title('二维图像显示相位谱');
x = 0:1:255;
y = 0:1:255;
[x, y] = meshgrid(x, y);
figure;
mesh(img_Q);
title('三维图像显示相位谱');
实验结果:
上图是原始图像。
上图是FFT之后3维幅度谱。
上图是FFT之后3维幅度谱。
均值。
数字图像处理实验(6):PROJECT 04-02,Fourier Spectrum and Average Value 标签: 图像处理MATLABfft 2017-05-07 23:1的更多相关文章
- 数字图像处理实验(总计23个)汇总 标签: 图像处理MATLAB 2017-05-31 10:30 175人阅读 评论(0)
以下这些实验中的代码全部是我自己编写调试通过的,到此,最后进行一下汇总. 数字图像处理实验(1):PROJECT 02-01, Image Printing Program Based on Half ...
- 080 01 Android 零基础入门 02 Java面向对象 01 Java面向对象基础 01 初识面向对象 05 单一职责原则
080 01 Android 零基础入门 02 Java面向对象 01 Java面向对象基础 01 初识面向对象 05 单一职责原则 本文知识点:单一职责原则 说明:因为时间紧张,本人写博客过程中只是 ...
- 数字图像处理实验(5):PROJECT 04-01 [Multiple Uses],Two-Dimensional Fast Fourier Transform 标签: 图像处理MATLAB数字图像处理
实验要求: Objective: To further understand the well-known algorithm Fast Fourier Transform (FFT) and ver ...
- 数字图像处理实验(16):PROJECT 06-03,Color Image Enhancement by Histogram Processing 标签: 图像处理MATLAB 2017
实验要求: Objective: To know how to implement image enhancement for color images by histogram processing ...
- 数字图像处理实验(15):PROJECT 06-02,Pseudo-Color Image Processing 标签: 图像处理MATLAB 2017-05-27 20:53
实验要求: 上面的实验要求中Objective(实验目的)部分是错误的. 然而在我拿到的大纲中就是这么写的,所以请忽视那部分,其余部分是没有问题的. 本实验是使用伪彩色强调突出我们感兴趣的灰度范围,在 ...
- 数字图像处理实验(14):PROJECT 06-01,Web-Safe Colors 标签: 图像处理MATLAB 2017-05-27 20:45 116人阅读
实验要求: Objective: To know what are Web-safe colors, how to generate the RGB components for a given jp ...
- 数字图像处理实验(12):PROJECT 05-03,Periodic Noise Reduction Using a Notch Filter 标签: 图像处理MATLAB 2017-0
实验要求: Objective: To understand the principle of the notch filter and its periodic noise reducing abi ...
- 数字图像处理实验(11):PROJECT 05-02,Noise Reduction Using a Median Filter 标签: 图像处理MATLAB 2017-05-26 23:
实验要求: Objective: To understand the non-linearity of median filtering and its noise suppressing abili ...
- 数字图像处理实验(10):PROJECT 05-01 [Multiple Uses],Noise Generators 标签: 图像处理MATLAB 2017-05-26 23:36
实验要求: Objective: To know how to generate noise images with different probability density functions ( ...
随机推荐
- Project://STARK
数据添加&编辑 删除&分页 搜索框功能 action批量操作 filter多条件过滤 pop_up弹窗
- Android Studio 开始运行错误
/******************************************************************************** * Android Studio 开 ...
- ENTRYPOINT 与 CMD
在Dockerfile中 ENTRYPOINT 只有最后一条生效,如果写了10条,前边九条都不生效 ENTRYPOINT 的定义为运行一个Docker容器像运行一个程序一样,就是一个执行的命令 两种写 ...
- 牛客网 PAT乙级(Basic Level)练习题 1023 考新郎
题目描述 过年期间,老家举行了一场盛大的集体婚礼,为了使婚礼进行的丰富一些,司仪临时想出了有一个有意思的节目,叫做“考新郎”,具体的操作是这样的: 1. 首先,给每位新娘打扮得几乎一模一样,并盖上大大 ...
- LeetCode Minimum Index Sum of Two Lists
原题链接在这里:https://leetcode.com/problems/minimum-index-sum-of-two-lists/description/ 题目: Suppose Andy a ...
- htaccess不起作用的解决方法,AllowOverride All打开后出现403错误时解决办法
在php程序的目录下有一个htaccess文件,这个文件起着对url重写的作用,但是不巧的,在我的应用程序里不起作用,baidu了一下,发现是 AllowOverride All, 这个选项没有打开 ...
- 常用Kerberos指令
1. 以超管身份进入kadminkadmin.local addprinc -randkey root/master1@JENKIN.COM //生成随机key的principal addprin ...
- Gradle 配置
下载Gradle https://gradle.org/releases/ https://services.gradle.org/distributions/gradle-4.4.1-bin.zip ...
- 数据校验(2)--demo1---bai
input_score.jsp <%@ page language="java" import="java.util.*" pageEncoding=&q ...
- springmvc----demo---login---bai
web.xml配置: <?xml version="1.0" encoding="UTF-8"?> <web-app version=&quo ...