Table of Contents

AI Text Detection Using PictoBlox Software

AI-Text-Detection
Example Description
Extract handwritten text directly from the stage using the Artificial Intelligence extension. This project creates a virtual canvas, allowing users to draw text using their mouse and the Pen extension. Once written, the system uses AI to read the digital handwriting and convert it into editable digital text.

Introduction

AI Text Detection is a technology that helps computers identify and read text from images or camera input using Optical Character Recognition (OCR). In this PictoBlox project, the AI Text Detection feature is used to recognise printed or handwritten text from an image and convert it into digital text. This allows users to create smart applications such as document readers, automatic text extraction systems, and educational AI projects. PictoBlox makes this process simple by providing easy-to-use AI blocks that work with images, URLs, or live camera input. Through this project, we can understand how artificial intelligence can help machines interpret and process real-world visual information.

Setting Up the Stage / Sprite

Step 1: Open PictoBlox

Launch PictoBlox on your computer and create a new project. PictoBlox provides a block-based programming environment that helps in building AI and coding projects easily.

select-blocks-enviornment

Step 2: Add the Pencil Sprite

By default, you will have the Tobi (bear) sprite. Click on the “Choose a Sprite” button and add the Pencil sprite.

           

This will act as your interactive drawing tool.

Step 3: Adding Necessary Extensions

  1. Click on the Add Extension button (located at the bottom-left corner of the screen).
  2. Add the Pen extension: This grants the Pencil sprite the ability to draw markings on the stage.
  3. Click the Add Extension button again and select the Artificial Intelligence extension:
    This specialised extension contains the blocks required for detecting and extracting handwritten text, distinguishing it from standard printed text OCR.

Pen Extension  Artificial Intelligence extension

 

Step 4: Programming the Pencil

First, we need to create a script that allows the user to draw freely on the stage using the Pencil sprite and the mouse.

  1. Movement Tracking: Ensure the pencil continuously follows the user’s mouse pointer across the stage.

  2. Drawing Logic: Set a specific pen color (e.g., blue). Use a conditional statement linked to the Space key to control when the pen touches the paper (pen down to draw) and when it lifts (pen up to stop drawing).

  3. Clear Canvas: Program the ‘C’ key to quickly erase all markings from the stage.

Step 4: Programming the AI Handwritten Text Recognition

Next, program the AI to read the specific text you have just drawn on the stage. We will trigger the AI scan by pressing the ‘a’ key on the keyboard.

What this does: The system captures the current visual state of the stage and sends it to the AI model specifically trained for handwriting. It then outputs the recognised string via a speech bubble for 5 seconds.

Output

  1. Click the Green Flag button to initialise the project and tracking scripts.
  2. Move your mouse around the stage; the Pencil should track your pointer exactly.
  3. Press and hold the Space key while dragging your mouse to write a word (e.g., “Hello”). Release the Space key to stop drawing.
  4. Press the ‘a’ key to trigger the Artificial Intelligence text recognition block.
  5. Observe the Output: The sprite will process the image and display the detected handwritten text in a speech bubble on the screen.
  6. Press the ‘c’ key to clear the stage and experiment with different handwriting styles to test the AI’s accuracy!