www.gusucode.com > images 案例代码 matlab源码程序 > images/ReadAndVisualize12bitRGBImageExample.m
%% Read and Visualize 12-bit RGB Image % %% % Read image from DPX file into the workspace. % Copyright 2015 The MathWorks, Inc. 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)