class_docstr: This class contains all needed functions to work with faces in a frame
docstr: Extract 2 cheeks as the ROIs
  
  Args:
      face (cv2 image): face cropped from the original frame. In RGB format.
      shape (array): facial landmarks' co-ords in format of of tuples (x,y)
      
  Outputs:
      ROI1 (cv2 image): right-cheek pixels
      ROI2 (cv2 image): left-cheek pixels
docstr_tok: ["Extract","2","cheeks","as","the","ROIs","Args",":","face","(","cv2","image",")",":","face","cropped","from","the","original","frame",".","In","RGB","format",".","shape","(","array",")",":","facial","landmarks","'","co-ords","in","format","of","of","tuples","(","x",",","y",")","Outputs",":","ROI1","(","cv2","image",")",":","right-cheek","pixels","ROI2","(","cv2","image",")",":","left-cheek","pixels"]
code: def ROI_extraction(self, face, shape):
      """
      Extract 2 cheeks as the ROIs
  
      Args:
          face (cv2 image): face cropped from the original frame. In RGB format.
          shape (array): facial landmarks' co-ords in format of of tuples (x,y)
  
      Outputs:
          ROI1 (cv2 image): right-cheek pixels
          ROI2 (cv2 image): left-cheek pixels
      """
      if len(shape) == 68:
          ROI1 = face[
              shape[29][1] : shape[33][1],  # right cheek
              shape[54][0] : shape[12][0],
          ]
  
          ROI2 = face[
              shape[29][1] : shape[33][1],  # left cheek
              shape[4][0] : shape[48][0],
          ]
      else:
          ROI1 = face[
              int((shape[4][1] + shape[2][1]) / 2) : shape[4][
                  1
              ],  # right cheek
              shape[2][0] : shape[3][0],
          ]
  
          ROI2 = face[
              int((shape[4][1] + shape[2][1]) / 2) : shape[4][
                  1
              ],  # left cheek
              shape[1][0] : shape[0][0],
          ]
  
      return ROI1, ROI2
  
file_path: heart-rate-measurement-camera/new_update/face_utilities.py
imports: import cv2
  import numpy
  import dlib
  from imutils import face_utils
  import imutils
  from collections import OrderedDict
label_desc: Use image node_id 6 for calling the Face_utilities obj's underlying member method code with example usage: obj.ROI_extraction(face, shape) and returns: ROI1,  ROI2