Ok, so i've got one definition on my python code, that defines how to find the position of something in an array, then returns the list of all the places that those things are.
Then I've got another definition to find the accurate centroid of a position.
How do I link the 2? As in, for the first one, I get a list of different co-ordinates, how do I go about then placing those in the second definition, and hence find a more accurate position of the object in the array.
If this doesn't make sense I can try and explain it better, but I'm having trouble sending the various parts between the definitions. If I put a "known" set of coordinates in the second definition, then I can easily find the centroid and that works, but say definition 1 gives me 10 different positions/ points, how do I link these ten, one by one, into the second definition, giving me accurate positions, without making one big definition?