Reputation: 949
I am using this code and data when I use this command:
[imgw, imgwr, map] = tpswarp(img, outDim, Zp, Zs, interp); ,
I get this error:
Matrix is close to singular or badly scaled. Results may be inaccurate.
Is there any reason for this error? How I can resolve this issue and run the code? Should I change the Zp
and Zs
?
Upvotes: 2
Views: 14859
Reputation: 104484
When a matrix is singular or badly scaled, this means that your matrix is ill-conditioned. This means two things:
The error you're getting is probably attributed to Zp
and Zs
. Also, this most likely means that Zp
and Zs
are poorly constructed. Double-check its construction and try again.
As a side question, what is Zp
and Zs
? Once I know this, I'll edit my post and suggest ways to circumvent this error.
Upvotes: 2