needs float32

This commit is contained in:
jh 2019-09-12 19:08:02 -07:00
commit 1ef2716293

View file

@ -148,7 +148,7 @@ def seamless_clone(source, target, mask):
def random_color_transform(image, seed=None):
image = cv2.cvtColor(image, cv2.COLOR_BGR2LAB)
image = cv2.cvtColor(image.astype(np.float32), cv2.COLOR_BGR2LAB)
M = special_ortho_group.rvs(3, 1, seed)
image = image.dot(M)
l, a, b = cv2.split(image)