Sie sind auf Seite 1von 8

PictoBlox is a Scratch 3.

0-based graphical programming software that is the ideal


companion for the setting the first step into the world of programming. Its user-friendly
interface and drag-and-drop functionality eliminate the need to memorize syntax and
rules that is the case in traditional programming languages and often times scares children
and makes them hesitant.

PictoBlox, like Scratch, has the following basic elements:

Stage : The stage is a background or a backdrop for your Scratch projects (the


programs you’ll create). It is a white background in the top left corner. The Stage
is where the sprite moves, draws, and interacts with other sprites and/or
hardware. It has its own set of scripts, images, and sounds.

Sprite : A Sprite is an object or a character that performs different actions in the


projects. It understands and obeys the instructions that you’ll give them in your
projects. It can move and can be moved to any place in the stage (you can try by
clicking on them and moving them around).

Stage Palette

Below the Stage (bottom right) is the Stage Palette.


The stage palette has different tools using which you can change the stage:

 You can choose an image from the backdrop library.


 You can paint a new stage, you can import an image.
 You can click a picture using your computer’s or laptop’s camera.

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.

Script : A script is a program or a code in PictoBlox/Scratch lingo. It is a set of


‘blocks’ that are arranged below one another in a specific order to perform a
task or a series of tasks. 

The scripting area is where you will create your scripts.


Motion Blocks
Motion blocks deal with the movement of sprites. They relate mainly to the x and y position
and direction of the sprite, as almost all the blocks correspond to them. The Stage does not
contain any Motion blocks since it is a still object.

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.

Artificial Intelligence Extension


PictoBlox’s Artificial Intelligence extension allows you to make AI projects in PictoBlox. You
can make projects in the following areas of AI:

Computer Vision: To identify celebrities, brands, landmarks, and objects in images.


Face Recognition: To identify age, gender, and emotion from the face recognized in the
images.
Optical Character Recognition: To identify text in images.
Speech Recognition: To generate text from speech.

Computer Vision Blocks The Artificial Intelligence extension has the following 3


blocks which take an image as the input and analyze for image features:

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.

You can recognize the following in images:

1. Image Features – Computer vision

2. Handwritten Text

3. Printed Text

4. Face Details
recognized () count

The recognized () count block reports the number of selected things to count in


the image. There can be multiple celebrities, brands, objects, and image tags in a
single image.

recognized () () name
The recognized () () name block reports the name of the recognized
celebrity/brand/object/image tag. There are two inputs to the block:

1. Type: Celebrity, Brand, Object or Image Tag


2. Number: # of the thing you want to analyze. E.g. if there are two celebrities, then you
can get the celebrity 1 name and celebrity 2 name by changing this input.
If the number is out of range, then the block will return NULL.E.g., for the image
given above, you can get the following:

recognition result

The () recognition result block reports the landmark and the image description
identified in the image. 

Face Detection Blocks in PictoBlox : The Face Detection extension in PictoBlox


has blocks dedicated for face detection.

Facial Detection Block : To execute face detection, we will use analyse image
from () blocks.

You can input the image in the following ways:

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. 

Controlling camera feed


You can control the camera feed on the stage using turn () video on stage with () %
transparency block. 

You can change the following parameters of the block:

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.

Example – Analyzing Image on Stage

1. In PictoBlox, turn off the camera using turn () video on stage with () %


transparency block. Click on the block to execute it.

2. Next upload it as backdrop.

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.

Get expression of face ()

The get expression of face () block reports the recognized expression of the


selected face. If the face selected is not detected then it reports NULL.

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 () of face () block reports the following attributes of the image:


1. X position: X coordinate of the center of the image on the stage
2. Y position: Y coordinate of the center of the image on the stage
3. Width: Width of the face
4. Height: Height of the face

Get () position of landmark () 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. 

OCR Blocks in PictoBlox

The Artificial Intelligence extension in PictoBlox has blocks dedicated to OCR. 

Text Recognition Blocks

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

You can input the image in the following ways:

1. Camera feed

2. URL – online link of the image

3. From the stage, backdrop, or costume

Speech Recognition

1. Add a when flag clicked block into the scripting area. 

2. Snap a recognize speech for () s in () block below the when flag


clicked block. Change the time to 4 seconds.

3. Now, snap an if () else block below the recognize speech for ()


seconds block. 
4. In the condition of the if () else block, add a () contains ()? block from
the Operators palette. In the first argument, add a speech recognition result block
and in the second write “mario“. So, if the decoded text contains the word Mario, it
will execute the if branch blocks.

5. Add a speak () block from Text to Speech palette under the if arm and write


the message “Playing Mario Song!“.
6. Next, a snap play sound () until done block below the speak () block and
select Mario. This is how the script look:

7. Duplicate the if () else block and snap it under the else arm.

8. Change “mario” to “spiderman” in the condition of the if arm

9. Change the message in the speak block to “Playing Spiderman


Song!“.Change the sound.
10.  Finally, in under else arm, add a speak () block and write “Sorry, I am
unable to understand the command“. The script is complete. It will look like

this:

Click the green flag to start the script. 

Das könnte Ihnen auch gefallen