For lack of a better alternative, I’m using Matlab’s image calibration toolbox. One of the things I’m after is the transformation matrix Matlab’s fitgeotrans
outputs:
tform = fitgeotrans(imagePoints, worldPoints, 'projective');
In tform
is a 3x3 matirx, tform.T
, which I think is a transformation matrix. I’d like to use this T
in Julia.
I “found out” that applying Matlab’s transformPointsForward
with tform
:
[worldPoints_X, worldPoints_Y] = transformPointsForward(tform, imagePoints_X, imagePoints_Y);
has the exact same results when using T
in Julia:
worldPoint_XY = [imagePoint_X imagePoint_Y 1.0]*T
where imagePoint_X
and imagePoint_Y
is the image coordinate and worldPoint_XY
now contains the world coordinate.
My question is: How can I convert this tform
to a transformation in CoordinateTransformations.jl
?
One of my goals is to use the CoordinateTransformations.Transformation
with ImageTransformations.warp
as well as transforming image coordinates to world coordinates.
Thanks in advance!