rawinfo
Syntax
Description
Examples
Retrieve metadata from a RAW image file.
info = rawinfo("colorCheckerTestImage.NEF");
Examine the CFALayout
field to determine the sensor layout.
sensor_layout = info.CFALayout
sensor_layout = "RGGB"
Input Arguments
Name of RAW file, specified as a string scalar or character vector. Specify
filename
as a full path, containing the file name and extension,
or as a relative path from the current folder or from any folder on the MATLAB® path.
The rawinfo
function does not support RAW file formats that
employ JPEG compression.
Data Types: char
| string
Output Arguments
Metadata from the RAW file, returned as a struct
with these
fields.
Field | Description |
---|---|
Filename | String scalar specifying the full name, including the path, to the RAW image file. |
CFASensorType | String scalar specifying the type of the sensor that captured the
image. |
CFALayout | String scalar specifying the sensor layout for Bayer sensors. Sensor
layouts supported by rawinfo include but are not limited to
"BGGR" , "RGGB" ,
"GBRG" , and "GRGB" . For non-Bayer
sensors, this value is empty. |
CFAImageSize | Two-element row vector of type double specifying the
total number of rows and columns present in the CFA image. |
SamplesPerPixel | Scalar of type double specifying the number of samples
in every pixel of the image. |
ImageSizeInfo | Structure containing all the size information that describes a CFA image. |
ColorInfo | Structure containing all of the color information required to render an RGB image from the CFA image. |
ExifTags | Structure containing the EXIF Tags, if any, present in the file. The
Makernotes , if any, are included in this field. |
LensInfo | Structure containing information about the lens used to capture the image. |
MiscInfo | Structure containing information, if any, about the camera and image creator present in the file. |
XMPData | String scalar containing the Adobe Extensible Metadata Platform (XMP) data, if any, present in the file. |
FormatSpecificInfo | Structure containing format specific information, such as DNG Tags and X-Trans sensor layout descriptions. If no format specific information is available, this value is an empty structure. |
LibrawVersion | String scalar specifying the version of the LibRaw library currently being used. LibRaw is a library for reading RAW files obtained from digital photo cameras. For more information, see libraw.org. |
More About
The RAW file format preserves image data in its most unedited state, recorded directly from the camera sensor. Most camera manufacturers define their own proprietary RAW file format, such as the Nikon NEF file format and the Canon CRW format. Adobe has also defined a RAW file format, DNG (digital negative), which is supported by several cameras. The name of the format is typically capitalized, like other file formats such as JPG and TIF. However, unlike other file formats, RAW is not an acronym.
Version History
Introduced in R2021aThe function now reads CFA image data using LibRaw version 0.21.4.
The function now uses LibRaw version 0.21.1 for reading the CFA image data.
The function now reads CFA image data using LibRaw version 0.20.2. Before, the function used LibRaw version 0.20.0.
See Also
raw2planar
| rawread
| planar2raw
| raw2rgb
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)