Deprecated: Required parameter $query follows optional parameter $post in /var/www/html/wp-content/plugins/elementor-extras/modules/breadcrumbs/widgets/breadcrumbs.php on line 1215
QR Code Scanner - Blocks, Python Functions, Projects | PictoBlox Extension
[PictoBloxExtension]

QR Code Scanner

QR scanner
Extension Description
Detect, identify and read QR codes from images.

Introduction

What is QR Code?

QR Code is a machine-scannable image that can be instantly read, using a smartphone camera. Every QR code consists of a number of black squares and dots that represent some encoded piece of information; like alphabets, numbers, etc. When your Smartphone scans this code, it translates that encoded information that only computers can understand, into something that can be easily understood by humans.

 

The QR Code Scanner extension allows users to scan QR codes from the camera or stage and report the information:

  1. QR Code Data
  2. QR code position on the stage
  3. QR code angle alignment on the stage

Accessing QR Code Scanner in Block Coding

Following is the process to add QR Code Scanner capability to the PictoBlox Project.

  1. Open PictoBlox and create a new file.
  2. Select the coding environment as Block Coding.
  3. Next, click on the Add Extension button and add the QR Code Scanner extension.
  4. You can find the QR Code Scanner blocks available in the project.

Accessing QR Code Scanner  in Python Coding

Following is the process to add QR Code Scanner capability to the PictoBlox Project.

  1. Open PictoBlox and create a new file.
  2. Select the coding environment as Python Coding.
  3. Next, click on the Add Modules/Libraries button and add the QR Code Scanner extension.
  4. To access the library functions, you have to add the object declaration.
    qr = QRCodeScanner()

Example Project Video

In this project, a QR code is generated with the help of a QR code generator website. credits – https://www.qr-code-generator.com/

The QR code is linked to a URL. Then, the QR code is scanned with the help of the QR code scanner extension of Pictoblox. The project is created by RS Junction.

Read More

PictoBlox Blocks

It changes Sound Effects.
The block will check its Boolean condition: if the condition is true, the code held inside the first C (space) will activate, and then the script will continue; if the condition is false, the code inside the second C will activate (unlike the If () Then block).
Scripts that begin with this block will be invoked once the specified broadcast has been sent by a calling script. If a Forever block is sending the broadcast faster than the attached script can finish running, the script will restart without reaching the blocks at the end. This can be avoided by using Broadcast () and Wait.
The block holds the most recent text imputed with the Ask () and Wait block. When nothing has been inputted yet, the value will hold nothing.
Once you have analyzed the images, you can use the get # of objects block to get the number of objects recognized in the image.
The block joins two Boolean blocks so any one of them can be true to return true — if at least one of them is true, the block returns true; if neither of them are true, it returns false.
The block simply holds its variable value.
Once you have analyzed the images, you can use the get # of people block to get the number of people recognized in the image.
This block returns the x position of the pose landmark detected. The position is mapped with the stage coordinates.
The recognized () count block reports the number of selected things to count in the image. Multiple celebrities, brands, objects, and image tags in a single image can be seen.
Once you have analyzed the images, you can use the get # faces block to get the number of faces recognized in the image.
Once you have analyzed the image for printed text, you can use a printed text result block to get the recognized text from the image in a string format.
The block checks if the currently recognized class from the selected image feed (camera, stage, costume or backdrop) is the selected class or not.
The block analyses the specified text and provides the sentiment associated with the text – Positive, Negative or Neutral.
Once you have analyzed the images, you can use the get # of objects detected block to get the number of objects recognized in the image.
The block returns the QR Code data value detected.
The block changes the instrument that the Play Note () for () Beats block will play. A sprite can play only one instrument at a time. In order to play multiple instruments at once, it is necessary to have multiple sprites or clones of a single sprite
The block sets the pen’s color to the given color, which can be selected by clicking on the input.
This block sets the pen’s color, saturation, brightness (also known as shade), and transparency. The first value can be selected from “color” (default), “saturation”, “brightness”, and “transparency”.
The block sets the analog state of the specified pin to the specified value between 0 to 255.
The block displays the specified character on the Quarky RGB LED.
The block sets the threshold value of the specified IR sensor to the specified value. The value can be from 0 to 4095.
The block checks if the currently recognized class from the analyze image from () block is the selected class or not.
The block analyses the image and saves the face information locally, which can be accessed using other blocks.
The block checks if the currently recognized class from the analyze image from () block is the selected class or not.
The block sets the head servo motor angle to the specified angle.
The block checks if the currently recognized class from the analyze image from () block is the selected class or not.
The block reports the specified class confidence value of the selected class. 0 is low confidence and 1 is high confidence.
Scripts that wear this block will activate once the selected class is predicted either on the recognition window.
The block sets the selected property of the sprite (density, roughness, and bounce) to the specified value.
All articles loaded
No more articles to load

Block Coding Examples

All articles loaded
No more articles to load

Python Functions

The function returns whether the specified number card (0-9) is detected in the analysis or not.
Syntax: isnumberdetected(card_number = 1)
The function returns the specified parameter for the specified number card detected.
Syntax: getnumberdetail(card_number = 1, parameter_value = 1)
The function returns whether the specified object card is detected in the analysis or not.
Syntax: isobjectdetected(object_name = “Pizza”)
The function returns the specified parameter for the specified object detected.
Syntax: getobjectdetail(object_name = “Pizza”, parameter_value = 1)
The function is used to control the state of the camera.
Syntax: video(video_state = “on”, transparency = 1)
The function enables the automatic display of the box on QR Code detection on the stage.
Syntax: enablebox()
The function disables the automatic display of the box on QR Code detection on the stage.
Syntax: disablebox()
This function is used to analyze the image received as input from the camera, for QR Code.
Syntax: analysecamera()
This function is used to analyze the image received as input from the stage, for QR Code.
Syntax: analysestage()
The function returns whether the QR Code is detected in the analysis or not.
Syntax: isdetected()
The function returns the X position of the specified landmark points of the QR code.
Syntax: xpos(landmark_name = “center”)
The function returns the Y position of the specified landmark points of the QR code.
Syntax: ypos(landmark_name = “center”)
The function returns the QR Code data value detected.
Syntax: codedata()
The function returns the QR Code angle detected.
Syntax: angle()
The function initialize and sets the event name and API key for the IFTTT webhooks.
Syntax: setifttt(event_name = “event name”, key = “key”)
The function sets the specified parameter (1, 2, or 3) to the specified value. 
Syntax: setvalues(value = “your value”, parameter = 1)
The function triggers the IFTTT webhook event.
Syntax: triggerevent()
The function clear the parameter values of the IFTTT webhook.
Syntax: clearvalues()
The function returns the parameter 1 value set during the program.
Syntax: value1()
The function returns the parameter 2 value set during the program.
Syntax: value2()
The function returns the parameter 3 value set during the program.
Syntax: value3()
All articles loaded
No more articles to load

Python Coding Examples

All articles loaded
No more articles to load
Table of Contents