Hi,
I'm trying to project marker coordinates and to export them to java. I think there's something on camera calibration and pose matrix I don't understand.
When i try to project the frame vertices of the marker with this code, there's always a variable offset: it seems like I'm not using correct camera calibration, perhaps.
Only when the device is normal to the frame i get the marker correctly framed.
const QCAR::Tracker& tracker = QCAR::Tracker::getInstance(); const QCAR::CameraCalibration& cameraCalibration = tracker.getCameraCalibration(); QCAR::Vec2F mrkrsize = marker->getSize(); float mposx = mrkrsize.data[0]; float mposy= mrkrsize.data[1]; QCAR::Vec2F screenPoint1 = QCAR::Tool::projectPoint(cameraCalibration, trackable->getPose(), QCAR::Vec3F(0, +mposy/2, 0)); QCAR::Vec2F screenPoint2 = QCAR::Tool::projectPoint(cameraCalibration, trackable->getPose(), QCAR::Vec3F(0, -mposy/2, 0)); QCAR::Vec2F screenPoint3 = QCAR::Tool::projectPoint(cameraCalibration, trackable->getPose(), QCAR::Vec3F(mposx, posy/2, 0)); QCAR::Vec2F screenPoint4 = QCAR::Tool::projectPoint(cameraCalibration, trackable->getPose(), QCAR::Vec3F(mposx, -mposy/2, 0));
Hi, I'm also working on it. First , forgive my pool English. I want to get the 4 corners of the image target with the funcation calcScreenCoordsOf and projectCoord, but the 4 coordinate I get is rotated 90 degrees counterclockwise when I display them on the screen. Could anyone give me some advice?