"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Vuforia project coordinates to screen

I try to project coordinates of target to screen's coordinates. I use https://developer.vuforia.com/forum/faq/technical-how-can-i-project-target-point-screen with small fixes.

This is my code: http://pastebin.com/kcHbnzRy

Call function calcScreenCoordsOf in renderFrame

targetPositiveDimensions[currentTarget] = imageTarget.getSize();
temp[0] = targetPositiveDimensions[currentTarget].getData()[0] / 2.0f;
temp[1] = targetPositiveDimensions[currentTarget].getData()[1] / 2.0f;
targetPositiveDimensions[currentTarget].setData(temp);

calcScreenCoordsOf(new float[]{temp[0], temp[1]}, trackableResult.getPose());

I recorded one small video to show results. https://youtu.be/k8qUT_72-PY

Image removed.

When I move the phone up and down everything is right, but when right-left red points move faster than the camera and completely ignored phone rotation

NoxSicarius

Wed, 02/08/2017 - 13:06

Have you tried changing the center of your world target? You may want to try switching the world center to be the camera, by default it is the first image target. 

mrnobody123

Thu, 02/09/2017 - 16:03

Using this (https://developer.vuforia.com/forum/faq/technical-how-can-i-project-target-point-screen) code without any fixes: https://youtu.be/znloWF7oqZE

http://pastebin.com/zHx2SgA2

rotation is ok, but moving up-down, left-right not so good..

mrnobody123

Thu, 02/09/2017 - 17:06

this is the right answer, thanks https://developer.vuforia.com/forum/android/frame-marker-getting-size-marker#comment-53858