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

12 visualizaciones (últimos 30 días)
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)

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 27 de Jun. de 2009
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)

Más respuestas (0)

Categorías

Más información sobre Printing and Saving en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by