Which SLR outputs RAW Bayer?

Messages
1,887
Edit My Images
Yes
Does anyone know of a digital SLR that outputs RAW Bayer? As in the actual values of each pixel before any processing or conversion to JPEG (or Lossless JPEG in the case of .cr2 format in the Canon 350D).
 
as i understand it, .cr2 is RAW not lossless JPG ?

Canon, Nikon, and anybody else that produces raw output produce RAW bayer output as long as jpg output is not selected

I may be wrong but just did a quick google search and this confirmed my thoughts ?
 
I just looked into dcraw.c (open source) raw decoder/encoder software and I put my 350D "RAW" file through it. It's extracting the "RAW" bit as lossless JPEG.

Anyone got the EOS 5D? Can I trouble the owner to snap a picture of anything and save it as 12-bit RAW (Bayer I assume)? It seems this camera has that.
 
Also, the actual file size doesn't quite add up.

File size: 7,452,954 bytes
Width: 3474
Height: 2314

If there's 8-bits per pixel, that should give 8,038,836 bytes.

Much less 12-bits per pixel that's supposed to be the Bayer output from the sensor.
 
Doing several google searches, all single chip DSLr cameras, use the Bayer filtering method, there are several cameras that have 3 sensors one for each colour. But all DSLR from Canon, Nikon etc user the Bayer Filter method for colour ! If you have a lot of one colour pixels next to each other in a picture the calculations will make the file size smaller, i have several cr2 images from my 20d and not 2 are the same size !

The quality of these images depends on the algorithms used by raw decoding software, and the results from different raw software can be VERY different, using the same raw file.

one of many searches
 
We have a simple guide to how sensors work and the Bayer pattern

It can be found here

HTH
 
IanC_UK said:
Doing several google searches, all single chip DSLr cameras, use the Bayer filtering method, there are several cameras that have 3 sensors one for each colour. But all DSLR from Canon, Nikon etc user the Bayer Filter method for colour ! If you have a lot of one colour pixels next to each other in a picture the calculations will make the file size smaller, i have several cr2 images from my 20d and not 2 are the same size !

The quality of these images depends on the algorithms used by raw decoding software, and the results from different raw software can be VERY different, using the same raw file.

one of many searches

First of all, thanks for your time and help so far. :thumb:

Yes, they all use the Bayer filter to obtain an R or G or B value at a particular point. A 12-bit value is then obtained from an analogue to digital converter of the pixel reading. I want this R or G or B value that is the direct output from the A/D converter.

Are you saying that the "lossless JPEG" format is just some sort of compression done on these values (pre-interpolation)?

I Googled a *.cr2 file for the EOS 5D. Trying to extract the contents now, though it's still saying it's "lossless JPEG" rather than a "compressed RAW" according to dcraw.c. :confused-

I think I'll look at Nikon cameras and see what they output.

fingerz, I work for a company that is designing a chip that will contain an ISP pipeline for image sensors. We want to test our ISP implementation by obtaining the Bayer raw output from a "high end" digital SLR.
 
kamion said:
First of all, thanks for your time and help so far. :thumb:
I Googled a *.cr2 file for the EOS 5D. Trying to extract the contents now, though it's still saying it's "lossless JPEG" rather than a "compressed RAW" according to dcraw.c. :confused-

No worries

I think maybe dcraw.c may be mis reporting what its doing more than anything ! I believe (im probably wrong though) true astronomical cameras use a lot of raw bayer data, as they have to do a lot of post processing to images.
 
I am not sure that you will be able to get information from any camera’s RAW file as from my understanding, the data is sent from the sensor through the in camera processor that runs all the manufacturers pre-programmed algorithms to “shape” the image before being recorded as a RAW file or being processed into a JPG. That is one of the reasons why certain cameras have different characteristics, due to those manufacturer programmed algorithms. I am sure that Canon, Nikon etc will be able to isolate the raw sensor data in a controlled environment such as a test bed in a lab, but I doubt that any of them would supply that output or indeed any information as to their algorithms, it is after all propriety technology. I could be completely wrong though?
 
Steve said:
I am not sure that you will be able to get information from any camera’s RAW file as from my understanding, the data is sent from the sensor through the in camera processor that runs all the manufacturers pre-programmed algorithms to “shape” the image before being recorded as a RAW file or being processed into a JPG. That is one of the reasons why certain cameras have different characteristics, due to those manufacturer programmed algorithms. I am sure that Canon, Nikon etc will be able to isolate the raw sensor data in a controlled environment such as a test bed in a lab, but I doubt that any of them would supply that output or indeed any information as to their algorithms, it is after all propriety technology. I could be completely wrong though?

Now you mention it Steve, i believe there was huge controversy over Nikon refusing to allow anybody access to the algorithm they were using for nef files on the new digital range, and all manufacturers are very protective of those algorithms !
 
Ok, but I am not after the algorithms. We have our own algorithms. Just need a source of raw data from a sensor to test validate our algorithms.
Anyway, I'll continue my research and I'll let you all know when I find some answers!

Cheers!
 
When you convert a RAW file to jpeg (8-bit), information is being lost.

The 12-bit Raw file represents 68,719,476,736 colours.
When converted to an 8-bit jpeg you are reducing this down to 16,777,216 colours.

File size varies when shooting in RAW. I've found that the brighter the image the larger it is.
 
kamion said:
Ok, but I am not after the algorithms. We have our own algorithms. Just need a source of raw data from a sensor to test validate our algorithms.
Anyway, I'll continue my research and I'll let you all know when I find some answers!

Cheers!

Maybe contact the sensor makers directly, Kodak etc and explain why. I would think that they would be your best bet and would be able to supply RAW data if it suits them.
 
Yes, we can and we have some raw files from image sensors that we have worked with. We want an example or benchmark raw data from a "known good" sensor.

I thought it might be easy as most cameras claim to output raw image but scratching a little below the surface, it is not as straight forward as I first thought.
 
The D2x Nikon NEF is actually compressed using Nikon's own secret software. It appears as an 18-19.5 Mb file in NEF then opens to nearly 35Mb as an uncompressed TIFF (no LZW compression) with no post-processing - a bit more if you tweak the images a bit as most of us do.
 
Ok, I've found out what the Canon CR2 and CRW files are doing. They both contain RAW Bayer data, but they compress them differently.

The CR2 format compresses the raw data using the "lossless JPEG" compression, and it doesn't mean that it's actually compressing a JPEG.

The CRW format uses some other compression algorithm, probably Canon's own.

dcraw reads the data out and puts each pixel value into an array of four 16-bit words. Presumably to optimise the processing that it does later on.

Finally managed to extract the raw data out today. :)

Thanks for all your help and time.
 
Back
Top