TINKER PiEDESIGN IN INDIA
Basic

AR Filter SwitcherChange your AR face filter by holding up 1, 2, 3 or 4 fingers.

You write a short TinkerPie Python program by following the Code guide in the workspace, then press Run. The sample program and step-by-step guide are always there to help.

What you will learn

  • Two AIs together: face and hand
  • Choosing with if / elif
  • Interactive AR

What you need

  • A laptop, tablet or phone with a camera (Virtual Cube)

Steps

  1. Type the program from the Code guide, then press Run.
  2. Hold up 1 to 4 fingers.
  3. Each number gives a different filter.

How it works

The program runs a face detector and a hand detector on every picture. The finger count chooses which sticker goes on your face.

Coding concepts

Loop
"while True:" repeats the indented lines once per camera picture.
Variable as a choice
look holds the name of the filter.

Expected output

Glasses with no hand; hat (1 finger), crown (2), cat (3), mask (4). The filter name is on screen.

Challenges

  • Add hearts for 5 fingers.
  • Keep the last filter when the hand goes away.
  • Add a beep when the filter changes.

More AR/VR projects

Basic10 minAR / VR, Computer Vision

AR Sunglasses

Put cool AR sunglasses on every face in the camera, like a photo filter app.

  • What augmented reality (AR) is
  • Placing pictures on detected faces
  • Filters you see in apps
Hardware: Laptop, tablet or phone cameraAI Cube: Virtual Cube only · Virtual Cube: laptop or phone camera
Basic15 minAR / VR

My First VR World

Build a 3D world with code: a sky, grass, a red box, a ball, a tree and a sign.

  • What virtual reality (VR) is
  • 3D positions: x, y and z
  • Building scenes with code
Hardware: Any device; a phone VR viewer for headset modeAI Cube: Virtual Cube only · Virtual Cube: laptop or phone camera