Page 40 - ComputerGenius_V2.1_Class8
P. 40

Textual code














                   Step 3   Add “==” block in the blank space of if-do block. In "==" block add numeric block (0
                            block) on the right side. Add Get face count block from Facial Features sub-category
                            to the left side of "==" block. Then, click on arrow of Get face count block and select
                            smile to make it Get smile count block. Get smile count block is used to detect whether
                            a person is smiling or not.

                              Block Code













                             Textual code
















                   Step 4   Provide the output statement for the person is smiling or not (this result will be printed).
                            The concept behind the following coding is, if the count of smile in the image is one, the
                            program should print the “Smiling” else print “Not Smiling”.
                            Get smile count == 1, means the person is smiling in the image.

                              Block Code















                       38    Computer Genius (V2.1)-VIII
   35   36   37   38   39   40   41   42   43   44   45