Azzera filtri
Azzera filtri

Convert images into .Mat files

21 visualizzazioni (ultimi 30 giorni)
pizzaa
pizzaa il 19 Mag 2023
Risposto: Piyush Dubey il 30 Mag 2023
Hi guys i have 6 of this images. I want to try to make it into .mat files. Just like this
In the picture above, u can see that there is 3 images that has 65536 in size. Now i want to turn my 6 images into .mat files just like this picture above.
What kind of code do i use?? thanks
  2 Commenti
Dyuman Joshi
Dyuman Joshi il 19 Mag 2023
Modificato: Dyuman Joshi il 19 Mag 2023
"In the picture above, u can see that there is 3 images that has 65536 in size."
Are you sure about that?
Ideally you can use a loop to achieve this, As you have named the images serially, but make sure that all the images are in the current directory.
for k=0:5
str = sprintf('chrome.%d.png', k)
I = imread(str);
out = sprintf('chrome%d.mat');
save(out, I)
end
KSSV
KSSV il 19 Mag 2023
Why and how your images are row dominant?

Accedi per commentare.

Risposta accettata

Piyush Dubey
Piyush Dubey il 30 Mag 2023
Hi Putra,
Images need not be converted to .mat extension. Images can be read using imread() function and then saved with .mat extension. More clarity can be obtained on a similar MATLAB Answer’s thread attached below:
Hope this helps.

Più risposte (0)

Categorie

Scopri di più su Convert Image Type in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by