dpxread

Read DPX image

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