By mrnobody123
on Tue, 02/07/2017 - 12:26
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
Have you tried changing the
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.
How can I change this for
How can I change this for android/ios ?
I dont use unity.
Use this (https://developer
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..
this is the right answer,
this is the right answer, thanks https://developer.vuforia.com/forum/android/frame-marker-getting-size-marker#comment-53858