Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Solar animation automatic alignment tool


Recommended Posts

Over the last 1.5 yrs I got really efficient at manual aligning of solar animation frames in GIMP, but plodding through 100+ frames is somewhat tiresome.

Fortunately I've recently found an elegant algorithm (http://en.wikipedia.org/wiki/Phase_correlation) for detecting image translation, which can be widely varying, the images severly cropped, in other words – exactly what we get after a few hour solar session with telescope buffeted by wind, drift due to imperfect polar alignment and lack of manual correction in time etc.

Attached is an early version of my tool implementing this algorithm. I've tested it on a few white light and Hα prominence animations and results are quite good:

before:

post-17321-0-77656600-1397936628.gif

after:

post-17321-0-65999800-1397936759.gif

before (animation by warpal http://astropolis.pl/topic/39586-slonce-w-h/page-26#entry533305):

post-17321-0-83151500-1397936842.gif

after:

post-17321-0-18310800-1397936868.gif

before:

post-17321-0-18468200-1397936921.gif

after:

post-17321-0-36140100-1397937231.gif

The simplest usage:

imgalt <input directory>
All BMP files in the specified directory are analyzed and saved after alignment (name suffixed with _aligned) in the current directory.

You can also choose the output directory:

imgalt <input directory> --output-dir <output directory>
8- and 24-bit BMP files are accepted on input. Output is saved as 8-bit (mono) BMPs.

Further information and help can be found in the README file.

Windows executable in imgalt.zip.

Source code in imgalt-src.zip.

Binary and sources can be freely distributed and used for all purposes. Latest version can be downloaded from

http://stargazerslounge.com/blog/1400/entry-1654-imgalt/

Link to comment
Share on other sites

  • Replies 36
  • Created
  • Last Reply

The workflow I use:

- align animation frames (i.e. sharpened stacks) with imgalt

- open aligned frames in GIMP (File->Open as Layers...)

- crop (select area, Image->Crop to Selection, this crops all layers), equalize layers' brightness if needed etc.

- export (File->Export as..., choose GIF, use "As Animation" option)

Link to comment
Share on other sites

Thank you for sharing this . I was wondering how to perform this very task the other day , it's the one thing (apart from the poor seeing) that has put me off attempting a timelapse animation.

I'm not particularly computer savvy so be prepared for a barrage of questions after I've fouled it up ...  :p

Link to comment
Share on other sites

That's what I'm here for, Steve :) If you just want results quickly without getting into details of command-line operation, follow these steps:

- create a directory, put your unaligned frames in BMP format in there

- copy imgalt.exe into the same directory and run it

- after a moment you should have "_aligned" files ready

Note:

- if you have frames in other format, IrfanView can quickly mass-convert them (File->Batch Conversion/Rename...)

- if you only have an animated GIF you'd like to reprocess, it can be split into BMP frames in VirtualDub (open the GIF, then File->Export->Image sequence...)

Link to comment
Share on other sites

That's the advantage of resisting progress and not actually getting a computer until you are fifty years old , I jumped straight from a 48k Spectrum to Windows 7 .....  :rolleyes:

All I need now is an hour or two of blue to play in , not looking hopeful for tomorrow but you never can tell ...  :p

Thank you once again .

Link to comment
Share on other sites

From now on I'll be uploading new versions (binaries and source code) on my SGL blog (as blog entries can be updated, but posts here cannot).

Link: http://stargazerslounge.com/blog/1400/entry-1654-imgalt/

New version 0.3:

- accepting 8- or 24-bit, mono or colour BMPs on input; Output files will be saved in the same color depth

- fixed problem with saving BMPs which sometimes produces files not accepted by Photoshop

See the README file for details.

Link to comment
Share on other sites

  • 3 weeks later...

Phase correlation is what I do .. it's also possible to perform scale and rotation too. I use a 10x alignment for stacking with interpolation. The current FFT PC I pipeline is doing 4 seconds for a 22MB image, but the new system I've written is returning sub 1 second for aligning RGBA (or four seperate images).

There are implementations of FFT PC from some of the image processing libraries.. but they don't perform full alignment with rotation.

The issue with PC is that it doesn't cope with warping.

Link to comment
Share on other sites

Hi Nick,

Yes, I guess I'll give the rotation detection a try when it comes to that (perhaps when I start shooting from an Alt-Az mount).

Right now I'm investigating alignment on the solar limb, when it's partially visible. Turns out it's not straightforward at all...

Link to comment
Share on other sites

Optic flow is probably a better analysis mechanism it will also work for the atmospheric distortion.

To show you what I mean, here I'm using optic flow on a solar sunspot - note the atmospheric movement:

Link to comment
Share on other sites

Any would do - all you need is to allow the length of the vectors to be analysed - small-medium local movements you'd warp before transform, longer vectors that signify issues or degradation of image information quality you'd then simply filter out by marking them non-processed (i.e. like an alpha mask).

Link to comment
Share on other sites

  • 2 months later...

Bunny god - are you doing white light imaging?

I'm actively doing something similar but in realtime for realtime viewing (http://stargazerslounge.com/topic/190363-bit-of-coding-and-my-383-is-now-an-integrating-video-camera-d/page-4)- could you post a couple of the sub-images up?

If you're getting random alignments then it's part of an issue I've identified and working on a solution for. In short it may be the glare saturation.

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.