This function returns the y position of the object detected. You can specify the object for which the value is needed. The position is mapped with the stage coordinates.

Function Definition: y(object = 1)
| Name | Type | Description | Expected Values | Default Value | 
|---|---|---|---|---|
| object | int | Object number for which the information is required. | 1-100 | 1 | 
This function returns the y position of the object detected. You can specify the object for which the value is needed. The position is mapped with the stage coordinates.

 
															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 2025 – Agilo Research Pvt. Ltd. All rights reserved – Terms & Condition | Privacy Policy
