diff options
Diffstat (limited to 'test-mogrify.py')
| -rw-r--r-- | test-mogrify.py | 8 |
1 files changed, 7 insertions, 1 deletions
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) |
