From 567a7009bdec15eac9e6655a77b4c50ae4bf01d4 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 15 May 2018 04:37:49 +0200 Subject: testy --- test-mogrify.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test-mogrify.py') diff --git a/test-mogrify.py b/test-mogrify.py index 373051a..1159c00 100644 --- a/test-mogrify.py +++ b/test-mogrify.py @@ -166,9 +166,15 @@ if __name__ == '__main__': # im = np.asarray(image_pil).astype('uint8') #print(im.shape, im.dtype) - # src_img = im[:, :, ::-1].copy() + src_img = im[:, :, ::-1].copy() img = process_image(im) + frac_a = data_opt.process_frac + frac_b = 1.0 - frac_a + array_a = np.multiply(src_img.astype('float64'), frac_a) + array_b = np.multiply(img.astype('float64'), frac_b) + img = np.add(array_a, array_b).astype('uint8') + cv2.imwrite(tmp_path, img) os.rename(tmp_path, edges_path) -- cgit v1.2.3-70-g09d2