Table of Contents

Quick Start for Web Development of Image Cloud Recognition

EasyAR WebAR implements AR features based on web technology, offering lightweight, fast deployment, and wide dissemination compared to native AR applications. It runs on mainstream browsers for Android, iOS, Windows, and Mac systems without the need to install an app, achieving true cross-platform compatibility.

Before you begin

Ensure the following preparations are complete before starting:

  1. An API Key supporting cloud recognition
  2. A running cloud recognition library

Upload Cloud Recognition Images

Prepare a recognition image and upload it to the cloud recognition library. Refer to Image Library Management for the upload method.

Download Sample

To facilitate rapid development, we provide sample code. Developers can download these samples to quickly experience WebAR functionality.

Click to Download

Configure Sample

The sample code includes pre-configured settings. Adjust them according to your actual environment.

  • Edit the config/application.txt file
  • Replace the API Key, API Secret, and CRS AppId in the configuration file

Cloud Recognition Configuration

  • Edit the asset/js/app.js file in the sample directory
  • Replace the Client-end (Target Recognition) URL for cloud recognition in app.js

Cloud Recognition Configuration

Run Sample

The EasyAR-WebAR_* files serve as HTTP and token generation services. If started successfully, they will display the listening port number. Start them as follows:

  • Linux System:
    ./EasyAR-WebAR_linux  
    
  • macOS System:
    ./EasyAR-WebAR_darwin  
    
  • Windows System:
    // Double-click or run in cmd  
    EasyAR-WebAR_windows.exe  
    

Experience Sample

Enter http://127.0.0.1:3001/ in a PC browser (with a camera), preferably using Firefox.
Aim at the recognition target and observe the sample's performance.

Tip

For mobile experience, configure a domain name that supports HTTPS.