Looking to use Aruco markers for position and rotation

Hi all,

I am looking to use Aruco Markers and OpenCV as a positioning system for an indoor balloon-drone using a single marker. Is this possible using the ofxAruco and ofxOpenCV addons. I’ve looked inside both and can’t find the functions that would give me rotation and distance from camera. Essentially I would like to do what this video illustrates using python and a raspberry Pi but with openframeworks:

https://www.youtube.com/watch?v=wlT_0fhGrGg&t=1s&ab_channel=TizianoFiorenzani

Thanks in advance

Ok, so I’ve found this function but I cannot see how to use it. I am confused how to get pitch, roll and yaw from this:


ofQuaternion ofxAruco::getBoardRotation( **int** board){

ofMatrix4x4 mv = ofMatrix4x4::getInverseOf(ofMatrix4x4::getTransposedOf(getModelViewMatrixBoard(board)));
ofVec3f t;
ofQuaternion q;
ofQuaternion so;
ofVec3f s;
mv.decompose(t,q,s,so);
**return** q;
}