diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-07-16 17:58:55 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-07-16 17:58:55 +0200 |
| commit | 623a3751c619625a57578a71d859a7d0545ce5f6 (patch) | |
| tree | 86e3061f86513e0743d719ea1a27018519558807 /rpc | |
| parent | 4e544051e2312e19a61ee1917536886d864543d2 (diff) | |
img ops
Diffstat (limited to 'rpc')
| -rw-r--r-- | rpc/img_ops.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rpc/img_ops.py b/rpc/img_ops.py index 244f8eb..3dc52bc 100644 --- a/rpc/img_ops.py +++ b/rpc/img_ops.py @@ -19,6 +19,11 @@ def process_image(opt, data_opt, im): if data_opt.process_frac == 0: return img + if data_opt.transform != False: + (h, w) = img.shape[:2] + center = (w / 2, h / 2) + M = cv2.getRotationMatrix2D(center, data_opt.rotate, data_opt.scale) + img = cv2.warpAffine(img, M, (w, h)) if data_opt.hsl is True: processed = True hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) |
