class
Emboss
extends
PhotometricTransform[TripletParams]Emboss(alpha: tuple[float, float] = (0.2, 0.5), strength: tuple[float, float] = (0.2, 0.7), p: float = 0.5)Emboss an image via a 3x3 directional gradient kernel (Albumentations Emboss).
Convolves the image with an asymmetric 3x3 kernel that highlights
the top-left to bottom-right gradient, producing a faux 3-D relief
effect. Blends the embossed result with the original using a
per-call alpha and a per-call strength that controls the
off-diagonal kernel weights.
Parameters
alpha(float, float)= (0.2, 0.5)Range from which the original / embossed blend weight is sampled
uniformly per call.
strength(float, float)= (0.2, 0.7)Range for the kernel off-diagonal magnitude; larger values give
a more pronounced relief.
pfloat= 0.5Probability of applying the transform.
Examples
>>> import lucid
>>> import lucid.utils.transforms as T
>>> tf = T.Emboss(alpha=(0.2, 0.5), strength=(0.2, 0.7), p=1.0)
>>> out = tf(T.Image(lucid.rand(3, 32, 32))).data
>>> tuple(out.shape)
(3, 32, 32)Used by 1
Constructors
1Instance methods
1Sample per-call random parameters for Emboss.
Parameters
imgTensorImage tensor; not inspected, carried through for dispatch.
Returns
TripletParamsCarries a (blend weight from alpha), b
(off-diagonal kernel magnitude from strength), and
c = 0.0 (unused — third slot kept for triplet
uniformity).