Sepia#
Sepia multiplies the RGB channels of a (*, 3, H, W) image by a fixed matrix; rescale divides by the image’s
maximum.
Functions#
- kornia.color.sepia(input, rescale=True, eps=1e-6)[source]#
Apply the sepia filter to an RGB image.
out = sepia(input)multiplies the RGB channels of a(*, 3, H, W)image by a fixed sepia matrix. By default it then divides by the image’s largest output value.- Convention:
rescaleuses one maximum per image, over channels and pixels, so the tint is preserved.Without
rescalethe output is the raw matrix response and can exceed 1.
- Parameters:
- Return type:
- Returns:
Sepia image with shape
(*, 3, H, W).
See also
Sepia: the module form, withrescaleandepsstored.
Example
>>> from kornia.color import sepia >>> input = torch.ones(3, 1, 1) >>> sepia(input, rescale=False) tensor([[[1.3510]], [[1.2030]], [[0.9370]]])
Modules#
- class kornia.color.Sepia(rescale=True, eps=1e-6)[source]#
Apply the sepia filter with stored settings (module form).
filt = Sepia(rescale, eps)stores the settings, andout = filt(input)issepia()on a(*, 3, H, W)image.- Convention:
See the convention block of
sepia().
- Parameters:
See also
sepia(): the one-call form.
Example
>>> input = torch.ones(3, 1, 1) >>> Sepia(rescale=False)(input) tensor([[[1.3510]], [[1.2030]], [[0.9370]]])