Leçon 1, Chapitre 1
En cours

Reconnaissance de texte – Fonctions python

Yann KIDSHAKER 17 mars 2026

Introduction to Text Recognition

  • Text Recognition is a widespread technique that is used to recognize text from files, that are in various kinds of digital formats such as images, scanned documents, videos (including real-time) etc.
  • OCR (Optical Character Recognition) is the process that converts an image of text into machine readable format. The text stored in this machine-readable format can then be analyzed, processed and stored for a wide range of applications.
  • The analyzing and processing part of OCR is done using computer vision systems which work on the principles of machine learning algorithms.

 

  • Apart from this, OCR can also be used to trigger some action in a process/system. An example is an activity called ‘Postman’ which is an automated post system, that can be built in the PictoBlox environment.
    In this activity, handwritten text which contains a name of a person is read using OCR and the gift sprite is then sent to the appropriate recipient, depending on the name detected.

Text Recognition Functions

The Text Recognition extension in PictoBlox utilizes AI to analyze media files like images or videos and recognize text from them. The Text Recognition extension can analyze both handwritten and printed text.

Functions

  1. video(): This function helps turn the video on/off on the stage with a defined level of transparency.
    1. Syntax: video(video_state = “on”, transparency = 1)
    2. Parameters:
      1. video_state = {“on”, “off”, “on flipped”}
      2. transparency = 0 to 100, in Percentage(%)
  2. analysecamera(): This function is used to analyze the image received as input from the camera, for the feature.
    1. Syntax: analysecamera(text_type, time)
    2. Parameters:
      1. text_type = {“handWrittenText”, “printedText”}
      2. time = Any positive integer
  3. analysestage(): This function is used to analyze the image received as input from the stage, for the feature.
    1. Syntax: analysestage(text_type, time)
    2. Parameters:
      1. text_type = {“handWrittenText”, “printedText”}
  4. analysebackdrop(): This function is used to analyze the image received as input from the current backdrop image, for the feature.
    1. Syntax: analysebackdrop()
  5. analysecostume(): This function is used to analyze the image received as input from the current costume, for the feature.
    1. Syntax: analysecostume()
  6. analyseURL(): This function is used to analyze the image received as input from the specified URL of the image, for the feature. Using this function you can analyse many things from the image, like Brands, Celebrity, Objects, Landmarks, Image Tags, Image Description.
    1. Syntax: analyseURL(url = “https://ai.thestempedia.com/wp-content/uploads/2022/02/Robert-and-Chris.jpg”)
    2. Parameters:
      1. url = “Any url”
  7. handwrittentextresult(): This function reports the handwritten text identified from the analysis.
    1. Syntax: handwrittentextresult()
  8. printedtextresult(): This function reports the printed text identified from the analysis.
    1. Syntax: printedtextresult()

Using these functions, we can now build very exciting text recognition programs and applications that can be exemplary in our portfolio.