我们如何在matlab中不使用坐标轴或任何其他选项显示图像?
答
axes
本身并不实际显示图像,该行仅创建一个可放置图像的对象axes
。如果您想显示图片,您可能需要使用imshow
。
如果您想要并排显示两张图像,subplot
也可能有所帮助。
hax1 = subplot(1,2,1);
imshow(img1, 'Parent', hax1);
hax2 = subplot(1,2,2);
imshow(img2, 'Parent', hax2);
+0
谢谢你的答案。@ Suever But actually axes(handles.axes1); imshow(grayImage,'Parent',handles.axes2); %显示在轴2,而不是轴1。 title('The Image'); –
+0
@Waqas_Ahmad当然,它显示在axes2中,因为您将它指定为父轴 – Suever
谷歌“matlab显示图像”... – Piglet