mattd Posted August 11, 2009 Share Posted August 11, 2009 Hello, It's not really a houdini specific question, more of a matrices in general question, so I hope it is not a problem posting here. I have a program that outputs a transformation that I need to apply to a 2d image. I am trying to understand how to convert the format it outputs to a transformation I can use in a COP. Here is the description of the output of the program that I am looking for: Affine: (AffineTransform) An affine transformation is defined as: Tμ(x) = A(x − c) + t + c, where the matrix A has no restrictions. This means that the image can be translated, rotated, scaled, and sheared. The parameter vector μ is formed by the matrix elements aij and the translation vector. In 2D, this gives a vector of length 6: μ = (a11, a12, a21, a22, tx, ty)T . So I need to figure out how that 2x2 matrix and the tx and tx can get converted into values usable in a transform COP. I know that the explodematrix expression does what I need, but how do you work with the values I am getting? oh, and I need to do all of this with expressions, I can't use a VOP. Thanks for any help. MD Quote Link to comment Share on other sites More sharing options...
mattd Posted August 11, 2009 Author Share Posted August 11, 2009 nevermind, I figured it out, I think it's [a11 a12 0] [a21 a22 0] [tx ty 1] I keep answering my own posts, but hey, it helps to formulate the question to solve it. Thanks MD Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.