Borrar filtros
Borrar filtros

Getting " Yet Another Color Gamut Visualizer" App Working

16 visualizaciones (últimos 30 días)
M345
M345 el 15 de Jul. de 2024 a las 1:24
Editada: DGM el 15 de Jul. de 2024 a las 4:22
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

Respuestas (2)

Image Analyst
Image Analyst el 15 de Jul. de 2024 a las 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 el 15 de Jul. de 2024 a las 4:07
Editada: DGM el 15 de Jul. de 2024 a las 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.

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by