RAW+JPEG WHERE??? HOW???
Posted 05/03/2008 - 22:41
Link
Quote:
Any one pixel can only represent one colour, so any one JPEG pixel has 8 bits of information about whichever colour is represented. A RAW pixel has 12 bits.
Pixel is a very general term, pixels on a capture device (excepting Foveon sensors) record a single primary colour each. Display devices output a single colour per screen pixel (sometimes referred to as sub-pixels) though the input file may contain composite RGB information per pixel. A pixel in a normal image file generally consists of a trio of RGB values.Any one pixel can only represent one colour, so any one JPEG pixel has 8 bits of information about whichever colour is represented. A RAW pixel has 12 bits.
Basically in the case of image files if R,G and B channels each contain 8bits of information the pixel will contain 24bits. When working with 16bit files each pixel contains 48bits, 16 bits for each colour channel. I should add that certain file types can also accommodate additional non-RGB layers (such as TIFF and PSD) for masking or other specialist applications.
RAW files from a Bayer array sensor generally represent a single colour per pixel and each pixel contains between 12 and 16 bits. Only after the RGBG Bayer matrix has been de-mosaiced by the RAW converter will a composite file with RGB per pixel be available.
The following links aren't the best I've read but may serve to provide a little more information:
http://en.wikipedia.org/wiki/Pixel
http://en.wikipedia.org/wiki/Bayer_filter
http://en.wikipedia.org/wiki/Demosaicing
Rob Studdert
HURSTVILLE AUSTRALIA
http://home.swiftdsl.com.au/~distudio/publications/
Pentax user since 1986, PDMLer since 1998
HURSTVILLE AUSTRALIA
http://home.swiftdsl.com.au/~distudio/publications/
Pentax user since 1986, PDMLer since 1998
Posted 05/03/2008 - 22:45
Link
Perhaps the term "sub pixel" should be used - to mean a single-colour unit.
~Pete
Posted 06/03/2008 - 06:16
Link
Quote:
That's very true but for all practical intents (disregarding the internal compression mechanisms) JPEG offers 24bit (8bits/cc) colour to the user when opened it's just that the RGB values are interpolated rather than directly stored as is the case with non-destructive image formats.
Well, yes... as an image format that's fine. But, I understood we're talking in the context of image capture, so implying that "RAW contains 12-bits per pixel, but JPEG contains 24-bits per pixel" is misleading That's very true but for all practical intents (disregarding the internal compression mechanisms) JPEG offers 24bit (8bits/cc) colour to the user when opened it's just that the RGB values are interpolated rather than directly stored as is the case with non-destructive image formats.
After demosaicing, the RAW actually contains 36-bits per pixel (12 each of R, G and B) (or 42 in the case of the K20D). (And the JPEG from camera was demosaic'd anyway from the RAW).
As far as luminance is concerned, a JPEG contains 8-bits per pixel whereas RAW contains 12-bits per pixel. (That's effectively the black and white content for anyone that's wondering ) Typically you find the limits of JPEG when trying to bring out detail in shadow areas and the like.
And now I suspect everyone is confused
Matt
http://www.mattmatic.co.uk
(For gallery, tips and links)
(For gallery, tips and links)
Posted 06/03/2008 - 11:08
Link
Quote:
Well, yes... as an image format that's fine. But, I understood we're talking in the context of image capture, so implying that "RAW contains 12-bits per pixel, but JPEG contains 24-bits per pixel" is misleading
That's why I said JPEG are 24bits or 8bits/cc, I don't believe that it's misleading in any way. Regular JPEG files are encoded from a 24bit file and decoded to a 24bit file, yes?Well, yes... as an image format that's fine. But, I understood we're talking in the context of image capture, so implying that "RAW contains 12-bits per pixel, but JPEG contains 24-bits per pixel" is misleading
Quote:
After demosaicing, the RAW actually contains 36-bits per pixel (12 each of R, G and B) (or 42 in the case of the K20D). (And the JPEG from camera was demosaic'd anyway from the RAW).
I understand that the K20D RAW files are 12bits/pixel the same as the K10D, the ADCs have differing sample bit depths but the RAW files for both still remain at 12bits/pixel after limited in camera RAW file gain control. Again it's an oversimplification to say that the de-mosaiced RAW file contains a discrete 36bits, it's interpolated using floating point math so unless it's been truncated to 8bits/cc on import it may actually contain more than 12bit/cc of usable data (considering the colour balancing and gamma curves that the RAW data has been subjected to). Let's face it a huge percentage of the data in a de-mosaiced image is interpolated.After demosaicing, the RAW actually contains 36-bits per pixel (12 each of R, G and B) (or 42 in the case of the K20D). (And the JPEG from camera was demosaic'd anyway from the RAW).
Quote:
As far as luminance is concerned, a JPEG contains 8-bits per pixel whereas RAW contains 12-bits per pixel. (That's effectively the black and white content for anyone that's wondering ) Typically you find the limits of JPEG when trying to bring out detail in shadow areas and the like.
LOL, yes that's correct in a very RAW interpretation.
As far as luminance is concerned, a JPEG contains 8-bits per pixel whereas RAW contains 12-bits per pixel. (That's effectively the black and white content for anyone that's wondering ) Typically you find the limits of JPEG when trying to bring out detail in shadow areas and the like.
Rob Studdert
HURSTVILLE AUSTRALIA
http://home.swiftdsl.com.au/~distudio/publications/
Pentax user since 1986, PDMLer since 1998
HURSTVILLE AUSTRALIA
http://home.swiftdsl.com.au/~distudio/publications/
Pentax user since 1986, PDMLer since 1998
Posted 06/03/2008 - 12:19
Link
HELP!!!!
CHEERS Vic
CHEERS Vic
Born again biker with lots of Pentax bits. Every day I wake up is a good day. I'm so old I don't even buy green bananas.
Posted 06/03/2008 - 14:33
Link
Quote:
Confused now?
ThoroughlyConfused now?
(but don't mind me - the camera could be full of elves with paintbrushes - as long as they continue painting, I'm happy... )
--------------
MZ-6,K10D,K20D,Grip,DA*Zooms,DA 18-55-200 Kit,FA50,1.7TC,AFZ360
For Saleentax FA28-90,FA100-300,Sigma EX28-80,DC18-200,
Makinon 500mm Mirror
MZ-6,K10D,K20D,Grip,DA*Zooms,DA 18-55-200 Kit,FA50,1.7TC,AFZ360
For Saleentax FA28-90,FA100-300,Sigma EX28-80,DC18-200,
Makinon 500mm Mirror
Add Comment
To leave a comment - Log in to Pentax User or create a new account.


68 posts
18 years
Australia
However, a JPEG isn't that simple. It's actually split into a YCbCr - Luminance and two colour channels. The equation that mulches the RGB information into the YCbCr throws away most of the blue (takes only 11% IIRC). So JPEG can't contain that much information.
Matt
HURSTVILLE AUSTRALIA
http://home.swiftdsl.com.au/~distudio/publications/
Pentax user since 1986, PDMLer since 1998