def setup_trackbars(range_filter):
    cv2.namedWindow('Thresholds', cv2.WINDOW_NORMAL)
    cv2.resizeWindow('Thresholds', 720, 720)
    for i in ['MIN', 'MAX']:
        v = (0 if (i == 'MIN') else 255)
        for j in range_filter:
            cv2.createTrackbar(('%s_%s' % (j, i)), 'Thresholds', v, 255, callback)
def setup_trackbars(range_filter):
    cv2.namedWindow('Thresholds', cv2.WINDOW_NORMAL)
    cv2.resizeWindow('Thresholds', 720, 720)
    for i in ['MIN', 'MAX']:
        v = (0 if (i == 'MIN') else 255)
        for j in range_filter:
            cv2.createTrackbar(('%s_%s' % (j, i)), 'Thresholds', v, 255, callback)