View Full Version : how does bit depth look like?
mister3d 01012010, 11:50 PM Hi guys. I'm bad at maths, but I want to understand the bit depth of am image.
So 8 bits per channel look like 8 digits?
01101110
And 10 bits per channel look like 10 digits?
1000101111
And 24 bits per pixel look like 24 digits correspondingly?
I simply don't know what is the small digit means over the number, I'm simply zero at maths.


scrimski
01022010, 12:02 AM
Usually 8 bit refers to the color depth per channel which is he same like 24 bit for all three together.
mister3d
01022010, 12:08 AM
Usually 8 bit refers to the color depth per channel which is he same like 24 bit for all three together.
Thanks, I read about that, but I don't understand how the bit depth looks visually in numbers. Is it just a row of numbers like 10011001 for a 8bit per channel?
scrimski
01022010, 12:14 AM
I'm no expert with this, but in my understanding it's like that. There is probably something more involved than just simple binary math, but I don't know in which way(and don't care too much because stuff like this makes my head explode).
S novim godom
sc
mister3d
01022010, 01:10 AM
I'm no expert with this, but in my understanding it's like that. There is probably something more involved than just simple binary math, but I don't know in which way(and don't care too much because stuff like this makes my head explode).
S novim godom
sc
I tebya. :)
As my mate explained to me, it's really that simple as a binary row of 01 numbers, simply put (4 digits for 4bit). But for a mathematical convenience, it has a number+degree representation, where 2 is a binary system, and the degree is how many times we multiply that number by itself to get all possible variants.
noouch
01022010, 01:02 PM
Fixed point will almost always be a positive binary number with the amount of bits specified, like this for an 8bit channel:
00101101
The precision is always fixed.
Floating point is a bit more complicated. It normally contains a sign bit and an exponent, explained here:
http://en.wikipedia.org/wiki/Floating_point
The result is decreased precision in higher numerical ranges, but since the most important range is normally between 0 and 1 and 16/32 bits are precise enough, banding is pretty much nonexistent.
mister3d
01032010, 02:30 AM
Fixed point will almost always be a positive binary number with the amount of bits specified, like this for an 8bit channel:
00101101
The precision is always fixed.
Floating point is a bit more complicated. It normally contains a sign bit and an exponent, explained here:
http://en.wikipedia.org/wiki/Floating_point
The result is decreased precision in higher numerical ranges, but since the most important range is normally between 0 and 1 and 16/32 bits are precise enough, banding is pretty much nonexistent.
What do you mean by a "positive number"?
"The precision is always fixed"  sorry not clear. :blush:
About the floating point it is an interesting point. What I need is simply to understand how it looks generally, not in much details. Anyway I will never touch the image code directly, so those points are just to clarify to get the basic "whatisunderthehood" for compositing. Thank you for your time.
pingking
01032010, 07:32 AM
if you just want the basic "whats under the hood" then it is enough that you know the difference between interger und floating point numbers.
interger values can have only a certain amount of values (8bit means 256 values, 16bit means 65.536 values) but will never be able more then 1 or below 0
flaoting point is a bit harder to explain, but it simply means more precision and you want lost values if the go above 1 or under 0 (super brights and negative values)
mister3d
01032010, 07:45 AM
if you just want the basic "whats under the hood" then it is enough that you know the difference between interger und floating point numbers.
interger values can have only a certain amount of values (8bit means 256 values, 16bit means 65.536 values) but will never be able more then 1 or below 0
flaoting point is a bit harder to explain, but it simply means more precision and you want lost values if the go above 1 or under 0 (super brights and negative values)
Yeah man, I know what the difference between floating point and "standard" image is, because I work in 3d, so I'm familiar with HDRI. So this part was easy to understand. But I never bothered understanding what 8bit per channel and per pixel mean, as those concepts are importnant in compositing. Now that I do, I wanted to understand for myself why it differs despite it is "more precise".The bit's theory explained to me why, as now I understand what bit is and how 8bit differs from 16bit for example. The floating point formula is interesting, but I have a hard time understanding mathematical formulas,a s I'm an artist (bad at maths).
beaker
01032010, 06:01 PM
Integer means the color values of a single pixel can only be represented by an integer number. So an 8 bpc RGB image has 3 channels and allows up to 256 different values per channel and they are all given the numbers 1256(all int's). Those numbers are assigned a greyscale level where 1=black and 256=white(on a screen).
We need more flexibility to define white and black and even grey. So in comes floating point values for color. So typically in float we assign:
black=0
18% grey=.5
white=1
White/Black are usually defined from a color chart shot on set. An integer image is an even number of steps between 1256, well now in a float we can add extra values of color where it is needed. In photography the most information that is needed is at the bottom and top of the curve so you don't get banding.
Float also allows for values below black in the negatives and also white values above 1. In an integer world 256 is white and that's it, there is nothing above it. Which typically leads to clipping of sky's and other bright objects.
There isn't any limit to the bit depth of a Float, though 16/32 bit ones are the most common flavors.
mister3d
01032010, 11:44 PM
Integer means the color values of a single pixel can only be represented by an integer number. So an 8 bpc RGB image has 3 channels and allows up to 256 different values per channel and they are all given the numbers 1256(all int's). Those numbers are assigned a greyscale level where 1=black and 256=white(on a screen).
We need more flexibility to define white and black and even grey. So in comes floating point values for color. So typically in float we assign:
black=0
18% grey=.5
white=1
White/Black are usually defined from a color chart shot on set. An integer image is an even number of steps between 1256, well now in a float we can add extra values of color where it is needed. In photography the most information that is needed is at the bottom and top of the curve so you don't get banding.
Float also allows for values below black in the negatives and also white values above 1. In an integer world 256 is white and that's it, there is nothing above it. Which typically leads to clipping of sky's and other bright objects.
There isn't any limit to the bit depth of a Float, though 16/32 bit ones are the most common flavors.
Thanks Beaker. So a floatingpoint image has more precision than 256 levels, but if we combine 3 channels, we get more than 256 levels for a pixel to modify. But for some reason, HSV models in photoshop for example use 256 values for manipulations. I'm not sure how using normalized values directly related to a floatingpoint images, as we can use normalized values for an integer images as well?
sundialsvc4
01042010, 01:06 PM
The digital computer is a binary machine: there are only two digits, '1' and '0.'
As with ordinary, tenfingered base ten, the more digits you have, the larger the number you can represent. With 8 "bits" you can represent values 0255. With 10 "bits" the number is about 4 times larger: 01023. For socalled "floating point" numbers (like 3.14159), it's a little different but much the same idea.
The more "bits" you have, the more detail you can represent (e.g. subtler shades of color), but the more storage it takes.
beaker
01042010, 08:20 PM
Thanks Beaker. So a floatingpoint image has more precision than 256 levels, but if we combine 3 channels, we get more than 256 levels for a pixel to modify. Your mixing up apples and oranges. Float/Int and bit depth are not directly related. This is int vs float value issue. An 8 bit float could very well still have 256 values per channel.
But yes when you combine 3 channels you get 256x256x256=16,777,216 different colors.
But for some reason, HSV models in photoshop for example use 256 values for manipulations. I'm not sure how using normalized values directly related to a floatingpoint images, as we can use normalized values for an integer images as well?Normalized values to 256 just a hold over from when Photoshop could only work with 8 bit images. Shake actually gives you an option on how you want to normalize them.
http://forums.cgsociety.org/attachment.php?attachmentid=149449&stc=1
sundialsvc4
01052010, 12:10 AM
Any (say...) "pixel color value" is actually represented by what mathematicians would call an ntuple: a group of numbers. For example, a pixel might be (R,G,B,A) (where "A = alpha, or transparency"). Or it might be (H,S,V,A), or (C,M,Y,K,A), or something else.
Each of these values might be represented by an integer (of some length, thus "bit depth"), or by a floatingpoint number.
A different representation might be used inmemory during graphics processing than is used for long term input/output purposes.
In each case, there is always an agreedupon mapping between the numeric quantities used in various representations. There is also a mapping that is applied during actual input/output operations... the socalled "gamma." It is crucial that, no matter how many computers and/or types of computers are involved in processing the data, all of them are able to handle the data in a visually consistent way. There are welldefined industry standards that allow them all to do that, and industry standard subroutine libraries which implement them.
Each of these values might be represented by an integer (of some length, thus "bit depth"), or by a floatingpoint number.
Floating point still has bitdepth...
The lowest prevision floating point format defined by IEEE 754 is 16bit (also 32, 64 and 128bit, although I very much doubt that you'd ever come across 64 or 128bit image data...)
A binary string is a binary string, whatever it means.
For example, let's take the 8bit binary string 01101010
As an unsigned integer, this represents 106 (actually, it represents 106 as a signed integer too, but in image data, integers are pretty much always unsigned)
If it were to be interpreted as a character, it would be 'j'
As a theoretical 8bit floating point number (with 3 exponent bits and 4 significant bits), it is 10000.0 (I think.... I've not tried manual float conversions before...)
To give an example of quite how inaccurate an 8bit float number would be, the only numbers between 0.2 and 1 would be 0.3, 0.4, 0.5, 0.6, 0.7, 0.8 and 0.9. Not quite the precision that you'd want!
mister3d
01062010, 10:31 AM
Thank you. I read all the replies carefully. I think I got it.
sundialsvc4
01072010, 03:24 AM
Floating point still has bitdepth...
The lowest prevision floating point format defined by IEEE 754 is 16bit (also 32, 64 and 128bit, although I very much doubt that you'd ever come across 64 or 128bit image data...)
A binary string is a binary string, whatever it means.
For example, let's take the 8bit binary string 01101010
As an unsigned integer, this represents 106 (actually, it represents 106 as a signed integer too, but in image data, integers are pretty much always unsigned)
If it were to be interpreted as a character, it would be 'j'
As a theoretical 8bit floating point number (with 3 exponent bits and 4 significant bits), it is 10000.0 (I think.... I've not tried manual float conversions before...)
To give an example of quite how inaccurate an 8bit float number would be, the only numbers between 0.2 and 1 would be 0.3, 0.4, 0.5, 0.6, 0.7, 0.8 and 0.9. Not quite the precision that you'd want!
Indeed you are correct. An 8bit "float" quantity would be useless. Microprocessors implement various floatingpoint formats as defined by IEEE and other standards organizations, whose numeric characteristics are very well known. Thus, when two CPUs perform the same operation on the same quantity, they can be expected to produce the same answer. (One of the historic problems with GPUs has been that they might not produce computationallyconsistent results, since they weren't really designed to send their results back to CPU memory.)
Mathematically speaking, there's the domain of the various functions (the inclusive range of quantities that can be represented, e.g. bitdepth); and the precision in the case of floatingpoint. From the point where each original datapoint is generated, all the way through to where every final output is produced, great care must be taken to be sure that all the data is handled consistently and with minimum loss and/or noise. "Storage space" is quite simply assumed to be an unlimited resource, because "computation" is not.
CGTalk Moderation
01072010, 03:24 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©20002015, Jelsoft Enterprises Ltd.