1

This might seem like a general question, however I could not find an answer for. Specifically, I am using a CMOS image sensor that has the following general capabilities:

  • Array Size: 1280 x 1024 (SXGA), can also take 640 x 480 (VGA)
  • Output Formats (10-bit): Raw RGB Data

When I take an SXGA (1280 x 870), i store the file (pragmatically) with a .RAW extension. The file size is about 1000 KB. When I take a VGA (640 x 480) the size is about 300 KB.

Are they already considered as "compressed"? Is is possible to compress these to a smaller size (both lossless tiff and lossy jpeg maybe)?

So far, I am convinced that the images I am taking don't have a specific format and are considered as Raw bitmap. Am I wrong?

References to achieve my goal is much appreciated.

  • 1
    What is your overall goal? Will the image data be analysed scientifically or is it solely for display purposes? As you stated in another comment, transfer time is off the essence in a limited bandwidth environment so you might want to be more clear about that. – John Hawthorne Sep 25 at 10:25
  • Both. Thus doesn't need to be 100% resolution or definition. I am looking for a good quality with reduced transfer time, I am trying to balance between both. – Sarah cartenz Sep 25 at 11:42
  • Just zip the files. – Eric Shain Sep 25 at 12:40
  • 1
    FWIW, The "raw bitmap" class of files to which your link refers are a different thing from the "RAW" images that are discussed on this site. A single-chip, color image sensor does not record RGB values for every pixel. It records just red for some pixels, just green for some, and just blue for others. A RAW image from a camera contains nothing but those individual, single-color pixel values. The process of converting that to an RGB image is called "demosaicing." I think that the camera that you're using does the demosaicing for you, and then it gives you the RGB image as a "raw bitmap." – Solomon Slow Sep 25 at 14:57
  • 1
    @Sarahcartenz What are you using to connect with and pull data from the sensor? What are you photographing? What is your "goal"? – xiota Sep 25 at 19:38
2

1280 * 1024 * 10 / 8 = 1638400 bytes.
640 * 480 * 10 / 8 = 384000.

Anything smaller than that must be compressed. Specifically, if you see varying file sizes depending on image content, you know that some compression is going on.

But really, if you want to do something with the data, you have to know the image format anyway and if you know how to decode it, you know whether it is compressed or not.

Once you have the decoded image, you can store it in whatever other format you like, be it TIFF or JPEG.

You can, of course, also try to zip the raw files.

  • The reason why it needs to be compressed to a smaller size is because once its stored in a RAW file, it must be transmitted through air with a limited bandwidth, all other processing will be done in the receiver part. A smaller size will enable it to transfer in a shorter time where time is of essence in this application. Is there anyways I can compress without decoding ? – Sarah cartenz Sep 25 at 8:22
  • 1
    like i said, zip it. (or any other flavour of general-purpose compression algorithm). by definition, you can't apply image specific algorithms without first obtaining an image, ie. decoding. – ths Sep 25 at 8:26
  • You can't zip an image file like you do a text file. It just doesn't work that way. – Tetsujin Sep 25 at 9:36
  • 4
    So we're not talking about a camera raw file, we're talking about data right from an imaging chip. In which case, this doesn't belong on here, it belongs on stack overflow. This is way beyond "photography" & into data processing. – Tetsujin Sep 25 at 10:08
  • 2
    note that ~300KB raw image for a 640x480 color camera means you also need demosaicing step before the jpeg compression - otherwise you would be compressing grayscale bayer pattern, which is the least sane thing you can do with jpeg – szulat Sep 25 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.