2D Targets (Image Targets)
Image Targets
Image Targets refer to 2D images which Vuforia can recognise and track. These image targets work in a similar way to QR codes, but full colour images can be used.
Image Requirements
The Vuforia Target Manager supports .jpg
and .png
images that are 2 MB or smaller. These images can be RGB or Grayscale. The features of the image are graded based on how well the engine is able to track them. Learn more here:
Workflow
The basic workflow for working with Image Targets is as follows:
Upload the image to the Vuforia Target Manager online. You can also use one of the sample Image Targets.
Download the updated Target Manager Database.
Add the image target to your project in Unity
Add the Device Database
Add and Configure the Image Target as a GameObject
Add an
ARCamera
Add an
ImageTarget
Assign Content to the
ImageTarget
Image Recognition in Unity
The basic workflow within Unity is extremely similar to that of 3D (Object) Targets.
Add a Device Database
If you haven't already, download the device database from your Vuforia Target Manager.
Import the .unitypackage
file by heading to Asset > Import Package
See: Device Databases
Add and Configure the GameObject
Add an
ARCamera
instance to your scene.GameObject > Vuforia > ARCamera
Generate and add your license information to the
ARCamera
in the Inspector WindowAdd an
ImageTarget
instance to your scene.GameObject > Vuforia > 3D ScanChange the Image Target Behaviour. With the
ImageTarget
selected, change theType
,Database
andImage Target
fields in the Inspector Window
Add Content to the GameObject
Add any content you desire to augment the image. This can be 2d content such as text or 3d assets such as
.FBX
files. In this case, we have named our content Cube.Make the content a child of the
ImageTarget
. This way the content will only be displayed once theImageTarget
is recongnised.
Testing Outcomes
Use the Play button in the toolbar
to test the application.
Last updated