+ Reply to Thread
Results 1 to 13 of 13
  1. #1
    Chief Free Electron Relocator
    TPF Supporter

    Join Date
    Mar 2011
    Location
    Iowa
    Posts
    6,287
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    1115 times

    Let's see if I understand this about raw files.

    I've been trying to understand raw camera files a bit more, and I think I've got my head wrapped around it. But I want to make sure I have it straight.

    So if any of my lines of thinking are wrong, please let me know:

    1. Each camera sensor pixel is colorblind, so either a red, blue or green filter is placed over it (typically a Bayer array, but other methods are used). This causes the pixel to only record one color of the spectrum.
    2. When the shutter opens, light strikes the pixels, and each pixel records it's red, green or blue value based on how many photons strike it during the exposure.
    3. A given pixel can record 4,096 shades of it's pre-assigned color, assuming a 12-bit depth.
    4. The pixel will create an electrical charge, increasing it as more photons strike the pixel.
    5. When the shutter closes, the camera's processor queries each pixel for it's value, which can range from 0 to 4,096 based on how many photons struck the pixel.
    6. If the camera is capable of recording raw, and that is the option chosen by the user, the values created by each sensor pixel is recorded.
    7. The processor will then use adjacent pixels of red, green and blue values to create an RGB pixel used to display in the final image. It will compress the 12-bit data to 8-bit to create an imbedded jpeg thumbnail in the raw file. It will also compress the 12-bit data to an 8-bit full-size jpeg to record on the memory card if that is an option chosen by the user.
    8. Once the raw file is saved, the data itself (i.e., the values recorded from each pixel) cannot be altered. It can be manipulated many ways and many times, but the original data obtained from the sensor pixels are never changed even with heavy and multiple post-processing.
    9. In-camera settings, such as sharpening, white balance, contrast, saturation, etc. are saved along with the raw data, but not applied to it (unless the image is to be saved as a jpeg).
    10. All digital cameras create the raw data, but not all of them are capable of recording it. Those that don't, or the option to record it is not chosen by the user, delete the sensor pixel data once the 8-bit jpeg is created.


    Have I got it right?
    ..................................... .


    My toys: Nikon D60 & gripped D7000: Nikkor 10.5 fisheye, 10-24, 18-105, 70-300, 105 Micro: Tokina 500: Sigma 600: Celestron 2000: auto macro tube set: SB600: Manfrotto 055XB/390RC2 & 560B-1: Gossen Starlite: Easy-Up AP1500: 40' WonderPole

  2. # ADS

  3. #2
    TPF Junkie!
    Join Date
    Apr 2011
    Location
    Vermont
    Posts
    1,923
    My Gallery
    (0)
    My Photos Are OK to Edit
    Liked
    326 times
    That all sounds right to me. Little bit of detail to add to 5.... The charge at the photosite is not recorded directly. It passes through an amplifier, whose gain is controlled by ISO value, and once amplified, is read by the A/D converter.
    60d, Tokina 11-16 2.8, Canon 24 1.4L II, Zeiss 35 1.4 Distagon, Zeiss 50 2.0 Makro-Planar, Canon 85 1.8, Yashica DX 135 2.8, flashy stuff, filtery stuff

  4. #3
    It's all about - Light Site Moderator
    TPF Supporter

    Join Date
    Apr 2009
    Location
    Iowa
    Posts
    22,069
    My Gallery
    (1)
    My Photos Are OK to Edit
    Liked
    1742 times
    Quote Originally Posted by 480sparky View Post
    I've been trying to understand raw camera files a bit more, and I think I've got my head wrapped around it. But I want to make sure I have it straight.

    So if any of my lines of thinking are wrong, please let me know:

    1. Each camera sensor pixel is colorblind, so either a red, blue or green filter is placed over it (typically a Bayer array, but other methods are used). This causes the pixel to only record one color of the spectrum. The pixel only records the luminosity of that color, not the color itself, so yes pixels only record grayscales.
    2. When the shutter opens, light strikes the pixels, and each pixel records it's red, green or blue value based on how many photons strike it during the exposure. Yes.
    3. A given pixel can record 4,096 shades of it's pre-assigned color, assuming a 12-bit depth. No. The pixels are analog and are not limited to 4096 values.
    4. The pixel will create an electrical charge, increasing it as more photons strike the pixel. Essentially. Pixels can become saturated, at which point they cannot record any more photons that may stike them.
    5. When the shutter closes, the camera's processor queries each pixel for it's value, which can range from 0 to 4,096 based on how many photons struck the pixel. No. The voltage each pixel developed has to first be amplified, then the amplified signal is run through an analog-to-digital converter. The output of the AD converter determines the bit-depth. !2-bit output is 4096 gradations of grayscale and 14-bit is 16.384 gradations of grayscale.
    6. If the camera is capable of recording raw, and that is the option chosen by the user, the values created by each sensor pixel is recorded. Essentially. But, it's the AD converter output that gets recorded, not the analog voltage the pixel developed.
    7. The processor will then use adjacent pixels of red, green and blue values to create an RGB pixel used to display in the final image. Maybe. In many cameras the actual process is proprietary.
    It will compress the 12-bit data to 8-bit to create an imbedded jpeg thumbnail in the raw file. It will also compress the 12-bit data to an 8-bit full-size jpeg to record on the memory card if that is an option chosen by the user. Yep.
    8. Once the raw file is saved, the data itself (i.e., the values recorded from each pixel) cannot be altered. No. The values each pixel recorded got altered twice. First in the amplifier circuits, then in the AD conversion. It can be manipulated many ways and many times, but the original data obtained from the sensor pixels are never changed even with heavy and multiple post-processing. The Raw data can indeed be permanently altered. Parametric raw converters are favored because they do not alter Raw pixel data. AParametric means all changes are line commands written in an .XML or .XMP metadata file appended to the Raw image data file.
    9. In-camera settings, such as sharpening, white balance, contrast, saturation, etc. are saved along with the raw data, but not applied to it (unless the image is to be saved as a jpeg). Camera maker Raw converters can be configured to apply those settings to the Raw files made by that camera.
    10. All digital cameras create the raw data, but not all of them are capable of recording it. Yes. Those that don't, or the option to record it is not chosen by the user, delete the sensor pixel data once the 8-bit jpeg is created. The pixel data is not really discarded, but is is no longer accessable on a pixel by pixel basis.

    Have I got it right?
    Yes, and no.

    A 3 transistor (3T) CMOS pixel:


    Active pixel sensor - Wikipedia, the free encyclopedia

    The 3T pixel comprises the same elements as the 4T pixel except the transfer gate and the pinned photo diode. The reset transistor, Mrst, acts as a switch to reset the floating diffusion which acts in this case as the photo diode. When the reset transistor is turned on, the photodiode is effectively connected to the power supply, VRST, clearing all integrated charge. Since the reset transistor is n-type, the pixel operates in soft reset. The read-out transistor, Msf, acts as a buffer (specifically, a source follower), an amplifier which allows the pixel voltage to be observed without removing the accumulated charge. Its power supply, VDD, is typically tied to the power supply of the reset transistor. The select transistor, Msel, allows a single row of the pixel array to be read by the read-out electronics.
    Last edited by KmH; 02-04-2012 at 01:07 PM.
    . . . . . . Keith . . . . . . .How Do I Use My Digital SLR?...

    "Even the easy things are tough, if you do them half-heartedly"
    FOR SALE : Stay Tuned!

  5. #4
    It's all about - Light Site Moderator
    TPF Supporter

    Join Date
    Apr 2009
    Location
    Iowa
    Posts
    22,069
    My Gallery
    (1)
    My Photos Are OK to Edit
    Liked
    1742 times
    Raw converters do quite a bit to a Raw file to make it look like what we see.

    The image sensor is linear and has a Gamma response of 1.0, but our eyes aren't linear and have a Gamma response between 2.0 and 3.0. If you'd like to explore the math and other concepts involved : Gamma encoding - Bing

    Here is an approximate example of what the image sensor see's before a Raw converter alters it:



    and after the Raw converter has demosaiced, sharpened, and applied a non-linear curve to that image, which is what it presents to us for likely further editing:

    Last edited by KmH; 02-04-2012 at 01:24 PM.
    . . . . . . Keith . . . . . . .How Do I Use My Digital SLR?...

    "Even the easy things are tough, if you do them half-heartedly"
    FOR SALE : Stay Tuned!

  6. #5
    Chief Free Electron Relocator
    TPF Supporter

    Join Date
    Mar 2011
    Location
    Iowa
    Posts
    6,287
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    1115 times
    The reason I'm asking this is I have yet to find one, single source that truly explains raw files that satisfies my curiosity.

    What I'm really interested in is what happens at the sensor-pixel level, between the shutter opening and post-processing. How the data is collected, manipulated, transferred and stored. And not just catch-phrases like, "Raw is the digital equivalent of film negatives" or "Shooting jpeg means you throw away a lot of data". While the statements may be true, unless I can really get a grip on the entire process.... step by step (and not get technical like Keith's schematic), I have a hard time with it.

    What I'm working on is to create this one, single source I have yet to find.
    ..................................... .


    My toys: Nikon D60 & gripped D7000: Nikkor 10.5 fisheye, 10-24, 18-105, 70-300, 105 Micro: Tokina 500: Sigma 600: Celestron 2000: auto macro tube set: SB600: Manfrotto 055XB/390RC2 & 560B-1: Gossen Starlite: Easy-Up AP1500: 40' WonderPole

  7. #6
    I spend too much of my life on TPF!
    Join Date
    Jan 2012
    Location
    Ne US
    Posts
    291
    My Gallery
    (0)
    My Photos Are OK to Edit
    Liked
    24 times
    Don't understand the difference between raw and jpeg. I noticed my camera will shoot a lot less picures in raw on the memory card.
    For the average hobby photographer, what is the benefit of raw pictures vs jpegs?

  8. #7
    Chief Free Electron Relocator
    TPF Supporter

    Join Date
    Mar 2011
    Location
    Iowa
    Posts
    6,287
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    1115 times
    Quote Originally Posted by slackercruster View Post
    Don't understand the difference between raw and jpeg. I noticed my camera will shoot a lot less picures in raw on the memory card.
    For the average hobby photographer, what is the benefit of raw pictures vs jpegs?
    This is precisely why I'm trying to collect all this information scattered across thousands of websites into one source.

    Basically, when you take an image, the raw data (that's why it's called raw) from the sensor pixels are processed by the camera. For most people, shooting jpeg means all that data is processed then thrown away when the jpeg is created. Shooting raw means you retain that information. There's advantages to doing so, but also disadvantages.
    ..................................... .


    My toys: Nikon D60 & gripped D7000: Nikkor 10.5 fisheye, 10-24, 18-105, 70-300, 105 Micro: Tokina 500: Sigma 600: Celestron 2000: auto macro tube set: SB600: Manfrotto 055XB/390RC2 & 560B-1: Gossen Starlite: Easy-Up AP1500: 40' WonderPole

  9. #8
    TPF Junkie!
    Join Date
    Oct 2003
    Location
    Brisbane, Australia
    Posts
    9,242
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    107 times
    Quote Originally Posted by 480sparky View Post
    What I'm really interested in is what happens at the sensor-pixel level, between the shutter opening and post-processing. How the data is collected, manipulated, transferred and stored.

    ...

    What I'm working on is to create this one, single source I have yet to find.
    You're going to have problems there. I have a set of 3 full sized textbooks that you would need to read to fully understand this from start to end. One in optoelectronics and photonics which describe the process of capturing photons, one in advanced analogue circuit design which will detail amplification and control circuits for sensors, and one on digital signal processing. That last book has maths in it which will probably require you to get a 4th book on advanced engineering mathematics.

    There is a whole world of knowledge about each individual step. For instance even the process of converting a signal from analogue to digital will incorporate concepts such as aliasing, quantisation, and all that wonderful mathy stuff that will alter the final value of the raw pixel.

    But on the upside along with kmh's pedantic corrections you pretty much know the process in a nutshell
    "I am always satisfied with the best." -Oscar Wilde
    Larger versions always on flickr
    Best photos in my gallery

    Proud Supporter of The Pact

  10. #9
    Chief Free Electron Relocator
    TPF Supporter

    Join Date
    Mar 2011
    Location
    Iowa
    Posts
    6,287
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    1115 times
    Quote Originally Posted by Garbz View Post
    Quote Originally Posted by 480sparky View Post
    What I'm really interested in is what happens at the sensor-pixel level, between the shutter opening and post-processing. How the data is collected, manipulated, transferred and stored.

    ...

    What I'm working on is to create this one, single source I have yet to find.
    You're going to have problems there. I have a set of 3 full sized textbooks that you would need to read to fully understand this from start to end. One in optoelectronics and photonics which describe the process of capturing photons, one in advanced analogue circuit design which will detail amplification and control circuits for sensors, and one on digital signal processing. That last book has maths in it which will probably require you to get a 4th book on advanced engineering mathematics.

    There is a whole world of knowledge about each individual step. For instance even the process of converting a signal from analogue to digital will incorporate concepts such as aliasing, quantisation, and all that wonderful mathy stuff that will alter the final value of the raw pixel.

    But on the upside along with kmh's pedantic corrections you pretty much know the process in a nutshell
    The nutshell version is what I want. I'm not wanting to describe the process of moving an electron along an electronics circuit, or the subtleties of demosaicing algorithms.
    ..................................... .


    My toys: Nikon D60 & gripped D7000: Nikkor 10.5 fisheye, 10-24, 18-105, 70-300, 105 Micro: Tokina 500: Sigma 600: Celestron 2000: auto macro tube set: SB600: Manfrotto 055XB/390RC2 & 560B-1: Gossen Starlite: Easy-Up AP1500: 40' WonderPole

  11. #10
    Been spending a lot of time on here!
    Join Date
    Nov 2011
    Location
    Vermont
    Posts
    149
    My Gallery
    (5)
    My Photos Are OK to Edit
    Liked
    17 times
    Quote Originally Posted by Garbz View Post
    Quote Originally Posted by 480sparky View Post
    What I'm really interested in is what happens at the sensor-pixel level, between the shutter opening and post-processing. How the data is collected, manipulated, transferred and stored.

    ...

    What I'm working on is to create this one, single source I have yet to find.
    You're going to have problems there. I have a set of 3 full sized textbooks that you would need to read to fully understand this from start to end. One in optoelectronics and photonics which describe the process of capturing photons, one in advanced analogue circuit design which will detail amplification and control circuits for sensors, and one on digital signal processing. That last book has maths in it which will probably require you to get a 4th book on advanced engineering mathematics.

    There is a whole world of knowledge about each individual step. For instance even the process of converting a signal from analogue to digital will incorporate concepts such as aliasing, quantisation, and all that wonderful mathy stuff that will alter the final value of the raw pixel.

    But on the upside along with kmh's pedantic corrections you pretty much know the process in a nutshell
    Good thing they make that button that says Auto so I don't have to know all that fancy schmancy stuff.

  12. #11
    TPF Junkie!
    Join Date
    Apr 2011
    Location
    Vermont
    Posts
    1,923
    My Gallery
    (0)
    My Photos Are OK to Edit
    Liked
    326 times
    There's a cool flowcharty thing with a quick description in this article that might interest you: Advantages of Fourteen Bit Cameras-- Part I
    60d, Tokina 11-16 2.8, Canon 24 1.4L II, Zeiss 35 1.4 Distagon, Zeiss 50 2.0 Makro-Planar, Canon 85 1.8, Yashica DX 135 2.8, flashy stuff, filtery stuff

  13. #12
    TPF Junkie!
    Join Date
    Oct 2003
    Location
    Brisbane, Australia
    Posts
    9,242
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    107 times
    Quote Originally Posted by TMBPhotography View Post
    Good thing they make that button that says Auto so I don't have to know all that fancy schmancy stuff.
    Wait till you find out about the "P" or "Professional" mode on your camera. It will blow your mind.

    Quote Originally Posted by analog.universe View Post
    There's a cool flowcharty thing with a quick description in this article that might interest you: Advantages of Fourteen Bit Cameras-- Part I
    Good article but I did find one thing I disagree with. That's his comment on bit-depth vs dynamic range. Unfortunately for him his views from the camera world do not match those from the digital signal processing world. While I understand where he's coming from I have about 3 textbooks that disagree with him and say that dynamic range is very well a function of bit depth. Just not his description of what "dynamic range" means. The answer is as always in the middle, both uses of the term is correct.
    "I am always satisfied with the best." -Oscar Wilde
    Larger versions always on flickr
    Best photos in my gallery

    Proud Supporter of The Pact

  14. #13
    TPF Junkie!
    Join Date
    Sep 2007
    Location
    Hell's Kitchen, New York
    Posts
    2,586
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    174 times
    The article also perpetuates the myth that linear Raw files are 'dark'. They aren't anything, of course, they are simply lists of numbers to be interpreted. They are only 'dark' when interpreted incorrectly: for example displayed on a graphics/monitor system that applies a reverse tone curve to balance the tone curve applied when converting from linear to logarithmic. If they were displayed linearly they would look perfectly natural: it's the display system mismatch that causes the 'darkness', not the nature of the data itself.


 

Sponsors

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. Converting tiff files to high res jpg files
    By nrsmw22 in forum Photography Beginners' Forum
    Replies: 15
    Last Post: 10-25-2011, 12:28 PM
  2. DNG Files converting to JPEG Files
    By Steve56 in forum Digital Discussion & Q&A
    Replies: 4
    Last Post: 08-09-2011, 03:51 AM
  3. Help with generating JPEG files from RAW files on SD card
    By DScience in forum Beyond the Basics
    Replies: 7
    Last Post: 04-02-2010, 03:03 AM
  4. Someone please help me understand this
    By AlfromLA in forum Digital Discussion & Q&A
    Replies: 5
    Last Post: 12-11-2008, 11:49 AM
  5. Trying to understand all of this.
    By VoLcOmKiDd911 in forum Photography Beginners' Forum
    Replies: 4
    Last Post: 09-09-2007, 06:33 AM

Search tags for this page

3t cmos
,
3t cmos image sensor
,
4t pixel cmos basics
,
images before demosaicing
,

pinned photodiode

,

pixel sensor

,
transfer gate schematic
Click on a term to search for related topics.