フィルターのクリア

Does imshow account for monitor calibration?

5 ビュー (過去 30 日間)
KAE
KAE 2018 年 3 月 14 日
編集済み: KAE 2018 年 3 月 19 日
I am reading in TIF files and displaying them with imshow (example below). Outside of Matlab, I calibrated my monitor and produced an ICM file which is listed as the default in Color Management in Windows. Is the image displayed by imshow adjusted for my monitor calibration for the most accurate color? If not, how can I display an image with the most accurate colors based on my monitor calibration?
A = imread('myFile.tif');
imshow(A);
% Display info about the tif file in case it is useful
iminfo(A)
Format: 'tif'
FormatVersion: []
Width: 3105
Height: 4109
BitDepth: 24
ColorType: 'truecolor'
FormatSignature: [73 73 42 0]
ByteOrder: 'little-endian'
NewSubFileType: 0
BitsPerSample: [8 8 8]
Compression: 'Uncompressed'
PhotometricInterpretation: 'RGB'
StripOffsets: [1×257 double]
SamplesPerPixel: 3
RowsPerStrip: 16
StripByteCounts: [1×257 double]
XResolution: 600
YResolution: 600
ResolutionUnit: 'Inch'
Colormap: []
PlanarConfiguration: 'Chunky'
TileWidth: []
TileLength: []
TileOffsets: []
TileByteCounts: []
Orientation: 1
FillOrder: 1
GrayResponseUnit: 0.01
MaxSampleValue: [255 255 255]
MinSampleValue: [0 0 0]
Thresholding: 1
Offset: 38275344
YCbCrPositioning: 'Centered'

採用された回答

Walter Roberson
Walter Roberson 2018 年 3 月 14 日
imshow() has no idea about color profiles.
You might be able to use makecform / applycform to convert between the .icm and sRGB and imshow() or image() the resulting data. However, this would only make sense to do if sRGB was calibrated for your screen. So I guess more applicable would be to run some kind of calibration procedure for your screen to get a .icm for it, and then makecform / applycform to transform between the source .icm and your display.
  3 件のコメント
Walter Roberson
Walter Roberson 2018 年 3 月 14 日
Well you can either tune your display properties to provide a particular response, or you can figure out what response your display does give and have the software work backwards to figure out what it has to send to get your display to show a particular response. I did not want to assume that your display could be accurately tuned.
KAE
KAE 2018 年 3 月 16 日
編集済み: KAE 2018 年 3 月 19 日
In case it helps someone: I asked Matlab Support for an example of displaying an image with color corrected for the scanner which acquired the image, and for the monitor displaying it, which they kindly provided. Here it is. (I made a couple minor edits).
% Import your image to MATLAB
orig_img = imread('myTif.tif'); % Image acquired with scanner
% Find ICM file location
dirIcc = [iccroot '\'];
% Load source ICC profile. Here source will be the ICM profile for the
% scanner
% This ICM file was obtained by calibrating the scanner outside of Matlab
inprof = iccread([dirIcc 'myScanner.icm']);
% Load Destination ICC profile. Destination here will be the ICM profile
% for the monitor
% This ICM file was obtained by calibrating the monitor outside of Matlab
outprof = iccread([dirIcc 'myDisplay.icm']);
% Create a color transformation structure.You must create a color
% transformation structure to define the conversion between the color
% spaces in the profiles. You use the makecform function to create the
% structure, specifying a transformation type string as an argument.
C = makecform('icc',inprof,outprof);
% Perform the conversion. You use the applycform function to perform
% the conversion, specifying as arguments the color data you want to
% convert and the color transformation structure that defines the
% conversion. The function returns the converted data.
out_img = applycform(orig_img,C);
% Write the converted data to a file.
% It will not have the scanner ICC profile embedded, which is required
% if someone else will need to display the color correctly
% If this is desired, see
% https://blogs.mathworks.com/steve/2009/10/20/embedding-an-icc-profile-into-a-tiff-file/
imwrite(out_img,'correctedImage.tif','tif');
% Compare the two images
figure('Name', 'Original Image');
imshow(orig_img);
title('Original Image');
figure('Name', 'Corrected Image');
imshow(out_img);
title('Image Corrected for Scanner and Display Color Profiles');

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by