Hi,

if the reference frame is as you describe, then it is the same as the one used by Vuforia (note: Vuforia also uses a reference frame which is like OpenGL but rotated 180 degrees around X, which makes the Z axis to "enter the screen");

then it should be easy to setup your "pose" matrix based on that;

suppose you have your face detected as a point at position (X,Y,Z), so suppose you have these three variables defined:

float facePosX = some value...;

float facePosY = some value ...;

float facePosZ = some value ....;

Then you should be able to compute your modelview matrix (like in the image targets sample, see ImageTargets.cpp), using this code:

// set the modelview matrix to identity matrix
modelViewMatrix.data[0] = 1.0f;
modelViewMatrix.data[1] = 0.0f;
modelViewMatrix.data[2] = 0.0f;
modelViewMatrix.data[3] = 0.0f;
modelViewMatrix.data[4] = 0.0f;
modelViewMatrix.data[5] = 1.0f;
modelViewMatrix.data[6] = 0.0f;
modelViewMatrix.data[7] = 0.0f;
modelViewMatrix.data[8] = 0.0f;
modelViewMatrix.data[9] = 0.0f;
modelViewMatrix.data[10] = 1.0f;
modelViewMatrix.data[11] = 0.0f;
modelViewMatrix.data[12] = 0.0f;
modelViewMatrix.data[13] = 0.0f;
modelViewMatrix.data[14] = 0.0f;
modelViewMatrix.data[15] = 1.0f;
SampleUtils::translatePoseMatrix(facePosX, facePosY, facePosZ,
&modelViewMatrix.data[0]);
SampleUtils::scalePoseMatrix(kObjectScale, kObjectScale, kObjectScale,
&modelViewMatrix.data[0]);
SampleUtils::multiplyMatrix(&projectionMatrix.data[0],
&modelViewMatrix.data[0] ,
&modelViewProjection.data[0]);

The only issue I can think of is about the value of facePosZ (i.e. the depth of the face), which perhaps you don't have...

Hi, in computer graphics we usually talk about

ModelViewmatrix for the 3D transformation part (rotation, translation and scaling), and "Projection" matrix for the projective transformation (for instance the camera perspective).The calibration parameters of the camera are used for building the Projection matrix.

We have some tutorials about these concepts here:

https://developer.vuforia.com/resources/dev-guide/projection-matrix-explained

https://developer.vuforia.com/resources/dev-guide/pose-matrix-explained

https://developer.vuforia.com/resources/dev-guide/positioning-3d-content