Skip to content

Commit

Permalink
Merge pull request #78 from GitHubDragonFly/dev
Browse files Browse the repository at this point in the history
Update color.py
  • Loading branch information
jasmcaus authored Apr 1, 2023
2 parents 11ff378 + 73118ed commit 25e31cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions caer/transforms/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def adjust_hue(tens: Tensor, hue_factor:float) -> Tensor:
if input_mode in {"L", "1", "I", "F"}:
return np.array(tens)

h, s, v = tens.convert("hsv").split()
h, s, v = tens.convert("HSV").split()

np_h = np.array(h, dtype=np.uint8)

Expand All @@ -288,7 +288,7 @@ def adjust_hue(tens: Tensor, hue_factor:float) -> Tensor:
np_h += np.uint8(hue_factor * 255)
h = Image.fromarray(np_h, "L")

tens = Image.merge("hsv", (h, s, v)).convert(input_mode)
tens = Image.merge("HSV", (h, s, v)).convert(input_mode)

return to_tensor(tens, cspace=cspace)

Expand Down

0 comments on commit 25e31cd

Please sign in to comment.