diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-21 03:09:53 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-21 03:09:53 +0200 |
| commit | 5f23a63e88f5130c6d694998203de9b5179a3ee4 (patch) | |
| tree | c5fd447cf5713d6d1eeaf989c58bc47ea136217b | |
| parent | ab975e418777a9e55c9defae9349cd8719363cd9 (diff) | |
un rato
| -rw-r--r-- | live-mogrify.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/live-mogrify.py b/live-mogrify.py index 6b90298..8166cda 100644 --- a/live-mogrify.py +++ b/live-mogrify.py @@ -38,11 +38,11 @@ def load_opt(): opt.serial_batches = True # no shuffle opt.no_flip = True # no flip - data_opt.tag = get_tag(data_opt) + data_opt.tag = get_tag(opt, data_opt) opt.render_dir = opt.results_dir + opt.name + "/" + tag + "/" return opt, data_opt -def get_tag(data_opt): +def get_tag(opt, data_opt): if data_opt.tag == '': d = datetime.now() tag = data_opt.tag = "{}_{}_{}".format( @@ -61,7 +61,7 @@ def load_first_frame(opt, data_opt): print("preload {}".format(opt.start_img)) A_img = Image.open(opt.start_img).convert('RGB') A_im = np.asarray(A_img) - A = process_image(A_im) + A = process_image(opt, data_opt, A_im) cv2.imwrite(start_img_path, A) numz = re.findall(r'\d+', os.path.basename(opt.start_img)) @@ -77,7 +77,7 @@ def load_first_frame(opt, data_opt): print("Sequence not found") return A_offset, A_im, A_dir -def process_image(im): +def process_image(opt, data_opt, im): img = im[:, :, ::-1].copy() processed = False @@ -198,7 +198,7 @@ def process_live_input(): # im = np.asarray(image_pil).astype('uint8') #print(im.shape, im.dtype) - next_img = process_image(next_im) + next_img = process_image(opt, data_opt, next_im) if opt.send_image == 'sequence': rpc_client.send_pil_image("frame_{:05d}.png".format(i+1), A_img) |
