How to get a RGB matrix from a figure generated by MATLAB

1 visualización (últimos 30 días)
Thierry
Thierry el 28 de Mayo de 2015
Respondida: Image Analyst el 29 de Mayo de 2015
I make a figure with the help of PATCH command. (let's say 40k quad or tri individual patches) Then I'd like to get a RGB matrix from this figure.
Option 1 : cdata = print(fig,'-RGBImage') but it seems very inefficient in term of time consumption.
Option 2 : GETFRAME but appears to be very sensitive to the number of patch.
I'd like to use a more efficient way to do that since this is the bottle neck of the whole process.
Any idea of alternative or optimisation?

Respuestas (2)

Katarzyna Wieciorek
Katarzyna Wieciorek el 29 de Mayo de 2015
is imread inefficient too? imread

Image Analyst
Image Analyst el 29 de Mayo de 2015
I'd try getting cdata from the axes itself and not using print. I think that's like a low level trick. Otherwise, getframe() is the main way that you're supposed to do it.

Categorías

Más información sobre Images 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