New version 0.4 has been released.
Download from http://stargazerslounge.com/blog/1400/e ... processor/
New features:
- Image sequence alignment via solar limb stabilization
- FITS files support (load/save)
- Zooming in/out of the view
Enhancements:
- View scrolling by dragging with the middle mouse button
- Logarithmic histogram setting is preserved
Bug fixes:
- Tone curve in gamma mode not applied during batch processing
Limb alignment is finally here - for animations that show a lot (the more, the better) of the limb. While the regular phase correlation alignment tends to keep your sunspots/proms/filaments stationary and moves the limb around, this will keep the disc steady (to show the rotation nicely).
Let me demonstrate on my last year's surge animation (Lunt 35); the first link uses phase alignment, the other – limb alignment:
Note that for now it will not work for eclipse shots.
The function expects input images with the disc brighter than the background, without strong vignetting or exaggerated limb darkening (e.g. during processing). So if you want to make them fully or part-inverted (or strongly darkened using low gamma), you must do it after the alignment. However, the images should be already sharpened before alignment (it will work on unsharpened stacks, but not as well).
In other news, FITS format is now supported (including alignment input/output). When saving, you can choose 8-bit, 16-bit or 32-bit floating-point.
Last but not least, the quite obvious feature of zooming the view in/out has been added. You can do it similarly to popular graphics apps: via menu, toolbar buttons or by using Ctrl+mouse wheel. The view can be also scrolled by dragging it with the middle mouse button (usually the wheel).
Screenshots:
ImPPG version 0.4 – limb alignment and FITS support
- GreatAttractor
- Almost There...
- Posts: 976
- Joined: Sat Jun 01, 2013 1:04 pm
- Location: Switzerland
- Has thanked: 782 times
- Been thanked: 776 times
- marktownley
- Librarian
- Posts: 44628
- Joined: Tue Oct 18, 2011 5:27 pm
- Location: Brierley Hills, UK
- Has thanked: 23839 times
- Been thanked: 12169 times
- Contact:
Re: ImPPG version 0.4 – limb alignment and FITS support
This is super! Thanks! I particularly like the align to limb feature, very effective!
I'll keep this here for a couple of days so it gets as much interest as possible then move it to the solar reference library.
I'll keep this here for a couple of days so it gets as much interest as possible then move it to the solar reference library.
http://brierleyhillsolar.blogspot.co.uk/
Solar images, a collection of all the most up to date live solar data on the web, imaging & processing tutorials - please take a look!
- GreatAttractor
- Almost There...
- Posts: 976
- Joined: Sat Jun 01, 2013 1:04 pm
- Location: Switzerland
- Has thanked: 782 times
- Been thanked: 776 times
Re: ImPPG version 0.4 – limb alignment and FITS support
You're welcome, Mark.
Some technical information on the limb alignment...
1) Locating the disc
From the start I assumed everything needs to happen automatically. I know (also from my own example) that users are put off when there's too many switches, sliders etc. Sure, at some point you would perhaps be willing to learn all the program's internals and tricks, but certainly not when in the "I've got beautiful fresh data, need to process NOW!" frame of mind. So ImPPG does a pretty good job (not perfect - note the "no vignetting" requirement) of deciding what's the threshold of brightness that separates disc from the background (identified by a quite simple analysis of the image's histogram), without resorting to a "choose background threshold" slider.
Next, it shoots a number of rays starting at the image's centroid ("center of mass") and for each ray identifies a point with the most steep brightness transition (calculated over a small interval). Not all those points are in fact on the limb; some may lie inside the disc, but on an edge of a big sunspot or a dark filament. The decision on which points to discard is based partly on the steepness of their transition, and also on the minimal fraction of neighboring background pixels (that's what we need the treshold for) - a more "topological" criterion.
It took some time to make it acceptably watertight. E.g. one of Michael Wilkinson's images with a white-hot surging AR right on the limb invalidated an older, simpler criterion.
Once we're sure we have a few actual limb points, it's easy to fit a circle to them; I use Gauss-Newton least squares approach which is quick and converges reliably – if there's enough of the limb visible. If there's just a short arc, it may diverge.
2) Aligning the discs
Since we capture the whole timelapse with the same telescope/Barlow/camera, the disc on every image should have the same diameter – correct? So alignment should be straightforward, just find the points, fit circles to them and translate the images to overlap the circles.
...wrong.
It turns out that disc radii differ slightly between images, I guess due to seeing and stacking variability. Not by much, some 2-5%, but when the disc is 1000 pixels wide, this would translate to multi-pixels jumps.
To alleviate this, all the discs are fitted to limb points again, but with the radius forced to equal the average of the radii found before. This unfortunately is still not sufficient. Below is an example path taken by a disc feature at this phase of alignment:
Therefore one final step is needed, basically what a human would do during manual alignment: select some high-contrast feature, track its movement across the disc and smooth it out. Note that the track in question can be an elliptical arc (if there's no field rotation) or a more complicated curve (with field rotation). I simplified this and just assumed it's always a circular arc. So I take the subsequent track's points (as in the graph above), fit a circle to them and project them onto this circle. Now the overall movement is acceptably smooth. (Tracking the contrasty feature's movement is performed using phase correlation with a small 128x128 ROI, so it's really quick).
The relevant code can be found in align_disc.cpp and align_proc.cpp (including more detailed comments).
Some technical information on the limb alignment...
1) Locating the disc
From the start I assumed everything needs to happen automatically. I know (also from my own example) that users are put off when there's too many switches, sliders etc. Sure, at some point you would perhaps be willing to learn all the program's internals and tricks, but certainly not when in the "I've got beautiful fresh data, need to process NOW!" frame of mind. So ImPPG does a pretty good job (not perfect - note the "no vignetting" requirement) of deciding what's the threshold of brightness that separates disc from the background (identified by a quite simple analysis of the image's histogram), without resorting to a "choose background threshold" slider.
Next, it shoots a number of rays starting at the image's centroid ("center of mass") and for each ray identifies a point with the most steep brightness transition (calculated over a small interval). Not all those points are in fact on the limb; some may lie inside the disc, but on an edge of a big sunspot or a dark filament. The decision on which points to discard is based partly on the steepness of their transition, and also on the minimal fraction of neighboring background pixels (that's what we need the treshold for) - a more "topological" criterion.
It took some time to make it acceptably watertight. E.g. one of Michael Wilkinson's images with a white-hot surging AR right on the limb invalidated an older, simpler criterion.
Once we're sure we have a few actual limb points, it's easy to fit a circle to them; I use Gauss-Newton least squares approach which is quick and converges reliably – if there's enough of the limb visible. If there's just a short arc, it may diverge.
2) Aligning the discs
Since we capture the whole timelapse with the same telescope/Barlow/camera, the disc on every image should have the same diameter – correct? So alignment should be straightforward, just find the points, fit circles to them and translate the images to overlap the circles.
...wrong.
It turns out that disc radii differ slightly between images, I guess due to seeing and stacking variability. Not by much, some 2-5%, but when the disc is 1000 pixels wide, this would translate to multi-pixels jumps.
To alleviate this, all the discs are fitted to limb points again, but with the radius forced to equal the average of the radii found before. This unfortunately is still not sufficient. Below is an example path taken by a disc feature at this phase of alignment:
Therefore one final step is needed, basically what a human would do during manual alignment: select some high-contrast feature, track its movement across the disc and smooth it out. Note that the track in question can be an elliptical arc (if there's no field rotation) or a more complicated curve (with field rotation). I simplified this and just assumed it's always a circular arc. So I take the subsequent track's points (as in the graph above), fit a circle to them and project them onto this circle. Now the overall movement is acceptably smooth. (Tracking the contrasty feature's movement is performed using phase correlation with a small 128x128 ROI, so it's really quick).
The relevant code can be found in align_disc.cpp and align_proc.cpp (including more detailed comments).
- swisswalter
- Way More Fun to Share It!!
- Posts: 17948
- Joined: Thu Feb 06, 2014 4:28 am
- Location: Switzerland
- Been thanked: 1 time
- Contact:
Re: ImPPG version 0.4 – limb alignment and FITS support
Hi Filip
thank you very much. I'll dive into it
thank you very much. I'll dive into it
Only stardust in the wind, some fine and some less fine scopes, filters and adapters as well. Switzerland 47 N, 9 E, in the heart of EUROPE
from 7 am - 7 pm http://www.nanosys.ch
from 7.01 pm - 6.59 am http://www.wastronomiko.com some times vice versa
from 7 am - 7 pm http://www.nanosys.ch
from 7.01 pm - 6.59 am http://www.wastronomiko.com some times vice versa