Enable Layar Vision in a layer


 

Please NOTE that this documentation will not be updated anymore. Please see our new Developer Documentation Site for the latest updates! The content of this page can be found here.

 

back to Layar Vision Index

 

Here we explain what layer developers need to do to enable Layar Vision in their layers. It contains the following topics:

 

 

Basic Concepts

 

 

     In Layar, an augment is a digital model (2D or 3D) rendered on a target object as seen through the mobile phone camera lens.

 

     A target object is a physical or digital visual entity that contains enough detail to be unique whereby a person can point their phone at said “object” to see the augment (if available). 

 

 

     A reference image is the file uploaded by a developer for analysis so that the object depicted in the file can become a target object; thereby, enabling target tracking of said object.  Layar will extract the details of each image to create the unique fingerprint of the object.  We will store this as specified in our updated Terms and Conditions. We will keep the reference image in our database as they might be needed for future improvements of our algorithm. Please check Reference Image Best Practices on how to create good reference images.

 

Changes in GetPOI API v6.0

 

Layar Vision can be enabled by returning a reference image in the getPOI response, for instance,

 

"hotspots": [
        {
            ...
            "anchor": {
                "referenceImage": "myFirstImage"
            },

           ...

        }

 ]

 

In Hotspot object, we added a new "anchor" object that contains either Geo-location or Vision information. For Vision enabled layer,

 

Key  Value  Example  Explanation
anchor  json dictionary

 "anchor": { "referenceImage": "myFirstImage" }


 The key of a reference image for feature tracking should be returned. In the example, it is "myFirstImage".
 NOTE: For POIs that have a reference image as anchor, the POI should be 2D or 3D objects.

 

To know the detailed changes to getPOIs API v6.0 changes, please read here .

 

Changes to layer definition

 

To enable Layar Vision, the following changes have been made on the layar publishing site.

 

  1. The ability to enable/disable "Layar Vision"

 

     On "create a new layer" page, an option to enable "Layar Vision" is added to indicate that this layer is a Vision enabled layer. This option can be edited later under the "General" tab of the "layer editing" page.

     NOTE: If "Layar Vision" is enabled, this will also change the Layer type to 3D and 2D objects in 3D spaces and the Minimum API version to version 6.0 automatically after the settings are saved.

 

 

     2.  The ability to upload and maintain reference images for a layer

 

     A new tab called "Layar Vision" is added to the layer editing page. Reference images can be uploaded and maintained here.

 

     For the uploaded reference image, the following information needs to be provided:

 

Fields
Description
Requirement (Best practices)
Image
The image itself that is uploaded from your computer
Image resolution must be at least 640 x 480 pixels, though larger images are accepted and encouraged. Supported file types include .JPG, .PNG, and .GIF. File size may not exceed 10 MB.
Image key
The key that is used to identify a reference image. It is the value of "referenceImage" defined in "anchor" object of a POI in getPOI response.

The image key is a quick way to identify your images. It has to be unique for a layer. We recommend using a personalized, easily remembered key.

NOTE: After you create an Image Key, the image will be processed by our server and you will not be able to edit it. To change the image or its key, you must delete the original and upload a replacement.

Real World Height
How high is your image in the real world in meters?
Fill in the real height of the target object that you want to augment. This determines how the unit length of the coordinate system is scaled with respect to the target object. So it will determine the size of the augment with respect to the target object and the lengths when "transform" or "animation" are applied to the augment.

 

 

Once a reference image is uploaded, the legend below is used to show ratings assigned by Layar server based on the quality and clarity of images and their ability to be used for Layar Vision.

 

 

 

The general flow of enabling Layar Vision 

 

The key components to enable Layar Vision are:

 

 

If we have a layer which has Layar Vision enabled and a reference image is uploaded to the layer definition on the publishing site, the interaction among Layar server, Third-party developer POI server and Layar client can be demonstrated using the diagram below:

 

 

 

Try out Layar Vision Demo Layers

 

To show case the new possibilities in Layar Vision, we have created several demo layers for developers to play with. 

 

1. Cantine Layer

 

Our first demo layer for Layar Vision.  Just search for "cantine" on the Android beta client . You can also watch it below:

 

 

We also created a tutorial which further explains how to create the demo Cantine layer. The complete JSON response of this layer together with the reference images are provided in the Cantine_layer.zip file. This zip folder contains:

 

 

2. Kitten Edition Layer

 

Kitten Edition shows the functionality of Layar Vision through the Internet-renowned image of an adorable kitten who happens to be dressed as Link from The Legend of Zelda.

The tutorial focuses on how to create the laser eyes effect !! The complete JSON response of this layer together with the reference images and 3d models are provided here.

 

 

Want to create your own Vision layer ? A tutorial is also available to help you get started quickly.