Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %addpath([pwd], 'util/');
- img = imread('raster_schwan.png');
- for channel = 1:3
- IMG = fftshift(fft2(img(:,:,channel)));
- [sx, sy] = size(IMG);
- subplot(2, 2, channel);
- %imshow(abs(IMG) ./ max(abs(IMG)));
- sigma = 1.5;
- h = fspecial('gaussian', [sx, sy], sigma);
- H = abs(fftshift(fft2(h)));
- %H = zeros(sx, sy);
- %H = fill_circle(H, sx/2, sy/2, 30, 1);
- IMG = IMG .* H;
- imshow(abs(IMG) ./ max(abs(IMG)));
- IMG = ifftshift(IMG);
- img(:,:,channel) = uint8(real(ifft2(IMG)));
- end
- subplot(224);
- imshow(img);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement