Why does the GETFRAME function in MATLAB produce movie frames of poor resolution?

조회 수: 12 (최근 30일)
If I display my image in a small axes and use the GETFRAME function to convert the image to a movie frame, the resulting movie frame has poor resolution.
For instance, using the code:
load trees
set (gca,'units','pixels','position',[100 100 100 100])
imagesc (X)
a = getframe(gca)
close all
imagesc (a.cdata)

채택된 답변

MathWorks Support Team
MathWorks Support Team 2009년 6월 27일
This change has been incorporated into the documentation in Release 14 Service Pack 3 (R14SP3). For previous releases, read below for any additional information:
The resolution of framed images depends on the size of the axes in pixels when the GETFRAME function is called. Since GETFRAME takes a snapshot of the screen, if the axes is small in size and/or you have restricted the view to a window within the axes, GETFRAME will capture fewer screen pixels. This will impact the resolution when the frame is enlarged for display.
To increase the framed image resolution, you can expand the axes or convert the image to a frame using the IM2FRAME function.
For example:
load trees
b= im2frame(X,map)
imagesc (b.cdata)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by