Lesson 1, Topic 1
In Progress

Detecting the Expressions

Recognize Image

Snap a analyse image from () block. Select the feed as the camera.

evive Notes Icon
Note: Analyse image from stage block analyses the images from the feed and detect the faces. For each detected face, it also recognises the position, width, height, and emotion of the face. This information is stored in the memory of the machine which we can access through other blocks. 

Display Bounding Box

Now we will write the script for each face detected.

  1. Snap a set size to () % block from the looks palette.
  2. Next add get () of face () block from the face detection palette. Select the parameter as width and add Face reporter block in the face number input.
  3. Then, add a go to x: () y: () block. Add a get () of face () block in both the input. Change the parameter to the x position in the first drop down and the y position in the second.v
  4. Next, add a say () block. Add a get expression of face () block in the input. Add the Face reporter block in the face number input.

Your script is now complete.

Click the green flag to start the script.

Boy Face Expression

Conclusion

In this topic, you learned about face detection. You learned how to recognize the emotions from images using PictoBlox by creating this fun project. In the next topic, we will look at how face recognition works.

Assignment

Before you move on to the next lesson, a small assignment awaits you!

You must upload the PictoBlox program you wrote in this activity to the website. 

Submitting the assignment is a must to receive the certificate after completing the course.

Follow the steps below to upload your assignment:

  1. Click Choose File.
  2. Select the image from the pop-up window that opens up.
  3. Once the image is selected, click Upload Assignment.
evive Alert
The file type allowed is SB3 file generated from the PictoBlox program. The maximum file size allowed is 15 MB.

Good luck!

Get in Touch!