フィルターのクリア

Getting " Yet Another Color Gamut Visualizer" App Working

6 ビュー (過去 30 日間)
M345
M345 2024 年 7 月 15 日
編集済み: DGM 2024 年 7 月 15 日
Hello,
I found an app on File Exchange that does exactly what I'm looking for. it's called "Yet Another Color Gamut Visualizer"
I must warn you I'm new to Matlab, and I'm trying to teach myself, I've learned some stuff, but getting this app to work has been challenging
I have a table of CIELAB points, and I want to build a 3D color gamut from them. This app seems to be exactly what I need, but I keep getting errors.
Here's one of the LAB points as an example
L* = 88.25
a* = 17.46
b* = 10.06
The inputs that are stated in the app are GAMUTVIEW(COLORS, DRIVE_VALUES, TYPE)
COLORS = I'm pretty sure this is my list of LAB values, or I could convert these to RGB values
DRIVE_VALUES = I think this would be my LAB values as the actual plot of how it would appear in 3D space
TYPE = I think this would be blank, as I only have LABs and RGB values, and I don't need to convert
This is the error I get all the time, and I don't know what it means
>> gamutview rgb,gamut
Unrecognized function or variable 'setstructfields'.
Error in gamutview>parse (line 224)
p = setstructfields(parser.Results, parser.Unmatched);
Error in gamutview (line 63)
[white_point, patch_properties, parent] = parse(varargin{:});
Any help would be greatly appreciated

回答 (2 件)

Image Analyst
Image Analyst 2024 年 7 月 15 日
I don't know about that particular File Exchangeitem but if you want to look at the gamut of your actual image, you might check out the built-in colorcloud.

DGM
DGM 2024 年 7 月 15 日
編集済み: DGM 2024 年 7 月 15 日
That FEX submission uses setstructfields() from the Signal Processing Toolbox.
which setstructfields() -all
/MATLAB/toolbox/signal/sigtools/setstructfields.m
For most practical cases, you can get away with replacing that line with this block of code:
% replace setstructfields() (mostly)
p = parser.Results;
fnames = fieldnames(parser.Unmatched);
for k = 1:numel(fnames)
p.(fnames{k}) = parser.Unmatched.(fnames{k});
end
That's a bit of a simplification over setstructfields() and won't handle nested struct inputs, but I don't expect there to be a need for passing struct parameters to patch() or anything.
There are also other, complete implementations on GitHub that can be found with a web search.

カテゴリ

Help Center および File ExchangeImages についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by