Jump to content

number of megapixels in raw file


sjluke

Recommended Posts

It is confusing to me that my raw files sometimes appear to have more megapixels than the camera (40D) is rated

for, that is 10.1. I downloaded a file today that said it contained 13.2 MP of information. I understand when the

files contain less than 10.1, but I don't understand them containing more. Could someone please explain this? Thanks!

Link to comment
Share on other sites

Your camera has 10.1 Megpixels. (Lets count this as 10.100.000 pixels).

 

Each pixel contains an amount of information (expressed in bits). For the 40D, this is 14bits per pixel.

 

So, the total amount of information produced by the sensor (per image) is ...

 

10.100.000 x 14 = 141.400.000 bits

 

If you store this amount of bits into a a file on a system where a byte holds 8 bits, you'll need

 

141.400.000 / 8 = 17.675.000 Bytes

 

The actual bytesize of your file was lower. That comes from the lossless compression that Canon applies

on the sensordata before storing it in a file. This compression is also the reason why different rawfiles have different filesizes. Note however, that the compression is lossless.

 

But Ellis was absolutely correct that you have confused filesize (in bytes) and image size (in pixels). This becomes even more obvious, if you take the jpg-image that results from the raw ... This image might have a filesize of only 1Mb ... but it still contains all the 10.1 Megapixels. (The jpg compression is lossy however).

Link to comment
Share on other sites

Earlier: "... except that it is 14 bits per COLOUR, not per pixel ..."

 

Nope.

 

Raw is tone only, not chrome.

 

It's up to the Raw conversion software to convert the tone (mono-color) to chrome (tri-color).

 

The extra space is also filled with EXIF and maker notes, such as camera settings to be used by Canon

Raw conversion software.

 

Ain't math fun?

 

And who among us resisted math in grammar school (let alone high school or college) because it has

no real-world application? ;-)

 

You should see Leica Raw choices, where they save by root values, not actual values, then square the

results in software afterwards, just to save file size - faster saves and less storage (and, yes, less

precise, but who's counting, when 8-bit JPG is going to toss 90% of the captured digital data anyway?).

Link to comment
Share on other sites

Geoff, except of the Foveon X3 that really has 3 colors per pixel in the raw data (but less pixels) all other cameras use a sensor with a "bayer matrix" . One pixel in the bayer matrix contains just ONE color. (THe missing colors of a pixel are calculated in the raw conversion from the neighbours.)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...