How to add embedded frame in video?

 채택된 답변

Image Analyst
Image Analyst 2013년 5월 1일

0 개 추천

Use MATLAB. Maybe just average it into each frame. I have no idea really since you weren't specific enough. Do you have some algorithm in mind?

댓글 수: 2

Pritish
Pritish 2013년 5월 1일
편집: Image Analyst 2013년 5월 1일
tic
mov=aviread('C:\Users\PRIT\final1\wm1.avi');
ai=aviinfo('C:\Users\PRIT\final1\wm1.avi');
ai1 = mmreader('C:\Users\PRIT\final1\wm1.avi');
num=ai.NumFrames;
% disp (num);
im1 = read(ai1,1);
% b=rgb2gray(im1);
% imshow(im1);
disp(im1);
% c=de2bi(b);
% disp(c);
[m,n]=size(im1);
% d=c;
% disp(d);
b= reshape(im1,1,m*n);
disp(b);
% imshow(b);
.................................................
F1=fopen('e.txt');
c= fread(F1);
disp(c);
t1=uint8(c);
% im2 =im1';
% disp(im2);
t2=de2bi(t1);
disp(t2);
[o,p]=size(t2);
a= reshape(t2,1,o*p);
% % mat=padarray(im3,[0,1], 0, 'pre');
disp(a);
% [o,p]=size(mat);
.........................................
x=min(n,p)
for i=1:1
for j=1:x
% if(n==7)
%
% for k=1:o
% for l=1:p
b(i,j)=bitset(b(i,j),1,a(i*j));
% end
% end
%
end
end
% end
disp(b);
out= reshape(b,m,n);
% im7=imresize(b,[350 500]);
imshow(out);
SIR, this is a code for embedding text file. i have to add embedded frame into original video. i need ur help. please reply.
Why not just get rid of the loops over i and j and take the average:
b = uint8((double(b)+double(a))/2);
Is there anything wrong with that? Of course you could add weights to a and b to make a fainter or bolder.

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

추가 답변 (1개)

Pritish
Pritish 2013년 5월 1일

0 개 추천

SIR I HAVE CODE FOR THIS. tic mov=aviread('C:\Users\PRIT\final1\wm1.avi'); ai=aviinfo('C:\Users\PRIT\final1\wm1.avi');
ai1 = mmreader('C:\Users\PRIT\final1\wm1.avi'); num=ai.NumFrames; % disp (num);
im1 = read(ai1,1);
% b=rgb2gray(im1); % imshow(im1); disp(im1); % c=de2bi(b); % disp(c); [m,n]=size(im1); % d=c; % disp(d); b= reshape(im1,1,m*n); disp(b); % imshow(b); ................................................. F1=fopen('e.txt'); c= fread(F1); disp(c); t1=uint8(c); % im2 =im1'; % disp(im2); t2=de2bi(t1); disp(t2); [o,p]=size(t2); a= reshape(t2,1,o*p); % % mat=padarray(im3,[0,1], 0, 'pre'); disp(a); % [o,p]=size(mat);
......................................... x=min(n,p) for i=1:1 for j=1:x % if(n==7) % % for k=1:o % for l=1:p b(i,j)=bitset(b(i,j),1,a(i*j)); % end % end % end end % end disp(b); out= reshape(b,m,n); % im7=imresize(b,[350 500]); imshow(out);
AFTER EMBEDDING TEXT FILE INTO FRAME, I HAVE TO ADD THIS FRAME INTO ORIGINAL VIDEO.BUT I AM UNABLE TO DO THAT. I NEED UR HELP TO ADD EMBEDDED FRAME INTO VIDEO WITH SAME FRAME NUMBER.

댓글 수: 1

Image Analyst
Image Analyst 2013년 5월 1일
??? Is this the answer to your question? Or should it have been a comment to me? If you still have an issue, why did you accept my answer?

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

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by