Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 108 - logicode 2609 C5
P. 108

    This block  turns the  webcam  on, off or flips the
                                            turn video  on
                                                                video feed.

                                                                This block is used to control the visibility of the video
                                       on
                                   set video transparency to  50
                                                                feed from the webcam.

                                                                                                            PURE
                            The ‘set video transparency to ()’ block sets how transparent the video is. 0
                            shows the video clearly, 100 hides it completely.                                FACT

                        Project 1    Sprite Reacts When You Move

                      Create a simple project where the sprite reacts to your
                      movements captured by the webcam. To create a simple

                      project  using the Video  Sensing extension,  follow  the
                      given steps:

                      Step  1    Click the Add Extension          button.
                      Step  2    Select Video Sensing extension.

                      Step  3    Remove the default sprite and add a new sprite.

                      Step  4    Create the given script for the chosen sprite.

                      Now, step in front of the webcam and wave your hand or touch the sprite. The sprite will
                      detect your movements, play the duck sound and say, ‘I am a duck!’.

                                           when video motion  >  10

                                    play sound  duck  until done

                                    say  I am a duck!  for  2  seconds

                               Create a small project using Video Sensing blocks where the sprite changes its
                                         costume when it detects movement in front of the webcam.

                      106   Premium Edition-V

| 103 104 105 106 107 108 109 110 111 112 113 |