Image 如何在图形中以正确的顺序显示图像?
在绘图中显示图像时出现问题。图像在图形窗口中倒置。你知道如何解决这个问题吗 以下是我在图形中显示图像的代码:Image 如何在图形中以正确的顺序显示图像?,image,matlab,plot,Image,Matlab,Plot,在绘图中显示图像时出现问题。图像在图形窗口中倒置。你知道如何解决这个问题吗 以下是我在图形中显示图像的代码: % Load the image img = imread('KAM-Map_12s.bmp'); hold on; % Plot the image, with x and y coordinnates image([100 350],[3.5 4.7],img) 我已经使用函数集(gca,'YDir','reverse')来反转图片,但是图形也反转了。我将非常感谢你的帮助 提前感谢
% Load the image
img = imread('KAM-Map_12s.bmp');
hold on;
% Plot the image, with x and y coordinnates
image([100 350],[3.5 4.7],img)
我已经使用函数集(gca,'YDir','reverse')
来反转图片,但是图形也反转了。我将非常感谢你的帮助
提前感谢将行更改为:
image([100 350],[4.7 3.5],img)
由于图像/矩阵的行是从上到下存储的,而不是从下到上存储的。请注意,图像和矩阵的坐标在MATLAB中是不同的,请参见: