How to Insert New Image in Video as first frame?

4 visualizaciones (últimos 30 días)
voxey
voxey el 20 de Jun. de 2019
Comentada: rasika priyadarshana el 4 de Abr. de 2020
How to Insert New Image in Video as first frame?
  1 comentario
rasika priyadarshana
rasika priyadarshana el 4 de Abr. de 2020
function out=in_icon(A,im)
mov=Vread(A);
G=imread(im);
f=size(mov,2);
[h1 w1 c1]=size(G);
for k=1:1
mov(k).cdata(1:h1, 1:w1,:)=G;
end
out=mov;
implay(mov);

Iniciar sesión para comentar.

Respuestas (1)

Vismay Raj
Vismay Raj el 20 de Jun. de 2019
Read the video using
videoObj = mmreader(FileName);
video = videoObj.read();
% the nth frame is accessed by video(:,:,:,n)
Read the image and append it
img = imread(filename);
video = cat(4,img,video);
  2 comentarios
voxey
voxey el 24 de Jun. de 2019
Vismay Raj , Its show Error. its not realated to my question.
rasika priyadarshana
rasika priyadarshana el 4 de Abr. de 2020
function out=in_icon(A,im)
mov=Vread(A);
G=imread(im);
f=size(mov,2);
[h1 w1 c1]=size(G);
for k=1:1
mov(k).cdata(1:h1, 1:w1,:)=G;
end
out=mov;
implay(mov);

Iniciar sesión para comentar.

Productos


Versión

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by