That moment when you realise you’ve been handling ALL your image files wrongly (or 65,534 shades of Grey vs. 254)

Another post so soon?  Well I’ve discovered something and its pretty significant.  It’s really rather embarrassing, but well like I keep saying I REALLY don’t know what I’m doing and I try to pride myself on always admitting when I am wrong, (and if necessary apologising although on this occasion I don’t know who I’d apologise to.)

I recently discovered something about the free image processing software GIMP (photoshop for cheapskates) – it is 8 bit.  That means within the image every pixel has a value between 0 and 2^8-1 which is 255.  If it is 0 then the pixel is completely dark and if it is 255 then the pixel is completely saturated and there are 254 shades of grey between those two extremes.

I also recently discovered something about our camera, it is 16 bit, so each pixel has a value between 0 and 2^16-1 which is 65535 with 65534 shades of grey in between.

Unfortunately I’ve been using GIMP to stack and analyse our images.  So if the camera was reading 100 on a particular pixel out of a possible maximum 65535 then once you read the file from the camera into GIMP it will divide everything by 256.  The closest integer to 100/256 is zero.  If we were to stack 20 such images, then 20 times zero is still zero.  If you use a proper 16 bit software, you would have 20 x 100 which is a respectable 2000.

So basically we’ve been missing out on a heck of a lot of detail.  Luckily I’ve still got the original image files, so I’ve been spending the last part of my holiday re-analysing and stacking some of those old images.

The difference is remarkable:-


These two images come from exactly the same data, cropped very slightly differently.  The one on the left uses all 16 bits while the one on the right is only 8 bit.  So all this time we’ve been getting much better images than we thought.  This makes me even more eager to get out and look at more things, but the weather is awful.  Luckily I’ve got a UG project coming up with the telescope, so that will give me a chance to get some new images…

So I do feel like a bit of a fool but a relatively happy one…