Log in or register to post comments

Vuforia project coordinates to screen

February 7, 2017 - 4:20am #1

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

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

Vuforia project coordinates to screen

February 9, 2017 - 9:06am #5

Vuforia project coordinates to screen

February 9, 2017 - 8:03am #4

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..

Vuforia project coordinates to screen

February 9, 2017 - 7:29am #3

How can I change this for android/ios ? 

I dont use unity.

Vuforia project coordinates to screen

February 8, 2017 - 5:06am #2

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. 

Log in or register to post comments