Panda3D drawing on top of aruco marker looks misaligned

Hi, i’m trying to use a marker to display some model with panda3D on top of it.

I ran a simple openCV program to detect and draw the axes of a marker.

What im doing now is using the rVec and tVec from the detection to try and place the panda3D object on top of the marker.

I made a panda3D window that has the same size and ratio a my image.
I put the image in the background of the window.

I used the rVec values and some Voodoo magic to rotate the object like the axes that are drawn on the first image.

As you can see when i use the values from tVec the object is not aligned to the marker.

I don’t know what to do.

Is there something else other than the tVec values to use to translate the object from it’s default coordinate (center of screen) to the marker position ?

all of this requires the model, tvec, rvec (it’s axis-angle, which isn’t euler), the camera matrix, and distortion coefficients.

and that exactly is where you need to debug. without a MRE, nobody can help you.

I’d recommend asking in a forum specific to “Panda3D”.

Sorry if i wasn’t clear, english is not my first language

I used this to detect the marker :

rVec, tVec, _ = aruco.estimatePoseSingleMarkers(
                marker_corners, MARKER_SIZE, cam_mat, dist_coef )

From the rVec i managed to get the angles to orient the object.

I want to know what exactly represent tVec and how to translate that to x,y (plus depth) on the screen.