Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Converting solvePnP tvec

I am using solvePnP to figure the rotation and translation of a fiducial marker relative to my camera (a Kinect). I understand that the units it will return for translation are the same as those I pass in, which in my case I think is the camera intrinsics:

`solvePnP(Mat(markerPoints), Mat(scene_corners), intrinsics, distortion,rvec, tvec, false);

I think my camera intrinsics below are pixels? How can I convert the translation result to real world distance? Would I have to basically apply the fundamental camera matrix or is there a simple scaling factor I can apply?

data :[529.215, 0., 328.94, 0., 525.56, 267.48, 0., 0., 1.]

Converting solvePnP tvec

I am using solvePnP to figure the rotation and translation of a fiducial marker relative to my camera (a Kinect). I understand that the units it will return for translation are the same as those I pass in, which in my case I think is the camera intrinsics:

`solvePnP(Mat(markerPoints), solvePnP(Mat(markerPoints), Mat(scene_corners), intrinsics, distortion,rvec, tvec, false);

I think my camera intrinsics below are pixels? How can I convert the translation result to real world distance? Would I have to basically apply the fundamental camera matrix or is there a simple scaling factor I can apply?

data :[529.215, 0., 328.94, 0., 525.56, 267.48, 0., 0., 1.]

Converting solvePnP tvec

I am using solvePnP to figure the rotation and translation of a fiducial marker relative to my camera (a Kinect). I understand that the units it will return for translation are the same as those I pass in, which in my case I think is the camera intrinsics:

solvePnP(Mat(markerPoints), Mat(scene_corners), intrinsics, distortion,rvec, tvec, false);

I think my camera intrinsics below are pixels? How can I convert the translation result to real world distance? Would I have to basically apply the fundamental camera matrix or is there a simple scaling factor I can apply?apply? Currently I have a magic number 4.89 that seems to give me reasonable units in CMs.

data :[529.215, 0., 328.94, 0., 525.56, 267.48, 0., 0., 1.]

Converting solvePnP tvec

I am using solvePnP to figure the rotation and translation of a fiducial marker relative to my camera (a Kinect). I understand that the units it will return for translation are the same as those I pass in, which in my case I think is the camera intrinsics:

solvePnP(Mat(markerPoints), Mat(scene_corners), intrinsics, distortion,rvec, tvec, false);

I think my camera intrinsics below are pixels? How can I convert the translation result to real world distance? Would I have to basically apply the fundamental camera matrix or is there a simple scaling factor I can apply? Currently I have a magic number 4.89 that seems My current thought is to give me reasonable units in CMs.multiply tvec by the size of the marker (in my case an 8cmx8cm, so multiply by 8).

data :[529.215, 0., 328.94, 0., 525.56, 267.48, 0., 0., 1.]

Converting solvePnP tvec

I am using solvePnP to figure the rotation and translation of a fiducial marker relative to my camera (a Kinect). I understand that the units it will return for translation are the same as those I pass in, which in my case I think is the camera intrinsics:

solvePnP(Mat(markerPoints), Mat(scene_corners), Mat(sceneCorners), intrinsics, distortion,rvec, tvec, false);

I think my camera intrinsics below are pixels? How can I convert the translation result to real world distance? Would I have to basically apply the fundamental camera matrix or is there a simple scaling factor I can apply? My current thought is to multiply tvec by the size of the marker (in my case an 8cmx8cm, so multiply by 8).

EDIT:

Having gained a bit more understanding, here is what markerPoints are:

data :[529.215, 0., 328.94, 0., 525.56, 267.48, 0., 0., 1.]
//FID_SIZE = 8.0cm
markerPoints.push_back( Point3f( 0.0, 0.0, 0.0 ) );
markerPoints.push_back( Point3f( FID_SIZE, 0.0, 0.0 ) );
markerPoints.push_back( Point3f( FID_SIZE, FID_SIZE, 0.0 ) );
markerPoints.push_back( Point3f( 0.0, FID_SIZE, 0.0 ) );

And sceneCorners are in pixels. Still can't quite get it to make 100% sense.