Log in or register to post comments

How to access a URL on successful Image recognition

September 3, 2015 - 2:06pm #1

Hai there,

I am a beginner to Vuforia and Unity. I am using Vuforia with Unity ( on a Windows 10 machine) to develop an application on Android. I have three photos of historical monuments. So far I have succeeded in creating image targets for each of these and displaying different Objects for each of the pictures. However I wish to be able to access a particular url everytime an image is successfully detected. That is say there are 3 images. A, B and C. When the camera is placed over image A, the phone should display 'A' ( I have reached here so far) and also access a partcular url say www.xyz.com/imageDetect.php?img='a' . How can one accomplish this?

 

I would like to extent the application and explore Unity and Vuforia in detail. Are there any good resources to learn Unity + Vuforia in general and also Unity Scripting. 

How to access a URL on successful Image recognition

September 13, 2015 - 11:58am #2

You can detect target lost / found events by implementing an ITrackableEventHandler and registering it with your Targets; see for instance the DefaultTrackableEventHandler implementation for a simple example of how to implementf such handler.

When the target is detected, you can then perform a specific action, such as playing a sound, showing a specific UI element on your screen or  opening a URL in a web browser, for instance based on the Trackable.Name of your target.

The following article provides an example of how to play a sound when a Target is detected:

https://developer.vuforia.com/forum/faq/unity-how-can-i-play-audio-when-targets-get-detected

 

Specifically for how to open a URL in a web page in Unity, see:

http://docs.unity3d.com/ScriptReference/Application.OpenURL.html

 

Log in or register to post comments