This function is used to analyze the image received as input from the stage, for objects.
Alert: This block processes the image input and updates the values in the other functions hence it needs to be put inside loops while making projects.
Function Definition: analysestage()
This function is used to analyze the image received as input from the stage, for objects.
Alert: This block processes the image input and updates the values in the other functions hence it needs to be put inside loops while making projects.
sprite = Sprite('Tobi')
obj = ObjectDetection()
obj.enablebox()
sprite.gotoxy(-180, -110)
sprite.setsize(100)
obj.setthreshold(0.3)
obj.analysestage()
sprite.say(str(obj.detectedcount("person")) + " Person Detected at 0.3 Threshold", 2)
obj.setthreshold(0.5)
obj.analysestage()
sprite.say(str(obj.detectedcount("person")) + " Person Detected at 0.5 Threshold", 2)
obj.setthreshold(0.9)
obj.analysestage()
sprite.say(str(obj.detectedcount("person")) + " Person Detected at 0.9 Threshold", 2)
sprite = Sprite('Square Box')
obj = ObjectDetection()
obj.disablebox()
obj.setthreshold(0.5)
obj.analysestage()
sprite.gotoxy(0, 0)
sprite.setsize(100)
sprite.say(str(obj.count()) + " Object Detected", 2)
for object in range(1, obj.count() + 1):
sprite.setx(obj.x(object))
sprite.sety(obj.y(object))
sprite.setsize(obj.width(object))
sprite.say(obj.classname(object) + " with " + str(obj.confidence(object)), 2)
Copyright 2024 – Agilo Research Pvt. Ltd. All rights reserved – Terms & Condition | Privacy Policy