class_docstr: dataset Augmentation for SiamRPN tracking.
  
  Parameters
  ----------
  shift : int
      length of template augmentation shift
  scale : float
      template augmentation scale ratio
  blur : float
      template augmentation blur ratio
  flip : float
      template augmentation flip ratio
  color : float
      template augmentation color ratio
class_docstr_tok: ["dataset","Augmentation","for","SiamRPN","tracking",".","Parameters","--","--","--","--","--","shift",":","int","length","of","template","augmentation","shift","scale",":","float","template","augmentation","scale","ratio","blur",":","float","template","augmentation","blur","ratio","flip",":","float","template","augmentation","flip","ratio","color",":","float","template","augmentation","color","ratio"]
docstr: crop image roi size.
  
  Parameters
  ----------
  image : np.array
      image
  bbox : list or np.array
      bbox coordinate，like (xmin,ymin,xmax,ymax)
  out_sz : int
      size after crop
  
  Return:
      image after crop
docstr_tok: ["crop","image","roi","size",".","Parameters","--","--","--","--","--","image",":","np.array","image","bbox",":","list","or","np.array","bbox","coordinate\uff0clike","(","xmin",",","ymin",",","xmax",",","ymax",")","out_sz",":","int","size","after","crop","Return",":","image","after","crop"]
code: def _crop_roi(self, image, bbox, out_sz, padding=(0, 0, 0)):
      """crop image roi size.
  
      Parameters
      ----------
      image : np.array
          image
      bbox : list or np.array
          bbox coordinate，like (xmin,ymin,xmax,ymax)
      out_sz : int
          size after crop
  
      Return:
          image after crop
      """
      bbox = [float(x) for x in bbox]
      a = (out_sz - 1) / (bbox[2] - bbox[0])
      b = (out_sz - 1) / (bbox[3] - bbox[1])
      c = -a * bbox[0]
      d = -b * bbox[1]
      mapping = np.array([[a, 0, c], [0, b, d]]).astype(np.float)
      crop = self.cv2.warpAffine(
          image,
          mapping,
          (out_sz, out_sz),
          borderMode=self.cv2.BORDER_CONSTANT,
          borderValue=padding,
      )
      return crop
  
file_path: gluon-cv/gluoncv/data/transforms/track.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import numpy
  from gluoncv.utils.filesystem import try_import_cv2
  from gluoncv.model_zoo.siamrpn.siamrpn_tracker import corner2center, center2corner
  from gluoncv.model_zoo.siamrpn.siamrpn_tracker import Center, Corner
label_desc: Use image node_id 3 for calling the SiamRPNaugmentation obj's underlying member method code with example usage: obj._crop_roi(image, bbox, out_sz, padding) and returns: crop