Getting " Yet Another Color Gamut Visualizer" App Working

15 次查看(过去 30 天)
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,1:54
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,4:07
编辑:DGM 2024-7-15,4:22
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 CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by