[其他] 影像弱化的頻域問題

作者: sherry470 (sherry)   2016-12-05 02:54:28
最近在學習用MATLAB處理影像
在做影像弱化的時候遇到一些問題想請教大家
我想把一個影像讀入後做FFT轉換,在頻域和degradation function相乘
再把相乘後的影像做反FFT轉換,得到一個比較模糊的影像
degration function:
http://i.imgur.com/I8a2LUP.png
以下是我的主程式:
clear
clc
close all
image_rgb = imread('original.png'); % read the image
image_gray = rgb2gray(image_rgb); % transform RGB image into grayscale
fp = motion(image_gray); %degradation
figure,fftshow(fp, 'abs'); % show the image
title('After');
函數motion就是做影像處理的部分:
function fp = motion(f)
% (M,N)
作者: kevio (成仔)   2016-12-05 11:44:00
NaN應當指定為1 我信中寫錯了

Links booklink

Contact Us: admin [ a t ] ucptt.com