Raw (.raw, .arw, .crw, .nef, .nrw, .dng, ...)


    • MIME types: image/x-raw-canon, image/x-raw-nikon, image/x-raw-sony, ...
    • Typically store not-processed sensor data.
    • Typically store uncompressed or lossless compressed data.

Import & Export

  • Import["file.raw"] imports a raw file and returns a viewable image.
  • Import["file.raw",elem] imports the specified element from a raw file.
  • The import format can be specified with Import["file","Raw"] or Import["file",{"Raw",elem,}].
  • See the reference page for full general information on Import.

Notebook Interface

  • In the notebook front end, Insert Picture and the Open menu allow the import of a raw file into a cell.

Import Elements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties, and settings
  • Data representation elements:
  • "Data"array of color values
    "Graphics"Graphics object representing an image
    "Image"raster image, given as an Image object
    "RawData"array of intensity values captured by the sensor
    "RawImage"image representing raw captured sensor data
    "EmbeddedThumbnail"thumbnail stored in the file, if available
    {"Thumbnail",size}thumbnail of a given size (default size = Small)
  • Import by default uses the "Image" element for raw image formats.
  • Advanced Import elements:
  • "BitDepth"bits used to represent raw pixels in the file
    "CameraTopOrientation"orientation of the camera when the picture was taken
    "Channels"the number of color channels used in the file
    "ColorProfileData"embedded color profile, given as a ColorProfileData object
    "ColorSpace"color encoding used in the file
    "Exif"formatted Exif (Exchange image file format)
  • whether the flash was fired
  • "FilterPattern"color filter array (cfa) used for demosaicing
    "GeoPosition"latitude and longitude represented as a GeoPosition object
  • image creation date and time registered by GPS
  • "ImageSize"raster dimensions
    "RedEyeCorrection"whether a red-eye correction was performed
  • summary of the file
  • Raw Exif, as stored in the file, can be imported using "RawExif" elements, returned as an association.
  • All Exif tags can be imported individually. Common tags include:
  • "ApertureValue"lens aperture
    "Artist"photographer or image creator
    "DateTime"image creation date and time
    "ExposureTime"exposure time, given in seconds
  • flash information: flash fired, red-eye correction, etc.
  • "FNumber"F number
    "FocalLength"actual focal length of the lens, given in millimeters
    "GPSAltitude"altitude of the GPS position
    "GPSLatitude"latitude of the GPS position
    "GPSLongitude"longitude of the GPS position
    "Make"manufacturer of the recording equipment
    "Model"model name or model number of the equipment
    "Software"name and version of the software or firmware of the camera or image input device used to generate the image



open all close all

Basic Examples  (2)

Import a Raw file:

Click for copyable input

Summary of an image:

Click for copyable input

Scope  (2)

Import Elements  (23)

Import Options  (4)

Introduced in 2015
Updated in 2018