Log in or register to post comments

distance in ImageTargets

January 24, 2013 - 10:09pm #1

Hi all , Nice to meet you . I have a doubt in the Image Targets app . I have used the following code to calculate the distance . 

 

            QCAR::Matrix34F pose = result->getPose();

            QCAR::Vec3F position(pose.data[3], pose.data[7], pose.data[11]);

            float distance = sqrt(position.data[0] * position.data[0] +

                                  position.data[1] * position.data[1] +

                                  position.data[2] * position.data[2]);

I have tested it in two different places 1. Full Lighting place 2. medium lighting place . When I compare the results full lighting place distance values are two times greeater than the medium lighting place distance Values . Please tell me to solve this issue . Is lighting factor for the distance ? Please let me know if my question not clear .

distance in ImageTargets

January 25, 2013 - 4:31am #4

The fact that you draw a 2D image (instead of a 3D model) does not impact the Vuforia tracking;

however, what I am saying is that if you render a 3D model, you can get an immediate visual feedback on the distance (as Is aid, if Vuforia reports a higher distance, then your 3D model will look farther away, and thus smaller...)

So, it would be good to re-enable the 3D model just to see if you "visually" can perceive the difference (smaller/larger teapot) when using different lighting conditions.

 

distance in ImageTargets

January 25, 2013 - 3:11am #3

No . One more thing is I have removed the teapot and have drawn 2d Image on the detected ImageTarget . Does it reflect on the distance ?

distance in ImageTargets

January 25, 2013 - 2:58am #2

Hi, that sounds strange; the position[] data comes from the pose matrix, which is also relfected into where the 3D augmentation model (for instance the Teapot model of our samples) appears;

if the distance is twice as big, I would expect that you also see your teapot model twice as small (because the increase distance will make your teapot look smaller)

Do you see such evidence in your observations ?

Log in or register to post comments