isSimilarity
Determine if transformation is similarity transformation
Syntax
Description
Examples
Check if 2-D transformation is a similarity transformation
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 transformation is a similarity transformation.
tf = isSimilarity(tform)
tf = 1
Check if 3-D transformation is a similarity transformation
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])
tform = affine3d with properties: T: [4x4 double] Dimensionality: 3
Check if the transformation is a similarity transformation.
TF = isSimilarity(tform)
TF = 0
Input Arguments
Output Arguments
TF
— Flag indicating similarity transformation
scalar
Flag indicating similarity transformation, returned as a logical scalar.
TF
is True
when
tform
is a similarity transformation.
Data Types: logical
More About
Similarity Transformation
A similarity transformation includes only rotation, translation, isotropic scaling, and reflection. A similarity transformation does not modify the shape of an input object. Straight lines remain straight, and parallel lines remain parallel.
Note
isSimilarity
returns True
if the
transformation includes reflection. Some toolbox functions, such as imregister
, support only
non-reflective similarity. Other functions, such as fitgeotrans
, support
reflection.
Version History
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)