フィルターのクリア

Fourier transform of multiple ROI not working

2 ビュー (過去 30 日間)
Russell Chow
Russell Chow 2021 年 10 月 4 日
The for loop plots 30 ROI on my image, calculates the FFT of an demeaned ROI, and stores it in a 3D matrix. I then average and normalize all my fft transformed ROIs. However, when i go to plot my image, I am not sure what I am doing wrong here. My plot should be donut shaped.
for i = 1:nROI
rectBW = createMask(drawrectangle(gca, 'Position', [x1(i),y1(i),ROIsize,ROIsize]));
roi = NoiseImg1;
roi(rectBW == 0) = 0;
r = mean(roi);
demean_roi = roi - r;
NPS1 = fftshift(fft2(demean_roi)).^2;
NPSdata1(:,:,i) = NPS1;
end
avgNPS1 = mean(NPSdata1,3) .* (voxelspace(1)^2/(ROIsize^2));
figure; %Nx = Ny = image size, fs = 1/pixelsize
imagesc([-(fs/2) (fs/2) * (Nx-2)/Nx], [-(fs/2) (fs/2) * (Ny-2)/Ny], abs(avgNPS1)); colorbar; colormap hot;
title('NPS 1 (mm^2*HU^2)'); axis image;
xlabel('Spatial Frequency in X (mm^{-1})'); ylabel('Spatial Frequency in Y (mm^{-1})');

回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Filtering and Enhancement についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by