필터 지우기
필터 지우기

getframe has extra row and column

조회 수: 8 (최근 30일)
Rafael J.
Rafael J. 2012년 10월 24일
댓글: Rafael J. 2017년 2월 15일
I am trying to build an avi movie that is the exact magnification and quality of the original frames. I am using the following code, but M has frames that are 129x129, it is supposed to be 128x128. There is an extra row and column filled with the value 240. I have to manually "delete" the extra row and column using the block of code clearly self explanatory afterwards assigning only the 128x128 portion. What causes the extra row and column in M?:
for j=1:L1+L2
imshow(data3(:,:,j),v,'InitialMagnification',100)
colormap(gray)
M(j) = getframe;
end
for p=1:length(M)
all_frame(p).cdata(1:128,1:128,1:3)=M(p).cdata(1:128,1:128,1:3);
all_frame(p).colormap=M(p).colormap;
end
myVideo = VideoWriter('movie.avi','Uncompressed AVI');
open(myVideo);
writeVideo(myVideo, all_frame);
close(myVideo);
end
  댓글 수: 4
Adrin
Adrin 2014년 1월 22일
Hello,
Did you find any solution for this problem ?
Thank you in advance,
Rafael J.
Rafael J. 2017년 2월 15일
Hi Adrin,
Delayed response, but no I never found the solution to the problem.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by