-
-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
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?
function adjustcontrast!(dst::AbstractArray{U}, img::AbstractArray{T}, factor; clamp=true) where {T, U}
map!(dst, img) do x
convert(U, clamp ? clamp01(x * factor) : x * factor)
end
end
Metadata
Metadata
Assignees
Labels
No labels