How do i convert an image plot to a matrix.

29 Ansichten (letzte 30 Tage)
ronald
ronald am 21 Nov. 2014
Beantwortet: Leslie Solorzano am 16 Dez. 2016
I was wondering if it was possible to create a matrix out of a figure plot.
I would be grateful for any help. Thanks.

Antworten (3)

Image Analyst
Image Analyst am 21 Nov. 2014
You can use export_fig

Leslie Solorzano
Leslie Solorzano am 16 Dez. 2016
https://se.mathworks.com/help/matlab/ref/frame2im.html

Ben11
Ben11 am 21 Nov. 2014
Maybe I misunderstood but you might want to use getframe and get the cdata property:
Example:
x = -10:10;
y = x.^2;
plot(x,y)
Frame = getframe(gcf)
FrameData = Frame.cdata; %// This is a matrix that you can plot/show with imshow.

Kategorien

Mehr zu Convert Image Type finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by