www.gusucode.com > images 案例代码 matlab源码程序 > images/Translate2DImageAndViewEntireTranslatedImageExample.m
%% Translate 2-D Image and View Entire Translated Image % %% % Read image into the workspace. % Copyright 2015 The MathWorks, Inc. I = imread('pout.tif'); %% % Translate the image. Use the |OutputView| parameter to specify that you % want the entire translated image to be visible. J = imtranslate(I,[25.3, -10.1],'FillValues',255,'OutputView','full'); %% % Display the original image and the translated image. figure imshow(I); title('Original Image'); set(gca,'Visible','on'); figure imshow(J); title('Full Translated Image'); set(gca,'Visible','on');