Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Augmented Reality in Your Browser using Vanilla JavaScript

Felix Wu
November 22, 2018

Augmented Reality in Your Browser using Vanilla JavaScript

Augmented Reality (AR) is on the rise, with live AR apps like Snapchat or Pokémon Go that are used by hundreds of millions of Users. With rising popularity, it also becomes more and more important for developers to have at least some experience with AR. And since we are in the age of frameworks where there are dozens of frameworks for each and everything, I thought: Why not act against the trend and implement AR using good old Plain Vanilla JS? Luckily, there happens to already be a beta Shape&Face Detection API that got released by the W3C earlier this year.
In this talk, I will introduce attendees to the Shape Detection API, go through some examples of AR in Web Development and also showcase a live face-filter service!

Felix Wu

November 22, 2018
Tweet

More Decks by Felix Wu

Other Decks in Programming

Transcript

  1. @flxwu AR in Your Browser with Vanilla JS WHAT IS

    AUGMENTED REALITY? USING THE
 SHAPEDETECTION API LET’S CODE FACE-FILTERS!
  2. @flxwu AR in Your Browser with Vanilla JS “interactive experience

    of the real world whereby the objects in the real-world are "augmented" by computer-generated perceptual information, sometimes across multiple sensory modalities, . . .
  3. @flxwu AR in Your Browser with Vanilla JS including visual,

    auditory, haptic, somatosensory, and olfactory. “
  4. @flxwu AR in Your Browser with Vanilla JS Version >70

    chrome://flags/#enable-experimental-web-platform-features
  5. @flxwu AR in Your Browser with Vanilla JS ShapeDetection API

    ShapeDetection FaceDetection TextDetection BarcodeDetection
  6. @flxwu AR in Your Browser with Vanilla JS Encoder Mac

    Android Win10 Linux Face QR/ Barcode Text
  7. @flxwu AR in Your Browser with Vanilla JS ShapeDetection API

    ShapeDetection FaceDetection TextDetection BarcodeDetection
  8. @flxwu AR in Your Browser with Vanilla JS [Constructor (optional

    FaceDetectorOptions)] interface FaceDetector { Promise<sequence<DetectedFace>> detect(Source image); };
  9. @flxwu AR in Your Browser with Vanilla JS [Constructor (optional

    FaceDetectorOptions)] interface FaceDetector { Promise<sequence<DetectedFace>> detect(Source image); };
  10. @flxwu AR in Your Browser with Vanilla JS { unsigned

    short maxDetectedFaces; boolean fastMode; }; [Constructor (optional FaceDetectorOptions)] interface FaceDetector { Promise<sequence<DetectedFace>> detect(Source image); };
  11. @flxwu AR in Your Browser with Vanilla JS { unsigned

    short maxDetectedFaces; boolean fastMode; }; [Constructor (optional FaceDetectorOptions)] interface FaceDetector { Promise<sequence<DetectedFace>> detect(Source image); };
  12. @flxwu AR in Your Browser with Vanilla JS { unsigned

    short maxDetectedFaces; boolean fastMode; }; [Constructor (optional FaceDetectorOptions)] interface FaceDetector { Promise<sequence<DetectedFace>> detect(Source image); }; <img>,<canvas>,<svg>,<video> Blob ImageData (e.g. b64)
  13. @flxwu AR in Your Browser with Vanilla JS { unsigned

    short maxDetectedFaces; boolean fastMode; }; [Constructor (optional FaceDetectorOptions)] interface FaceDetector { Promise<sequence<DetectedFace>> detect(Source image); }; <img>,<canvas>,<svg>,<video> Blob ImageData (e.g. b64)
  14. @flxwu AR in Your Browser with Vanilla JS { DOMRectReadOnly

    boundingBox; FrozenArray<Landmark>? landmarks; }; { unsigned short maxDetectedFaces; boolean fastMode; }; [Constructor (optional FaceDetectorOptions)] interface FaceDetector { Promise<sequence<DetectedFace>> detect(Source image); }; <img>,<canvas>,<svg>,<video> Blob ImageData (e.g. b64)
  15. @flxwu AR in Your Browser with Vanilla JS { DOMRectReadOnly

    boundingBox; FrozenArray<Landmark>? landmarks; }; { unsigned short maxDetectedFaces; boolean fastMode; }; [Constructor (optional FaceDetectorOptions)] interface FaceDetector { Promise<sequence<DetectedFace>> detect(Source image); }; <img>,<canvas>,<svg>,<video> Blob ImageData (e.g. b64)