movie resolution using getframe
4 views (last 30 days)
Show older comments
hello.
I have a problem for generate a HD resolution movie (1920x1200) but as the computer monitor do not have HD resolution i cant using getframe function because each frame is the size of window plot (max resolution of computer monitor (1680x1050) and not as defined. for exemplo:
scrsz = get(0,'ScreenSize'); %getting the screensize of the 1 screen
figure('Position',[1 0 1920 1200],'MenuBar','none','ToolBar','none','resize','off') % fullscreen
% Prepare the new file.
vidObj = VideoWriter('peaks.avi');
open(vidObj);
% Create an animation.
Z = peaks; image(Z);
axis tight
set(gca, 'CLim',[0,1],'position',[0 0 1 1],'Visible','off')
for k = 1:20
imagesc(sin(2*pi*k/20)*Z),colormap jet
% Write each frame to the file.
currFrame = getframe;
writeVideo(vidObj,currFrame);
end
% Close the file.
close(vidObj);
So, the generated movie peaks.avi have a resolution of computer monitor and not (1920x1200).
what i do? exist other way to generate a movie without need plot a figure (using getframe)?
thank...
0 Comments
Accepted Answer
Image Analyst
on 20 Aug 2012
Notice the third option for writeVideo:
writeVideo(writerObj,img) writes data from an image to a video file.
So create an image and then display the hi-res ( not HD because HD is only 1080 lines tall) image, and then call writeVideo(). I haven't tried it but it claims that it will write out the image, which can be any resolution, as opposed to currFrame which can only be as large as your monitor.
More Answers (0)
See Also
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!