storing an image

1 visualización (últimos 30 días)
Pat
Pat el 12 de En. de 2012
I have taken a video converted in number of frames and created a folder named NEW ,
nframes is 40
for k = 1:nFrames
................. .................
end
please tell how to write imaged into NEW folder in that for loop
  1 comentario
Chandra Kurniawan
Chandra Kurniawan el 12 de En. de 2012
you mean, you've managed to split video file into frames?
and now you want to save the image frames into a folder?

Iniciar sesión para comentar.

Respuesta aceptada

Chandra Kurniawan
Chandra Kurniawan el 12 de En. de 2012
obj = mmreader('yourvideofile.avi');
vid = read(obj);
nFrame = 5;
for k = 1 : nFrame
newname = strcat('frame0',num2str(k),'.jpg');
imwrite(vid(:,:,:,k), newname);
end
  2 comentarios
Pat
Pat el 12 de En. de 2012
Thanks chandra can u plz tell how to calculate cluster centroids using k means algorithm..please
Chandra Kurniawan
Chandra Kurniawan el 12 de En. de 2012
I'm sorry, Pat.
But, I'm not experienced here.
My greatest apology.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by