def trackbar_update(_=None): global trackbars for k,v in trackbars.iteritems(): trackbars[k]['value'] = cv2.getTrackbarPos(v['label'], v['win_name'])