一种可行的解决方案是显示图像,然后更改轴限制,以便每个图像像素都有一个屏幕像素:
%# read an image and make it large
img = imread('autumn.tif');
img = repmat(img,[10,10]);
%# turn off the warning temporarily, we're going to fix the problem below
%# Note that in R2011b, the warning ID is different!
warningState = warning('off','Images:initSize:adjustingMag');
figure
imshow(img)
warning(warningState);
%# get axes limits in pixels
set(gca,'units','pixels')
pos = get(gca,'position')
%# display the top left part of the image at magnification 100%
xlim([0.5 pos(3)-0.5]),ylim([0.5 pos(4)-0.5])
Run Code Online (Sandbox Code Playgroud)
现在您可以选择手(平移工具)并根据需要移动图像。
| 归档时间: |
|
| 查看次数: |
7162 次 |
| 最近记录: |