Skip to content

Commit

Permalink
Fixing typo (EIDOSLAB#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
bertrandchauveau authored Dec 1, 2024
1 parent b927fc6 commit f4c9495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchstain/torch/utils/rgb2lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def rgb2lab(rgb):
mask = arr > 0.008856
not_mask = torch.logical_not(mask)
arr.masked_scatter_(mask, torch.pow(torch.masked_select(arr, mask), 1 / 3))
arr.masked_scatter_(not_mask, 7.787 * torch.masked_select(arr, not_mask) + 16 / 166)
arr.masked_scatter_(not_mask, 7.787 * torch.masked_select(arr, not_mask) + 16 / 116)

# get each channel as individual tensors
x, y, z = arr[0], arr[1], arr[2]
Expand Down

0 comments on commit f4c9495

Please sign in to comment.