Unable to render objects with correct projection

Hi all,
I’m trying to do some AR with OF.
I’ve initially followed the AR example in ofxCV addons, which uses solvepnp to find the projection and render cubes on a chessboard. I modified it to track a template with my algorithm and render on the template a 2D image. It works on PC!

I ported the code on Android, starting from the androidCameraExample. So there is the problem: tracking seems to work (at least the template is found and its coordinate are passed to solvePnP), but i can’t obtain the overlay correctly projected on the tracked template.
I tried to port also the AR example from ofxCV and the cubes are projected in a different position, not on the chessboard.
Maybe because of the rotation imposed in Android to use the camera in portrait mode?
Have you faced similar problems? How could I procede at this point?

I’m stucked from weeks!
Thank you very much,