Hello guys
I got a smal Problem. I got a Logical array which i want to save as a jpg. But i have to convert it to a differend type of datatype. How i should convert it to save it? I want to use this:
imwrite(kl , [hg f1 '.jpg'],'jpg');
hg is the Path where i want to save it
f1 is the name of the new png
kl is the logical array
Thanks for your help :D

 Respuesta aceptada

KSSV
KSSV el 25 de Jul. de 2017

1 voto

If k1 is your logical..convert it to double
k1 = double(k1) ;

2 comentarios

Martin Mieß
Martin Mieß el 25 de Jul. de 2017
i have alredy tried this, than i get this Error:
Error using imwrite>parse_inputs (line 531) Expected COLORMAP to be one of these types:
double, single, uint8, uint16, uint32, uint64, int8, int16, int32, int64
Instead its type was cell.
Error in imwrite (line 418) [data, map, filename, format, paramPairs] = parse_inputs(varargin{:});
Martin Mieß
Martin Mieß el 25 de Jul. de 2017
But thanks,
cause of your answer i rethought the error and realized that not kl was meant with the error, f1 was e cell not a char. Thanks for that answer :D

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Images en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 25 de Jul. de 2017

Comentada:

el 25 de Jul. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by