Wider is best for astrophotography — perceive the fundamentals of bit depth and dynamic vary for higher astrophotos.
Earlier than you’ll be able to have a correct understanding of what it means to stretch your picture, you might want to make certain you perceive what your picture is manufactured from: numbers. That’s it . . . tons and many numbers. Each pixel has a quantity that corresponds to how shiny the pixel ought to seem. Small numbers are darkish, and enormous numbers are shiny. Monochrome (black and white) photographs have only one quantity per pixel; colour photographs have three numbers, one every for the purple, inexperienced, and blue contribution. Easy, proper?
Bits of Knowledge
The subsequent factor to contemplate is how these numbers are represented by a pc. The reply to that’s bits. The extra bits, the bigger the quantity you’ll be able to signify. A single bit might be zero or 1. Black or white. Not a lot variation in there. We’d might name this extraordinarily low dynamic vary.
A pc represents a quantity as a complete string of bits, like this:
That is truly the quantity 42. The extra bits or locations you could have, the extra distinctive mixtures of 1’s and zero’s are doable, and thus the extra numbers might be represented. Primarily, each permutation of 1’s and zero’s is a singular numeric worth. How this works is fascinating, however past the scope of an astrophotography weblog. Observe, I’m going to neglect unfavorable numbers right here, in addition to one thing referred to as “endianness” . . . I’m not a sadist. This weblog just isn’t for people who find themselves already engineers!
Two bits can retailer the numbers from zero to three, three bits can retailer the numbers from zero to 7, and so forth, with extra bits supporting exponentially bigger numbers. It’s not terribly vital that you just perceive this; simply bear in mind, extra bits equals bigger numbers . . . and much extra variation in tone values that may be recorded or saved.
The smallest reminiscence location on a pc is Eight bits in a row, referred to as a byte, which represents a quantity between zero and 255. The quantity 5 could require solely three bits, however it has to go in a reminiscence location that’s not less than Eight bits extensive. All of the main bits are simply zero.
00000101 (5 in binary)
Some vital numbers that come up on the subject of picture information and cameras are:
Eight bits can maintain a quantity from zero to 255.
12 bits: zero to 4095
14 bits: zero to 16,383
16 bits: zero to 65,535
The extra bits you could have, the subtler variations in tonal values and intensities you’ll be able to have, and the bigger values you’ll be able to retailer. We name the big vary of values in a picture its dynamic vary. Extra dynamic vary is at all times higher when it comes time to start out processing your photographs.
Computer systems work in multiples of bytes (Eight bits), so in case you can’t match a quantity in an Eight-bit reminiscence location, it’s a must to use two Eight-bit reminiscence areas subsequent to one another (or extra because the numbers get even bigger!). The quantity 256, for instance, would truly devour a minimal of two bytes of storage, like so:
There’s an vital concept right here: A quantity that requires 9 bits is definitely going to require 16 bits of storage.
Most conventional photographs in your laptop are Eight-bit photographs, holding depth numbers between zero and 255 for every colour channel. (Normally these are referred to as 24-bit photographs, however every channel actually solely has Eight bits). This restrict happens as a result of most laptop shows additionally help solely Eight bits per channel, and that means the picture maps on to your display screen. Monochrome photographs have the identical worth in every colour channel… so they are surely JUST Eight-bit photographs in your display screen. Most uncooked photographs from a DSLR or astrophotography digicam include 16-bit pixels holding values that may technically vary from zero to 65,535, however they should be scaled right down to the zero to 255 vary earlier than they are often displayed.
To this point so good?
Decoding Bit Depth
We talked last month about how camera sensors count photons. Every pixel in a digicam’s detector can maintain a sure variety of electrons earlier than it overflows or tops out. No matter what number of photons a pixel can maintain, they’re counted utilizing 12, 14, or 16 bits after they’re learn off the chip. The extra bits per pixel, the dearer it’s to make the chip. This is a vital issue when making an attempt to maintain prices down and likewise an vital issue within the dynamic vary in tonality that the digicam can seize.
When that information is learn off of most cameras, the numbers go into both one-byte containers (zero to 255, bear in mind), or two-byte containers (16 bits, or zero to 65,535). A digicam that reads out Eight-bit picture values could nicely have a 12-bit or extra sensor, however it has to scale that quantity down to suit into an Eight-bit reminiscence location on the pc. A 16-bit picture would have every pixel worth divided by 256! Many planetary cameras will return Eight-bit picture information to hurry issues up (with half the bits, there’s half the info to maneuver), whereas deep-sky imagers at all times want 16-bit information from their digicam.
Right here’s an vital takeaway: Digicam sensors could help nearly any bit depth, however digicam information in your laptop is nearly at all times Eight or 16 bits. Even when a digicam produces 14-bit information (most DSLR’s do that, for instance), the info could be saved as 16-bit pixels within the file.
In a uncooked DSLR file with 14-bit information, the main two bits are zero; the 14 bits that signify the pixel worth comply with. If a pixel have been utterly saturated (with a price of 16,383), it will be represented like this:
Now for the enjoyable half: To show this picture on a pc, we’ve got to scale this big quantity down to suit into solely Eight bits, and to do that correctly, we have to know information’s precise bit depth. For a 14-bit digicam, we’d divide the pixel values by 64. If we didn’t know that the info was saved in 14-bit pixels, we would attempt to scale the total vary of 65,525 right down to 255, and we’d divide the quantity by 256! This is able to compress and darken our picture, because the pixel values would vary from zero to 64 as a substitute of the total vary from zero to 255. The outcome could be a really darkish picture (assuming it was well-exposed to start with).
For much more enjoyable, many cameras will learn out, say, 12- or 14-bit values from the sensor, however then scale them as much as make them vary from zero to 65,535. On some CCD cameras, the digicam acquire could serve this extra goal.
The automated scaling works nicely and requires little person intervention when a picture is uncovered with loads of mild. Alas in astrophotography, most of our pixel values are small to start with, and we’ve got to brighten the info by some means. Brightening photographs might be executed linearly or non-linearly, and we’ll get to that subsequent month.