class_docstr: Convert color space from RGB to LAB.
class_docstr_tok: ["Convert","color","space","from","RGB","to","LAB","."]
docstr: Convert color space from RGB to XYZ.
  
  Args:
     img(np.ndarray): Original RGB image.
  
  Return:
      img(np.ndarray): Converted XYZ image.
code: def rgb2xyz(self, rgb: np.ndarray) -> np.ndarray:
      """
      Convert color space from RGB to XYZ.
  
      Args:
         img(np.ndarray): Original RGB image.
  
      Return:
          img(np.ndarray): Converted XYZ image.
      """
      mask = rgb > 0.04045
      np.seterr(invalid="ignore")
      rgb = (((rgb + 0.055) / 1.055) ** 2.4) * mask + rgb / 12.92 * (
          1 - mask
      )
      rgb = np.nan_to_num(rgb)
      x = (
          0.412453 * rgb[0, :, :]
          + 0.357580 * rgb[1, :, :]
          + 0.180423 * rgb[2, :, :]
      )
      y = (
          0.212671 * rgb[0, :, :]
          + 0.715160 * rgb[1, :, :]
          + 0.072169 * rgb[2, :, :]
      )
      z = (
          0.019334 * rgb[0, :, :]
          + 0.119193 * rgb[1, :, :]
          + 0.950227 * rgb[2, :, :]
      )
      out = np.concatenate(
          (x[None, :, :], y[None, :, :], z[None, :, :]), axis=0
      )
      return out
  
imports: import random
  from typing import Callable, Union, List, Tuple
  import cv2
  import PIL
  import numpy
  import paddlehub.vision.functional
label_desc: Use image node_id 1 for calling the RGB2LAB obj's underlying member method code with example usage: obj.rgb2xyz(rgb) and returns: out