code: def crop(img, w, h):
      center = np.array(img.shape) / 2
      x = center[1] - w / 2
      y = center[0] - h / 2
      crop_img = img[int(y) : int(y + h), int(x) : int(x + w)]
      crop_img = np.transpose(crop_img, (2, 0, 1))
      return crop_img
  
file_path: BigDL/python/orca/example/learn/openvino/predict.py
imports: from __future__ import print_function
  import argparse
  import numpy
  import time
  import cv2
  import glob
  import math
  from bigdl.orca.learn.openvino import Estimator
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 1 for calling a global function with example usage: crop(img, w, h) and returns: crop_img