parameters: (frame)
return_statement: return th
docstring: Apply histogram equalization to an input frame, threshold it and return the (binary) result.
docstring_summary: Apply histogram equalization to an input frame, threshold it and return the (binary) result.
docstring_tokens: Apply histogram equalization to an input frame threshold it and return the ( binary ) result .
function: def get_binary_from_equalized_grayscale(frame):
      """
      Apply histogram equalization to an input frame, threshold it and return the (binary) result.
      """
      gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
  
      eq_global = cv2.equalizeHist(gray)
  
      _, th = cv2.threshold(eq_global, thresh=250, maxval=255, type=cv2.THRESH_BINARY)
  
      return th
function_tokens: def get_binary_from_equalized_grayscale ( frame ) : gray = cv2 . cvtColor ( frame , cv2 . COLOR_BGR2GRAY ) eq_global = cv2 . equalizeHist ( gray ) _ , th = cv2 . threshold ( eq_global , thresh = 250 , maxval = 255 , type = cv2 . THRESH_BINARY ) return th