Registered Member
|
Reading the tutorial part 8 "Geometry" i got the impression that the following should be possible:
But when compiling i get the following error:
Replacing the transform type Projective by Affine in the code, the multiplication compiles (and works) fine. There is a workaround by homogenizing manually, but isn't that done internally? I am using Eigen 3.0.5 with MSVC 10. Kind regards Janosch |
Moderator
|
right, there must be a good reason for that but I cannot remember. The solution is to explicitly use homogeneous vectors:
q = (t * p.homogeneous()).hnormalized(); |
Registered Member
|
This is not done internally because in the projective case you can map any 2D point to a point at infinity. A point at infinity (or ideal point) has a homogeneous coordinate of 0 and such a point cannot be normalized. HTH, Hauke |
Moderator
|
on the other hand, I think that the ".homogeneous()" could be implicit just like it is the case with Affine transforms.
|
Registered Member
|
You'ld be risking Inf entries but maybe that is reasonable when the user explicitly requests the transformation of 2D points. So, I agree, we might adapt the code. Regards, Hauke |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]