docstr: Using the bbox, standard 2D gaussian map, returns Transformed 2d Gaussian map
docstr_tok: ["Using","the","bbox",",","standard","2D","gaussian","map",",","returns","Transformed","2d","Gaussian","map"]
code: def four_point_transform(self, bbox):
      """
      Using the bbox, standard 2D gaussian map, returns Transformed 2d Gaussian map
      """
      width, height = (
          np.max(bbox[:, 0]).astype(np.int32),
          np.max(bbox[:, 1]).astype(np.int32),
      )
      init_points = np.array(
          [
              [0, 0],
              [self.init_size, 0],
              [self.init_size, self.init_size],
              [0, self.init_size],
          ],
          dtype="float32",
      )
  
      M = cv2.getPerspectiveTransform(init_points, bbox)
      warped_gaussian_map = cv2.warpPerspective(
          self.gaussian_map, M, (width, height)
      )
      return warped_gaussian_map, width, height
  
file_path: EasyOCR/trainer/craft/data/gaussian.py
imports: import numpy
  import cv2
  from data.boxEnlarge import enlargebox
label_desc: Use image node_id 4 for calling the GaussianBuilder obj's underlying member method code with example usage: obj.four_point_transform(bbox) and returns: warped_gaussian_map,  width,  height