GOP1.m
上传用户:cxsjwj
上传日期:2022-08-09
资源大小:34k
文件大小:2k
- function [B2,B3,P4,B5,B6,P7,B8,B9,I10]=GOP1(i,resize,long,wide)
- %reading P4 frame
- framedata=aviread('news.avi',i+3);
- P4=frame2im(framedata);
- if resize==1
- P4=imresize(P4,[long,wide]);
- end
-
- P4=P4(:,:,1);
- P4=double(P4);
-
-
- %reading B2 frame
- framedata=aviread('news.avi',i+1);
- B2=frame2im(framedata);
- if resize==1
- B2=imresize(B2,[long,wide]);
- end
-
- B2=B2(:,:,1);
- B2=double(B2);
- %reading B3 frame
- framedata=aviread('news.avi',i+2);
- B3=frame2im(framedata);
- if resize==1
- B3=imresize(B3,[long,wide]);
- end
-
- B3=B3(:,:,1);
- B3=double(B3);
- %reading B5 frame
- framedata=aviread('news.avi',i+4);
- B5=frame2im(framedata);
- if resize==1
- B5=imresize(B5,[long,wide]);
- end
-
- B5=B5(:,:,1);
- B5=double(B5);
- %reading B6 frame
- framedata=aviread('news.avi',i+5);
- B6=frame2im(framedata);
- if resize==1
- B6=imresize(B6,[long,wide]);
- end
-
- B6=B6(:,:,1);
- B6=double(B6);
- %reading B8 frame
- framedata=aviread('news.avi',i+7);
- B8=frame2im(framedata);
- if resize==1
- B8=imresize(B8,[long,wide]);
- end
-
- B8=B8(:,:,1);
- B8=double(B8);
- %reading B9 frame
- framedata=aviread('news.avi',i+8);
- B9=frame2im(framedata);
- if resize==1
- B9=imresize(B9,[long,wide]);
- end
-
- B9=B9(:,:,1);
- B9=double(B9);
- %reading I10 frame
- framedata=aviread('news.avi',i+9);
- I10=frame2im(framedata);
- if resize==1
- I10=imresize(I10,[long,wide]);
- end
-
- I10=I10(:,:,1);
- I10=double(I10);
- %reading P7 frame
- framedata=aviread('news.avi',i+6);
- P7=frame2im(framedata);
- if resize==1
- P7=imresize(P7,[long,wide]);
- end
-
- P7=P7(:,:,1);
- P7=double(P7);