Error using - Matrix dimensions must agree

1 回表示 (過去 30 日間)
simin as
simin as 2015 年 5 月 22 日
コメント済み: simin as 2015 年 5 月 23 日
Hi .
Good time.
I have been trying to implement the AAM_2D_example model for prostat MRI images.The following error was encountered. Please help me. Error using - Matrix dimensions must agree.
Error in AAM_align_data2D (line 25) offsetr=-mean(rot-rotb);
Error in AAM_MakeShapeModel2D (line 19) [TrainingData(i).CVertices, TrainingData(i).tform]=AAM_align_data2D(TrainingData(i).Vertices,MeanVertices);
Error in AAM_2D_example (line 82) [ShapeData,TrainingData] = AAM_MakeShapeModel2D(TrainingData,options);
  2 件のコメント
dpb
dpb 2015 年 5 月 22 日
Well, you've given little really to go on other than
Error in AAM_align_data2D (line 25)
offsetr=-mean(rot-rotb);
is the line in question and so one must presume that
all(size(rot)==size(rotb))
returns FALSE To subtract arrays they have to have the same dimensions as the error message says, including the number of planes. Maybe one is color, the other not? Or, one is a subsection of another or whatever, but they clearly must not be conformant.
Walter Roberson
Walter Roberson 2015 年 5 月 22 日

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2015 年 5 月 22 日
The subtraction will fail if the two sets of vertices being aligned do not have the same number of elements as built by LoadDataSetNiceContour.
I did not try to track down which files are the ones that differ, and I did not try to figure out how many vertices would be created. One thing I do see is that there must be exactly the same number of landmark points marked or else the number of vertices output would differ.
  1 件のコメント
simin as
simin as 2015 年 5 月 23 日
Thanks for the answer. How do I determine the vertices of the image of the prostate MRI? Is the function (LoadDataSetNiceContour) into (nBetween, verbose) What?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMRI についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by