class_docstr: Matrix Transform abstract class. (Affine and Homography).
  Does all the transforms around the image /  center.
  
  Parameters
  ----------
  interpolation : str
      Interpolation mode.
  padding : str or None
      Padding Mode.
  p : float
      Probability of transform's execution.
  ignore_state : bool
      Whether to ignore the pre-calculated transformation or not. If False,
      then it will lead to an incorrect behavior when the objects are of different sizes.
      Should be used only when it is assumed that the image, mask and keypoints are of
      the same size.
class_docstr_tok: ["Matrix","Transform","abstract","class",".","(","Affine","and","Homography",")",".","Does","all","the","transforms","around","the","image","\/","center",".","Parameters","--","--","--","--","--","interpolation",":","str","Interpolation","mode",".","padding",":","str","or","None","Padding","Mode",".","p",":","float","Probability","of","transform","'s","execution",".","ignore_state",":","bool","Whether","to","ignore","the","pre-calculated","transformation","or","not",".","If","False",",","then","it","will","lead","to","an","incorrect","behavior","when","the","objects","are","of","different","sizes",".","Should","be","used","only","when","it","is","assumed","that","the","image",",","mask","and","keypoints","are","of","the","same","size","."]
code: def recompute_coordinate_frame(transform_matrix, width, height):
      coord_frame = np.array(
          [[0, 0, 1], [0, height, 1], [width, height, 1], [width, 0, 1]]
      )
      new_frame = np.dot(transform_matrix, coord_frame.T).T
      new_frame[:, 0] /= new_frame[:, -1]
      new_frame[:, 1] /= new_frame[:, -1]
      new_frame = new_frame[:, :-1]
      # Computing the new coordinates
  
      # If during the transform, we obtained negative coordinates, we have to move to the origin
      if np.any(new_frame[:, 0] < 0):
          new_frame[:, 0] += abs(new_frame[:, 0].min())
      if np.any(new_frame[:, 1] < 0):
          new_frame[:, 1] += abs(new_frame[:, 1].min())
  
      new_frame[:, 0] -= new_frame[:, 0].min()
      new_frame[:, 1] -= new_frame[:, 1].min()
      w_new = int(np.round(new_frame[:, 0].max()))
      h_new = int(np.round(new_frame[:, 1].max()))
  
      return h_new, w_new
  
imports: import copy
  import random
  from abc import ABCMeta, abstractmethod
  import cv2
  import numpy
  from solt.utils import Serializable
  from solt.constants import ALLOWED_INTERPOLATIONS, ALLOWED_PADDINGS
  from ._data import DataContainer, Keypoints
  from solt.utils import img_shape_checker, validate_parameter
label_desc: Use image node_id 6 for calling the MatrixTransform obj's underlying member method code with example usage: obj.recompute_coordinate_frame(transform_matrix, width, height) and returns: h_new,  w_new