isTranslation
Determine if geometric transformation is pure translation
Description
Examples
Check If 2-D Transformation Is a Pure Translation
Create an affine2d
object that defines a pure
translation.
A = [ 1 0 0 0 1 0 40 40 1 ]; tform = affine2d(A)
tform = affine2d with properties: T: [3x3 double] Dimensionality: 2
Check if the transformation is a pure translation.
tf = isTranslation(tform)
tf = 1
Check If 3-D Transformation Is a Pure Translation
Create an affine3d
object that defines a different
scale factor in each dimension.
Sx = 1.2; Sy = 1.6; Sz = 2.4; tform = affine3d([Sx 0 0 0; 0 Sy 0 0; 0 0 Sz 0; 0 0 0 1]);
tf = affine3d with properties: T: [4x4 double] Dimensionality: 3
Check if the transformation is a pure translation. Since
tform
scales the object,
tf = isTranslation(tform)
tf = 0
As expected, the transformation is not a pure translation since scaling changes the size and shape of an input volume.
Input Arguments
Output Arguments
TF
— Geometric transformation is pure translation
true
| false
Geometric transformation is pure translation, returned as
true
or false
.
Data Types: logical
More About
Translation Transformation
A translation transformation shifts an image without modifying
the image size, shape, or orientation. A 2-D translation is represented by a matrix
T
of the form:
[1 0 0; 0 1 0; e f 1];
A 3-D translation is represented by a matrix of the form:
[1 0 0 0; 0 1 0 0; 0 0 1 0; j k l 1];
Version History
Introduced in R2013a
See Also
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)