- You can safe yourself a lot of typing if you use arrays instead of separate variables. So e.g. in instead of variables
x11, y11, x12, y12,..., you'd use one variablesourceImagePoints = {{624,672},{608,623},...}you could useDot,Map,Outerand so on to get much simpler code.You can save yourself a lot of typing if you use arrays instead of separate variables. So e.g. in instead of variables
x11, y11, x12, y12,..., you'd use one variablesourceImagePoints = {{624,672},{608,623},...}you could useDot,Map,Outerand so on to get much simpler code. - Your system of equations is linear, you don't need
NSolve.Solvedoest just fine, but you have to help it a little, by multiplying the denominators to the left side. You can do this by adding/. (x_ == a_/b_) :> (x*b == a)after your equations:Your system of equations is linear, you don't need
NSolve.Solvedoes just fine, but you have to help it a little, by multiplying the denominators to the left side. You can do this by adding/. (x_ == a_/b_) :> (x*b == a)after your equations:Solve[{...)} /. (x_ == a_/b_) :> (x*b == a), {...}]
Solve[{...)} /. (x_ == a_/b_) :> (x*b == a), {...}]
- I'm pretty sure you're using the terms "homogeneous" and "inhomogeneous" wrong. They don't mean "coordinates in the transformed/untransformed images", respectively. The word homogeneous means (more or less) that if you multiply a vector with a scalar (except 0), that vector refers to the same point in space. It's very elegant mathematical trick that lets you treat translations and projective transformations as simple matrix multiplications. You usually use homogeneous coordinates for both source image coordinates and destination image coordinates, and only convert to euclidean coordinates at the end, when you call some graphics routine.
I'm pretty sure you're using the terms "homogeneous" and "inhomogeneous" wrong. They don't mean "coordinates in the transformed/untransformed images", respectively. The word homogeneous means (more or less) that if you multiply a vector with a scalar (except 0), that vector refers to the same point in space. It's very elegant mathematical trick that lets you treat translations and projective transformations as simple matrix multiplications. You usually use homogeneous coordinates for both source image coordinates and destination image coordinates, and only convert to euclidean coordinates at the end, when you call some graphics routine.
