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]);
Citar como
Sean de (2024). imtranslate (https://www.mathworks.com/matlabcentral/fileexchange/27251-imtranslate), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
- Image Processing and Computer Vision > Image Processing Toolbox > Geometric Transformation and Image Registration >
- Image Processing and Computer Vision > Image Processing Toolbox > 3-D Volumetric Image Processing >
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0.0 |