class_docstr: This is an auxiliary class that enables Video Stabilization for vidgear with minimalistic latency, and at the expense
  of little to no additional computational requirements.
  
  The basic idea behind it is to tracks and save the salient feature array for the given number of frames and then uses
  these anchor point to cancel out all perturbations relative to it for the incoming frames in the queue. This class relies
  heavily on **Threaded Queue mode** for error-free & ultra-fast frame handling.
docstr: An internal method that applies affine transformation to the given frame
  from previously calculated transformations
code: def __apply_transformations(self):
      """
      An internal method that applies affine transformation to the given frame
      from previously calculated transformations
      """
      # extract frame and its index from deque
      queue_frame = self.__frame_queue.popleft()
      queue_frame_index = self.__frame_queue_indexes.popleft()
  
      # create border around extracted frame w.r.t border_size
      bordered_frame = cv2.copyMakeBorder(
          queue_frame,
          top=self.__border_size,
          bottom=self.__border_size,
          left=self.__border_size,
          right=self.__border_size,
          borderType=self.__border_mode,
          value=[0, 0, 0],
      )
      alpha_bordered_frame = cv2.cvtColor(
          bordered_frame, cv2.COLOR_BGR2BGRA
      )  # create alpha channel
      # extract alpha channel
      alpha_bordered_frame[:, :, 3] = 0
      alpha_bordered_frame[
          self.__border_size : self.__border_size + self.__frame_height,
          self.__border_size : self.__border_size + self.frame_width,
          3,
      ] = 255
  
      # extracting Transformations w.r.t frame index
      dx = self.__frame_transforms_smoothed[
          queue_frame_index, 0
      ]  # x-axis
      dy = self.__frame_transforms_smoothed[
          queue_frame_index, 1
      ]  # y-axis
      da = self.__frame_transforms_smoothed[
          queue_frame_index, 2
      ]  # angle
  
      # building 2x3 transformation matrix from extracted transformations
      queue_frame_transform = np.zeros((2, 3), np.float32)
      queue_frame_transform[0, 0] = np.cos(da)
      queue_frame_transform[0, 1] = -np.sin(da)
      queue_frame_transform[1, 0] = np.sin(da)
      queue_frame_transform[1, 1] = np.cos(da)
      queue_frame_transform[0, 2] = dx
      queue_frame_transform[1, 2] = dy
  
      # Applying an affine transformation to the frame
      frame_wrapped = cv2.warpAffine(
          alpha_bordered_frame,
          queue_frame_transform,
          alpha_bordered_frame.shape[:2][::-1],
          borderMode=self.__border_mode,
      )
  
      # drop alpha channel
      frame_stabilized = frame_wrapped[:, :, :3]
  
      # crop and zoom
      if self.__crop_n_zoom:
          # crop stabilized frame
          frame_cropped = frame_stabilized[
              self.__crop_n_zoom : -self.__crop_n_zoom,
              self.__crop_n_zoom : -self.__crop_n_zoom,
          ]
          # zoom stabilized frame
          frame_stabilized = cv2.resize(
              frame_cropped,
              self.__frame_size[::-1],
              interpolation=self.__interpolation,
          )
  
      # finally return stabilized frame
      return frame_stabilized
  
file_path: vidgear/vidgear/gears/stabilizer.py
imports: import cv2
  import numpy
  import logging
  from collections import deque
  from .helper import logger_handler, check_CV_version, retrieve_best_interpolation, logcurr_vidgear_ver
label_desc: Use image node_id 5 for calling the Stabilizer obj's underlying member method code with example usage: obj.__apply_transformations() and returns: frame_stabilized