Question: Please implement separate _ frequency.m Please do this in Matlab. The pseudocode is provided below for separate _ frequency.m and lab 0 4 .

Please implement separate_frequency.m
Please do this in Matlab.
The pseudocode is provided below for "separate_frequency.m" and "lab04.m", but please help implement "separate_frequency.m"
separate_frequency.m
function [low_pass_img, high_pass_img]=
separate_frequency(img, ratio)
%% apply FFT
frequency_map = fft2(img);
%% shift the frequency map
%% compute low-frequency mask
%% separate low-frequency and high-frequency maps
%% shift frequency maps back
%% apply Inverse FFT
low_pass_img = real(ifft2(frequency_map));
high_pass_img = real(ifft2(frequency_map));
end
Lab04.m
%% Task 1: Split Frequency
img = im2double(imread('images/lena.jpg'));
ratio =0.1;
[low_pass_img, high_pass_img]=separate_frequency(img, ratio);
imwrite(low_pass_img, 'lena_low_pass.jpg');
imwrite(high_pass_img +0.5, 'lena_high_pass.jpg');

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!