Follow the steps below:
- Create a New file in PictoBlox App.
- Connect Quarky to PictoBlox.
- Next, click on the Add Extension button and add the Face Detection
- Add a when flag clicked block from the Events palette into the scripting area.
- Add a turn () video on the stage with () % transparency block below the when flag clicked The default option is on and the transparency is 0%.
- Add a () bounding box block below the turn () video on the stage with () % transparency Show is selected by default.
- Add a forever block from the Control palette below the () bounding box block. Only the blocks inside the forever block will run continuously.
- Add an analyse image from () block inside the forever This block will analyze our faces to detect our expressions.
- Now, we will make Tobi tell the expression that PictoBlox has detected. From the Looks palette, add a say () block below the analyse image from ()
- Inside the space of the say () block, drop a get expression of face () This block will figure out our presentation, and then the say block will make Tobi tell us the expression detected.
- Click the green flag to run the script and have fun!
- In the same script, add an if block below the say () Using this block, we’re going to check which expression has been detected. Let us first check for the happy expression.
- Inside the white space of the if block, add an expression of face () () Happy is the default option so you don’t need to change anything. If the detected expression is happy, then Quarky must also be happy!
- Go to the Display palette and drop a display () expression block inside the if happy is the default option so you don’t need to change anything here.
- Repeat the above 3 steps for sad, surprised, and angry expressions.
Click the green flag to run the script and have fun!