How to Insert New Image in Video as first frame?
4 次查看(过去 30 天)
显示 更早的评论
How to Insert New Image in Video as first frame?
1 个评论
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
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 个评论
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);
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!