Closed itan1 closed 1 year ago
The reason for the default clamping is that the default low-memory color type is RGB{N0f8}
which is represented under the hood as UInt8
s. When trying to convert a number outside the inveral [0, 1]
back to that representation, an error is thrown.
Happy to accept a PR adding the clamp = true
flag for AdjustBrightness
and AdjustContrast
:)
Currently the output images are clamped with
clamp01
in AdjustBrightness (here) and AdjustContrast (here).I am working with medical data with a different grayscale range than [0,1] so I would like to use the augmentation methods but without clamping. Was there a specific reason to use the clamping? Can I add an optional clamp flag like below?