parallel computing for an image stack

4 ビュー (過去 30 日間)
Jingtao
Jingtao 2025 年 3 月 12 日
回答済み: Edric Ellis 2025 年 3 月 12 日
Dear all,
I've got an image stack with the size of 1024 pixels *1024 pixels *1600 frames. I call it M(x,y,z). I'd like to do some computations like smooth and FFT for all the pixels simultaneously. I don't want to use parfor on CPU cores. How can I realize it using GPU?

採用された回答

Edric Ellis
Edric Ellis 2025 年 3 月 12 日
I'm not sure exactly what you're after here, but note that the gpuArray implementation of fft2 automatically applies to "pages" of a 3-dimensional array, like this:
x = ones(2, 2, 3, "gpuArray") .* reshape(1:3, 1, 1, 3)
x =
x(:,:,1) = 1 1 1 1 x(:,:,2) = 2 2 2 2 x(:,:,3) = 3 3 3 3
fft2(x)
ans =
ans(:,:,1) = 4 0 0 0 ans(:,:,2) = 8 0 0 0 ans(:,:,3) = 12 0 0 0

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by