Overview
In this session, we want to solidify your knowledge of the Python functions in the Pictoblox application. In this activity, we will be using the Card Recognition extension functions to analyze image from the camera and also use the if-else conditional statement to check whether the number 1 card is detected or not. Watch the video (below) for a step-by-step guide to make the “Number Card Detection” activity within PictoBlox.
Number Detection – Understanding the Logic
We’ll be using our Smartphone’s camera to detect the numbers. The logic here is pretty simple. We’ll bring a random number in front of the camera and then PictoBlox will detect if that number card is 1 or not. The accuracy with which it will detect the number depends on something called confidence.
Confidence tells us how sure the machine is of the object it has detected. E.g., let’s say PictoBlox has detected the number 1 and its confidence is 0.6. This means that it is 60% sure that object it has detected is number 1. The accuracy of object detection depends on the confidence value. The higher it is. the more will be the confidence.
The disadvantage of setting a high confidence value is that detecting the objects becomes difficult, especially if it is far away from the camera.
But we cannot keep the confidence value too low either. In that case, the machine may detect some other object or multiple objects at once!
Therefore, we must choose a value that is neither too low nor too high. For this project, we will use confidence as 0.6.