This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

dpxread

Read DPX image

Syntax

X = dpxread(filename)

Description

example

X = dpxread(filename) reads image data from the DPX file specified by filename, returning the image X.

Digital Picture Exchange (DPX) is an ANSI standard file format commonly used for still-frame storage in digital intermediate post-production facilities and film labs.

Examples

collapse all

Read image from DPX file into the workspace.

RGB = dpxread('peppers.dpx');

Create a scale factor based on the data range of the image data. The image needs to be scaled to span the 16-bit data range expected by imshow.

maxOfDataRange = 2^12 - 1;
scaleFactor = intmax('uint16') / maxOfDataRange;

Display the image.

figure
imshow(RGB * scaleFactor)

Input Arguments

collapse all

Name of a DPX file, specified as a string scalar or character vector. filename can contain the absolute path to the file, the name of a file on the MATLAB path, or a relative path.

Example: RGB = dpxread('peppers.dpx');

Data Types: char | string

Output Arguments

collapse all

Image data from DPX file, returned as a real, nonsparse numeric array of class uint8 or uint16, depending on the bit depth of the pixels in filename.

See Also

Introduced in R2015b