OCR Blocks in PictoBlox
OCR Blocks in PictoBlox
The Artificial Intelligence extension in PictoBlox has blocks dedicated to OCR. Let’s first add the extension to our project:
- Create a new project in PictoBlox.
- Next, click the Add Extension button and add the Artificial Intelligence extension.
Now, let’s have a look at the blocks:
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:
- Handwritten text
- Printed text
You can input the image in the following ways:
- Camera feed
- URL – online link of the image
- From the stage, backdrop, or costume
Recognizing Printed Text
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.
E.g., if you input the image above in one of the recognize blocks, the recognized text will be as follows:
Recognizing Handwritten Text
Once you have analyzed the images for handwritten text, you can use a handwritten text result block to get the recognized text from the image in a string format.
E.g., if you input the image above in one of the recognize blocks, the recognized text will be as follows. You can extract the city and Pincode easily with simple string manipulation.
Limitations of OCR
The accuracy of text recognition operations depends on the quality of the images. The following factors may lead to an inaccurate reading:
- Blurry images
- Handwritten or cursive text
- Artistic font styles
- Small text size
- Complex backgrounds, shadows, glare over text, or perspective distortion
- Oversized or missing capital letters at the beginnings of words
- Subscript, superscript, or strikethrough text
In the next, topic we’ll use these blocks to make a fun PictoBlox project!