主要内容

安全转换中心imágenes y vídeo

vídeo档案中心和中间影像档案的安全VideoReaderyVideoWriter

拉玛多博物馆shuttle.avicontinene 121照相图。中间影像档案的摄影摄影VideoReaderY la funciónimwrite.Después, convierta los archivos de imagen a un archiivo AVI medianteVideoWriter

Configuracion

Cree una carpet de trabajo temporal para almacenar la secuencia de imágenes。

workingDir = tempname;mkdir (workingDir) mkdir (workingDir,“图片”

Crear un videereader

克里族联合国VideoReader档案摄影之旅。

shuttleVideo =视频阅读器(“shuttle.avi”);

Crear la secuencia de imágenes

记录仪vídeo地图上的地图上的地图上的锚上的地图3羊驼img.档案图像JPEG格式不明确imgN.jpg, enel que N es el número de fotogramas。

| img001.jpg |

| img002.jpg |

| |…

| img121.jpg |

Ii = 1;hasFrame(shuttleVideo) img = readFrame(shuttleVideo);文件名= [sprintf(' % 03 d ',(二)“jpg”];fullname = fullfile(workingDir,“图片”文件名);fullname imwrite (img)写入JPEG文件(img1.jpg、img2.jpg等)Ii = Ii +1;结束

意象档案的恩宠

地毯档案命名中心图片.与人交往,与人交往,与人交往,与人交往。

imageNames = dir(fullfile(workingDir,“图片”‘* . jpg”));imageNames = {imageNames.name}';

Crear nuevos vídeos con la secuencia de imágenes

识识不反对VideoWriter, que crea un archiivo AVI动作jpeg形式上预先确定。

outputVideo = VideoWriter(fullfile(workingDir)“shuttle_out.avi”));outputVideo。FrameRate = shuttleVideo.FrameRate;打开(outputVideo)

安全的记录imágenes,想象的货物escríbala和vídeo。

ii = 1:长度(imageNames) img = imread(fullfile(workingDir,“图片”, imageNames {2}));writeVideo (outputVideo img)结束

Finalice el archivo de vídeo。

关上(outputVideo)

Ver el vídeo final

解释不清楚。

shutleavi = videereader (fullfile(workingDir,“shuttle_out.avi”));

Cree una estructura de película de MATLAB®a partir de los fotogramas del vídeo。

Ii = 1;hasFrame(shuttleAvi) mov(ii) = im2frame(readFrame(shuttleAvi));Ii = Ii +1;结束

Cambie el tamaño de la figura y los ejes actuales según el ancho y el alto del vídeo y vea el primer fotography de la película。

图imshow (mov .cdata (1),“边界”“紧”

图中包含一个轴对象。axis对象包含一个image类型的对象。

重现la película una vez a la velocidad de fotogramas del vídeo。

电影(mov 1 shuttleAvi.FrameRate)

作为

Vídeo del transbordador space cortesía de la NASA。