- https://www.mathworks.com/matlabcentral/answers/44112-is-paddedsize-the-matlab-command#answer_97424
- https://www.mathworks.com/matlabcentral/mlc-downloads/downloads/submissions/32384/versions/1/previews/MIDAS_2010/paddedsize.m/index.html
- https://www.cs.uregina.ca/Links/class-info/425-nova/Lab5/
It's showing Unrecognized function or variable 'paddedsize'. Error in Untitled (line 7) PQ = paddedsize(size(footBall)); error
조회 수: 41 (최근 30일)
이전 댓글 표시
footBall=imread('football.jpg');
%Convert to grayscale
footBall=rgb2gray(footBall);
imshow(footBall)
%Determine good padding for Fourier transform
PQ = paddedsize(size(footBall));
%Create a Gaussian Lowpass filter 5% the width of the Fourier transform
D0 = 0.05*PQ(1);
H = lpfilter('gaussian', PQ(1), PQ(2), D0);
% Calculate the discrete Fourier transform of the image
F=fft2(double(footBall),size(H,1),size(H,2));
% Apply the highpass filter to the Fourier spectrum of the image
LPFS_football = H.*F;
% convert the result to the spacial domain.
LPF_football=real(ifft2(LPFS_football));
% Crop the image to undo padding
LPF_football=LPF_football(1:size(footBall,1), 1:size(footBall,2));
%Display the blurred image
figure, imshow(LPF_football, [])
% Display the Fourier Spectrum
% Move the origin of the transform to the center of the frequency rectangle.
Fc=fftshift(F);
Fcf=fftshift(LPFS_football);
% use abs to compute the magnitude and use log to brighten display
S1=log(1+abs(Fc));
S2=log(1+abs(Fcf));
figure, imshow(S1,[])
figure, imshow(S2,[])
댓글 수: 0
채택된 답변
Adam Danz
2021년 6월 24일
paddedsize is not a Matlab function.
A quick google search resulted in these two leads that may be helpful to identify that function:
I think the 3rd link refers to your code. There's a link within that link that points to the paddedsize function.
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!