imagej-ops icon indicating copy to clipboard operation
imagej-ops copied to clipboard

Richardson-Lucy deconvolution returns empty image for 16-bit input

Open igorpisarev opened this issue 6 years ago • 3 comments

I've been experimenting with the deconvolution ops and observed quite strange behavior of RichardsonLucyF/RichardsonLucyTV: when I call it with a 16-bit 3d image and a PSF, the op returns an empty image (all zeroes). It finally worked as expected when I converted the input image to FloatType. I think it'd be helpful to document it somewhere, or, even better, automatically convert the inputs to the expected type and then convert the result back to the original type.

igorpisarev avatar Dec 07 '18 18:12 igorpisarev

Hi @igorpisarev thanks for the feedback. I agree it would be helpful to convert the inputs to the expected type automatically and will put this on my todo-list.

By the way, what is your use case?? The latest work on ops-deconvolution has been put in an experimental repository called ops-experiments. In it there are several examples showing how to build and call native code from ops. There is a much faster CPU version of Richardson Lucy that uses MKL, and a very fast GPU version using Cuda. There is also an example showing how to split and deconvolve large images on the GPU using imglib2-cache. And finally there is an example showing how to use @eczech 's tensor flow implementation of RL, from imagej-ops. If any of this is useful to you, and you have questions, feel free to reach out to me here, or on the image-sc forum.

bnorthan avatar Dec 10 '18 12:12 bnorthan

In addition there are several examples showing how to use ops-deconvolution in the Fiji script editor, under 'Templates->Deconvolution'

bnorthan avatar Dec 10 '18 12:12 bnorthan

Thanks @bnorthan! My use case is to run the deconvolution on the cluster for a large collection of images, as a part of a larger workflow. I didn't know about the ops-experiments repo so I'll look into that, and thanks for the pointer!

igorpisarev avatar Dec 10 '18 14:12 igorpisarev