Beruflich Dokumente
Kultur Dokumente
Stage Palette
Blocks : Blocks are like jigsaw puzzle pieces that fit into each other. They are
predefined commands used to create programs by simply dragging and
dropping them below one another in the scripting area.
Block Palette :The block palette is under the Code tab. It consists of different
palettes such as Motion, Sound, and Control. Each palette has different blocks that
perform functions specified by the palette name.
Events Blocks
Events blocks are related to various triggers in a project, or when one part signals another to
run. The Events blocks used to be part of the Control category prior to Scratch 2.0. The
"Events" category consists mostly of hat blocks.
Looks Blocks
Looks blocks are related to the appearance of sprites and the stage. Some of the
functionalities are changing costumes and applying graphic effects.
Control Blocks
Control blocks run the basic flow of a project in the desired fashion, whether it be organized
or unexpected. They provide functions for looping various blocks and scripts. They "control"
the project and enhance its running.
Sound Blocks
Sound blocks are related to playing various sounds, whether they be MIDI notes or saved
sounds.
Sensing Blocks
Sensing blocks associate with sprites and the stage detecting conditions. For example,
sensing blocks can be used to detect when one sprite touches another. They consist of many
booleans and can work with Control blocks to stabilize a project' a flow.
Operators Blocks
Operators blocks, originally called "Numbers" blocks, deal with many mathematical
functions within a project. They are a green color and provide the capabilities of simple to
complex mathematical operations. "Operators" also contains blocks for modifying strings
and implementing them into various uses. There are some boolean blocks, too, in which
some are related to mathematical outputs, while others are used for adjoining other
booleans into one or a different output condition.
Variables Blocks
Data blocks include two subcategories, Variables and Lists, but both are related to storing
and accessing data. Prior to Scratch 2.0, this category was called "Variables". Data blocks are
used for storing information, such as a score in a project, and using it in scripting and other
beneficial purposes.Variables are a subcategory of Data blocks. They become visible once a
variable, a changeable value, is created. They are color-coded orange and consist of four
stack blocks.
List Blocks
Lists are another subcategory of Data blocks. The blocks become visible once a list is
created.
My Blocks
My blocks are blocks that hold custom procedures for a selected sprite. The blocks are
useful for running a script without screen refresh and organization of the scripts.
Extensions
There are many extensions in Scratch that provide additional elements to the editor or allow
connection to the physical world.
1. recognize () in camera image after () seconds: This block starts the camera and
takes an image after the specified time and analyzes it. It then saves the image features in
PictoBlox.
2. recognize () in image from URL (): This block extracts the image from the specified
URL, analyzes it, and then saves information in PictoBlox.
3. recognize () in image from (): This block extracts the image from Stage, Costume, or
Backdrop in PictoBlox, analyzes it, and then saves information in PictoBlox.
2. Handwritten Text
3. Printed Text
4. Face Details
recognized () count
recognized () () name
The recognized () () name block reports the name of the recognized
celebrity/brand/object/image tag. There are two inputs to the block:
recognition result
The () recognition result block reports the landmark and the image description
identified in the image.
Facial Detection Block : To execute face detection, we will use analyse image
from () blocks.
1. Camera feed
2. Stage
This block analyses the image and saves the face information in locally, which
can be accessed using other blocks similar to computer vision.
You have to run this block every time you want to analyse a new image from
camera or stage.
1. Camera state:
1. OFF – The video feed on the stage will stop.
2. ON – The video feed on the stage will start.
3. ON filpped – The video feed on the stage will start with the video mirrored.
So, your right hand will show left and vice versa.
2. Transparency: This parameter makes the video translucent. O is defined as the
camera feed will be shown on the stage and 100 is the video will fade out completely from
the stage.
Edit the parameter and try out this block yourself.
3. Select Tobi sprite and hide it.
4. Drag analyse image from () block, change the feed as stage and click on the block to
analyse the image.
5. Get # faces
Once you have analyzed the images, you can use the get # faces block to get the
number of faces recognized in the image.
Is expression of face () ()
The is expression of face () () block checks whether the selected face has a
particular emotion or not. If the emotion matches, then the block returns true,
else false.
E.g., for face 1 in the image, the emotion is Happy.
Get () of face ()
The get () position of landmark () of face () block reports the x and y position of the
selected landmark (number from 1 to 68) of the selected face.
For text recognition, we’ll use the same blocks that we used in computer vision.
You have to select the type of text you want to recognize in the image. The two
types of text that the block can recognize are:
1. Handwritten text
2. Printed text
1. Camera feed
Speech Recognition
this: