while 1: tracking.update() for obj in tracking.objects(): allobjs= allobjs.append(obj.xpos) allobjs.append(obj.ypos) allobjs.append(obj.xmot) allobjs.append(obj.ymot) allobjs.append(obj.sessionid) aobjlist.append(allobjs)
In the above snippet of code tracking.objects() returns a list of objects with above mentioned properties.
tracking.update() continuously updates obj attributes and adds new objects.
Our requirement was to have an Multi dimensional list in which objects with its values should be stored as individual list.
But the out put got is , where each xpos, ypos, xmot etc are created as individual lists for different objects.
How can this be reversed.
Edited 6 Years Ago by adarshcu: n/a