Hi all ,
I am getting the good output when I am using the ImageTargets Projects for detecting my logo . Now I have to display the distance in the UILabel . For calculating the distance I have used the below code in the EAGLView.mm .
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]);
NSLog(@"distance: %f", distance);
Kindly tell me in which class I have to add the UILabel code . And what what are the units which I am getting in the distance variable . My Target image size which I have in the database is 247 and the image size on which I have focused the camera is 800 . Please tell me . Thanks in advance .
Thank you NalinS