What is the difference between IMWARP and IMTRANSFORM?

Technical Source
2 min readMar 7, 2022

I just installed Matlab 2013a with the image processing toolbox. It has a new function IMWARP. It is very similar to the existing IMTRANSFORM function when performing 2D transformations on an image. I performed the same transformation on an image using both IMWARP and IMTRANSFORM. IMWARP is significantly faster (2X to 3X). I compared both images and they gave similar, but not exactly the same results. Also each function uses a difference version of the TFORM object. I was wondering is someone can describe the differences and advantages between these two functions.

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

The new function imwarp is part of a redesign of workflows involving image registration, geometric transformations, and spatial referencing that began with the R2013a release.

The imwarp function will replace imtransform as the recommended way of applying geometric transformations to images in the Image Processing Toolbox. As you have pointed out, imwarp is significantly faster than imtransform. imwarp supports 3-D geometric transformations, where as imtransform was strictly 2-D. imwarp uses the new spatial referencing classes imref2d and imref3d that were introduced in the R2013a release to allow users to more easily work with images in a non-default or world coordinate system. The ‘OutputView’ Name/Value is particularly useful for controlling the world limits and resolution of the output image.

The new function imwarp expects that the input geometric transformation is a geometric transformation object. R2013a provides three new classes of geometric transformation objects: affine2d, affine3d, and projective2d.

The affine and projective geometric transformation objects expose methods for applying geometric transformations to points in a forward and inverse sense and they expose a “T” property for accessing the forward transformation matrix.

There are two reasons why the answers produced by imwarp are not exactly the same as those produced by imtransform. The first reason is that the algorithm for automatically determining the world limits of the output image in imwarp when a user does not specify an ‘OutputView’

out = imwarp(I,tform);

is not the same as the algorithm used by imtransform syntax:

out = imtransform(I,tform);

The second is that imwarp determines and computes the world limits of the input and output images in terms of the outer extents of the first and last pixel in each dimension where as imtransform computes input and output boundaries in terms of the center of the first and last pixel in each dimension.

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.