How to add embedded frame in video?

Asked by Pritish about 15 hours ago
Latest activity Commented on by Image Analyst about 10 hours ago

How to add embedded frame in video?

0 Comments

Pritish

Products

No products are associated with this question.

2 Answers

Answer by Image Analyst about 15 hours ago
Accepted answer

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 Comments

Pritish about 14 hours ago
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.
Image Analyst about 10 hours ago

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.

Image Analyst
Answer by Pritish about 14 hours ago

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 Comment

Image Analyst about 10 hours ago

??? 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?

Pritish

Contact us