Hamming filter to reduce ringing artifact in image
Show older comments
Hello all,
I have a low-resolution image (sLR) which is generated by selecting the central part of the reference high-resolution image (sHR) in the frequency (k-space) domain in row-direction. When I zero-pad this low-resolution image in frequency-domain, I get ringing artifact in the spatial domain as it is expected. I try to remove this artifact by filtering the image using Hamming window. Please see my code below. I have doubts about applying fft and ifft to the image and also filtering process, and I would be thankful if someone could please review my code.
My second question is when I use iffft, the output image usually has negative intensities. For further processing in the Spatial domain, is that okay if I normalize the image intensity in a way that the minimum intensity of the image is 0? or should I use the absolute of the image?
% sHR: HR reference image
n = size(sHR,1);
kspHR = fftshift(fft(sHR,n,1),1)/n; % HR image in k-space
% Generating LR image (LR in row-direction)
kspLR = kspHR((n/2)-(n/4)+1:(n/2)+(n/4),:);
sLR = real(ifft(ifftshift(kspLR,1),n,1)))*n; % this image has negative intensity values?
% Zero-padding
a = floor(size(kspLR,1)/2);
kspZP = padarray(kspLR, a ,'both');
sZP = real(ifft(ifftshift(kspZP,1),n,1)))*n;% image with Ringing artifact
% Apply Hamming filter to Zero-padded kspace image (kspZP)
[r,c]=size(abs(kspZP));
w = hamming(r);
W = repmat(w,[1,c]);
kspHM = W.*kspZP
sHM = real(ifft(ifftshift(kspHM,1),n,1)))*n; % Filtered image in spatial domain
Accepted Answer
More Answers (0)
Categories
Find more on Matched Filter and Ambiguity Function in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!