Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

How to use rotation matrix and translation vector to correct position an assimp model?

$
0
0

@Negino wrote:

Hi,

I want to use ofxAssimpModelLoader to draw a 3d object and get something similar to this:


Image from http://www.morethantechnical.com/2012/10/17/head-pose-estimation-with-opencv-opengl-revisited-w-code/

I'm calculating rotation and translation matrix using opencv function like this:

CvMatr32f rotation = new float[9];
CvMatr32f translation = new float[3];
CvPOSITObject* posit = cvCreatePOSITObject(&pModelAnchor[0], pModelAnchor.size());
CvTermCriteria criteria = cvTermCriteria(CV_TERMCRIT_EPS | CV_TERMCRIT_ITER, 50, 1.0e-4f);
cvPOSIT(posit, &pImgAnchor[0], FOCAL_LENGTH, criteria, rotation, translation);

How can I use rotation and translation matrix to correct place the assimp model on screen and get an effect similar to the picture above?

Thank you

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles