| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

View
 

Enable Layar Vision in a layer

Page history last edited by xuan wang 12 years, 9 months ago

 

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

 

  • What is an Augment?  A “target object”?

 

     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). 

 

  • What is a reference image ?

 

     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.

 

  • GREEN - Green means the image is good to go. It should function properly with Layar Vision.
  • YELLOW - Yellow means the image will function properly under certain conditions, but we recommend that a better image is used. Try boosting contrast or increasing brightness to improve the image’s clarity and definition.
  • RED - Red means the image will most certainly not function properly under most conditions. Make sure images are focused with high contrast, definition and brightness. If you need more help making a good image, see our Reference Image Best Practices .

 

 

The general flow of enabling Layar Vision 

 

The key components to enable Layar Vision are:

 

  • Publishing site: Creates a layer with Layar Vision enabled and uploads reference images to a layer. Image keys are defined.   

  • Layar server:  Analyzes and extracts the details of each uploaded reference image to create the unique fingerprint of the target object. The defined image keys will be used to retrieve the fingerprints of target objects.

  • Third-party developer POI server: Returns getPOI response which contains correct "referenceImage" values. The "referenceImage" value should be one of the image keys defined for that layer on the publishing site.  

  • Layar client: knows which target objects to look for, and the associated augments and actions for each target object will be loaded from the layar server.

 

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:

 

  • Cantine Doc.pdf, detailed explanation/instructions on how to create the Cantine layer.
  • PHP - All the files that you need to get the web service work.
  • Reference Images - Images need to be uploaded to the publishing site. 
  • Images for print - The actual target objects that you can print out.

 

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. 

 

Comments (0)

You don't have permission to comment on this page.