Home | Galleries | Articles | Reviews | Best Gear | Science | New | About | Contact |
sigma-clipped average davinci code is at:
http://clarkvision.com/articles/linux.for.photographers.software1/
Direct link: here.
If you install davinci http://davinci.asu.edu/ on linux, macs, or windows, this code should run. I adapted this code from some spectroscopy code I wrote. This version pulls all the images into memory. So for ten 20-megabyte images, it requires about 5.5 gigabytes (ram + virtual memory). I'll rewrite it when I get a chance and pull in one color channel at a time. That will reduce memory needs by almost 3x with small additional run time. It is a little slow: I do 3 iterations as I found it does a better job than ImagesPlus even using a higher clip level. On a I7-950 machine at 3 GHz, it takes about a minute per 20-megapixel RGB image and the code is not multi threaded.
I would love to see someone translate this to python.
Davinci reads some tif files issuing the following message which you can ignore:
SAMPLEFORMAT tag missing; assumptions will be made in data format determination
Davinci is scientific data language used in planetary and terrestrial sciences, where the common formats are not tif files (NASA PDS and other science image formats like vicar). It does have fits extensions, but seem difficult to get working so I have ignored that
Davinci also has a quirk which the developers have not yet fixed. It can't write multi-band 16-bit tiffs, so I write png files. But davinci writes png with 16-bit signed integers. So I then read the png result into photoshop and and use levels tool, moving the right slider to 128 and write a tiff.
From a command line, if the images to stack are tiffs, run:
davinci.sigma-clip-average sigma 2.0 -png -images *.tif
And relax for a while. The above is case sensitive. If you try this on windows, please let me know if it works.
With davinci you can also easily subtract a dark frame. No need for commercial software. And if there are any developers out there who want to contribute code or fixes, I am sure the Mars team at ASU would be accepting.
Linux for Photographers:
Home | Galleries | Articles | Reviews | Best Gear | Science | New | About | Contact |
http://clarkvision.com/articles/linux.for.photographers.software1/davinci.sigma-clip-average-notes.html
First Published Sept. 3, 2016
Last updated Sept. 3, 2016.