class_docstr: Convert an image from RGB to Lab.
  
  The image data is assumed to be in the range of :math:`[0, 1]`. Lab
  color is computed using the D65 illuminant and Observer 2.
  
  Returns:
      Lab version of the image.
  
  Shape:
      - image: :math:`(*, 3, H, W)`
      - output: :math:`(*, 3, H, W)`
  
  Examples:
      >>> input = torch.rand(2, 3, 4, 5)
      >>> lab = RgbToLab()
      >>> output = lab(input)  # 2x3x4x5
  
  Reference:
      [1] https://docs.opencv.org/4.0.1/de/d25/imgproc_color_conversions.html
  
      [2] https://www.easyrgb.com/en/math.php
  
      [3] https://github.com/torch/image/blob/dc061b98fb7e946e00034a5fc73e883a299edc7f/generic/image.c#L1467
class_docstr_tok: ["Convert","an","image","from","RGB","to","Lab",".","The","image","data","is","assumed","to","be","in","the","range","of",":","math",":","`","[","0",",","1","]","`",".","Lab","color","is","computed","using","the","D65","illuminant","and","Observer","2",".","Returns",":","Lab","version","of","the","image",".","Shape",":","-","image",":",":","math",":","`","(","*",",","3",",","H",",","W",")","`","-","output",":",":","math",":","`","(","*",",","3",",","H",",","W",")","`","Examples",":",">",">",">","input","=","torch.rand","(","2",",","3",",","4",",","5",")",">",">",">","lab","=","RgbToLab","(",")",">",">",">","output","=","lab","(","input",")","#","2x3x4x5","Reference",":","[","1","]","https",":","\/\/docs.opencv.org\/4.0.1\/de\/d25\/imgproc_color_conversions.html","[","2","]","https",":","\/\/www.easyrgb.com\/en\/math.php","[","3","]","https",":","\/\/github.com\/torch\/image\/blob\/dc061b98fb7e946e00034a5fc73e883a299edc7f\/generic\/image.c","#","L1467"]
code: def forward(self, image: torch.Tensor) -> torch.Tensor:
      return rgb_to_lab(image)
  
file_path: kornia/kornia/color/lab.py
imports: import torch
  from torch import nn
  from .rgb import linear_rgb_to_rgb, rgb_to_linear_rgb
  from .xyz import rgb_to_xyz, xyz_to_rgb
label_desc: Use image node_id 1 for calling the RgbToLab obj's underlying member method code with example usage: obj.forward(image) and returns: rgb_to_lab