I have just started to use Matlab's TFORMINV function. I have already looked up the documentation. I am trying to debug an issue in an existing code related to tforminv function.
When I run the code, I get the following error :
Error using tform>checkTform (line 89)
Function TFORMINV expected a TFORM struct as its first or second argument.
Error in tform (line 29)
[t, A] = checkTform(f, numout, varargin{:});
Error in tforminv (line 67)
varargout = tform('inv', nargout, varargin{:});
Error in train_detector>traversetree (line 357)
[pixel_a_x_lmcoord, pixel_a_y_lmcoord] = tforminv(tf2meanshape, pixel_a_x_imgcoord, pixel_a_y_imgcoord);
...
but, tf2meanshape seems to me of type TFORM. Here is the screenshot which shows that tf2meanshape is of type struct during debugging, but when I step into next line I am getting the above error :
Let me know if any additional information is required. Thanks in advance.

댓글 수: 3

David Young
David Young 2015년 7월 28일
It's very hard to read the screenshot. Please can you post the code that produces tf2meanshape. Normally this would be the result of a call to maketform, but I think you must be making it some other way, perhaps using affine2d.
Guru Swaroop
Guru Swaroop 2015년 7월 28일
you can right click the image, and select open image in new tab. In my system it is readable.
David Young
David Young 2015년 7월 28일
편집: David Young 2015년 7월 28일
I can read the screenshot now, but I still can't see the code that produces tf2meanshape. It is an affine2d object, not a struct as required, so it's a question of whether you should be using maketform to make a struct instead, or whether you should be using its transformPointsInverse method to apply the transformation. You're not showing the code so it's hard to give advice.

댓글을 달려면 로그인하십시오.

 채택된 답변

Guru Swaroop
Guru Swaroop 2015년 7월 28일

0 개 추천

Thanks David, As you rightly pointed out, I had to use transformPointsInverse instead of tforminv.

추가 답변 (0개)

태그

질문:

2015년 7월 28일

답변:

2015년 7월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by