Results 1 to 19 of 19

Thread: RAW image size and storage

  1. #1

    RAW image size and storage

    Modern DSLR cameras, we are told produce images of 14 bit size when used in RAW mode. This means each image being 2^14 bits or16384 bits per channel. This gives an image size of 16384^3 (16384*16384*16384) = 4.398^12. Now for those not happy with mathematical notation this amounts to 4,398,046,511,000. (Four Trillion, 398 Billion,46 Million,511 Thousand.)... Now I know memory has come down dramatically of late, but where are these images stored. any display device must recall the image data from somewhere.

  2. #2
    Black Pearl's Avatar
    Join Date
    Jan 2011
    Location
    Whitburn, Sunderland
    Posts
    2,422
    Real Name
    Robin

    re: RAW image size and storage

    Not sure I follow - they are stored wherever you record/store them.

  3. #3
    Moderator Manfred M's Avatar
    Join Date
    Mar 2012
    Location
    Ottawa, Canada
    Posts
    22,203
    Real Name
    Manfred Mueller

    re: RAW image size and storage

    You are mistaking the total number of colours that can be represented versus the R, G and B values stored for each pixel in the image. Even though your camera records in 14-bits per channel, it is converted to 16-bit data when exported to a data file to make it compatible with computers. This means 2 bytes are required for each channel or a total of 6 bytes per pixel. Each of these pixels can be any one of the 4.398^12 values you have mentioned in your question.

    I use lossless compression when I shoot raw using my 36MB sensor camera, so each raw file (including overhead) is roughly 40MB.

    Raw data cannot be displayed directly , so it has to be converted to an image format first. Your camera converts the data into a jpeg for display purposes on the screen on the back of your camera. Your raw processing software will convert the data into a format that the software can handle (if you use Photoshop, that would be a psd (Photoshop Document) file), TIFF, jpeg, ect.

  4. #4

    Join Date
    May 2014
    Location
    amsterdam, netherlands
    Posts
    3,182
    Real Name
    George

    re: RAW image size and storage

    Quote Originally Posted by bobg4nlk View Post
    Modern DSLR cameras, we are told produce images of 14 bit size when used in RAW mode. This means each image being 2^14 bits or16384 bits per channel. This gives an image size of 16384^3 (16384*16384*16384) = 4.398^12. Now for those not happy with mathematical notation this amounts to 4,398,046,511,000. (Four Trillion, 398 Billion,46 Million,511 Thousand.)... Now I know memory has come down dramatically of late, but where are these images stored. any display device must recall the image data from somewhere.
    14 bit=14bit. But with 14 bit you have 2^14 values.

    George

  5. #5
    pnodrog's Avatar
    Join Date
    Sep 2012
    Location
    Nomadic but not homeless, ex N.Z. now Aust.
    Posts
    4,154
    Real Name
    Paul

    re: RAW image size and storage

    My understanding is that RAW files in general are saved as 16bit (2bytes) per pixel. The colour information is not determined until the RAW converter demosaics the file and saves it as colour channels. Some versions of RAW files are compress using either lossless algorithms or if acceptable a more compressed version with very minor loss's tolerated. If 12 bits is acceptable I would expect that 2 pixels are save per 3 bytes.
    Last edited by pnodrog; 15th May 2017 at 08:52 PM.

  6. #6

    Join Date
    Feb 2012
    Location
    Texas
    Posts
    6,956
    Real Name
    Ted

    re: RAW image size and storage

    Quote Originally Posted by bobg4nlk View Post
    Modern DSLR cameras, we are told produce images of 14 bit size when used in RAW mode.
    Too vague, Bob, and "size" is used inappropriately, sorry. Raw files contain much, much more than just image data, so the following paragraph is almost irrelevant.

    This means each image being 2^14 bits or16384 bits per channel. This gives an image size of 16384^3 (16384*16384*16384) = 4.398^12. Now for those not happy with mathematical notation this amounts to 4,398,046,511,000. (Four Trillion, 398 Billion,46 Million,511 Thousand.)
    The excursion into 'Bit-depth 101' is really not necessary.

    ... Now I know memory has come down dramatically of late, but where are these images stored. any display device must recall the image data from somewhere.
    The image data is contained within an image file, google "MIME". This file can be stored anywhere, which answers the question in the OP.

    CPUs work with bytes, words, long words and maybe 64-bit numbers these days. 12- or 14-bit quantities are NOT stored as such. They are fitted into words, either at the high end or low end. so, as has be already said, one pixel (Bayer CFA) is stored as two bytes and the CPU uses it as a word (one word is 16 bits, up to 65535 unsigned integer value).

    How processors, computer or in-camera, do their stuff is a huge subject with plenty of room for obfuscation, so this thread should last quite a while . . .

  7. #7
    dje's Avatar
    Join Date
    May 2011
    Location
    Brisbane Australia
    Posts
    4,636
    Real Name
    Dave Ellis

    re: RAW image size and storage

    For my 24MP Nikon D610 shooting in 14 bit lossless compressed raw (uncompressed raw not available in this model), the data size comes down to about 1 byte per pixel (ie about 24 MB). Once you add in extra space for embedded jpegs and metadata, typical file sizes are around 27-30 MB.

    Dave
    Last edited by dje; 16th May 2017 at 04:02 AM.

  8. #8

    Join Date
    May 2014
    Location
    amsterdam, netherlands
    Posts
    3,182
    Real Name
    George

    re: RAW image size and storage

    Quote Originally Posted by bobg4nlk View Post
    Modern DSLR cameras, we are told produce images of 14 bit size when used in RAW mode. This means each image being 2^14 bits or16384 bits per channel. This gives an image size of 16384^3 (16384*16384*16384) = 4.398^12. Now for those not happy with mathematical notation this amounts to 4,398,046,511,000. (Four Trillion, 398 Billion,46 Million,511 Thousand.)... Now I know memory has come down dramatically of late, but where are these images stored. any display device must recall the image data from somewhere.
    As said before you're confusing values with bits. When captured in RAW, a "fingerprint"is made of the sensor in pieces of 12 or 14 bit. My Nikon anyway. For a sensor with 4000x6000 elements this would be 400x600x14=336000000bit. Dividing this by 8 it gives 42000000byte, or 42Mb.
    When converted to a raster based RGB image, pixels are calculated with RGB values. This is mostly in bytes,8bit, or word,16 bit for each channel. That picture of 4000x6000 pixels will be 4000x6000x3x2=144Mb. If you save your picture as TIFF16 you will see these sizes

    RAW image size and storage

    When in memory, the image can be saved to disk in different formats.


    In a RAW file the sensor info is saved in pieces of 12 or 14 bits. When I change my camera settings from 12 bit to 14 bit, both uncompressed, the free space of my memory card can hold 285 pictures, with 12 bits it's 370 pictures. When it would be saved in words, both would fit in it and no change would be vissible.

    My camera,D700, has 4256x2832 pixels


    George

  9. #9

    re: RAW image size and storage

    To display or process any image it must first be stored for access in the monitor or whatever device is being used.

  10. #10
    Moderator Manfred M's Avatar
    Join Date
    Mar 2012
    Location
    Ottawa, Canada
    Posts
    22,203
    Real Name
    Manfred Mueller

    re: RAW image size and storage

    Quote Originally Posted by bobg4nlk View Post
    To display or process any image it must first be stored for access in the monitor or whatever device is being used.
    Your camera will take the raw data and convert it to a jpeg for display.

    For data from a camera that have been downloaded to a computer, it will be stored on your hard drive or SSD, depending on the machine in question. Raw data has to be converted to a displayable image file through the raw conversion process.

    Your computer then takes that data and scales it to fit on the screen and rasterizes it for display purposes. During the raw conversion process, a white balance setting (i.e. colour temperature) and the colour space will also be "baked in" to the image file.

    I'm really not sure where you are coming from...

  11. #11

    re: RAW image size and storage

    Cheers Ted, My question is really aimed at your last paragraph...I am trying to understand what happens to the vast amount of data produced in the image and how it gets to a usable form.

    Regards

    Bob Southall

  12. #12

    Join Date
    Feb 2012
    Location
    Texas
    Posts
    6,956
    Real Name
    Ted

    re: RAW image size and storage

    Quote Originally Posted by bobg4nlk View Post
    To display or process any image it must first be stored for access in the monitor or whatever device is being used.
    A better word is "loaded" rather than "stored". For example, a picture uploaded for posting here can be stored anywhere on the the internet - meaning that it is physically stored in the memory of a 'server' computer far from your location.

    When you click on the link to a thread here, copies of all the images in the thread are down-loaded by your Browser onto your computer temporarily while you have the thread open. This site will only display certain types of image file, as may have already been said. Raw files are out.

    Quote Originally Posted by bobg4nlk View Post
    Cheers Ted, My question is really aimed at your last paragraph...I am trying to understand what happens to the vast amount of data produced in the image and how it gets to a usable form.

    Regards

    Bob Southall
    Firstly, please disassociate the word "vast" from your concept of all images. I could easily make a tiny image and post it. Or just look at my avatar at left of this post - had it been a shot of my ugly old face, well 80x120 pixels ain't much but it is still an 'image'!

    As to explaining "what happens to the vast amount of data produced in the image and how it gets to a usable form", that would be a tall order for a thread in this forum, hence my earlier comment to which you refer above.

    Norman Koren writes well on the subject:

    http://www.normankoren.com/color_management.html

    Maybe read that a few times and come back with specific questions and references.
    Last edited by xpatUSA; 16th May 2017 at 06:20 PM.

  13. #13

    Join Date
    Nov 2009
    Location
    Provence, France
    Posts
    990
    Real Name
    Remco

    re: RAW image size and storage

    This isn't a troll?

  14. #14

    re: RAW image size and storage

    The question really is about the memory address's used to store the data, if it can't be stored, it can't be used...recalled, modified etc. Most processors run out of steam (address lines) around 40Gb ie they can't address more than this 'on the fly'. Also, even a 10bit image, uncompressed would take up most of a decent sized hard drive, all this for an image that the human eye can't appreciate anyway. Our eyesight cant distinguish much above 10 meg colours. I do incidently appreciate the colours could be dragged off a drive in useable chunks, (I do have programming knowledge) but consider the time this would take.
    I have had this explained to me by wixperts together with the process of displaying 10 and 12 bit monochrome images on a bog-standard (8 bit) computer/monitor system.

  15. #15

    Join Date
    May 2014
    Location
    amsterdam, netherlands
    Posts
    3,182
    Real Name
    George

    re: RAW image size and storage

    Quote Originally Posted by bobg4nlk View Post
    The question really is about the memory address's used to store the data, if it can't be stored, it can't be used...recalled, modified etc. Most processors run out of steam (address lines) around 40Gb ie they can't address more than this 'on the fly'. Also, even a 10bit image, uncompressed would take up most of a decent sized hard drive, all this for an image that the human eye can't appreciate anyway. Our eyesight cant distinguish much above 10 meg colours. I do incidently appreciate the colours could be dragged off a drive in useable chunks, (I do have programming knowledge) but consider the time this would take.
    I have had this explained to me by wixperts together with the process of displaying 10 and 12 bit monochrome images on a bog-standard (8 bit) computer/monitor system.
    Strange questions for somebody with programming knowledge.
    I made a remark on your post in post 4, made some calculations in post 8 and no reaction. I showed a diagram which I think is very useful in this topic and no reaction. What do you want?

    By the way, I've one of the cheapest video cards, with 1GB memory.

    George

    George

  16. #16
    Moderator Manfred M's Avatar
    Join Date
    Mar 2012
    Location
    Ottawa, Canada
    Posts
    22,203
    Real Name
    Manfred Mueller

    re: RAW image size and storage

    Quote Originally Posted by bobg4nlk View Post
    The question really is about the memory address's used to store the data, if it can't be stored, it can't be used...recalled, modified etc. Most processors run out of steam (address lines) around 40Gb ie they can't address more than this 'on the fly'. Also, even a 10bit image, uncompressed would take up most of a decent sized hard drive, all this for an image that the human eye can't appreciate anyway. Our eyesight cant distinguish much above 10 meg colours. I do incidently appreciate the colours could be dragged off a drive in useable chunks, (I do have programming knowledge) but consider the time this would take.
    I have had this explained to me by wixperts together with the process of displaying 10 and 12 bit monochrome images on a bog-standard (8 bit) computer/monitor system.
    I would suggest that you ask graphics programing experts then.

    While some of us have varying degrees of technical knowledge, this is primarily a photographic site, rather than one that gets into the nitty gritty of what happens inside graphics processing engines, so while a few members might have some insight, most will not. Most are here because they want to improve their image making skills, whether that involves camera work or post-processing of data that a camera has captured.

    You are also confusing two different issues with respect to human vision and data. The 10MB is the total number of individual colours (shades) that the human visual system can resolve and has nothing to do with the total number of data bytes used to make up an image.

  17. #17
    Saorsa's Avatar
    Join Date
    Dec 2013
    Location
    Florida USA/Dunstable Beds.
    Posts
    1,435
    Real Name
    Brian Grant

    re: RAW image size and storage

    Quote Originally Posted by bobg4nlk View Post
    Cheers Ted, My question is really aimed at your last paragraph...I am trying to understand what happens to the vast amount of data produced in the image and how it gets to a usable form.

    Regards

    Bob Southall
    Regardless of the amount of data I think I can walk you through the storage process.

    Starting at the point that the shutter closes, the data is shifted From the sensor to internal random access memory (RAM) This is usually referred to as the cameras internal buffer memory. RAM is a description of a capability. In fact, the buffer is likely allocated to allow for efficient storage and retrieval in anything but a random method.

    Once the sensor data is in the buffer, processing begins. The parameters you set on your camera will affect the allocation of output buffer space. For example, shooting raw+jpeg vs. raw only, TIFF, image size, etc. The output buffer will also collect the EXIF data for the image. Some of this is static (camera model, etc.) others will be dynamic, (shooting mode, use of flash, shutter speed, etc.). Once the processing is complete, the file is transferred to the storage media in your camera, (the CF or SD card) as a file. If you are shooting in Raw the file is specific to each camera as is the software needed to process it. If you are shooting in jpeg, tiff, dng, etc. you will have a widely accepted format and not neet raw conversion software.

    If you are interested in the processing chips you can check out Thom Hogan's article on the Fuji Milbeaut and Nikon Expeed processor.

  18. #18
    pnodrog's Avatar
    Join Date
    Sep 2012
    Location
    Nomadic but not homeless, ex N.Z. now Aust.
    Posts
    4,154
    Real Name
    Paul

    re: RAW image size and storage

    Quote Originally Posted by bobg4nlk View Post
    Modern DSLR cameras, we are told produce images of 14 bit size when used in RAW mode. This means each image being 2^14 bits or16384 bits per channel. This gives an image size of 16384^3 (16384*16384*16384) = 4.398^12. Now for those not happy with mathematical notation this amounts to 4,398,046,511,000. (Four Trillion, 398 Billion,46 Million,511 Thousand.)... Now I know memory has come down dramatically of late, but where are these images stored. any display device must recall the image data from somewhere.
    This calculation is totally irrelevant to storage or file size. It gives the number of possible outcomes. A bit like saying 1 byte produces a storage requirement of 256. The question is based on a completely meaningless calculation and I suspect the author is aware of it. I apologise if he is not.
    Last edited by pnodrog; 21st July 2017 at 08:00 PM.

  19. #19
    pnodrog's Avatar
    Join Date
    Sep 2012
    Location
    Nomadic but not homeless, ex N.Z. now Aust.
    Posts
    4,154
    Real Name
    Paul

    Re: RAW image size and storage

    Quote Originally Posted by bobg4nlk View Post
    The question really is about the memory address's used to store the data, if it can't be stored, it can't be used...recalled, modified etc. Most processors run out of steam (address lines) around 40Gb ie they can't address more than this 'on the fly'. Also, even a 10bit image, uncompressed would take up most of a decent sized hard drive, all this for an image that the human eye can't appreciate anyway. Our eyesight cant distinguish much above 10 meg colours. I do incidently appreciate the colours could be dragged off a drive in useable chunks, (I do have programming knowledge) but consider the time this would take.
    I have had this explained to me by wixperts together with the process of displaying 10 and 12 bit monochrome images on a bog-standard (8 bit) computer/monitor system.
    For a 64bit processor with 42 address lines the figure is 512Gb. It is the implementation by the motherboard and operating system that are the limiting factor in address capability not the 42 address lines.

    Yes, you may have a bit of programming knowledge but certainly a very strange sense of humour.
    Last edited by pnodrog; 21st July 2017 at 10:48 PM.

Tags for this Thread

Posting Permissions

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