Username:

Password:

Altair AstroDIO DehumidifiersAtik CamerasModern AstronomyDavid HindsNe3 Filters

Author Topic: Combination modes for stacked images  (Read 3253 times)

0 Members and 1 Guest are viewing this topic.

Offline MartinB

  • Senior Member
  • ****
  • Posts: 666
Combination modes for stacked images
« on: 13:53:16, 26 October, 2006 »
There is so much terminology to learn!!  I have sussed out quite a bit but still haven't got to grips with the different modes used for stacking images - average, sum, median. sigma clipped. max-min.  etc  Could someone give an explaination to a simpleton like me, when to use what sort of combine and why.  I will sleep easier if I finally get to discover what sigma clipping is :roll:
Martin

10"LX200R, ED120, ED80, ZS66, Tak EM200,  SXVH9 and SXV guidehead

Lots of bits

Offline tasco

  • The Regulars
  • Full Member
  • ***
  • Posts: 383
    • astro rejects
Re: Combination modes for stacked images
« Reply #1 on: 14:47:46, 26 October, 2006 »
i look forward to reading the answers myself- LOL
if at 1st you dont succeed- join the club!

Offline the fordster

  • Galactic Poster
  • ******
  • Posts: 20128
  • while (!(succeed=try ()));
    • 56 Degrees North
Re: Combination modes for stacked images
« Reply #2 on: 14:56:54, 26 October, 2006 »
Mentioned this in another post somewhere...

In theory, the best way is to average combine. If you have 5 frames, and the pixel values are averaged, you get a real accurate result...

I.e. 45, 47, 46, 42, 44 = 224/5 = 44.8

However, if something happens, like a plane with lights blazing goes through your image (well, the area of sky you're imaging :lol:), it throws it all out. Your values may be

38, 44, 45, 51, 1442, so the average is 1620/5 = 324

That plane has completely skewed the average.

Now that's why folks use a median combine - It lines up the numbers from low to high and takes the middle one...

i.e. for that same set 38, 44, 45, 51, 1442, so the middle value is 45.

It's good at getting rid of that plane, but it's still lower than the true value.

The way I use is a min/max excluded average.

It lines up all the image pixel values, throws away the top and bottom ones, and averages the rest, to get a really accurate value, i.e. using that same set...

38, 44, 45, 51, 1442

The 38 and 1442 would be discarded, and the rest averaged

44, 45, 51 = 140 / 3 = 46.67

The min/max excluded average will get you great combinations, but it follows that accuracy will only increase if the number of images you take increases too - So take as many subs as possible!

Hope this helps...

Offline MartinB

  • Senior Member
  • ****
  • Posts: 666
Re: Combination modes for stacked images
« Reply #3 on: 15:09:49, 26 October, 2006 »
Thanks Andy, that's very helpful.  So median selects the pixel value which is commonest is that right?  And sigma clipped and sum???
Martin

10"LX200R, ED120, ED80, ZS66, Tak EM200,  SXVH9 and SXV guidehead

Lots of bits

Offline the fordster

  • Galactic Poster
  • ******
  • Posts: 20128
  • while (!(succeed=try ()));
    • 56 Degrees North
Re: Combination modes for stacked images
« Reply #4 on: 15:26:40, 26 October, 2006 »
median just lines them up and picks the one in the middle - Doesn't care (doesn't know!) whether it's too high or too low...

A sigma clipped average image derives it's pixel values from the average of the values left over, after rejecting those outside of a given number of standard deviations of the initial average (the SD is derived from looking at the whole data set for that pixel)...

Summing just adds the values of the pixels together. It increases shadows data, but will increase noise too - And if you have anything bright, it'll just wash out.

i.e. if an image consists of values from 0 (black) to 255 (white), something that has a grey pixel (120) and another image with a grey pixel (115) - will be summed to a near white pixel - 120+115 = 235. See why it's easy to saturate an image by adding! :o

Offline MartinB

  • Senior Member
  • ****
  • Posts: 666
Re: Combination modes for stacked images
« Reply #5 on: 15:37:15, 26 October, 2006 »
YES! Thanks Andy :big_clap:  I now understand sigma clipped average! 
Martin

10"LX200R, ED120, ED80, ZS66, Tak EM200,  SXVH9 and SXV guidehead

Lots of bits

Offline the fordster

  • Galactic Poster
  • ******
  • Posts: 20128
  • while (!(succeed=try ()));
    • 56 Degrees North
Re: Combination modes for stacked images
« Reply #6 on: 16:14:52, 26 October, 2006 »
Cool :cool: Glad to help. We should mebbe make this one a sticky if folk think it's useful?

Offline ngwillym

  • Full Member
  • ***
  • Posts: 399
    • Haven Observatory
