def getAvgPosFromCenter(frame): COP = CalcCenterOfPos(frame) vecs = frameToArray(frame) return np.abs(vecs-COP).mean(axis=0)