def use(pkgname):
    global have_opencv, cv2, cv2_resize

    if pkgname == 'opencv':
        import cv2
        have_opencv = True
        cv2_resize = {
            'nearest': cv2.INTER_NEAREST,
            'linear' : cv2.INTER_LINEAR,
            'area'   : cv2.INTER_AREA,
            'bicubic': cv2.INTER_CUBIC,
            'lanczos': cv2.INTER_LANCZOS4,
            }
        if not 'nearest' in interpolation_methods:
            interpolation_methods.extend(cv2_resize.keys())
            interpolation_methods.sort()
dataset/ETHPy150Open ejeschke/ginga/ginga/trcalc.py/use/original