summaryrefslogtreecommitdiff
path: root/test-mogrify.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-15 04:37:49 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-15 04:37:49 +0200
commit567a7009bdec15eac9e6655a77b4c50ae4bf01d4 (patch)
treedb947ab60a03a7b3a1653f05300fe5591c1ad23f /test-mogrify.py
parentdcd5a47b00bdd589820025e995b6dedf3efad957 (diff)
testy
Diffstat (limited to 'test-mogrify.py')
-rw-r--r--test-mogrify.py8
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)