Jump to content

SkySurveyBanner.jpg.21855908fce40597655603b6c9af720d.jpg

Home-brew software for LR deconvolution.


michael.h.f.wilkinson

Recommended Posts

I have put together a little command line Linux program that performs LR deconvolution with Gaussian PSFs. The code is really very simple and it is pretty fast (3Mpixel image in a couple of seconds for 50-100 iterations). Just had a quick test on some pretty cruddy data from the summer of 2013 in Tuscany (boiling seeing).

Raw data:

post-5655-0-01507300-1414003631.png

LR Deconvolution sigma= 1.5, iterations= 25

post-5655-0-98276900-1414003731.png

Quite decent given the bad input. I also tested it on an earlier mosaic with artificial blur, and it could recover a result pretty close to the original. I am going to wrap a little GUI around this code, and allow users to control batch processing from in by loading multiple images. I am planning cross-platform portable code which can handle many bit depths and I/O formats.

Link to comment
Share on other sites

  • Replies 25
  • Created
  • Last Reply

Michael, as you may have picked up from some of my posts, I'm purely visual (and determined to stay that way, by the way!) so the language/code you use is a foreign tongue to me.

But I have eyes and I enjoy, very much, seeing the images you and others share. They are in a language I understand.

Power to you.

Link to comment
Share on other sites

Looks like it works very well Michael. I'm in the same boat as Floater, a purely visual observer with no aspirations of starting imaging but someone who enjoys seeing the output of others on here. I'm also curious and interested in understanding as much about it as possible.

With that in mind, is there a layman's explanation of what this routine is doing?

Stu

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Looks like it works very well Michael. I'm in the same boat as Floater, a purely visual observer with no aspirations of starting imaging but someone who enjoys seeing the output of others on here. I'm also curious and interested in understanding as much about it as possible.

With that in mind, is there a layman's explanation of what this routine is doing?

Stu

Sent from my iPhone using Tapatalk

I have posted an explanation here:

http://stargazerslounge.com/topic/228147-lucy-richardson-deconvolution-so-what-is-it/

Link to comment
Share on other sites

Very nice work Michael. The results are crisp without being over the top

sent from my Sony Xperia Z2

That seems to be the secret, sharp results but very natural looking still. Highly effective

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Cheers guys. For a Mac version I can provide source code plus instructions on how to compile it. I might be able to get it to work on the Mac one of my colleagues, in which case I could distribute an executable. I am not quite sure how to package it for distribution, however

Link to comment
Share on other sites

I have put together a little command line Linux program that performs LR deconvolution with Gaussian PSFs. The code is really very simple and it is pretty fast (3Mpixel image in a couple of seconds for 50-100 iterations). Just had a quick test on some pretty cruddy data from the summer of 2013 in Tuscany (boiling seeing).

Early GPU version - non optimised seems to give 17.1 MB image in 0.4 second for 50 iterations using the existing primitives. Optimisation would be making the PSF a local memory workgroup memory lookup would make it faster still.

Link to comment
Share on other sites

Great work on the coding Michael. If you need another to test let me know. Sadly I am Windows only for this kind of stuff. We make embedded Linux devices at work (data loggers, routers, that type of stuff) but I don't know it would run on one of those and our Linux server is a tad old.

Robin

Link to comment
Share on other sites

Early GPU version - non optimised seems to give 17.1 MB image in 0.4 second for 50 iterations using the existing primitives. Optimisation would be making the PSF a local memory workgroup memory lookup would make it faster still.

This is the kind of workload that GPUs like, typical SIMD parallelism. However, as I tell my students: first get it to work, then get it to work fast. Besides, CUDA machines are not generally that good at double precision math (it is getting better), which is really what I like to use to avoid numerical instability.

In your example, what pixel data type was used?

Link to comment
Share on other sites

This is the kind of workload that GPUs like, typical SIMD parallelism. However, as I tell my students: first get it to work, then get it to work fast. Besides, CUDA machines are not generally that good at double precision math (it is getting better), which is really what I like to use to avoid numerical instability.

In your example, what pixel data type was used?

LR really needs double working, as you're hinting at, this was float as a quick metric. I can enable the khr double support for a quick test this morning. ATI isn't much better than CUDA, nor is Intel's own OpenCL support (although their commercial compiler does a far far better job at CPU based optimisation).

I found that GPUs work best with float or float4.. especially as apple's drivers for OpenGL only support specific formats and I'm sharing OpenCL and OpenGL objects.

The annoying thing is the lack of GPU j0 or j1 support so if I wanted to load the kernels with more maths to reduce the size of data (local workgroup memory is very small compared to the images it's processing!

I'll also explore sharpening the stack - so as the stacking continues, it's iterating further - this may allow the reduction of the number of iterations per stack addition..

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.