The Lampix Simulator

To enable experimenting with Lampix interactions and creating content for lampix easily, the Lampix Simulator is provided. It provides the same environment for running Lampix web applications as Lampix itself does, while replacing the actual computer vision events (object & finger recognition, movement, etc.).

Here is an example of a lampix application, it’s a tower defense game. Real objects which you place on a table start shooting bullets at enemies which are projected (augmented). Once working, this application looks like this:

_images/tower_defense_real.jpg

Before it got to that stage, this application was developed in a very short time using the simulator, without the developer initially having access to a lampix device at all. Here is how the exact same application looks like in the simulator:

_images/tower_defense_sim.jpg

The developer can simulate events in the simulator via simple mouse clicks and see how the application reacts. Most lampix applications have been developed using the simulator first, in order to separate the complexity of the content from the complexity of the computer vision.

Downloading the simulator

The simulator is available for download here (Linux is a work in progress, we can provide source code for the linux simulator if required):
  • Windows (MD5: 7b21ff909359be07b33f195fbe615c9c)
  • Mac (MD5: f1082c2336bab9677293afec98bd7a51)
  • Linux

Using the simulator

When launching the simulator for the first time, the standard demo sample apps are available to choose from in the Lampix App URL dropdown. Choose an app and press Load. When developing your own apps, you can type their URL in the Lampix App URL field and the corresponding entry will be added to the list, for you to reuse whenever you launch the simulator.

_images/1_dropdown_url.PNG

The main part of the simulator screen contains the preview of what your app will look like on Lampix. Below that a standard web browser debug pane shows all relevant controls and data for you to understand what is going on with your app. The console is of particular interest, it shows messages and data related to the running app. You can output to the console from your app using the standard Javascript console.log() method.

Each app registers for certain events on Lampix, as described in the previous chapter. Depending on what the app registered for, different options are available in the emulator, as shown in the examples below. In each example one of the demo apps was loaded, to show the interaction for that particular API call. These demo apps are available by default in the simulator.

If the app has registered for getting movement events, the Generate Movement checkbox is active. If you mark this checkbox and move your cursor over the app, movement events are generated and the app gets the corresponding call. The sample shows 2 separate registered zones which are detecting movement, all the rest of the surface is not getting any events.

_images/3_positionclassifier.PNG

If the app has registered at least a simple classifier, then after selecting the Fixed Position Detector radio button, the corresponding dropdown is enabled and shows the list of available classifiers. These are the classifiers that were passed to the registerSimpleClassifier function. Pick one classifier from the dropdown list and the class that was detected form the next dropdown list, then click on the app to simulate the detection of that class. For this type of detector, just the fact that an object was detected is passed to the app, no information regarding the position of the object is available, except for the fact that detection only happens within the registered rectangles.

One special type of simple classifier used for creating buttons, is the finger detector. In case you register for finger detection, the class drop down list shows “finger” and “no finger” entries.

_images/2_simpleclassifier_log.PNG

If the app has registered at least a position classifier, then after selecting the Variable Position Detector radio button, the corresponding dropdown is enabled and shows the list of available classifiers. These are the classifiers that were passed to the registerPositionClassifier function. Pick one classifier from the dropdown list and the class that was detected form the next dropdown list, then click on the app to simulate the detection of that class. For this type of detector, the contour of the detected object is passed to the app when detection happens within the registered rectangles.

One special type of simple classifier used for creating buttons, is the paper detector. In case you register for paper detection, the class drop down list shows “paper” and “no paper” entries. Extension of the API with paper metadata (text contents, high resolution scan of the paper, live stream link to the paper) is work in progress.

_images/4_movement.PNG

These simple apps available by default in the simulator are meant to give you a basic structure for creating your own Lampix App. You can register for any number of events concurrently, so you can combine elements of the above samples to create your own app.