def main():
    img = imread("HJoceanSmall.png")
#     imshow(img)
    reduced_img = img
    start_time = time.time()
    i = 10
    while i > 0:
        seam = find_seam(reduced_img)
        reduced_img = remove_seam(reduced_img, seam)
#         imsave(str(i), reduced_img)
        i = i-1
    stop_time = time.time()
    plot_seam(reduced_img)
    show()
    print "Time taken :", stop_time - start_time
def plot_seam(img, seam=None):
    imshow(img)
    if seam is not None:
        c = arange(len(seam))
        plot(seam, c, "r")
    show()