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

조회 수: 1 (최근 30일)
Thierry
Thierry 2015년 5월 28일
답변: Image Analyst 2015년 5월 29일
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?

답변 (2개)

Katarzyna Wieciorek
Katarzyna Wieciorek 2015년 5월 29일
is imread inefficient too? imread
  댓글 수: 1
Image Analyst
Image Analyst 2015년 5월 29일
You can't use imread() to pull a picture from an axes control.

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


Image Analyst
Image Analyst 2015년 5월 29일
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.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by