-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Hi,
I am testing using this amazing software for the deconvolution of light-sheet microscope images. Recently, a paper is published in this regard. I managed to port the PSF generation part from Matlab to python. However, porting the deconvolution method to python will be very GPU inefficient if it is done on the python side and using CPU. (Since the image stack should be moved to GPU memory and back to CPU memory several times).
The deconvolution function has a damping component to allow the deconvolution of low-resolution images.
function deconvolved = deconGPU(stack, psf, niter, damping)
deconvolved = stack;
psf_inv = psf(end:-1:1, end:-1:1, end:-1:1); % spatially reversed psf
R = 1/26 * ones(3, 3, 3, 'single');
R(2,2,2) = single(0);
for i = 1 : niter
denom = convGPU(deconvolved, psf);
denom(denom < eps('single')) = eps('single'); % protect against division by zero
if damping == 0
deconvolved_new = convGPU(stack ./ denom, psf_inv) .* deconvolved;
else
deconvolved_new = (1 - damping) .* convGPU(stack ./ denom, psf_inv) .* deconvolved ...
+ damping .* convn(deconvolved, R, 'same');
end
endThe damping parameter is a ratio between 0 and 1. I was wondering will you be able to implement this with Cuda directly and make it available in both cudaDecon and pycudaDecon?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels