Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
想象一下,你在一个图中绘制了几个点、圆、线。之后,另一个 m 文件应该使用这个图作为输入来进行阈值处理。我知道 print 命令,但我不希望将绘图存储为文件。我更愿意将它存储在矩阵(x_dim,y_dim,3)中。有任何想法吗?
您应该检查函数getframe并将frame2im图形或轴对象转换为图像矩阵。
getframe
frame2im
如何保存到图像?您可以使用getframe获取框架对象 F,其中 F.cdata 包含 RGB 值。请记住使用'border', 'tight'选项来避免捕获边界。
'border', 'tight'