Code covered by the BSD License  

Highlights from
imtranslate

5.0

5.0 | 2 ratings Rate this file 42 Downloads (last 30 days) File Size: 1.74 KB File ID: #27251
image thumbnail

imtranslate

by

 

Affine translates a 2D image or 3D volume.

| Watch this File

File Information
Description

This function makes it easy to translate a 2d image or 3d volume. The shifts do not need to be integer values.
It was written so I could test image registration algorithms.

Help:
function Iout = imtranslate(I, translation, F, method, same_size)
%SCd 12/21/2009
%Affine translates a 2D or 3D image
%
%Input Arguments:
% -I = 2D or 3D image
% -translation =
% -[row_shift col_shift] for 2D images
% -[row_shift col_shift pag_shift] for 3D images
% -F = values to pad the image with (optional, defaults to 0)
% -method = interpolation method (optional, defaults to 'linear')
% -same_size = 1 or 0, 1 if the output image is to be the same size as
% the input image (optional, defaults to 1)
%
%Output Arguments:
% -Iout = translated image
%
-----
Screen Shot was done using:

>>I = imread('cameraman.tif');
>>I2 = imtranslate(I,[3 -8.7]);

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
24 Aug 2011 Sadik

Thank you very much.

The current usage of imtransform with xdata ydata is not straight-forward at all. I think matlab really needs to have this in its library!

18 May 2011 Frank  
16 Apr 2010 Cris Luengo

Requires the Image Processing Toolbox.

Contact us