Re: Combination modes for stacked images
« Reply #7 on: 18:45:14, 26 October, 2006 »
Sudden thought, the sum about getting a white out if you sum images only applies if you are summing to a max of 255 shades.

My Watec produces 256 shades, but outputs 16 bit Fits files. You can sum these much further as the white level is 2**16 (64k) levels

Have I got this right ???
Neil G
50.8920° N, 1.4530° W
Scopes: Celestron C11 Fastar, Opticstar 127mm Apo, Celestron SLT 102, Celestron Travelscope 70
Mounts: Skywatcher EQ8, Skywatcher EQ5+Synscan, Celestron SLT 102
Cameras: QHY5L-IIM, DFK21AU, AVS DSO-1, Watec 120n, Sony A100/A580
Eyepieces: Quark Chromosphere, Parks Gold, Lumicon GEG

Offline dciobota

  • Daniel
  • Galactic Poster
  • ******
  • Posts: 9722
Re: Combination modes for stacked images
« Reply #8 on: 18:56:01, 26 October, 2006 »
 Yep you're right, if your max image output is 256 and you have 256 images to sum, then a 16 bit summing and result image is enough range to sum them all up without washing out anything.

 Fordy, your explanation is by far the most concise and clear I've ever seen on the subject of stacking algorithms, this well deserves a top place in the stickies posts imo!  :urock:

 This should be required reading for anyone starting stacking.
PLEASE REMOVE ME

Offline mcrossley

  • Poster God
  • *****
  • Posts: 2721
  • Wilmslow, Cheshire
    • Wilmslow Astro
Re: Combination modes for stacked images
« Reply #9 on: 19:07:35, 26 October, 2006 »
Andy is right but there are a couple of things about formats.

Averaging only works properly if you use floating point pixel values, otherwise you end up with rounding errors.

Adding gives the same result as averaging - but again there is a risk of 'overflowing' the values - or better if teh average uses interger values.  Using 32 bit integers, or floating points for the pixel values fixes the overflow problem.

Whatever number format you use you would noramlly scaled back the images to 16 bit FITS format for saving to disk - if you want to transfer between programs.  Floating point and 32bit formats tend to be harder to open in programs other than those that created them.
Mark
C14 SCT + Hyperstar » SV4 Apo » MI-250 + Gemini » QHY8 » QHY5 » ToUcam
http://www.wilmslowastro.com/

Offline the fordster

  • Galactic Poster
  • ******
  • Posts: 20128
  • while (!(succeed=try ()));
    • 56 Degrees North
Re: Combination modes for stacked images
« Reply #10 on: 19:54:21, 26 October, 2006 »
Thanks, Dan :cool:

Neil, as Dan says, you're absolutely right. In that post, my bit depths bounce about a bit (obviously 16 bit for the one where I mention the plane), but I was referring to Photoshop's standard scale of 255 white levels for the summing one.

If you have 16 bits, figures like 128 won't white out. However, the scale still holds true. Two images, each with pixels at half brightness (in 16 bit, this would be 32, 768) would give a full brightness summed image.

Mark makes some real valid points - In my averages, you can see that the figures coming out are not integers, so these need floating point accuracy.

Mind you, even with rounding to the nearest integer, it's easy to see why averaging - assuming no outliers - gives the best image with the less chance of random errors (noise), but the only way to be sure is to lose those min/max figures and average the rest ;)

Offline the fordster

  • Galactic Poster
  • ******
  • Posts: 20128
  • while (!(succeed=try ()));
    • 56 Degrees North
Re: Combination modes for stacked images
« Reply #11 on: 09:29:03, 21 November, 2006 »
BTW, following on from recent work, I have to say that although a min/max excluded average is a good statistical algorithm for stacking, a sigma clipped average is proving real good! But, (as ever) you need a lot of subs.

However, if you have the patience/clear skies to take them, it seems you can push the resulting combination far harder in processing...

Offline KeithT

  • Galactic Poster
  • ******
  • Posts: 4250
  • Sickly yellow or starburst white?
    • Astronomy Matters
Re: Combination modes for stacked images
« Reply #12 on: 10:43:51, 22 November, 2006 »
Great thread guys  :big_clap:

I guess a lot of us tend to know what works by experience and experiment - its really good to 'start' getting to grips with what it all actually means.
Thanks
Celestron CPC800 - StarSense - Feathertouch - ES & WO 2" EPs
Lunt LS50Ha - BF600 - EQ5 - QHY5P-11c

www.astronomymatters.co.uk

 

ukbuysellRemote Imaging from AustraliaSharpSkyblank APTUKAI on Facebook
Powered by SMF 2.0.13 | SMF © 2006, Simple Machines LLC
DarkBreak by DzinerStudio. Theme modified by The UKAI Team

Page created in 0.156 seconds with 37 queries.
TinyPortal © 2005-2012