How to Insert New Image in Video as first frame?

조회 수: 3 (최근 30일)
voxey
voxey 2019년 6월 20일
댓글: rasika priyadarshana 2020년 4월 4일
How to Insert New Image in Video as first frame?
  댓글 수: 1
rasika priyadarshana
rasika priyadarshana 2020년 4월 4일
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);

댓글을 달려면 로그인하십시오.

답변 (1개)

Vismay Raj
Vismay Raj 2019년 6월 20일
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
voxey
voxey 2019년 6월 24일
Vismay Raj , Its show Error. its not realated to my question.
rasika priyadarshana
rasika priyadarshana 2020년 4월 4일
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);

댓글을 달려면 로그인하십시오.

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by