GithubHelp home page GithubHelp logo

universalvoucher / perception-toolkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from smalls/perception-toolkit

0.0 4.0 0.0 4.44 MB

License: Apache License 2.0

JavaScript 8.02% HTML 1.17% TypeScript 90.14% CSS 0.67%

perception-toolkit's Introduction

Perception Toolkit

Perception Toolkit running on a phone

This toolkit provides a set of components and utilities for developers to add an augmented experience to their website. For example, a primary use-case supported is the ability to detect barcodes (in -- say -- a real-world store) with the user's device camera, and to show them extended information on a given product.

Included in this toolkit is:

  • Device Support Detection
    • Barcode Detector
    • getUserMedia and environment camera
    • Geolocation
    • Wasm
  • Detectors
    • Barcode Detector (native / ZXing)
    • QR Codes (native / ZXing)
    • Geolocation (native)
    • (TODO) Planar Image
    • (TODO) ML Image Classification
  • UI
    • Loader
    • Card
    • User onboarding
  • Utilities
    • Stream capture (i.e. getUserMedia to image conversion)
    • Logging
    • Image resizing

Installation

We recommend installation via npm. Simply:

npm install --save perception-toolkit

The intended use is detailed under demo/, where you can see how to set up barcode detection and the display of values to the end user. A good starting point is demo/simple/index.html, with a few small modifications to refer to node_modules (and assuming that node_modules is available at the root of your server, as it is with our sample server):

  • You must specify root in window.PerceptionToolkit.config:

    window.PerceptionToolkit.config = {
      root: '/node_modules/perception-toolkit',
      
      ...
    }
    
  • You must change the location of bootstrap.js, included at the end of index.html:

    <script src="/node_modules/perception-toolkit/lib/bundled/bootstrap.js"></script>
    

Development

  1. git clone https://github.com/PolymerLabs/perception-toolkit
  2. npm i
  3. npm run build
  4. npm run serve
  5. Open the demo page at localhost:8080

Building

npm run build

Testing

npm test

Note: coverage data can be found in the generated coverage/ directory located in the project root.

API Docs

npm run docs

Note: docs can be found in the generated docs directory located in the project root.

perception-toolkit's People

Contributors

paullewis avatar mmocny avatar smalls avatar

Watchers

James Cloos avatar n1c0 avatar  avatar Lucas Verra avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.