Reputation: 4115
We can construct a 'TFORM' structure using control points via the 'cp2tform' function, however I am wondering if we can obtain the explicit transformation matrix form, not the 'TFORM' structure, so that I can compute the pixel size of the transformed image from the original image, where the pixel size dx does not equal dy.
Upvotes: 1
Views: 1123
Reputation: 124563
If TFORM
is the structure returned, you can access the transformation matrices as:
TFORM.tdata.T
and
TFORM.tdata.Tinv
one for the forward transformation, the other its inverse.
You can edit maketform.m
file in the IPT toolbox and see how they are used internally.
Upvotes: 2