maketform affine3d not recognized (but recommended)

2 ビュー (過去 30 日間)
PaoloB
PaoloB 2015 年 3 月 31 日
回答済み: PaoloB 2015 年 3 月 31 日
Hi,
in following this example I am encountering a few problems.
First of all, if I type
tform = maketform('affine', A);
where A is a 4x4 identity matrix, Matlab underlines "maketform" and gives a warning that AFFINE is not recommended and I should use AFFINE2D or AFFINE3D. However, if I try to use either of those two I get the error:
Unrecognized TRANSFORMTYPE: 'affine3d'.
Nevermind, I stick with affine and ignore the warning, but then, when I try to do:
RegisteredImage= tformfwd(InitialImage, tform);
I get the following error:
Error using TFORMFWD
Expected input number 2, U, to be one of these types:
double
Instead its type was uint16.
I assume the error refers to the image, which is actually a 3D matrix of uint16, but even a cast does not seem to solve the issue.
Could anyone please shine some light on this?

回答 (1 件)

PaoloB
PaoloB 2015 年 3 月 31 日
Silly me:
affine3d is not the the attribute of "maketoform", rather a function in itself...
So now my code is:
tform = affine3d(A)

カテゴリ

Help Center および File ExchangePartial Differential Equation Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by