Please help me with this .tif to .mat file conversion

9 visualizaciones (últimos 30 días)
Yogesh Awate
Yogesh Awate el 28 de Nov. de 2017
Comentada: Yogesh Awate el 28 de Nov. de 2017
pic1 = imread('IMG_1.tif');
pic2 = imread('IMG_2.tif');
pic3 = imread('IMG_3.tif');
pic4 = imread('IMG_4.tif');
pic5 = imread('IMG_5.tif');
save('MultiUAV1.mat', 'pic1', 'pic2', 'pic3', 'pic4', 'pic5');
I am trying to convert these .tif images(960 x 1280 uint16) into a single .mat file(960 x 1280 x 5 uint16), instead it is creating separate files(960 x 1280 unit6) into mutliple.
Please help me getting single .mat file(960 x 1280 x 5 uint16)
Thank you in advance!

Respuesta aceptada

KSSV
KSSV el 28 de Nov. de 2017
Editada: KSSV el 28 de Nov. de 2017
images = {'IMG_1.tif','IMG_2.tif','IMG_3.tif','IMG_4.tif','IMG_5.tif'} ;
N = length(images) ;
I = zeros(960,1280,N) ;
for i = 1:N
I1 = imread(images{i}) ;
I(:,:,i) = I1 ;
end
save MultiUAV1.mat I ;
  3 comentarios
KSSV
KSSV el 28 de Nov. de 2017
Edited...
Yogesh Awate
Yogesh Awate el 28 de Nov. de 2017
Thanks a lot for help!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Import and Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by