Convert Pictures into Array

조회 수: 32 (최근 30일)
pizzaa
pizzaa 2023년 3월 4일
답변: Image Analyst 2023년 3월 4일
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
  댓글 수: 1
pizzaa
pizzaa 2023년 3월 4일
I m just so confused,, pls help

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2023년 3월 4일
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');

추가 답변 (1개)

Anton Kogios
Anton Kogios 2023년 3월 4일
You can use imread to import the images to MATLAB and then use save to save them as a .mat file

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by