필터 지우기
필터 지우기

fft of large 3d volume

조회 수: 1 (최근 30일)
Chris Walker
Chris Walker 2012년 9월 3일
I am using the new partial read of a matfile to do a 3d fft of a large volume, as it is too large to fit into memory. I am testing on a smaller volume to start with. First I fft the volume (matObj.X) slice by slice, then I do an fft in the remaining dimension in a second pass and put the output into a temporary matfile. The first pass takes about 2 seconds and the second pass takes about twenty minutes. I assume the second pass takes so much longer because the data in the final dimension is not in a sequence on disc. Is there any way to speed up the second pass? Code is below, I hope it is understandable! Thanks in advance. Chris W.
tic
wbh = waitbar(0,'fft first pass');
for i = 1:sz(3)
slice = double(matObj.X(:,:,i));
fftOut1 = fft2(slice);
localMatObj.x3real(:,:,i) = real(fftOut1);
localMatObj.x3imag(:,:,i) = imag(fftOut1);
waitbar(i/(sz(3)), wbh);
end
close(wbh);
toc
tic
wbh = waitbar(0,'fft second pass');
for i = 1:sz(1)
for j = 1:sz(2)
fftOut2 = fft(complex(localMatObj.x3real(i,j,:),localMatObj.x3imag(i,j,:)));
localMatObj.x3real(i,j,:) = real(fftOut2);
localMatObj.x3imag(i,j,:) = imag(fftOut2);
end
waitbar(i/(sz(1)), wbh);
end
close(wbh);
toc

답변 (0개)

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by