Convert Pictures into Array

Hi guys i want to ask, how do you convert multple .JPG images into .mat files??
This is the picures that i want to convert into .mat files
Into an array just like this
Please help thanks

 Respuesta aceptada

Image Analyst
Image Analyst el 4 de Mzo. de 2023
You already have your JPG files saved on disk. Why do you want to group them with other variables and save them to disk again? This will take up twice as much space. I would just save only the additional variables to a .mat file.
save('answers.mat', 'mask', 'L');
Actually I'd save the mask file as a PNG image file and save only L to a .mat file
imwrite(mask, 'mask.png');
save('answers.mat', 'L');

Más respuestas (1)

Anton Kogios
Anton Kogios el 4 de Mzo. de 2023

0 votos

You can use imread to import the images to MATLAB and then use save to save them as a .mat file

Categorías

Más información sobre Convert Image Type en Centro de ayuda y File Exchange.

Productos

Versión

R2022b

Preguntada:

el 4 de Mzo. de 2023

Respondida:

el 4 de Mzo. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by