How to imshow to display colors consistently with other mac apps?

4 Ansichten (letzte 30 Tage)
Alec Jacobson
Alec Jacobson am 20 Nov. 2022
Kommentiert: Walter Roberson am 21 Nov. 2022
This appears to be a long standing issue but the question from 2015 didn't make much progress or reproduce easily. Here's what I've done
Z = repmat(uint8(cat(3,240,162,0)),512,512);
imshow(Z)
imwrite(Z,'orange.png');
Then open orange.png in a variety of different apps. Using Digital Color Meter.app we can see how the display is considering the color. Only Matlab's display is a direct mapping of the [240 162 0] values all others appear to have a (fairly consistent) color correction filter applied for display.
We can confirm that it's not a problem with imwrite writing the .png by seeing that photoshop agrees that the pixel values are [240 162 0].
Why is matlab's display inconsistent with other apps on mac? Is there a way to adjust matlab so that the colors match other applications/use this apparently system-wide color correction?
  3 Kommentare
Alec Jacobson
Alec Jacobson am 21 Nov. 2022
Yes, I think you're right. The default color profile on my macbook pro is called "Color LCD."
It seems that the matlab display is somehow bypassing the color profile. For example, some of the color profiles are really dramatic (switching orange to puce green). When I switch to this with all the windows of the orange square open, I see that at first they all change to puce green, including matlab. However, when I focus on the matlab window the imshow display switches back to orange and measures perfect [240, 162, 0].
Meanwhile, some of the color profiles (e.g., "Crestron, LG HDR 4K, LG TV, Sidecar Display, sRGBIEC61966-2.1") will change the orange in the other apps to measure [240, 162, 0]. My goal, however, is to tell matlab to respect the chosen color profile (rather than need to change the display so that matlab is in agreement, if that makes sense).
Walter Roberson
Walter Roberson am 21 Nov. 2022
I think I understand what you are doing; I just do not know how to do what you want. The only thing that comes to mind is somehow working out a representation of the active color profile and doing a mapping on the MATLAB colors. But I do not know how you would get an appropriate representation of the active color profile.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Install Products finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by