• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

matlab计算图像相位

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

%% ========================================================================
%% Title:
% 1) Importance of phase in images
% 2) Verification of Fig 6.2 of [1]
%% Author:
% Ankit A. Bhurane ([email protected])
%% Expression:
%
% Original images and their Fourier transforms:
%
% Space domain <=> Spatial Frequency
%
% I1(x,y) => |F1(w)| exp(j* <F1(w));
% I2(x,y) => |F2(w)| exp(j* <F2(w));
%
% Inverse Fourier transforms with phases exchanged:
%
% R1(x,y) <= |F1(w)| exp(j* <F2(w));
% R2(x,y) <= |F2(w)| exp(j* <F1(w));
%
%% Observations:
% Phase plays a vital role in capturing the changes within an image. If
% phases of the two images are interchanged, the complete image appears to
% be different.
%
%% References:
% [1] Oppenheim, Willsky, Nawab, "Signals and Systems", PHI, Second edition
%% Last Modified: Sept 26, 2013.
%% Copyright (c) 2013-2014 | Ankit A. Bhurane
%% ========================================================================

clc; clear all; close all;

% Read original images
VMG = imread(\'VMG.png\');
SSG = imread(\'SSG.png\');

% Fourier transforms of corrsponding images
F_VMG = fftn(VMG);
F_SSG = fftn(SSG);

% Isolate magnitude and phase of input images
M_VMG = abs(F_VMG); P_VMG = angle(F_VMG);
M_SSG = abs(F_SSG);P_SSG = angle(F_SSG);

% Take inverse Fourier transforms with phase exchanged
I_VMG = ifftn(M_VMG.*exp(1j*P_SSG)); I_SSG = ifftn(M_SSG.*exp(1j*P_VMG));

% Show Image
subplot 221; imshow(VMG); title(\'Prof. V.M. Gadre (VMG)\');
subplot 222; imshow(SSG); title(\'Prof. Somnath Sengupta (SSG)\');
subplot 223; imshow(uint8(I_VMG)); title(\'Magnitude of VMG, Phase of SSG\');
subplot 224; imshow(uint8(I_SSG)); title(\'Magnitude of SSG, Phase of VMG\');

%% ========================================================================


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
rust crates 国内镜像加速配置 - 荣锋亮发布时间:2022-07-18
下一篇:
Rust问答之Cargo是什么发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap