def sit(img, path=None, name=""): if path is None: _count = get_count() path = '~/temp/no-use/images/%s_%d_%s.jpg' % (log.get_date_str(), _count, name) if type(img) == list: plt.show_images(images=img, path=path, show=False, axis_off=True, save=True) else: plt.imwrite(path, img) return path
def sit(img=None, format='rgb', path=None, name=""): if path is None: path = get_temp_path(name) if img is None: plt.save_image(path) return path if format == 'bgr': img = _img.bgr2rgb(img) if type(img) == list: plt.show_images(images=img, path=path, show=False, axis_off=True, save=True) else: plt.imwrite(path, img) return path
def sit(img=None, name=''): path = get_temp_path(name) if img is None: plt.save_image(path) return path img = _img.bgr2rgb(img) if type(img) == list: print "hehe" plt.show_images(images=img, path=path, show=False, axis_off=True, save=True) else: plt.imwrite(path, img) return path