Borrar filtros
Borrar filtros

Convert, 3D matrix to Video

21 visualizaciones (últimos 30 días)
Khawaja Asim
Khawaja Asim el 19 de Abr. de 2014
Respondida: Melika Bahmanabasdi el 8 de Mayo de 2020
I want to convert a 3D matrix, say "100x150x75" to a video in matlab. How can I do that? I have converted a 3D matrix to a video, but output was very distorted video.

Respuestas (1)

Melika Bahmanabasdi
Melika Bahmanabasdi el 8 de Mayo de 2020
VidObj = VideoWriter('movie.avi', 'Uncompressed AVI'); %set your file name and video compression
VidObj.FrameRate = 30; %set your frame rate
open(VidObj);
for f = 1:size(T, 3) %T is your "100x150x75" matrix
writeVideo(VidObj,mat2gray(T(:,:,f)));
end
close(VidObj);

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by