mirror of
https://github.com/iperov/DeepFaceLive
synced 2025-07-11 15:47:02 -07:00
change hsv args
This commit is contained in:
parent
fd0ee234b7
commit
b80860cca7
2 changed files with 4 additions and 4 deletions
|
@ -466,9 +466,9 @@ class ImageProcessor:
|
|||
"""
|
||||
apply HSV modification for BGR image
|
||||
|
||||
h_diff = [-360.0 .. 360.0]
|
||||
s_diff = [-1.0 .. 1.0]
|
||||
h_diff = [-1.0 .. 1.0]
|
||||
s_diff = [-1.0 .. 1.0]
|
||||
v_diff = [-1.0 .. 1.0]
|
||||
"""
|
||||
dtype = self.get_dtype()
|
||||
self.to_ufloat32()
|
||||
|
@ -481,7 +481,7 @@ class ImageProcessor:
|
|||
img = img.reshape( (N*H,W,C) )
|
||||
|
||||
h, s, v = cv2.split(cv2.cvtColor(img, cv2.COLOR_BGR2HSV))
|
||||
h = ( h + h_diff ) % 360
|
||||
h = ( h + h_diff*360.0 ) % 360
|
||||
|
||||
s += s_diff
|
||||
np.clip (s, 0, 1, out=s )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue