Jump to content

some matrix math help


mattd

Recommended Posts

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...