Can I get the Trackable Image's Coordinates?

+2 votes
asked Oct 18, 2017 by pspyros (160 points)
Hi there,

The actual concept is that the webcamera/smartphone camera  's input is projected on a plane, in unity, and the easyAR camera prefab is "shooting" at it and use it as the latest (the most far away) object, so it works like a background video.

When the image target is recognised in this feedback video, the augmentation appears in front of it. at the relevant position we set it.

Is there anyway to get the coordinates (x,y) of the recognized image target either on the background plane, or on the final screen?

And since the video is live and not stable, image target keeps changing position in video, so it may be needed a callback method that returns these coordinates in every single frame.


1 Answer

0 votes
answered Oct 19, 2017 by albert52 (31,850 points)


I'm sorry to reply you so late.

Can you be more specific. Do you want to get the coordinates of the ImageTarget in Unity (plane) or relative to the real world(or camera).

commented Oct 20, 2017 by pspyros (160 points)
You start your app.
You move your smart phone around the room, till the printed picture (photo, books first page , whatever you set as "image target") is being seen by your phone's camera.
Depending the position of the camera / or the printed image in camera's plane / frame, an augmentation (3D object) appears on your screen.
Assume that the 3d augmented object is set right in front of image target.
If the image is at the upper right corner of your screen, the 3d object appears in the upper right corner of your screen.
If you move your phone and the phone's camera captures the printed picture / image target at the bottom left corner of your screen, 3d object appears at that place.
So , if your phone camera captures the image target, the app recognises it among the frame, it calculates its position (coordinates) and creates the 3D object right in front of it.
So I want these coordinates of the printed image as it is, inside the camera's frame.
If you take it a step deeper, I don't want to calculate where the #D object will be seen on screen, but where the picture (before 3d object appears) is in the original frame of the phones camera.
This is a short drawing of what I mean:
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.