tvec and coordinate systems q
The output of solvePnp tvec and rvec: is tvec in world coordinates? I am guessing it is b/c the chessboard calibration is in mm. Second, what is tvec measuring from-to?
The output of solvePnp tvec and rvec: is tvec in world coordinates? I am guessing it is b/c the chessboard calibration is in mm. Second, what is tvec measuring from-to?
Asked: 2020-12-07 12:20:58 -0600
Seen: 1,418 times
Last updated: Dec 07 '20
AIUI, when you transform from frame A to frame B, the tvec represents the "position" of A in B's frame. conceptually, coordinates you have in A are moved into B by adding the tvec. you can check what I'm saying by pointing the image center at one of the corners of the board, and seeing if the tvec is (~0, ~0, +distance) for one of them (the origin of the board). if the tvec were relative to A, and you weren't right on an axis of A, you'd see that in the values. what you see should confirm that the tvec is in B (destination frame). the full pose matrix does a rotation from A into A's orientation in B, and then translates into A's position in B.
Most of that makes sense to me. Though I'm unclear on the nature of A & B. Do the frames A and B represent different coordinate systems image plane to world coordinates? I'm sorry that's such a basic question. I do understand testing the tvec and passing the information forward. I've successfully matched the image points with the model points, computed the pose(rt) and the projective transformation K(rt).
when I said "frame", I mean an abstract thing: a coordinate frame, coordinate axis, frame of reference, a "basis" to use a linear algebra term. in this situation your "space" is three-dimensional. -- a point in a 3-dimensional space can be represented by a 3-vector, which describes the point as a linear combination of this vector's elements with the basis vectors (which represent a unit length each). -- we don't know "universally" how the frames are placed "in space". we know how they are positioned relative to each other from their "basis transformation" matrices, which are 4x4 (3 dims + another "projective" one to enable translation), and describe the transformation such that a point, relative/native to one frame, is transformed to be relative to another frame.
SolvePnp gives me a tvec that measures accurately the distance to the plane in mm.
I know the math behind plane-ray intersection (huge amount of info on the web) but I am having trouble with the setup of the ray, and how tvec integrates with it. If I can correctly get the ray projected from the camera I'm home free. Prototype: r0 + r1*t for ray.
what ray are you talking about? I don't follow.
I'm sorry. I want to create a ray from camera center to plane model. I was wondering whether tvec would have any role in that.
tvec is precisely that vector in the camera frame that points to the plane frame's origin