2
我在繪圖中顯示圖像時出現問題。圖像在圖形窗口中倒置。你知道如何解決這個問題嗎?如何在圖表中以正確的順序顯示圖像?
這裏是我的代碼在圖表中顯示的圖像:
% 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)
我已經使用了function set(gca,'YDir','reverse')
扭轉圖像,但是圖中也相反。我將不勝感激您的任何幫助。預先
由於
請注意,圖像和矩陣的座標在MATLAB中是不同的,請參閱:http://stackoverflow.com/a/20887324/2777181 –