Chapter 6. Training Images

Table of Contents

The ImageTrainer Program
Target Design Guide

Before you can add augmented content to an image of your choice, you will need to run it through a training procedure. This produces a representation of the image that Popcode can use to locate it in the camera view.

Training is currently quite a long process.

The ImageTrainer Program

The ImageTrainer program is included in the Popcode Developer Kit.

Training your own images for use with Popcode is very simple:

  1. Enter a path to the image you want to use in the Source Image box, or click the button to the right to bring up a file browsing window. Images should be saved as either PNG (best for diagrams) or JPEG (best for photgraphs).

  2. Choose where to save the output .target file in the Destination box (again you can do this through a file browsing window by clicking the button on the right).

  3. Click the Train Image button and wait for it to complete.

A warning is displayed if the source image contains any transparent or semi-transparent pixels. ImageTrainer will ignore the transparency values, so we recommend that the target image files do not contain transparency. One way to correct this is to add a background solid colour layer to the source image using an image editing program.

If the source image is larger than 640 in either width or height then the program will offer to resize it for you. This tends to lead to better target files for tracking.

Draft Mode

The training procedure can take quite a long time, depending on the size of your input image and the speed of your computer. ImageTrainer also has a Draft mode which will produce a target file much more quickly. However the quality of the tracking with this target file is likely to be lower than when a file has been trained using the full training procedure.

The draft mode is useful for a number of reasons:

  • The quality of tracking is generally good enough to tell whether the target image is suitable for Popcode. See the following section for the desirable characteristics of target images.

  • It is possible to use the draft file to quickly begin developing the AR content. Whilst doing this the full training procedure can be running in the background. If you have at least 2 CPU cores (most modern computers do) this should not greatly affect the speed of either ImageTrainer or SceneViewer.

We recommend using .target files obtained from the full training procedure for final applications.