Page 120 - CG_v2.1_flipBooks_class_4
P. 120
Step 2 Go to AI Learning → Object Detection and check out the following blocks:
l Load Image block allows user to either click
picture through camera or load local image from
desktop.
l Get object count block is used to detect and
count the selected object.
l Show Image with border block is used to show
detected image with and without border on
output window.
Step 3 Drag and drop the Load Image block.
Step 4 Attach if-do block from Logic category.
Step 5 Add Get object count block inside if-do block and change object to
aeroplane using arrow button in the block.
Step 6 Add Show Image with border block.
Step 7 Add print block from Output category and add String block
from the Data Types category inside print then write
“Aeroplane”.
Step 8 Expand the ‘if - do’ block by clicking on icon. Add else
block to if block.
Step 9 In else attach one more print block and string block then
write ”Image not matched”. Following is the complete
code.
Step 10 Now, click on Load Image block and new window will
appear, then click on Browse button.
Step 11 Choose your file from your computer and then the
selected image will appear as shown here.
Step 12 Click on Submit button.
Step 13 Click on Run button.
118 Computer Genius (V2.1)-IV

