docstr: Jitter text components attributes.
  
  Args:
      comp_attribs (ndarray): The text component attributes.
      jitter_level (float): The jitter level of text components
          attributes.
  
  Returns:
      jittered_comp_attribs (ndarray): The jittered text component
          attributes (x, y, h, w, cos, sin, comp_label).
docstr_tok: ["Jitter","text","components","attributes",".","Args",":","comp_attribs","(","ndarray",")",":","The","text","component","attributes",".","jitter_level","(","float",")",":","The","jitter","level","of","text","components","attributes",".","Returns",":","jittered_comp_attribs","(","ndarray",")",":","The","jittered","text","component","attributes","(","x",",","y",",","h",",","w",",","cos",",","sin",",","comp_label",")","."]
code: def jitter_comp_attribs(self, comp_attribs, jitter_level):
      """Jitter text components attributes.
  
      Args:
          comp_attribs (ndarray): The text component attributes.
          jitter_level (float): The jitter level of text components
              attributes.
  
      Returns:
          jittered_comp_attribs (ndarray): The jittered text component
              attributes (x, y, h, w, cos, sin, comp_label).
      """
  
      assert comp_attribs.shape[1] == 7
      assert comp_attribs.shape[0] > 0
      assert isinstance(jitter_level, float)
  
      x = comp_attribs[:, 0].reshape((-1, 1))
      y = comp_attribs[:, 1].reshape((-1, 1))
      h = comp_attribs[:, 2].reshape((-1, 1))
      w = comp_attribs[:, 3].reshape((-1, 1))
      cos = comp_attribs[:, 4].reshape((-1, 1))
      sin = comp_attribs[:, 5].reshape((-1, 1))
      comp_labels = comp_attribs[:, 6].reshape((-1, 1))
  
      x += (
          (np.random.random(size=(len(comp_attribs), 1)) - 0.5)
          * (h * np.abs(cos) + w * np.abs(sin))
          * jitter_level
      )
      y += (
          (np.random.random(size=(len(comp_attribs), 1)) - 0.5)
          * (h * np.abs(sin) + w * np.abs(cos))
          * jitter_level
      )
  
      h += (
          (np.random.random(size=(len(comp_attribs), 1)) - 0.5)
          * h
          * jitter_level
      )
      w += (
          (np.random.random(size=(len(comp_attribs), 1)) - 0.5)
          * w
          * jitter_level
      )
  
      cos += (
          (np.random.random(size=(len(comp_attribs), 1)) - 0.5)
          * 2
          * jitter_level
      )
      sin += (
          (np.random.random(size=(len(comp_attribs), 1)) - 0.5)
          * 2
          * jitter_level
      )
  
      scale = np.sqrt(1.0 / (cos**2 + sin**2 + 1e-8))
      cos = cos * scale
      sin = sin * scale
  
      jittered_comp_attribs = np.hstack(
          [x, y, h, w, cos, sin, comp_labels]
      )
  
      return jittered_comp_attribs
  
imports: import cv2
  import numpy
  from ppocr.utils.utility import check_install
  from numpy.linalg import norm
label_desc: Use image node_id 15 for calling the DRRGTargets obj's underlying member method code with example usage: obj.jitter_comp_attribs(comp_attribs, jitter_level) and returns: jittered_comp_attribs