Skip to content
class

Equalize

extends_NoParamsPhotometricTransform[Empty]
Equalize(p: float = 0.5)

Per-channel histogram equalization (Albumentations Equalize).

Computes a cumulative distribution per channel and remaps intensities so the output histogram is as flat as possible. Useful for stretching contrast on dim or hazy images. Delegates to functional.equalize, which handles the uint8 round-trip and per-channel CDF construction.

Parameters

pfloat= 0.5
Probability of applying the transform.

Examples

>>> import lucid
>>> import lucid.utils.transforms as T
>>> tf = T.Equalize(p=1.0)
>>> out = tf(T.Image(lucid.rand(3, 32, 32))).data
>>> tuple(out.shape)
(3, 32, 32)

Used by 1

Constructors

1
dunder

__init__

→None
__init__(p: float = 0.5)

Instance methods

1
fn

make_params

→Emptyfrom _NoParams
make_params(img: Tensor)

Dunder methods

1