ARToolKit | Mailing List Archive |
![]() |
From: | lim kianhong <spartan_kings@y ........> | Received: | Jun 29, 2005 |
To | ARToolkit pp <artoolkit@h ..................> | ||
Subject: | Any utility function to inverse a matrix?? | ||
--0-1338301166-1120105187=:94394 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I'm a undergraduate doing my final year project.I wish to find the inverse of a matrix and i tried to use utility function arUtilMatInv(source,dest) which in turn uses minv function. But the return result is not correct as i have checked against a couple of online matrix inverse calculator. Did I use the wrong function??If so is there any function that helps to do the calculation??. I can code for inverse matrix calculation for 4x4 matrix as I will be only doing for 4x4 matrix but i really don't want to re-invent the wheel. Thanks in advance. => __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --0-1338301166-1120105187=:94394 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit <DIV>Hi, I'm a undergraduate doing my final year project.I wish to find the inverse of a matrix and i tried to use utility function arUtilMatInv(source,dest) which in turn uses minv function. But the return result is not correct as i have checked against a couple of online matrix inverse calculator. Did I use the wrong function??If so is there any function that helps to do the calculation??.</DIV> <DIV> </DIV> <DIV>I can code for inverse matrix calculation for 4x4 matrix as I will be only doing for 4x4 matrix but i really don't want to re-invent the wheel.</DIV> <DIV> </DIV> <DIV>Thanks in advance. =></DIV><p>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com --0-1338301166-1120105187=:94394-- |
From: | "Chris L. Baker" <chris.baker@p .....................> | Received: | Jun 30, 2005 |
To | "'Peter Oost'" <h.b.oost@s .................>, "'lim kianhong'" <spartan_kings@y ........> | ||
Subject: | RE: Any utility function to inverse a matrix?? | ||
Since the pose of a coordinate is a special matrix (orthonormal) in the rotation part of the matrix, it is pretty trivial to compute the inverse in. If you want to compute your own inverse, just transpose the upper left 3x3 part of the matrix (the rotation), and rotate the negative of the translation. For example, if you have a 3x4 pose matrix which consists of P = [R T] where R is a 3x3 rotation and T is a 3x1 translation, the inv(P) = [R' -R'*T]. If you want the 4x4 just add the last row [0 0 0 1]. Chris Baker Perceptek-Robotics CSM PhD Graduate Student -----Original Message----- From: owner-artoolkit@h .................. [mailto:owner-artoolkit@h ..................] On Behalf Of Peter Oost Sent: Thursday, June 30, 2005 3:44 AM To: lim kianhong Cc: ARToolkit pp Subject: Re: Any utility function to inverse a matrix?? On Wed, 2005-06-29 at 21:19 -0700, lim kianhong wrote: > Hi, I'm a undergraduate doing my final year project.I wish to find the > inverse of a matrix and i tried to use utility function > arUtilMatInv(source,dest) which in turn uses minv function. But the > return result is not correct as i have checked against a couple of > online matrix inverse calculator. Did I use the wrong function??If so > is there any function that helps to do the calculation??. > > I can code for inverse matrix calculation for 4x4 matrix as I will be > only doing for 4x4 matrix but i really don't want to re-invent the > wheel. If I remember correctly the arUtilMatInv(source,dest) function takes, and gives, a 3x4 matrix. It assumes the 4th row to always be [0 0 0 1]. Did you take this in account when you called the function and/or calculated your own result? -Peter |
From: | Peter Oost <h.b.oost@s .................> | Received: | Jun 30, 2005 |
To | lim kianhong <spartan_kings@y ........> | ||
Subject: | Re: Any utility function to inverse a matrix?? | ||
On Wed, 2005-06-29 at 21:19 -0700, lim kianhong wrote: > Hi, I'm a undergraduate doing my final year project.I wish to find the > inverse of a matrix and i tried to use utility function > arUtilMatInv(source,dest) which in turn uses minv function. But the > return result is not correct as i have checked against a couple of > online matrix inverse calculator. Did I use the wrong function??If so > is there any function that helps to do the calculation??. > > I can code for inverse matrix calculation for 4x4 matrix as I will be > only doing for 4x4 matrix but i really don't want to re-invent the > wheel. If I remember correctly the arUtilMatInv(source,dest) function takes, and gives, a 3x4 matrix. It assumes the 4th row to always be [0 0 0 1]. Did you take this in account when you called the function and/or calculated your own result? -Peter |