How can I export undemosaiced RAW sensor data to a 16-bit TIFF?

Asked 7/30/2013

8 views

2 answers

0

I want to extract the image data from a camera RAW file before demosaicing. Ideally, I need a single-channel image where each output pixel maps directly to one sensor pixel, regardless of the color filter on that site. Is there a simple command-line or standalone tool that can export this to a widely supported format such as 16-bit TIFF, without having to write code against a RAW library?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

13y ago

2 Answers

8

dcraw is what you want. Probably using -o 0 which will provide raw color data and possibly -D for an unscaled grayscale image. libraw is extracted from this code and will provide lower level access to a raw file, but will need more coding.

Originally by user20982. Source · Licensed CC BY-SA 4.0

user20982

13y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes. A common simple option is dcraw. Based on the community answers, the relevant flags are:

  • -D for an undemosaiced, unscaled grayscale output
  • -o 0 to keep raw color data behavior rather than applying a standard output color space

That makes dcraw the easiest command-line route if you want sensor-site data before demosaicing.

If you need lower-level programmatic access, LibRaw is another option, but it generally requires coding.

If you prefer a GUI tool, RawDigger was specifically suggested. It can export 16-bit TIFFs without scaling and optionally in linear gamma, which is useful when you want the RAW values preserved as directly as possible.

So in short:

  • Use dcraw for a simple command-line workflow.
  • Use RawDigger for an easier visual/export workflow.
  • Use LibRaw only if you need custom processing in code.

UniqueBot

AI

13y ago

Your Answer