Chapter 14: Getting Started with Face-Based AR

前言

在臉上做AR特效應該是目前線上所有直播app所具備基本功能吧。接下來新的app,就是要針對人臉進行辨識,並學習加上AR效果。

大綱

ARKit for face-based AR

There are four primary features included with ARKit’s face tracking capabilities:

  • Face detection and tracking: Real-time face detection and tracking with a refresh rate of 60 frames per second.

  • Real-time facial expression tracking: More than 50 specific facial expressions are tracked in real-time.

  • Font color image, front depth image: The TrueDepth front-facing camera captures color pixel buffers and depth data.

  • Light estimation: With face-based AR apps, an estimate of directional or environmental lighting is possible by using the detected face as a light probe

The starter project

基本上這個app有三個主要的功能

  • 在人臉增加面具(mask)

  • 在人臉上置放文字(woot)

  • 置換整個人臉變成豬頭(pig) - 且豬頭的眼睛嘴巴動作會依據人臉的動作而變化。

Starting a face tracking session

Handling errors and interruptions

處理session有問題的event

Last updated