summaryrefslogtreecommitdiff
path: root/rpc/img_ops.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-07-16 15:43:54 +0200
committerJules Laplace <julescarbon@gmail.com>2018-07-16 15:43:54 +0200
commit03ddc67962f4c1d709c8f61bfa96bf5d8117948d (patch)
treee4cdf34ee983f1b2e8cec7ae6be6d2b620375c3e /rpc/img_ops.py
parentb353c12a7d8df5946273d87f116052233f59b673 (diff)
flags for hsl transform
Diffstat (limited to 'rpc/img_ops.py')
-rw-r--r--rpc/img_ops.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/rpc/img_ops.py b/rpc/img_ops.py
index 39d79d8..28efd03 100644
--- a/rpc/img_ops.py
+++ b/rpc/img_ops.py
@@ -19,6 +19,15 @@ def process_image(opt, data_opt, im):
if data_opt.process_frac == 0:
return img
+ if data_opt.hsl is True:
+ processed = True
+ hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
+ h, s, v = cv2.split(hsv)
+ h += data_opt.hue
+ s += data_opt.saturation
+ v += data_opt.luminosity
+ hslimg = cv2.merge((h,s,v))
+ img = cv2.cvtColor(hslimg, cv2.COLOR_HSV2BGR)
if data_opt.clahe is True:
processed = True
lab = cv2.cvtColor(img, cv2.COLOR_BGR2LAB)