I get this kind of error in highpass filter code(Undefined function or method 'LPF_football' for input arguments of type 'double')

2 views (last 30 days)
clc clear all close all
footBall1=imread('C:\Users\shankar\Documents\MATLAB\filtering\lowpass\ship.jpg'); footBall=rgb2gray(footBall1); footBall=footBall(:,:,1); % Grab only the Red component to fake gray scaling imshow(footBall) PQ = paddedsize(size(footBall)); D0 = 0.05*PQ(1); H = hpfilter('gaussian', PQ(1), PQ(2), D0); % Calculate the HPF F=fft2(double(footBall),size(H,1),size(H,2)); % Calculate the discrete Fourier transform of the image HPF_football=real(ifft2(H.*F)); % multiply the Fourier spectrum by the LPF and apply the inverse, discrete Fourier transform HPF_football= LPF_football(1:size(footBall,1), 1:size(footBall,2)); % Resize the image to undo padding figure, imshow(HPF_football, []) which functionName % Display the Fourier Spectrum Fc=fftshift(F); % move the origin of the transform to the center of the frequency rectangle S2=log(1+abs(Fc)); % use abs to compute the magnitude (handling imaginary) and use log to brighten display figure, imshow(S2,[])

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!