def scale_dtu_input(images, cams, depth_image=None, scale=1):
    ' resize input to fit into the memory '
    for view in range(len(images)):
        images[view] = scale_image(images[view], scale=scale)
        cams[view] = scale_camera(cams[view], scale=scale)
    if (depth_image is None):
        return (images, cams)
    else:
        depth_image = scale_image(depth_image, scale=scale, interpolation='nearest')
        return (images, cams, depth_image)
resize input to fit into the memory
def scale_dtu_input(images, cams, depth_image=None, scale=1):
    '  '
    for view in range(len(images)):
        images[view] = scale_image(images[view], scale=scale)
        cams[view] = scale_camera(cams[view], scale=scale)
    if (depth_image is None):
        return (images, cams)
    else:
        depth_image = scale_image(depth_image, scale=scale, interpolation='nearest')
        return (images, cams, depth_image)